voltdbjruby 0.5.0-java → 0.8.0-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +31 -5
- data/CHANGELOG.md +18 -1
- data/Gemfile +1 -1
- data/README.md +16 -5
- data/bin/console +2 -1
- data/bin/setup +1 -1
- data/lib/org/voltdb/voltdbclient/8.3/voltdbclient-8.3.jar +0 -0
- data/lib/voltdb/callbacks.rb +41 -0
- data/lib/voltdb/client.rb +117 -103
- data/lib/voltdb/version.rb +1 -1
- data/lib/voltdbjruby_jars.rb +2 -2
- data/tasks/vendor.rake +6 -0
- data/voltdb.gemspec +4 -3
- metadata +20 -5
- data/lib/org/voltdb/voltdbclient/6.8/voltdbclient-6.8.jar +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5cbe777d642a00a8f738f2678372c54fdbafcff2
|
4
|
+
data.tar.gz: 2fc60efceefff2e4bb98eedd7eaf44b991d46ad0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c37317a4a428717a47a50b75d41fc63dc11b7ea8d73cddeead34864984348d1d69d21a1502d146290f73c6bc24a6fff3c645a40a843248e16d4de55e23860d5
|
7
|
+
data.tar.gz: a85faea4820fb2a14ad8f81ae6aeaa2995890d6ae5a153282f5da01e6ab103a7ef53b47553a183854e3e2ce276ddd5d70ca7d7aabceeee49e3f6d47186d78b0d
|
data/.travis.yml
CHANGED
@@ -1,12 +1,38 @@
|
|
1
|
-
|
1
|
+
language: ruby
|
2
2
|
sudo: false
|
3
3
|
|
4
|
-
language: ruby
|
5
4
|
cache: bundler
|
5
|
+
|
6
|
+
before_install:
|
7
|
+
- gem update --system
|
8
|
+
- gem --version
|
9
|
+
- gem install bundler --no-document
|
10
|
+
- bundle --version
|
11
|
+
|
12
|
+
install: bin/setup
|
13
|
+
script: bundle exec rake
|
14
|
+
|
15
|
+
env: JRUBY_OPTS="$JRUBY_OPTS --debug"
|
16
|
+
|
6
17
|
rvm:
|
7
|
-
- jruby
|
18
|
+
- jruby
|
19
|
+
- jruby-9.1
|
20
|
+
|
8
21
|
jdk:
|
9
22
|
- openjdk8
|
10
23
|
|
11
|
-
|
12
|
-
|
24
|
+
branches:
|
25
|
+
only:
|
26
|
+
- master
|
27
|
+
|
28
|
+
notifications:
|
29
|
+
email:
|
30
|
+
- r-and-d@slack.full360.com
|
31
|
+
|
32
|
+
deploy:
|
33
|
+
provider: rubygems
|
34
|
+
api_key:
|
35
|
+
secure: WnxCak7F22vXEazWjd3n1Hij3kmOyZE2+w0iPgruDV8b8eO/WKnp3RAyoJD5d0pg6rrAOtTMX81o0z16/ZcWzi9pRsWRHmCiGe8laCuKymCFwhDdWJLpIfggbNx9lJ5f4EVE9MCbqvZpPSJakTjk9AQvdD6wD+TnHC4qn8BvP1GSbcL1Hd899jVL0BM3l18mrtHMEOa7QJiU51odrs1b9VhtUuJpLJ2T23VIpwbaFuci6pS7VTuRT7e2tmQOQVbC/kLkzND/x+hwWIUxhrI0rkMeIisBnx2TQkOLOfWmiPBgC1M4tFtW6XVfV+Ol/EH0C2/jWlyqjG+u9/TEmPDufrWVxdy4s4hfIgA2FG/lYqqGf9GLMPfOZGR+pnq7lPE2b9yZfxwTPqdf+NxQM6JeDc9k7IfXLZ9dodQZlQDZ8ubdeeQVmjAIfckHddX8TmrN+qAuS2DnqxzO19AAD/+9VNz5Ogg3344SbajMIeo2aZNHSYGxioK49WUxRYrA4bpNH1eixpUkZDhuwUiuna95DM7cZK9d2XQDAQYQ+vN4xJhI1u5LjYW5zrGiUW1uWqblQXcfDfLwvkjsTaWZ8R/mPaKjnj2ax4PADckisF5SdNnyUu288ytjS/YgAbbS9aasL6d4KjDMJ9b7oGHVZJihmoDck3vNxLMdCoP3SGahIsA=
|
36
|
+
on:
|
37
|
+
branch: master
|
38
|
+
tags: true
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,23 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
##
|
3
|
+
## 0.8.0
|
4
|
+
|
5
|
+
- Update the wrapper client to VoltDB 8.3
|
6
|
+
[#9](https://github.com/full360/voltdb-client-jruby/pull/9)
|
7
|
+
- Revert remove `pry` as a development dependency
|
8
|
+
- Update the voltdbclient jar to version 8.3
|
9
|
+
- Remove deprecated `update_application_catalog`
|
10
|
+
- Add more delegate methods including some deprecated ones
|
11
|
+
- Add new `BulkLoaderSuccessCallback`
|
12
|
+
- Update `get_new_bulk_loader` with new signature. This is a breaking change as
|
13
|
+
the method now receives two Procs instead of one block
|
14
|
+
- Remove intermediate object creation where possible
|
15
|
+
- Fix examples to make them work with version 8.3
|
16
|
+
- Add more code YARD comments
|
17
|
+
- Update Travis CI to work with JRuby 9.2 and 9.1 and also deploy on tags
|
18
|
+
[#13](https://github.com/full360/voltdb-client-jruby/pull/13)
|
19
|
+
|
20
|
+
## 0.5.0
|
4
21
|
|
5
22
|
- Remove `pry` as a development dependency
|
6
23
|
- Add the examples dir with the Hello World example
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -5,7 +5,7 @@ A thin wrapper around the VoltDB Java client.
|
|
5
5
|
## Versions
|
6
6
|
|
7
7
|
We've decided that vendoring the `voltdbclient-x.x.jar` in the Gem as a
|
8
|
-
dependency is the right way to do it. We are using VoltDB
|
8
|
+
dependency is the right way to do it. We are using VoltDB 8.3 and for that
|
9
9
|
reason that's the one that's vendored. We are open on doing a different thing if
|
10
10
|
it's the right solution.
|
11
11
|
|
@@ -26,6 +26,16 @@ Or install it yourself as:
|
|
26
26
|
|
27
27
|
$ gem install voltdbjruby
|
28
28
|
|
29
|
+
## Vendor
|
30
|
+
|
31
|
+
Installing and vendor jar dependencies from maven using `jar-dependencies` gem
|
32
|
+
and the `rake` task.
|
33
|
+
|
34
|
+
To update the vendored jar dependencies we use a new `rake` task called `vendor`
|
35
|
+
that will download jars from Maven and vendor them in the `lib/` directory.
|
36
|
+
|
37
|
+
bundle exec rake vendor
|
38
|
+
|
29
39
|
## Usage
|
30
40
|
|
31
41
|
### Basic example
|
@@ -108,10 +118,11 @@ also run `bin/console` for an interactive prompt that will allow you to
|
|
108
118
|
experiment.
|
109
119
|
|
110
120
|
To install this gem onto your local machine, run `bundle exec rake install`. To
|
111
|
-
release a new version, update the version number in `version.rb
|
112
|
-
`bundle exec rake release`, which will create a git tag for
|
113
|
-
git commits and tags, and push the `.gem` file to
|
114
|
-
[rubygems.org](https://rubygems.org).
|
121
|
+
release a new version, update the version number in `version.rb`. If you have
|
122
|
+
ownership rights run `bundle exec rake release`, which will create a git tag for
|
123
|
+
the version, push git commits and tags, and push the `.gem` file to
|
124
|
+
[rubygems.org](https://rubygems.org). If you don't have create the git tags
|
125
|
+
manually and push them, Travis CI will make the rest happen.
|
115
126
|
|
116
127
|
## Contributing
|
117
128
|
|
data/bin/console
CHANGED
data/bin/setup
CHANGED
Binary file
|
data/lib/voltdb/callbacks.rb
CHANGED
@@ -7,6 +7,11 @@ module Voltdb
|
|
7
7
|
@block = block
|
8
8
|
end
|
9
9
|
|
10
|
+
# Implementation of callback to be provided by client applications
|
11
|
+
#
|
12
|
+
# @param client_response [Java::OrgVoltdbClient::ClientResponse] response
|
13
|
+
# to the stored procedure invocation this callback is associated with
|
14
|
+
# @raise exceptions from the caller method
|
10
15
|
def client_callback(client_response)
|
11
16
|
client_response.extend(ClientResponseUtils)
|
12
17
|
@block.call(client_response)
|
@@ -22,12 +27,41 @@ module Voltdb
|
|
22
27
|
@block = block
|
23
28
|
end
|
24
29
|
|
30
|
+
# Invoked by the VoltBulkLoader when a insertRow() fails
|
31
|
+
#
|
32
|
+
# @param row_handle parameter received in the insertRow()
|
33
|
+
# @param field_list [Array] array of row objects that were processed
|
34
|
+
# @param client_response [Java::OrgVoltdbClient::ClientResponse] response
|
35
|
+
# generated by VoltDB indicating the type of failure that occurred
|
36
|
+
# @raise exceptions from the caller method
|
25
37
|
def failure_callback(row_handle, field_list, client_response)
|
26
38
|
client_response.extend(ClientResponseUtils)
|
27
39
|
@block.call(row_handle, field_list.to_ary, client_response)
|
28
40
|
end
|
29
41
|
end
|
30
42
|
|
43
|
+
class BulkLoaderSuccessCallback
|
44
|
+
java_import "org.voltdb.client.VoltBulkLoader.BulkLoaderSuccessCallback"
|
45
|
+
include Java::OrgVoltdbClient::ClientResponse
|
46
|
+
include Java::OrgVoltdbClientVoltBulkLoader::BulkLoaderSuccessCallback
|
47
|
+
|
48
|
+
def initialize(&block)
|
49
|
+
@block = block
|
50
|
+
end
|
51
|
+
|
52
|
+
# Callback for successful row import. Callers are reponsible for managing
|
53
|
+
# their own exception reporting
|
54
|
+
#
|
55
|
+
# @param row_handle parameter received in the insertRow()
|
56
|
+
# @param client_response [Java::OrgVoltdbClient::ClientResponse] response
|
57
|
+
# generated by VoltDB indicating success
|
58
|
+
# @raise exceptions from the caller method
|
59
|
+
def success(row_handle, client_response)
|
60
|
+
client_response.extend(ClientResponseUtils)
|
61
|
+
@block.call(row_handle, client_response)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
31
65
|
class AllPartitionProcCallback
|
32
66
|
java_import Java::OrgVoltdbClient::ClientResponseWithPartitionKey
|
33
67
|
include Java::OrgVoltdbClient::AllPartitionProcedureCallback
|
@@ -36,6 +70,13 @@ module Voltdb
|
|
36
70
|
@block = block
|
37
71
|
end
|
38
72
|
|
73
|
+
# Implementation of callback to be provided by client applications
|
74
|
+
#
|
75
|
+
# @param client_response_with_partition_key
|
76
|
+
# [Java::OrgVoltdbClient::AllPartitionProcedureCallback] responses for
|
77
|
+
# each partition to the stored procedure invocation this callback is
|
78
|
+
# associated with
|
79
|
+
# @raise exceptions from the caller method
|
39
80
|
def client_callback(client_response_with_partition_key)
|
40
81
|
response = client_response_with_partition_key.map do |partition|
|
41
82
|
partition.response.extend(ClientResponseUtils)
|
data/lib/voltdb/client.rb
CHANGED
@@ -16,33 +16,69 @@ module Voltdb
|
|
16
16
|
# @param config Voltdb::ClientConfig
|
17
17
|
# @return Voltdb::Client
|
18
18
|
def self.create_client(config)
|
19
|
-
|
20
|
-
|
21
|
-
self.new(client)
|
19
|
+
new(ClientFactory.create_client(config))
|
22
20
|
end
|
23
21
|
|
24
22
|
def initialize(java_client)
|
25
23
|
@java_client = java_client
|
26
24
|
end
|
27
25
|
|
26
|
+
# The method uses system procedure @GetPartitionKeys to get a set of
|
27
|
+
# partition values and then execute the stored procedure one partition at a
|
28
|
+
# time, and return an aggregated response. If a block is passed to the
|
29
|
+
# method an asyncronous call will be made
|
30
|
+
#
|
31
|
+
# @param proc_name [String] proc_name the stored procedure name
|
32
|
+
# @param *param [Array<Object>] a list of params
|
33
|
+
# @yield [response] async response that will be invoked with procedure
|
34
|
+
# results
|
35
|
+
# @return [ClientResponseWithPartitionKey, true, false] VoltDB client
|
36
|
+
# response with partition key if the procedure was called synchronously,
|
37
|
+
# else will return true if the procedure was properly queued or false if
|
38
|
+
# it was not
|
39
|
+
# @raise [ProcCallException, NoConnectionsException, IOException]
|
40
|
+
# ProcCallException will be returned if called synchronously
|
41
|
+
def call_all_partition_procedure(proc_name, *params, &block)
|
42
|
+
if block_given?
|
43
|
+
java_client.call_all_partition_procedure(
|
44
|
+
AllPartitionProcCallback.new(&block),
|
45
|
+
proc_name,
|
46
|
+
*params_to_java_objects(*params)
|
47
|
+
)
|
48
|
+
else
|
49
|
+
java_client.call_all_partition_procedure(
|
50
|
+
proc_name,
|
51
|
+
*params_to_java_objects(*params)
|
52
|
+
).map do |partition|
|
53
|
+
partition.response.extend(ClientResponseUtils)
|
54
|
+
partition
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
28
59
|
# Invokes a voltdb stored procedure based on its procedure name, a list of
|
29
60
|
# params and a block only if an asynchronous call is required
|
30
61
|
#
|
31
62
|
# @param proc_name [String] the stored procedure name
|
32
63
|
# @param *params [Array<Object>] a list of params
|
33
|
-
# @
|
64
|
+
# @yield [response] async response that will be invoked with procedure
|
65
|
+
# results
|
66
|
+
# @return [Java::OrgVoltdbClient::ClientResponse, true, false] VoltDB
|
34
67
|
# client response if the procedure was called synchronously, else will
|
35
68
|
# return true if the procedure was properly queued or false if it was not
|
36
69
|
# @raise [ProcCallException, NoConnectionsException, IOException]
|
37
70
|
# ProcCallException will be returned if called synchronously
|
38
71
|
def call_procedure(proc_name, *params, &block)
|
39
72
|
if block_given?
|
40
|
-
|
41
|
-
|
73
|
+
java_client.call_procedure(
|
74
|
+
ProcCallback.new(&block),
|
75
|
+
proc_name,
|
76
|
+
*params_to_java_objects(*params)
|
77
|
+
)
|
42
78
|
else
|
43
|
-
|
44
|
-
|
45
|
-
|
79
|
+
java_client.call_procedure(proc_name, *params_to_java_objects(*params)).tap do |resp|
|
80
|
+
resp.extend(ClientResponseUtils)
|
81
|
+
end
|
46
82
|
end
|
47
83
|
end
|
48
84
|
|
@@ -53,71 +89,39 @@ module Voltdb
|
|
53
89
|
# @param query_timeout [Fixnum] the stored procedure timeout
|
54
90
|
# @param proc_name [String] the stored procedure name
|
55
91
|
# @param *params [Array<Object>] a list of params
|
56
|
-
# @
|
92
|
+
# @yield [response] async response that will be invoked with procedure
|
93
|
+
# results
|
94
|
+
# @return [Java::OrgVoltdbClient::ClientResponse, true, false] Voltdb
|
57
95
|
# client response if the procedure was called synchronously, else will
|
58
96
|
# return true if the procedure was properly queued or false if it was not
|
59
97
|
# @raise [ProcCallException, NoConnectionsException, IOException]
|
60
98
|
# ProcCallException will be returned if called synchronously
|
61
99
|
def call_procedure_with_timeout(query_timeout, proc_name, *params, &block)
|
62
100
|
if block_given?
|
63
|
-
|
64
|
-
|
101
|
+
java_client.call_procedure_with_timeout(
|
102
|
+
ProcCallback.new(&block),
|
103
|
+
query_timeout,
|
104
|
+
proc_name,
|
105
|
+
*params_to_java_objects(*params)
|
106
|
+
)
|
65
107
|
else
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
# catalog file into a byte array in Java code, then calling call_procedure
|
74
|
-
# with "@UpdateApplicationCatalog" as the procedure name, followed by they
|
75
|
-
# bytes of the catalog and the string value of the deployment file. If a
|
76
|
-
# block is passed to the method an asyncronous call will be made
|
77
|
-
#
|
78
|
-
# @param catalog_path [String] the path to the voltdb catalog
|
79
|
-
# @param deployment_path [String] deployment_path the path to the
|
80
|
-
# deployment.xml file
|
81
|
-
# @return [Java::OrgVoltdbClient::ClientResponse, True, False] Voltdb
|
82
|
-
# client response if the procedure was called synchronously, else will
|
83
|
-
# return true if the procedure was properly queued or false if it was not
|
84
|
-
# @raise [ProcCallException, NoConnectionsException, IOException]
|
85
|
-
# ProcCallException will be returned if called synchronously
|
86
|
-
def update_application_catalog(catalog_path, deployment_path, &block)
|
87
|
-
if block_given?
|
88
|
-
cb = ProcCallback.new(&block)
|
89
|
-
java_client.update_application_catalog(cb, catalog_path, deployment_path)
|
90
|
-
else
|
91
|
-
response = java_client.update_application_catalog(catalog_path, deployment_path)
|
92
|
-
response.extend(ClientResponseUtils)
|
93
|
-
response
|
108
|
+
java_client.call_procedure_with_timeout(
|
109
|
+
query_timeout,
|
110
|
+
proc_name,
|
111
|
+
*params_to_java_objects(*params)
|
112
|
+
).tap do |resp|
|
113
|
+
resp.extend(ClientResponseUtils)
|
114
|
+
end
|
94
115
|
end
|
95
116
|
end
|
96
117
|
|
97
|
-
#
|
98
|
-
#
|
99
|
-
# then calling call_procedure with "@UpdateClasses" as the procedure name,
|
100
|
-
# followed by the bytes of the jarfile and a string containing a
|
101
|
-
# comma-separates list of classes to delete from the catalog.If a block is
|
102
|
-
# passed to the method an asyncronous call will be made
|
118
|
+
# Get the list of VoltDB server hosts that this client has open TCP
|
119
|
+
# connections to
|
103
120
|
#
|
104
|
-
# @
|
105
|
-
#
|
106
|
-
|
107
|
-
|
108
|
-
# client response if the procedure was called synchronously, else will
|
109
|
-
# return true if the procedure was properly queued or false if it was not
|
110
|
-
# @raise [ProcCallException, NoConnectionsException, IOException]
|
111
|
-
# ProcCallException will be returned if called synchronously
|
112
|
-
def update_classes(jar_path, classes_to_delete, &block)
|
113
|
-
if block_given?
|
114
|
-
cb = ProcCallback.new(&block)
|
115
|
-
java_client.update_classes(cb, jar_path, classes_to_delete)
|
116
|
-
else
|
117
|
-
response = java_client.update_classes(jar_path, classes_to_delete)
|
118
|
-
response.extend(ClientResponseUtils)
|
119
|
-
response
|
120
|
-
end
|
121
|
+
# @return [Array<InetSocketAddress>] An list of InetSocketAddress
|
122
|
+
# representing the connected hosts
|
123
|
+
def get_connected_host_list
|
124
|
+
java_client.get_connected_host_list.to_ary
|
121
125
|
end
|
122
126
|
|
123
127
|
# Get an identifier for the cluster that this client is currently connected
|
@@ -131,23 +135,6 @@ module Voltdb
|
|
131
135
|
java_client.get_instance_id.to_ary
|
132
136
|
end
|
133
137
|
|
134
|
-
# Get the instantaneous values of the rate limiting values for this client
|
135
|
-
#
|
136
|
-
# @return [Array<Fixnum>] Array of Fixnum representing max throughput/sec
|
137
|
-
# and max outstanding txns
|
138
|
-
def get_throughput_and_outstanding_txn_limits
|
139
|
-
java_client.get_throughput_and_outstanding_txn_limits.to_ary
|
140
|
-
end
|
141
|
-
|
142
|
-
# Get the list of VoltDB server hosts that this client has open TCP
|
143
|
-
# connections to
|
144
|
-
#
|
145
|
-
# @return [Array<InetSocketAddress>] An list of InetSocketAddress
|
146
|
-
# representing the connected hosts
|
147
|
-
def get_connected_host_list
|
148
|
-
java_client.get_connected_host_list.to_ary
|
149
|
-
end
|
150
|
-
|
151
138
|
# Creates a new instance of a VoltBulkLoader that is bound to this Client.
|
152
139
|
# Multiple instances of a VoltBulkLoader created by a single Client will
|
153
140
|
# share some resources, particularly if they are inserting into the same
|
@@ -157,42 +144,69 @@ module Voltdb
|
|
157
144
|
# @param max_batch_size [Fixnum] to collect for the table before pushing a
|
158
145
|
# bulk insert
|
159
146
|
# @param [Boolean] upsert true if want upsert instead of insert
|
160
|
-
# @
|
147
|
+
# @yieldparam failure [row, list, response] BulkLoaderFailureCallback
|
148
|
+
# @yieldparam success [row, response] BulkLoaderSuccessCallback
|
149
|
+
# @return [VoltBulkLoader] instance of VoltBulkLoader
|
161
150
|
# @raise [Exception] if tableName can't be found in the catalog
|
162
|
-
def get_new_bulk_loader(table_name, max_batch_size, upsert,
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
151
|
+
def get_new_bulk_loader(table_name, max_batch_size, upsert, failure, success = nil)
|
152
|
+
fcb = BulkLoaderFailureCallback.new(&failure)
|
153
|
+
scb = BulkLoaderSuccessCallback.new(&success) if success
|
154
|
+
|
155
|
+
if success
|
156
|
+
java_client.get_new_bulk_loader(table_name, max_batch_size, upsert, fcb, scb)
|
157
|
+
elsif upsert
|
158
|
+
java_client.get_new_bulk_loader(table_name, max_batch_size, upsert, fcb)
|
167
159
|
else
|
168
|
-
java_client.get_new_bulk_loader(table_name, max_batch_size,
|
160
|
+
java_client.get_new_bulk_loader(table_name, max_batch_size, fcb)
|
169
161
|
end
|
170
162
|
end
|
171
163
|
|
172
|
-
#
|
173
|
-
# partition values and then execute the stored procedure one partition at a
|
174
|
-
# time, and return an aggregated response. If a block is passed to the
|
175
|
-
# method an asyncronous call will be made
|
164
|
+
# Get the instantaneous values of the rate limiting values for this client
|
176
165
|
#
|
177
|
-
# @
|
178
|
-
#
|
179
|
-
|
180
|
-
|
166
|
+
# @return [Array<Fixnum>] Array of Fixnum representing max throughput/sec
|
167
|
+
# and max outstanding txns
|
168
|
+
def get_throughput_and_outstanding_txn_limits
|
169
|
+
java_client.get_throughput_and_outstanding_txn_limits.to_ary
|
170
|
+
end
|
171
|
+
|
172
|
+
# This method is a convenience method that is equivalent to reading a
|
173
|
+
# jarfile containing to be added/updated into a byte array in Java code,
|
174
|
+
# then calling call_procedure with "@UpdateClasses" as the procedure name,
|
175
|
+
# followed by the bytes of the jarfile and a string containing a
|
176
|
+
# comma-separates list of classes to delete from the catalog.If a block is
|
177
|
+
# passed to the method an asyncronous call will be made
|
178
|
+
#
|
179
|
+
# @param jar_path [String] path to the jar file with new/update clases
|
180
|
+
# @param classes_to_delete [String,String] comma-separated list of classes
|
181
|
+
# to delete
|
182
|
+
# @yield [response] async response that will be invoked with procedure
|
183
|
+
# results
|
184
|
+
# @return [Java::OrgVoltdbClient::ClientResponse, true, false] Voltdb
|
185
|
+
# client response if the procedure was called synchronously, else will
|
186
|
+
# return true if the procedure was properly queued or false if it was not
|
181
187
|
# @raise [ProcCallException, NoConnectionsException, IOException]
|
182
|
-
|
188
|
+
# ProcCallException will be returned if called synchronously
|
189
|
+
def update_classes(jar_path, classes_to_delete, &block)
|
183
190
|
if block_given?
|
184
|
-
|
185
|
-
java_client.call_all_partition_procedure(cb, proc_name, *params_to_java_objects(*params))
|
191
|
+
java_client.update_classes(ProcCallback.new(&block), jar_path, classes_to_delete)
|
186
192
|
else
|
187
|
-
java_client.
|
188
|
-
|
189
|
-
partition
|
193
|
+
java_client.update_classes(jar_path, classes_to_delete).tap do |resp|
|
194
|
+
resp.extend(ClientResponseUtils)
|
190
195
|
end
|
191
196
|
end
|
192
197
|
end
|
193
198
|
|
194
199
|
def_delegators :java_client,
|
195
|
-
:
|
196
|
-
:
|
200
|
+
:backpressureBarrier, # deprecated
|
201
|
+
:blocking, # deprecated
|
202
|
+
:calculateInvocationSerializedSize, # deprecated
|
203
|
+
:configureBlocking, # deprecated
|
204
|
+
:create_connection,
|
205
|
+
:drain,
|
206
|
+
:close,
|
207
|
+
:create_stats_context,
|
208
|
+
:get_build_string,
|
209
|
+
:is_auto_reconnect_enabled,
|
210
|
+
:write_summary_csv
|
197
211
|
end
|
198
212
|
end
|
data/lib/voltdb/version.rb
CHANGED
data/lib/voltdbjruby_jars.rb
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
begin
|
3
3
|
require 'jar_dependencies'
|
4
4
|
rescue LoadError
|
5
|
-
require 'org/voltdb/voltdbclient/
|
5
|
+
require 'org/voltdb/voltdbclient/8.3/voltdbclient-8.3.jar'
|
6
6
|
end
|
7
7
|
|
8
8
|
if defined? Jars
|
9
|
-
require_jar
|
9
|
+
require_jar 'org.voltdb', 'voltdbclient', '8.3'
|
10
10
|
end
|
data/tasks/vendor.rake
ADDED
data/voltdb.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# coding: utf-8
|
2
|
-
lib = File.expand_path(
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require
|
4
|
+
require "voltdb/version"
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "voltdbjruby"
|
@@ -24,10 +24,11 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
25
25
|
spec.require_paths = ["lib"]
|
26
26
|
|
27
|
-
spec.requirements << "jar org.voltdb, voltdbclient,
|
27
|
+
spec.requirements << "jar org.voltdb, voltdbclient, 8.3"
|
28
28
|
|
29
29
|
spec.add_development_dependency "jar-dependencies", "~> 0.3"
|
30
30
|
spec.add_development_dependency "bundler", "~> 1.14"
|
31
31
|
spec.add_development_dependency "rake", "~> 12"
|
32
|
+
spec.add_development_dependency "pry", "~> 0.10"
|
32
33
|
spec.add_development_dependency "rspec", "~> 3.5"
|
33
34
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: voltdbjruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Alberto Grespan
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-11-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '12'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
requirement: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0.10'
|
61
|
+
name: pry
|
62
|
+
prerelease: false
|
63
|
+
type: :development
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0.10'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
requirement: !ruby/object:Gem::Requirement
|
57
71
|
requirements:
|
@@ -84,7 +98,7 @@ files:
|
|
84
98
|
- Rakefile
|
85
99
|
- bin/console
|
86
100
|
- bin/setup
|
87
|
-
- lib/org/voltdb/voltdbclient/
|
101
|
+
- lib/org/voltdb/voltdbclient/8.3/voltdbclient-8.3.jar
|
88
102
|
- lib/voltdb.rb
|
89
103
|
- lib/voltdb/callbacks.rb
|
90
104
|
- lib/voltdb/client.rb
|
@@ -97,6 +111,7 @@ files:
|
|
97
111
|
- lib/voltdb/volt_table_utils.rb
|
98
112
|
- lib/voltdbjruby_jars.rb
|
99
113
|
- tasks/rspec.rake
|
114
|
+
- tasks/vendor.rake
|
100
115
|
- voltdb.gemspec
|
101
116
|
homepage: https://github.com/full360/voltdb-client-jruby
|
102
117
|
licenses:
|
@@ -117,9 +132,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
132
|
- !ruby/object:Gem::Version
|
118
133
|
version: '0'
|
119
134
|
requirements:
|
120
|
-
- jar org.voltdb, voltdbclient,
|
135
|
+
- jar org.voltdb, voltdbclient, 8.3
|
121
136
|
rubyforge_project:
|
122
|
-
rubygems_version: 2.6.
|
137
|
+
rubygems_version: 2.6.14.1
|
123
138
|
signing_key:
|
124
139
|
specification_version: 4
|
125
140
|
summary: JRuby VoltDB Client
|
Binary file
|