sessionm-cassandra_object 4.0.17 → 4.0.18
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4f7695ab50cc8f809469eae9e85df59aa5e8167
|
4
|
+
data.tar.gz: c366e423d4218302c58b9470fabdce04fbddc5e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65b1137b9b00dfdcd4dabc4c1c6d4112b2d98b9a9cb039e11a11d5308c56cdd41007638b4b6210a1fdb42a649cacf50d2b3d57f05cefb48b17345038f83bdabd
|
7
|
+
data.tar.gz: 828a23a774fe4d56a085c376dc7673910391ef8d6a441ea440f1f6319edab25200792714486eb801ba1f32a25cf61ab51279b1526a6918f0d862e45524aa23e1
|
@@ -1,6 +1,17 @@
|
|
1
1
|
module CassandraObject
|
2
2
|
module Adapters
|
3
3
|
class CassandraDriver
|
4
|
+
CLUSTER_CONFIG_OPTIONS = [
|
5
|
+
:credentials, :auth_provider, :compression, :hosts, :logger, :port,
|
6
|
+
:load_balancing_policy, :reconnection_policy, :retry_policy, :listeners,
|
7
|
+
:consistency, :trace, :page_size, :compressor, :username, :password,
|
8
|
+
:ssl, :server_cert, :client_cert, :private_key, :passphrase,
|
9
|
+
:connect_timeout, :futures_factory, :datacenter, :address_resolution,
|
10
|
+
:address_resolution_policy, :idle_timeout, :heartbeat_interval, :timeout,
|
11
|
+
:synchronize_schema, :schema_refresh_delay, :schema_refresh_timeout,
|
12
|
+
:shuffle_replicas, :client_timestamps
|
13
|
+
]
|
14
|
+
|
4
15
|
attr_reader :config
|
5
16
|
|
6
17
|
def initialize(config)
|
@@ -25,14 +36,17 @@ module CassandraObject
|
|
25
36
|
end
|
26
37
|
|
27
38
|
def cluster_config
|
28
|
-
|
39
|
+
config.slice(*CLUSTER_CONFIG_OPTIONS).reverse_merge(
|
29
40
|
:hosts => config[:servers].map { |server| server.sub /:\d+/, '' },
|
30
|
-
:port =>
|
31
|
-
:connect_timeout => config[:thrift][:connect_timeout
|
32
|
-
:timeout => config[:thrift][:timeout
|
33
|
-
:logger =>
|
41
|
+
:port => 9042,
|
42
|
+
:connect_timeout => config[:thrift].try(:[], :connect_timeout) || 10,
|
43
|
+
:timeout => config[:thrift].try(:[], :timeout) || 10,
|
44
|
+
:logger => (defined?(Rails) && Rails.logger) || Logger.new(STDOUT),
|
45
|
+
:heartbeat_interval => nil,
|
46
|
+
:idle_timeout => nil
|
47
|
+
).merge(
|
34
48
|
:consistency => (config[:consistency] || {})[:write_default].try(:to_sym) || :one,
|
35
|
-
|
49
|
+
)
|
36
50
|
end
|
37
51
|
|
38
52
|
class SchemaCache < ActiveRecord::ConnectionAdapters::SchemaCache
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sessionm-cassandra_object
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Doug Youch
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-04-
|
12
|
+
date: 2016-04-28 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Cassandra ActiveModel
|
15
15
|
email: doug@sessionm.com
|