Add custom types support
Description
Environment
DSE 4.6.2, C* 2.0.12, Ubuntu 14.04
Pull Requests
Activity
capncrunch4me: Cassandra::Types.send(type, lookup_type(node.children.first))
[3:02pm] avalanche123: just print the node.name above the case statement
[3:03pm] avalanche123: to make it easier
[3:03pm] avalanche123: the last one printed is the one I care about
[3:03pm] capncrunch4me: only in case statement or both
[3:03pm] capncrunch4me: case and else?
[3:04pm] avalanche123: that else is part of case
[3:04pm] avalanche123: if you do it before the case that should cover both
[3:04pm] capncrunch4me: case type
[3:04pm] capncrunch4me: when :set, :list
[3:04pm] capncrunch4me: p node.name
[3:04pm] capncrunch4me: Cassandra::Types.send(type, lookup_type(node.children.first))
[3:05pm] avalanche123: above the case type
[3:07pm] capncrunch4me: avalanche123: http://pastebin.com/r03yCTza
Ngrep trace from DSE server of client trying to connect:
T 10.0.5.30:49203 -> 10.0.5.22:9042 [AP]
.........
T 10.0.5.22:9042 -> 10.0.5.30:49203 [AP]
.......0...
.*Invalid or unsupported protocol version: 3
T 10.0.5.30:49204 -> 10.0.5.22:9042 [AP]
........
T 10.0.5.22:9042 -> 10.0.5.30:49204 [AP]
.......4....CQL_VERSION....3.1.7..COMPRESSION....snappy..lz4
T 10.0.5.30:49204 -> 10.0.5.22:9042 [AP]
There is 1 table in 1 CF created.
CREATE TABLE new_schema.cdr (
id timeuuid,
subscriber text,
time timestamp,
callid text,
country text,
created timestamp,
delay_duration int,
destination text,
direction text,
dst_ip text,
duration int,
from_did text,
from_lata text,
from_ocn text,
from_rc text,
from_tag text,
hunt_position int,
jurisdiction text,
leg text,
lrn_did text,
lrn_lata text,
lrn_ocn text,
lrn_rc text,
method text,
orig_bill_sec int,
orig_carrier_id int,
orig_from text,
orig_increment int,
orig_lrn text,
orig_min_duration int,
orig_paid text,
orig_rate decimal,
orig_rpid text,
orig_ruri text,
orig_surcharge int,
orig_to text,
orig_trunk_group_id int,
orig_trunk_id int,
orig_value decimal,
pdd int,
prefix text,
reason text,
ring_time int,
rs_ip text,
setuptime int,
sip_code text,
sip_reason text,
src_ip text,
switch_ip text,
term_bill_sec int,
term_carrier_id int,
term_increment int,
term_min_duration int,
term_rate decimal,
term_surcharge int,
term_trunk_group_id int,
term_trunk_id int,
term_value decimal,
terminator text,
to_did text,
to_lata text,
to_ocn text,
to_rc text,
to_tag text,
trunk_prefix text,
PRIMARY KEY (id, subscriber, time)
) WITH CLUSTERING ORDER BY (subscriber ASC, time ASC) AND
bloom_filter_fp_chance=0.010000 AND
caching='KEYS_ONLY' AND
comment='check rate data types decimal' AND
dclocal_read_repair_chance=0.100000 AND
gc_grace_seconds=864000 AND
read_repair_chance=0.000000 AND
replicate_on_write='true' AND
populate_io_cache_on_flush='false' AND
compaction={'max_sstable_age_days': '100', 'base_time_seconds': '3600', 'class': 'DateTieredCompactionStrategy'} AND
compression={'sstable_compression': 'SnappyCompressor'};
Running single node DSE cluster in development.
This line fails: cluster = Cassandra.cluster(hosts: ['10.0.5.22'])
Version 2.0.1 works.
/usr/local/rvm/gems/ruby-2.2.1/gems/cassandra-driver-2.1.3/lib/cassandra/cluster/schema/type_parser.rb:134:in `lookup_type': nil is not a symbol nor a string (TypeError)
from /usr/local/rvm/gems/ruby-2.2.1/gems/cassandra-driver-2.1.3/lib/cassandra/cluster/schema/type_parser.rb:103:in `create_type'
from /usr/local/rvm/gems/ruby-2.2.1/gems/cassandra-driver-2.1.3/lib/cassandra/cluster/schema/type_parser.rb:83:in `create_result'
from /usr/local/rvm/gems/ruby-2.2.1/gems/cassandra-driver-2.1.3/lib/cassandra/cluster/schema/type_parser.rb:53:in `parse'
from /usr/local/rvm/gems/ruby-2.2.1/gems/cassandra-driver-2.1.3/lib/cassandra/cluster/schema.rb:252:in `create_table'
from /usr/local/rvm/gems/ruby-2.2.1/gems/cassandra-driver-2.1.3/lib/cassandra/cluster/schema.rb:91:in `block in update_keyspace'
from /usr/local/rvm/gems/ruby-2.2.1/gems/cassandra-driver-2.1.3/lib/cassandra/cluster/schema.rb:89:in `each'
from /usr/local/rvm/gems/ruby-2.2.1/gems/cassandra-driver-2.1.3/lib/cassandra/cluster/schema.rb:89:in `each_with_object'
from /usr/local/rvm/gems/ruby-2.2.1/gems/cassandra-driver-2.1.3/lib/cassandra/cluster/schema.rb:89:in `update_keyspace'
from /usr/local/rvm/gems/ruby-2.2.1/gems/cassandra-driver-2.1.3/lib/cassandra/cluster/schema.rb:72:in `block in update_keyspaces'
from /usr/local/rvm/gems/ruby-2.2.1/gems/cassandra-driver-2.1.3/lib/cassandra/cluster/schema.rb:69:in `each'
from /usr/local/rvm/gems/ruby-2.2.1/gems/cassandra-driver-2.1.3/lib/cassandra/cluster/schema.rb:69:in `update_keyspaces'
from /usr/local/rvm/gems/ruby-2.2.1/gems/cassandra-driver-2.1.3/lib/cassandra/cluster/control_connection.rb:260:in `block in refresh_schema_async'
from /usr/local/rvm/gems/ruby-2.2.1/gems/ione-1.2.0/lib/ione/future.rb:348:in `call'
from /usr/local/rvm/gems/ruby-2.2.1/gems/ione-1.2.0/lib/ione/future.rb:348:in `block in map'
from /usr/local/rvm/gems/ruby-2.2.1/gems/ione-1.2.0/lib/ione/future.rb:704:in `call'
from /usr/local/rvm/gems/ruby-2.2.1/gems/ione-1.2.0/lib/ione/future.rb:704:in `call_listener'
from /usr/local/rvm/gems/ruby-2.2.1/gems/ione-1.2.0/lib/ione/future.rb:743:in `block in resolve'
from /usr/local/rvm/gems/ruby-2.2.1/gems/ione-1.2.0/lib/ione/future.rb:742:in `each'
from /usr/local/rvm/gems/ruby-2.2.1/gems/ione-1.2.0/lib/ione/future.rb:742:in `resolve'
from /usr/local/rvm/gems/ruby-2.2.1/gems/ione-1.2.0/lib/ione/future.rb:787:in `block (2 levels) in initialize'
from /usr/local/rvm/gems/ruby-2.2.1/gems/ione-1.2.0/lib/ione/future.rb:704:in `call'
from /usr/local/rvm/gems/ruby-2.2.1/gems/ione-1.2.0/lib/ione/future.rb:704:in `call_listener'
from /usr/local/rvm/gems/ruby-2.2.1/gems/ione-1.2.0/lib/ione/future.rb:743:in `block in resolve'
from /usr/local/rvm/gems/ruby-2.2.1/gems/ione-1.2.0/lib/ione/future.rb:742:in `each'
from /usr/local/rvm/gems/ruby-2.2.1/gems/ione-1.2.0/lib/ione/future.rb:742:in `resolve'
from /usr/local/rvm/gems/ruby-2.2.1/gems/ione-1.2.0/lib/ione/future.rb:348:in `block in map'
from /usr/local/rvm/gems/ruby-2.2.1/gems/ione-1.2.0/lib/ione/future.rb:704:in `call'
from /usr/local/rvm/gems/ruby-2.2.1/gems/ione-1.2.0/lib/ione/future.rb:704:in `call_listener'
from /usr/local/rvm/gems/ruby-2.2.1/gems/ione-1.2.0/lib/ione/future.rb:743:in `block in resolve'
from /usr/local/rvm/gems/ruby-2.2.1/gems/ione-1.2.0/lib/ione/future.rb:742:in `each'
from /usr/local/rvm/gems/ruby-2.2.1/gems/ione-1.2.0/lib/ione/future.rb:742:in `resolve'
from /usr/local/rvm/gems/ruby-2.2.1/gems/ione-1.2.0/lib/ione/future.rb:29:in `fulfill'
from /usr/local/rvm/gems/ruby-2.2.1/gems/cassandra-driver-2.1.3/lib/cassandra/protocol/cql_protocol_handler.rb:241:in `complete_request'
from /usr/local/rvm/gems/ruby-2.2.1/gems/cassandra-driver-2.1.3/lib/cassandra/protocol/v1.rb:155:in `actual_decode'
from /usr/local/rvm/gems/ruby-2.2.1/gems/cassandra-driver-2.1.3/lib/cassandra/protocol/v1.rb:86:in `decode_header'
from /usr/local/rvm/gems/ruby-2.2.1/gems/cassandra-driver-2.1.3/lib/cassandra/protocol/v1.rb:64:in `<<'
from /usr/local/rvm/gems/ruby-2.2.1/gems/cassandra-driver-2.1.3/lib/cassandra/protocol/cql_protocol_handler.rb:271:in `receive_data'
from /usr/local/rvm/gems/ruby-2.2.1/gems/ione-1.2.0/lib/ione/io/base_connection.rb:162:in `call'
from /usr/local/rvm/gems/ruby-2.2.1/gems/ione-1.2.0/lib/ione/io/base_connection.rb:162:in `read'
from /usr/local/rvm/gems/ruby-2.2.1/gems/ione-1.2.0/lib/ione/io/io_reactor.rb:396:in `block in tick'
from /usr/local/rvm/gems/ruby-2.2.1/gems/ione-1.2.0/lib/ione/io/io_reactor.rb:396:in `each'
from /usr/local/rvm/gems/ruby-2.2.1/gems/ione-1.2.0/lib/ione/io/io_reactor.rb:396:in `tick'
from /usr/local/rvm/gems/ruby-2.2.1/gems/ione-1.2.0/lib/ione/io/io_reactor.rb:133:in `block in start'