cassandra-driver 2.1.6-java → 2.1.7-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fe9408bd227a8de854b21db55dae97c83e1c2b9a
4
- data.tar.gz: 4002b520a50502d2a85b17d82ab7900c309157cd
3
+ metadata.gz: 08356521233eb103e2f2bf262476dd4c7a62895c
4
+ data.tar.gz: f1e63737fcd6e12d503a869cddcb70bea74bff52
5
5
  SHA512:
6
- metadata.gz: aa36a8342dd0d459829909a6870531efc2cbad231bf6cf6e3d40e152cfaac20fdbd70fec9d52d39c0fdb09b20733012317d2721205595e1d405e620089758aee
7
- data.tar.gz: d485cae41fa3088bb5a8e47eb33a35af067df43486a32d200e2af09ee2b4ee14f537349ea7fe5a7c316c4c473dd36b49efe3fcc8a96306ed3cb3d5bd7460f849
6
+ metadata.gz: 614a6ac21232965b662687fe1af769287e2d8928af0ee890ccd5ae3625c78fd667210ca694f139622b78dd10a265c3889fe35ca20a5cb0ff0252fdbc27e42b82
7
+ data.tar.gz: 682a1aa7519916253ee9e3c28a0b877c71c7efeab3a7616dbdfd3f9638e8840e5ddac246f8fd628d8146beaa3420dd33619553f9cbcda464b23a2b4f1f8fa66f
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Datastax Ruby Driver for Apache Cassandra
2
2
 
