cassandra-driver 3.2.1-java → 3.2.2-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/README.md +18 -18
- data/lib/cassandra/future.rb +7 -1
- data/lib/cassandra/protocol/cql_byte_buffer.rb +20 -14
- data/lib/cassandra/protocol/cql_protocol_handler.rb +0 -2
- data/lib/cassandra/version.rb +1 -1
- data/lib/cassandra_murmur3.jar +0 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f130ef4e5f17d65e6f757f326d18f425fec74fc9
|
4
|
+
data.tar.gz: 701dbf0a28efd4ca8afd93f58b8fe05986131be7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e32771608add1a985bf76a870033144dbb8e62ae61e54dccf3ec1d957191b2d641c864ce0418e5119189f8d878b185d1b78c5a34d5af93bfe391ae50c8f4cb34
|
7
|
+
data.tar.gz: 7939fb859edd27fc51a58d6f744a0ca09caa283ab91e15487c528eeeba535b4e348a934f34b54089f96ade700a5ef313ac6bb805c5987eb36e6fc99e4e5d9433
|
data/README.md
CHANGED
@@ -21,14 +21,14 @@ better compatibility and support for DataStax Enterprise.
|
|
21
21
|
|
22
22
|
This driver is based on [the cql-rb gem](https://github.com/iconara/cql-rb) by [Theo Hultberg](https://github.com/iconara) and we added support for:
|
23
23
|
|
24
|
-
* [Asynchronous execution](http://docs.datastax.com/en/developer/ruby-driver/3.
|
25
|
-
* One-off, [prepared](http://docs.datastax.com/en/developer/ruby-driver/3.
|
26
|
-
* Automatic peer discovery and cluster metadata with [support for change notifications](http://docs.datastax.com/en/developer/ruby-driver/3.
|
27
|
-
* Various [load-balancing](http://docs.datastax.com/en/developer/ruby-driver/3.
|
28
|
-
* [SSL encryption](http://docs.datastax.com/en/developer/ruby-driver/3.
|
29
|
-
* [Flexible and robust error handling](http://docs.datastax.com/en/developer/ruby-driver/3.
|
30
|
-
* [Per-request execution information and tracing](http://docs.datastax.com/en/developer/ruby-driver/3.
|
31
|
-
* [Configurable address resolution](http://docs.datastax.com/en/developer/ruby-driver/3.
|
24
|
+
* [Asynchronous execution](http://docs.datastax.com/en/developer/ruby-driver/3.1/features/asynchronous_io/)
|
25
|
+
* One-off, [prepared](http://docs.datastax.com/en/developer/ruby-driver/3.1/features/basics/prepared_statements/) and [batch statements](http://docs.datastax.com/en/developer/ruby-driver/3.1/features/basics/batch_statements/)
|
26
|
+
* Automatic peer discovery and cluster metadata with [support for change notifications](http://docs.datastax.com/en/developer/ruby-driver/3.1/features/state_listeners/)
|
27
|
+
* Various [load-balancing](http://docs.datastax.com/en/developer/ruby-driver/3.1/features/load_balancing/), [retry](http://docs.datastax.com/en/developer/ruby-driver/3.1/features/retry_policies/) and [reconnection](http://docs.datastax.com/en/developer/ruby-driver/3.1/features/reconnection/) policies with [ability to write your own](http://docs.datastax.com/en/developer/ruby-driver/3.1/features/load_balancing/implementing_a_policy/)
|
28
|
+
* [SSL encryption](http://docs.datastax.com/en/developer/ruby-driver/3.1/features/security/ssl_encryption/)
|
29
|
+
* [Flexible and robust error handling](http://docs.datastax.com/en/developer/ruby-driver/3.1/features/error_handling/)
|
30
|
+
* [Per-request execution information and tracing](http://docs.datastax.com/en/developer/ruby-driver/3.1/features/debugging/)
|
31
|
+
* [Configurable address resolution](http://docs.datastax.com/en/developer/ruby-driver/3.1/features/address_resolution/)
|
32
32
|
|
33
33
|
[Check out the slides from Ruby Driver Explained](https://speakerdeck.com/avalanche123/ruby-driver-explained) for a detailed overview of the Ruby Driver architecture.
|
34
34
|
|
@@ -76,9 +76,9 @@ __Note__: The host you specify is just a seed node, the driver will automaticall
|
|
76
76
|
|
77
77
|
Read more:
|
78
78
|
|
79
|
-
* [`Cassandra.cluster` options](http://docs.datastax.com/en/developer/ruby-driver/3.
|
80
|
-
* [`Session#execute_async` options](http://docs.datastax.com/en/developer/ruby-driver/3.
|
81
|
-
* [Usage documentation](http://docs.datastax.com/en/developer/ruby-driver/3.
|
79
|
+
* [`Cassandra.cluster` options](http://docs.datastax.com/en/developer/ruby-driver/3.1/api/cassandra/#cluster-class_method)
|
80
|
+
* [`Session#execute_async` options](http://docs.datastax.com/en/developer/ruby-driver/3.1/api/cassandra/session/#execute_async-instance_method)
|
81
|
+
* [Usage documentation](http://docs.datastax.com/en/developer/ruby-driver/3.1/features)
|
82
82
|
|
83
83
|
## Installation
|
84
84
|
|
@@ -94,14 +94,14 @@ Install via Gemfile
|
|
94
94
|
gem 'cassandra-driver'
|
95
95
|
```
|
96
96
|
|
97
|
-
__Note__: if you want to use compression you should also install [snappy](http://rubygems.org/gems/snappy) or [lz4-ruby](http://rubygems.org/gems/lz4-ruby). [Read more about compression.](http://docs.datastax.com/en/developer/ruby-driver/3.
|
97
|
+
__Note__: if you want to use compression you should also install [snappy](http://rubygems.org/gems/snappy) or [lz4-ruby](http://rubygems.org/gems/lz4-ruby). [Read more about compression.](http://docs.datastax.com/en/developer/ruby-driver/3.1/features/#compression)
|
98
98
|
|
99
99
|
|
100
100
|
## Upgrading from cql-rb
|
101
101
|
|
102
102
|
Some of the new features added to the driver have unfortunately led to changes in the original cql-rb API.
|
103
103
|
In the examples directory, you can find [an example of how to wrap the ruby driver to achieve almost complete
|
104
|
-
interface parity with cql-rb](https://github.com/datastax/ruby-driver/blob/v3.2.
|
104
|
+
interface parity with cql-rb](https://github.com/datastax/ruby-driver/blob/v3.2.2/examples/cql-rb-wrapper.rb)
|
105
105
|
to assist you with gradual upgrade.
|
106
106
|
|
107
107
|
If you are upgrading to DataStax Enterprise, use the [Ruby DSE driver](https://github.com/datastax/ruby-dse-driver.git)
|
@@ -112,7 +112,7 @@ This minor release adds support for MRI 2.4.x and also contains a few miscellane
|
|
112
112
|
support for Ruby versions prior to 2.2. This was already officially the case, but the minimum version limit is
|
113
113
|
now enforced.
|
114
114
|
|
115
|
-
See the [changelog](https://github.com/datastax/ruby-driver/blob/v3.2.
|
115
|
+
See the [changelog](https://github.com/datastax/ruby-driver/blob/v3.2.2/CHANGELOG.md) for more information on all
|
116
116
|
changes in this version and past versions.
|
117
117
|
|
118
118
|
## What's new in v3.1
|
@@ -180,7 +180,7 @@ examples in the `features/` directory.
|
|
180
180
|
## Running tests
|
181
181
|
|
182
182
|
If you don't feel like reading through the following instructions on how to run
|
183
|
-
ruby-driver tests, feel free to [check out .travis.yml for the entire build code](https://github.com/datastax/ruby-driver/blob/v3.2.
|
183
|
+
ruby-driver tests, feel free to [check out .travis.yml for the entire build code](https://github.com/datastax/ruby-driver/blob/v3.2.2/.travis.yml).
|
184
184
|
|
185
185
|
* Check out the driver codebase and install test dependencies:
|
186
186
|
|
@@ -204,7 +204,7 @@ CASSANDRA_VERSION=2.1.12 bundle exec rake test # run both as well as integration
|
|
204
204
|
## Changelog & versioning
|
205
205
|
|
206
206
|
Check out the [releases on GitHub](https://github.com/datastax/ruby-driver/releases) and
|
207
|
-
[changelog](https://github.com/datastax/ruby-driver/blob/v3.2.
|
207
|
+
[changelog](https://github.com/datastax/ruby-driver/blob/v3.2.2/CHANGELOG.md). Version
|
208
208
|
numbering follows the [semantic versioning](http://semver.org/) scheme.
|
209
209
|
|
210
210
|
Private and experimental APIs, defined as whatever is not in the
|
@@ -227,7 +227,7 @@ the release.
|
|
227
227
|
* Because the driver reactor is using `IO.select`, the maximum number of tcp connections allowed is 1024.
|
228
228
|
* Because the driver uses `IO#write_nonblock`, Windows is not supported.
|
229
229
|
|
230
|
-
Please [refer to the usage documentation for more information on common pitfalls](http://docs.datastax.com/en/developer/ruby-driver/3.
|
230
|
+
Please [refer to the usage documentation for more information on common pitfalls](http://docs.datastax.com/en/developer/ruby-driver/3.1/features/)
|
231
231
|
|
232
232
|
## Contributing
|
233
233
|
|
@@ -257,4 +257,4 @@ License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
|
|
257
257
|
either express or implied. See the License for the specific language governing permissions
|
258
258
|
and limitations under the License.
|
259
259
|
|
260
|
-
[1]: http://docs.datastax.com/en/developer/ruby-driver/3.
|
260
|
+
[1]: http://docs.datastax.com/en/developer/ruby-driver/3.1/api
|
data/lib/cassandra/future.rb
CHANGED
@@ -204,7 +204,13 @@ module Cassandra
|
|
204
204
|
end
|
205
205
|
|
206
206
|
def all(*futures)
|
207
|
-
|
207
|
+
# May get called with varargs or an array of futures. In the latter case,
|
208
|
+
# the first element in futures is the array of futures. Promote it.
|
209
|
+
futures = Array(futures.first) if futures.one?
|
210
|
+
|
211
|
+
# Special case where there are no futures to aggregate.
|
212
|
+
return Value.new([]) if futures.empty?
|
213
|
+
|
208
214
|
monitor = Monitor.new
|
209
215
|
promise = Promise.new(@executor)
|
210
216
|
remaining = futures.length
|
@@ -53,24 +53,30 @@ module Cassandra
|
|
53
53
|
end
|
54
54
|
|
55
55
|
def read_decimal(len = bytesize)
|
56
|
-
|
56
|
+
scale = read_signed_int
|
57
57
|
number_string = read_varint(len - 4).to_s
|
58
|
-
if
|
59
|
-
|
60
|
-
|
61
|
-
|
58
|
+
if scale < 0
|
59
|
+
# Special case where the actual scale is positive; scale in the protocol is actually negative of
|
60
|
+
# reality.
|
61
|
+
BigDecimal.new(number_string + '0' * -scale)
|
62
|
+
else
|
63
|
+
if number_string.length <= scale
|
64
|
+
if number_string.start_with?(MINUS)
|
65
|
+
number_string = number_string[1, number_string.length - 1]
|
66
|
+
fraction_string = MINUS + ZERO << DECIMAL_POINT
|
67
|
+
else
|
68
|
+
fraction_string = ZERO + DECIMAL_POINT
|
69
|
+
end
|
70
|
+
(scale - number_string.length).times { fraction_string << ZERO }
|
71
|
+
fraction_string << number_string
|
62
72
|
else
|
63
|
-
fraction_string =
|
73
|
+
fraction_string = number_string[0, number_string.length - scale]
|
74
|
+
fraction_string << DECIMAL_POINT
|
75
|
+
fraction_string <<
|
76
|
+
number_string[number_string.length - scale, number_string.length]
|
64
77
|
end
|
65
|
-
(
|
66
|
-
fraction_string << number_string
|
67
|
-
else
|
68
|
-
fraction_string = number_string[0, number_string.length - size]
|
69
|
-
fraction_string << DECIMAL_POINT
|
70
|
-
fraction_string <<
|
71
|
-
number_string[number_string.length - size, number_string.length]
|
78
|
+
BigDecimal.new(fraction_string)
|
72
79
|
end
|
73
|
-
BigDecimal.new(fraction_string)
|
74
80
|
rescue Errors::DecodingError => e
|
75
81
|
raise Errors::DecodingError, e.message, e.backtrace
|
76
82
|
end
|
data/lib/cassandra/version.rb
CHANGED
data/lib/cassandra_murmur3.jar
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cassandra-driver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.2
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Theo Hultberg
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2018-01-
|
13
|
+
date: 2018-01-29 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|