3
- *If you're reading this on GitHub, please note that this is the readme for the development version and that some features described here might not yet have been released. You can [find the documentation for latest version through ruby driver docs](http://datastax.github.io/ruby-driver/) or via the release tags, [e.g. v1.0.0-beta.3](https://github.com/datastax/ruby-driver/tree/v1.0.0-beta.3).*
3
+ *If you're reading this on GitHub, please note that this is the readme for the development version and that some
4
+ features described here might not yet have been released. You can view the documentation for the latest released
5
+ version [here](http://docs.datastax.com/en/developer/ruby-driver/latest).*
4
6
 
5
7
  [![Build Status](https://travis-ci.org/datastax/ruby-driver.svg?branch=master)](https://travis-ci.org/datastax/ruby-driver)
6
8
 
@@ -8,22 +10,22 @@ A Ruby client driver for Apache Cassandra. This driver works exclusively with
8
10
  the Cassandra Query Language version 3 (CQL3) and Cassandra's native protocol.
9
11
 
10
12
  - Code: https://github.com/datastax/ruby-driver
11
- - Docs: http://datastax.github.io/ruby-driver/
13
+ - Docs: http://docs.datastax.com/en/developer/ruby-driver
12
14
  - Jira: https://datastax-oss.atlassian.net/browse/RUBY
13
15
  - Mailing List: https://groups.google.com/a/lists.datastax.com/forum/#!forum/ruby-driver-user
14
16
  - IRC: #datastax-drivers on [irc.freenode.net](http://freenode.net>)
15
- - Twitter: Follow the latest news about DataStax Drivers - [@avalanche123](http://twitter.com/avalanche123), [@mfiguiere](http://twitter.com/mfiguiere), [@al3xandru](https://twitter.com/al3xandru)
17
+ - Twitter: Follow the latest news about DataStax Drivers - [@stamhankar999](http://twitter.com/stamhankar999), [@avalanche123](http://twitter.com/avalanche123), [@al3xandru](https://twitter.com/al3xandru)
16
18
 
17
19
  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:
18
20
 
19
- * [Asynchronous execution](http://datastax.github.io/ruby-driver/features/asynchronous_io/)
20
- * One-off, [prepared](http://datastax.github.io/ruby-driver/features/basics/prepared_statements/) and [batch statements](http://datastax.github.io/ruby-driver/features/basics/batch_statements/)
21
- * Automatic peer discovery and cluster metadata with [support for change notifications](http://datastax.github.io/ruby-driver/features/state_listeners/)
22
- * Various [load-balancing](http://datastax.github.io/ruby-driver/features/load_balancing/), [retry](http://datastax.github.io/ruby-driver/features/retry_policies/) and [reconnection](http://datastax.github.io/ruby-driver/features/reconnection/) policies with [ability to write your own](http://datastax.github.io/ruby-driver/features/load_balancing/implementing_a_policy/)
23
- * [SSL encryption](http://datastax.github.io/ruby-driver/features/security/ssl_encryption/)
24
- * [Flexible and robust error handling](http://datastax.github.io/ruby-driver/features/error_handling/)
25
- * [Per-request execution information and tracing](http://datastax.github.io/ruby-driver/features/debugging/)
26
- * [Configurable address resolution](http://datastax.github.io/ruby-driver/features/address_resolution/)
21
+ * [Asynchronous execution](http://docs.datastax.com/en/developer/ruby-driver/2.1/features/asynchronous_io/)
22
+ * One-off, [prepared](http://docs.datastax.com/en/developer/ruby-driver/2.1/features/basics/prepared_statements/) and [batch statements](http://docs.datastax.com/en/developer/ruby-driver/2.1/features/basics/batch_statements/)
23
+ * Automatic peer discovery and cluster metadata with [support for change notifications](http://docs.datastax.com/en/developer/ruby-driver/2.1/features/state_listeners/)
24
+ * Various [load-balancing](http://docs.datastax.com/en/developer/ruby-driver/2.1/features/load_balancing/), [retry](http://docs.datastax.com/en/developer/ruby-driver/2.1/features/retry_policies/) and [reconnection](http://docs.datastax.com/en/developer/ruby-driver/2.1/features/reconnection/) policies with [ability to write your own](http://docs.datastax.com/en/developer/ruby-driver/2.1/features/load_balancing/implementing_a_policy/)
25
+ * [SSL encryption](http://docs.datastax.com/en/developer/ruby-driver/2.1/features/security/ssl_encryption/)
26
+ * [Flexible and robust error handling](http://docs.datastax.com/en/developer/ruby-driver/2.1/features/error_handling/)
27
+ * [Per-request execution information and tracing](http://docs.datastax.com/en/developer/ruby-driver/2.1/features/debugging/)
28
+ * [Configurable address resolution](http://docs.datastax.com/en/developer/ruby-driver/2.1/features/address_resolution/)
27
29
 
28
30
  [Check out the slides from Ruby Driver Explained](https://speakerdeck.com/avalanche123/ruby-driver-explained) for a detailed overview of the Ruby Driver architecture.
29
31
 
@@ -32,12 +34,12 @@ This driver is based on [the cql-rb gem](https://github.com/iconara/cql-rb) by [
32
34
  This driver works exclusively with the Cassandra Query Language v3 (CQL3) and Cassandra's native protocol. The current version works with:
33
35
 
34
36
  * Apache Cassandra versions 1.2, 2.0 and 2.1
35
- * DataStax Enterprise 3.1, 3.2, 4.0 and 4.5
36
- * Ruby (MRI) 1.9.3, 2.0, 2.1 and 2.2
37
+ * DataStax Enterprise 3.1-4.8
38
+ * Ruby (MRI) 2.2, 2.3
37
39
  * JRuby 1.7
38
- * Rubinius 2.2
39
40
 
40
- __Note__: JRuby 1.6 is not officially supported, although 1.6.8 should work.
41
+ __Note__: JRuby 1.6 is not officially supported, although 1.6.8 should work. Rubinius is not supported.
42
+ MRI 1.9.3, 2.0, 2.1, and JRuby 9k are not officially supported, but they should work.
41
43
 
42
44
  ## Quick start
43
45
 
@@ -66,9 +68,9 @@ __Note__: The host you specify is just a seed node, the driver will automaticall
66
68
 
67
69
  Read more:
68
70
 
69
- * [`Cassandra.cluster` options](http://datastax.github.io/ruby-driver/api/#cluster-class_method)
70
- * [`Session#execute_async` options](http://datastax.github.io/ruby-driver/api/session/#execute_async-instance_method)
71
- * [Usage documentation](http://datastax.github.io/ruby-driver/features)
71
+ * [`Cassandra.cluster` options](http://docs.datastax.com/en/developer/ruby-driver/2.1/api/#cluster-class_method)
72
+ * [`Session#execute_async` options](http://docs.datastax.com/en/developer/ruby-driver/2.1/api/session/#execute_async-instance_method)
73
+ * [Usage documentation](http://docs.datastax.com/en/developer/ruby-driver/2.1/features)
72
74
 
73
75
  ## Installation
74
76
 
@@ -84,30 +86,51 @@ Install via Gemfile
84
86
  gem 'cassandra-driver'
85
87
  ```
86
88
 
87
- __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://datastax.github.io/ruby-driver/features/#compression)
89
+ __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/2.1/features/#compression)
88
90
 
89
91
 
90
92
  ## Upgrading from cql-rb
91
93
 
92
- Some of the new features added to the driver have unfortunately led to changes in the original cql-rb API. In the examples directory, you can find [an example of how to wrap the ruby driver to achieve almost complete interface parity with cql-rb](https://github.com/datastax/ruby-driver/blob/master/examples/cql-rb-wrapper.rb) to assist you with gradual upgrade.
94
+ Some of the new features added to the driver have unfortunately led to changes in the original cql-rb API.
95
+ In the examples directory, you can find [an example of how to wrap the ruby driver to achieve almost complete
96
+ interface parity with cql-rb](https://github.com/datastax/ruby-driver/blob/v2.1.7/examples/cql-rb-wrapper.rb)
97
+ to assist you with gradual upgrade.
93
98
 
94
- ## What's new in v2.1.3
99
+ ## What's new in v2.1
100
+ See the [changelog](https://github.com/datastax/ruby-driver/blob/master/CHANGELOG.md) for details on patch releases.
95
101
 
96
102
  Features:
97
103
 
98
104
  * Apache Cassandra native protocol v3
99
- * [User-defined types](http://datastax.github.io/ruby-driver/features/basics/user_defined_types/) and [tuples](http://datastax.github.io/ruby-driver/features/basics/datatypes/#using-tuples)
100
- * [Schema metadata includes user-defined types](http://datastax.github.io/ruby-driver/api/keyspace/#type-instance_method)
101
- * [Named arguments](http://datastax.github.io/ruby-driver/features/basics/prepared_statements/#an-insert-statement-is-prepared-with-named-parameters)
102
- * [Public types api for type definition and introspection](http://datastax.github.io/ruby-driver/api/types/)
105
+ * [User-defined types](http://docs.datastax.com/en/developer/ruby-driver/2.1/features/basics/user_defined_types/) and [tuples](http://docs.datastax.com/en/developer/ruby-driver/2.1/features/basics/datatypes/#using-tuples)
106
+ * [Schema metadata includes user-defined types](http://docs.datastax.com/en/developer/ruby-driver/2.1/api/keyspace/#type-instance_method)
107
+ * [Named arguments](http://docs.datastax.com/en/developer/ruby-driver/2.1/features/basics/prepared_statements/#an-insert-statement-is-prepared-with-named-parameters)
108
+ * [Public types api for type definition and introspection](http://docs.datastax.com/en/developer/ruby-driver/2.1/api/types/)
109
+ * Add support for disabling nagle algorithm (tcp nodelay), enabled by default.
110
+ * Add support for client-side timestamps, disabled by default.
111
+ * Add support for serial consistency in batch requests.
112
+ * Add support for `type_hints` to override type-guessing for non-prepared statements.
113
+
103
114
 
104
115
  Breaking Changes:
105
116
 
106
117
  * Splat style positional arguments support, deprecated in 2.0.0, has been dropped
118
+ * Setting `:synchronize_schema` to `true` will no longer perform the initial
119
+ fetching if schema metadata.
107
120
 
108
121
  Bug Fixes:
109
122
 
110
123
  * [[RUBY-93](https://datastax-oss.atlassian.net/browse/RUBY-93)] Reconnection can overflow the stack
124
+ * [[RUBY-95](https://datastax-oss.atlassian.net/browse/RUBY-95)] Speed up generation of large token maps
125
+ * [[RUBY-97](https://datastax-oss.atlassian.net/browse/RUBY-97)] Allow disabling of the initial population of schema metadata
126
+ * [[RUBY-98](https://datastax-oss.atlassian.net/browse/RUBY-98)] Use of undefined class variable in `Table#create_partition_key`
127
+ * [[RUBY-102](https://datastax-oss.atlassian.net/browse/RUBY-102)] Allow custom types in schema metadata
128
+ * [[RUBY-103](https://datastax-oss.atlassian.net/browse/RUBY-103)] Don't regenerate schema metadata for the same replication strategies and options
129
+ * [[RUBY-116](https://datastax-oss.atlassian.net/browse/RUBY-116)] fix thread leak on connection error
130
+ * [[RUBY-119](https://datastax-oss.atlassian.net/browse/RUBY-119)] Use `require 'datastax/cassandra'` to avoid namespace conflicts
131
+ * [[RUBY-128](https://datastax-oss.atlassian.net/browse/RUBY-128)] Fix decoding of large values in maps, sets and lists.
132
+ * [[RUBY-202](https://datastax-oss.atlassian.net/browse/RUBY-202)] Allow password authenticator to be used for LDAP authentication.
133
+ * [[RUBY-255](https://datastax-oss.atlassian.net/browse/RUBY-255)] ControlConnection.peer_ip ignores peers that are missing critical information in system.peers.
111
134
 
112
135
  ## Code examples
113
136
 
@@ -146,11 +169,10 @@ Prereleases will be stable, in the sense that they will have finished and proper
146
169
 
147
170
  ## Known bugs & limitations
148
171
 
149
- * JRuby 1.6 is not officially supported, although 1.6.8 should work, if you're stuck in JRuby 1.6.8 try and see if it works for you.
150
172
  * Because the driver reactor is using `IO.select`, the maximum number of tcp connections allowed is 1024.
151
173
  * Because the driver uses `IO#write_nonblock`, Windows is not supported.
152
174
 
153
- Please [refer to the usage documentation for more information on common pitfalls](http://datastax.github.io/ruby-driver/features/)
175
+ Please [refer to the usage documentation for more information on common pitfalls](http://docs.datastax.com/en/developer/ruby-driver/2.1/features/)
154
176
 
155
177
  ## Contributing
156
178
 
@@ -160,12 +182,12 @@ For contributing read [CONTRIBUTING.md](https://github.com/datastax/ruby-driver/
160
182
 
161
183
  This driver is based on the original work of [Theo Hultberg](https://github.com/iconara) on [cql-rb](https://github.com/iconara/cql-rb/) and adds a series of advanced features that are common across all other DataStax drivers for Apache Cassandra.
162
184
 
163
- The development effort to provide an up to date, high performance, fully featured Ruby Driver for Apache Cassandra will continue on this project, while [cql-rb](https://github.com/iconara/cql-rb/) will be discontinued.
185
+ The development effort to provide an up to date, high performance, fully featured Ruby Driver for Apache Cassandra will continue on this project, while [cql-rb](https://github.com/iconara/cql-rb/) has been discontinued.
164
186
 
165
187
 
166
188
  ## Copyright
167
189
 
168
- Copyright 2013-2015 DataStax, Inc.
190
+ Copyright 2013-2016 DataStax, Inc.
169
191
 
170
192
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
171
193
 
@@ -173,4 +195,4 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
173
195
 
174
196
  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
175
197
 
176
- [1]: http://datastax.github.io/ruby-driver/api
198
+ [1]: http://docs.datastax.com/en/developer/ruby-driver/2.1/api
@@ -514,7 +514,7 @@ module Cassandra
514
514
 
515
515
  peers.shuffle!
516
516
  peers.each do |data|
517
- ip = peer_ip(data)
517
+ ip = peer_ip(data, connection.host)
518
518
  next unless ip
519
519
  ips << ip
520
520
  @registry.host_found(ip, data)
@@ -699,9 +699,30 @@ Control connection failed and is unlikely to recover.
699
699
  @connector.connect(host)
700
700
  end
701
701
 
702
- def peer_ip(data)
703
- ip = data['rpc_address']
704
- ip = data['peer'] if ip == '0.0.0.0'
702
+ def peer_ip(data, host_address)
703
+ peer = data['peer']
704
+
705
+ return nil unless peer && data['host_id'] && data['data_center'] && data['rack'] && data['tokens']
706
+
707
+ rpc_address = data['rpc_address']
708
+
709
+ if rpc_address.nil?
710
+ @logger.info("The system.peers row for '#{data['peer']}' has no rpc_address. This is likely " +
711
+ 'a gossip or snitch issue. This host will be ignored.')
712
+ return nil
713
+ end
714
+
715
+ if peer == host_address || rpc_address == host_address
716
+ # Some DSE versions were inserting a line for the local node in peers (with mostly null values).
717
+ # This has been fixed, but if we detect that's the case, ignore it as it's not really a big deal.
718
+
719
+ @logger.debug("System.peers on node #{host_address} has a line for itself. This is not normal but is a " +
720
+ 'known problem of some DSE versions. Ignoring the entry.')
721
+ return nil
722
+ end
723
+
724
+ ip = rpc_address
725
+ ip = peer if ip == '0.0.0.0'
705
726
 
706
727
  @address_resolver.resolve(ip)
707
728
  end
@@ -17,5 +17,5 @@
17
17
  #++
18
18
 
19
19
  module Cassandra
20
- VERSION = '2.1.6'.freeze
20
+ VERSION = '2.1.7'.freeze
21
21
  end
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: 2.1.6
4
+ version: 2.1.7
5
5
  platform: java
6
6
  authors:
7
7
  - Theo Hultberg
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-04-22 00:00:00.000000000 Z
12
+ date: 2016-09-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  requirement: !ruby/object:Gem::Requirement