vendor/gen-rb/cassandra.rb in cassandra-0.7.6 vs vendor/gen-rb/cassandra.rb in cassandra-0.8.0
- old
+ new
@@ -10,10 +10,26 @@
module CassandraThrift
module Cassandra
class Client
include ::Thrift::Client
+ def login(keyspace, auth_request)
+ send_login(keyspace, auth_request)
+ recv_login()
+ end
+
+ def send_login(keyspace, auth_request)
+ send_message('login', Login_args, :keyspace => keyspace, :auth_request => auth_request)
+ end
+
+ def recv_login()
+ result = receive_message(Login_result)
+ raise result.authnx unless result.authnx.nil?
+ raise result.authzx unless result.authzx.nil?
+ return
+ end
+
def get(keyspace, key, column_path, consistency_level)
send_get(keyspace, key, column_path, consistency_level)
return recv_get()
end
@@ -101,44 +117,44 @@
raise result.ue unless result.ue.nil?
raise result.te unless result.te.nil?
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_count failed: unknown result')
end
- def get_key_range(keyspace, column_family, start, finish, count, consistency_level)
- send_get_key_range(keyspace, column_family, start, finish, count, consistency_level)
- return recv_get_key_range()
+ def get_range_slice(keyspace, column_parent, predicate, start_key, finish_key, row_count, consistency_level)
+ send_get_range_slice(keyspace, column_parent, predicate, start_key, finish_key, row_count, consistency_level)
+ return recv_get_range_slice()
end
- def send_get_key_range(keyspace, column_family, start, finish, count, consistency_level)
- send_message('get_key_range', Get_key_range_args, :keyspace => keyspace, :column_family => column_family, :start => start, :finish => finish, :count => count, :consistency_level => consistency_level)
+ def send_get_range_slice(keyspace, column_parent, predicate, start_key, finish_key, row_count, consistency_level)
+ send_message('get_range_slice', Get_range_slice_args, :keyspace => keyspace, :column_parent => column_parent, :predicate => predicate, :start_key => start_key, :finish_key => finish_key, :row_count => row_count, :consistency_level => consistency_level)
end
- def recv_get_key_range()
- result = receive_message(Get_key_range_result)
+ def recv_get_range_slice()
+ result = receive_message(Get_range_slice_result)
return result.success unless result.success.nil?
raise result.ire unless result.ire.nil?
raise result.ue unless result.ue.nil?
raise result.te unless result.te.nil?
- raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_key_range failed: unknown result')
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_range_slice failed: unknown result')
end
- def get_range_slice(keyspace, column_parent, predicate, start_key, finish_key, row_count, consistency_level)
- send_get_range_slice(keyspace, column_parent, predicate, start_key, finish_key, row_count, consistency_level)
- return recv_get_range_slice()
+ def get_range_slices(keyspace, column_parent, predicate, range, consistency_level)
+ send_get_range_slices(keyspace, column_parent, predicate, range, consistency_level)
+ return recv_get_range_slices()
end
- def send_get_range_slice(keyspace, column_parent, predicate, start_key, finish_key, row_count, consistency_level)
- send_message('get_range_slice', Get_range_slice_args, :keyspace => keyspace, :column_parent => column_parent, :predicate => predicate, :start_key => start_key, :finish_key => finish_key, :row_count => row_count, :consistency_level => consistency_level)
+ def send_get_range_slices(keyspace, column_parent, predicate, range, consistency_level)
+ send_message('get_range_slices', Get_range_slices_args, :keyspace => keyspace, :column_parent => column_parent, :predicate => predicate, :range => range, :consistency_level => consistency_level)
end
- def recv_get_range_slice()
- result = receive_message(Get_range_slice_result)
+ def recv_get_range_slices()
+ result = receive_message(Get_range_slices_result)
return result.success unless result.success.nil?
raise result.ire unless result.ire.nil?
raise result.ue unless result.ue.nil?
raise result.te unless result.te.nil?
- raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_range_slice failed: unknown result')
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_range_slices failed: unknown result')
end
def insert(keyspace, key, column_path, value, timestamp, consistency_level)
send_insert(keyspace, key, column_path, value, timestamp, consistency_level)
recv_insert()
@@ -188,10 +204,27 @@
raise result.ue unless result.ue.nil?
raise result.te unless result.te.nil?
return
end
+ def batch_mutate(keyspace, mutation_map, consistency_level)
+ send_batch_mutate(keyspace, mutation_map, consistency_level)
+ recv_batch_mutate()
+ end
+
+ def send_batch_mutate(keyspace, mutation_map, consistency_level)
+ send_message('batch_mutate', Batch_mutate_args, :keyspace => keyspace, :mutation_map => mutation_map, :consistency_level => consistency_level)
+ end
+
+ def recv_batch_mutate()
+ result = receive_message(Batch_mutate_result)
+ raise result.ire unless result.ire.nil?
+ raise result.ue unless result.ue.nil?
+ raise result.te unless result.te.nil?
+ return
+ end
+
def get_string_property(property)
send_get_string_property(property)
return recv_get_string_property()
end
@@ -218,10 +251,70 @@
result = receive_message(Get_string_list_property_result)
return result.success unless result.success.nil?
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_string_list_property failed: unknown result')
end
+ def describe_keyspaces()
+ send_describe_keyspaces()
+ return recv_describe_keyspaces()
+ end
+
+ def send_describe_keyspaces()
+ send_message('describe_keyspaces', Describe_keyspaces_args)
+ end
+
+ def recv_describe_keyspaces()
+ result = receive_message(Describe_keyspaces_result)
+ return result.success unless result.success.nil?
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'describe_keyspaces failed: unknown result')
+ end
+
+ def describe_cluster_name()
+ send_describe_cluster_name()
+ return recv_describe_cluster_name()
+ end
+
+ def send_describe_cluster_name()
+ send_message('describe_cluster_name', Describe_cluster_name_args)
+ end
+
+ def recv_describe_cluster_name()
+ result = receive_message(Describe_cluster_name_result)
+ return result.success unless result.success.nil?
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'describe_cluster_name failed: unknown result')
+ end
+
+ def describe_version()
+ send_describe_version()
+ return recv_describe_version()
+ end
+
+ def send_describe_version()
+ send_message('describe_version', Describe_version_args)
+ end
+
+ def recv_describe_version()
+ result = receive_message(Describe_version_result)
+ return result.success unless result.success.nil?
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'describe_version failed: unknown result')
+ end
+
+ def describe_ring(keyspace)
+ send_describe_ring(keyspace)
+ return recv_describe_ring()
+ end
+
+ def send_describe_ring(keyspace)
+ send_message('describe_ring', Describe_ring_args, :keyspace => keyspace)
+ end
+
+ def recv_describe_ring()
+ result = receive_message(Describe_ring_result)
+ return result.success unless result.success.nil?
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'describe_ring failed: unknown result')
+ end
+
def describe_keyspace(keyspace)
send_describe_keyspace(keyspace)
return recv_describe_keyspace()
end
@@ -234,15 +327,43 @@
return result.success unless result.success.nil?
raise result.nfe unless result.nfe.nil?
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'describe_keyspace failed: unknown result')
end
+ def describe_splits(start_token, end_token, keys_per_split)
+ send_describe_splits(start_token, end_token, keys_per_split)
+ return recv_describe_splits()
+ end
+
+ def send_describe_splits(start_token, end_token, keys_per_split)
+ send_message('describe_splits', Describe_splits_args, :start_token => start_token, :end_token => end_token, :keys_per_split => keys_per_split)
+ end
+
+ def recv_describe_splits()
+ result = receive_message(Describe_splits_result)
+ return result.success unless result.success.nil?
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'describe_splits failed: unknown result')
+ end
+
end
class Processor
include ::Thrift::Processor
+ def process_login(seqid, iprot, oprot)
+ args = read_args(iprot, Login_args)
+ result = Login_result.new()
+ begin
+ @handler.login(args.keyspace, args.auth_request)
+ rescue CassandraThrift::AuthenticationException => authnx
+ result.authnx = authnx
+ rescue CassandraThrift::AuthorizationException => authzx
+ result.authzx = authzx
+ end
+ write_result(result, oprot, 'login', seqid)
+ end
+
def process_get(seqid, iprot, oprot)
args = read_args(iprot, Get_args)
result = Get_result.new()
begin
result.success = @handler.get(args.keyspace, args.key, args.column_path, args.consistency_level)
@@ -316,38 +437,38 @@
result.te = te
end
write_result(result, oprot, 'get_count', seqid)
end
- def process_get_key_range(seqid, iprot, oprot)
- args = read_args(iprot, Get_key_range_args)
- result = Get_key_range_result.new()
+ def process_get_range_slice(seqid, iprot, oprot)
+ args = read_args(iprot, Get_range_slice_args)
+ result = Get_range_slice_result.new()
begin
- result.success = @handler.get_key_range(args.keyspace, args.column_family, args.start, args.finish, args.count, args.consistency_level)
+ result.success = @handler.get_range_slice(args.keyspace, args.column_parent, args.predicate, args.start_key, args.finish_key, args.row_count, args.consistency_level)
rescue CassandraThrift::InvalidRequestException => ire
result.ire = ire
rescue CassandraThrift::UnavailableException => ue
result.ue = ue
rescue CassandraThrift::TimedOutException => te
result.te = te
end
- write_result(result, oprot, 'get_key_range', seqid)
+ write_result(result, oprot, 'get_range_slice', seqid)
end
- def process_get_range_slice(seqid, iprot, oprot)
- args = read_args(iprot, Get_range_slice_args)
- result = Get_range_slice_result.new()
+ def process_get_range_slices(seqid, iprot, oprot)
+ args = read_args(iprot, Get_range_slices_args)
+ result = Get_range_slices_result.new()
begin
- result.success = @handler.get_range_slice(args.keyspace, args.column_parent, args.predicate, args.start_key, args.finish_key, args.row_count, args.consistency_level)
+ result.success = @handler.get_range_slices(args.keyspace, args.column_parent, args.predicate, args.range, args.consistency_level)
rescue CassandraThrift::InvalidRequestException => ire
result.ire = ire
rescue CassandraThrift::UnavailableException => ue
result.ue = ue
rescue CassandraThrift::TimedOutException => te
result.te = te
end
- write_result(result, oprot, 'get_range_slice', seqid)
+ write_result(result, oprot, 'get_range_slices', seqid)
end
def process_insert(seqid, iprot, oprot)
args = read_args(iprot, Insert_args)
result = Insert_result.new()
@@ -391,10 +512,25 @@
result.te = te
end
write_result(result, oprot, 'remove', seqid)
end
+ def process_batch_mutate(seqid, iprot, oprot)
+ args = read_args(iprot, Batch_mutate_args)
+ result = Batch_mutate_result.new()
+ begin
+ @handler.batch_mutate(args.keyspace, args.mutation_map, args.consistency_level)
+ rescue CassandraThrift::InvalidRequestException => ire
+ result.ire = ire
+ rescue CassandraThrift::UnavailableException => ue
+ result.ue = ue
+ rescue CassandraThrift::TimedOutException => te
+ result.te = te
+ end
+ write_result(result, oprot, 'batch_mutate', seqid)
+ end
+
def process_get_string_property(seqid, iprot, oprot)
args = read_args(iprot, Get_string_property_args)
result = Get_string_property_result.new()
result.success = @handler.get_string_property(args.property)
write_result(result, oprot, 'get_string_property', seqid)
@@ -405,10 +541,38 @@
result = Get_string_list_property_result.new()
result.success = @handler.get_string_list_property(args.property)
write_result(result, oprot, 'get_string_list_property', seqid)
end
+ def process_describe_keyspaces(seqid, iprot, oprot)
+ args = read_args(iprot, Describe_keyspaces_args)
+ result = Describe_keyspaces_result.new()
+ result.success = @handler.describe_keyspaces()
+ write_result(result, oprot, 'describe_keyspaces', seqid)
+ end
+
+ def process_describe_cluster_name(seqid, iprot, oprot)
+ args = read_args(iprot, Describe_cluster_name_args)
+ result = Describe_cluster_name_result.new()
+ result.success = @handler.describe_cluster_name()
+ write_result(result, oprot, 'describe_cluster_name', seqid)
+ end
+
+ def process_describe_version(seqid, iprot, oprot)
+ args = read_args(iprot, Describe_version_args)
+ result = Describe_version_result.new()
+ result.success = @handler.describe_version()
+ write_result(result, oprot, 'describe_version', seqid)
+ end
+
+ def process_describe_ring(seqid, iprot, oprot)
+ args = read_args(iprot, Describe_ring_args)
+ result = Describe_ring_result.new()
+ result.success = @handler.describe_ring(args.keyspace)
+ write_result(result, oprot, 'describe_ring', seqid)
+ end
+
def process_describe_keyspace(seqid, iprot, oprot)
args = read_args(iprot, Describe_keyspace_args)
result = Describe_keyspace_result.new()
begin
result.success = @handler.describe_keyspace(args.keyspace)
@@ -416,14 +580,59 @@
result.nfe = nfe
end
write_result(result, oprot, 'describe_keyspace', seqid)
end
+ def process_describe_splits(seqid, iprot, oprot)
+ args = read_args(iprot, Describe_splits_args)
+ result = Describe_splits_result.new()
+ result.success = @handler.describe_splits(args.start_token, args.end_token, args.keys_per_split)
+ write_result(result, oprot, 'describe_splits', seqid)
+ end
+
end
# HELPER FUNCTIONS AND STRUCTURES
+ class Login_args
+ include ::Thrift::Struct
+ KEYSPACE = 1
+ AUTH_REQUEST = 2
+
+ ::Thrift::Struct.field_accessor self, :keyspace, :auth_request
+ FIELDS = {
+ KEYSPACE => {:type => ::Thrift::Types::STRING, :name => 'keyspace'},
+ AUTH_REQUEST => {:type => ::Thrift::Types::STRUCT, :name => 'auth_request', :class => CassandraThrift::AuthenticationRequest}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keyspace is unset!') unless @keyspace
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field auth_request is unset!') unless @auth_request
+ end
+
+ end
+
+ class Login_result
+ include ::Thrift::Struct
+ AUTHNX = 1
+ AUTHZX = 2
+
+ ::Thrift::Struct.field_accessor self, :authnx, :authzx
+ FIELDS = {
+ AUTHNX => {:type => ::Thrift::Types::STRUCT, :name => 'authnx', :class => CassandraThrift::AuthenticationException},
+ AUTHZX => {:type => ::Thrift::Types::STRUCT, :name => 'authzx', :class => CassandraThrift::AuthorizationException}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ end
+
class Get_args
include ::Thrift::Struct
KEYSPACE = 1
KEY = 2
COLUMN_PATH = 3
@@ -438,10 +647,14 @@
}
def struct_fields; FIELDS; end
def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keyspace is unset!') unless @keyspace
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field key is unset!') unless @key
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_path is unset!') unless @column_path
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field consistency_level is unset!') unless @consistency_level
unless @consistency_level.nil? || CassandraThrift::ConsistencyLevel::VALID_VALUES.include?(@consistency_level)
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field consistency_level!')
end
end
@@ -489,10 +702,15 @@
}
def struct_fields; FIELDS; end
def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keyspace is unset!') unless @keyspace
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field key is unset!') unless @key
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_parent is unset!') unless @column_parent
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field predicate is unset!') unless @predicate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field consistency_level is unset!') unless @consistency_level
unless @consistency_level.nil? || CassandraThrift::ConsistencyLevel::VALID_VALUES.include?(@consistency_level)
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field consistency_level!')
end
end
@@ -536,10 +754,14 @@
}
def struct_fields; FIELDS; end
def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keyspace is unset!') unless @keyspace
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keys is unset!') unless @keys
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_path is unset!') unless @column_path
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field consistency_level is unset!') unless @consistency_level
unless @consistency_level.nil? || CassandraThrift::ConsistencyLevel::VALID_VALUES.include?(@consistency_level)
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field consistency_level!')
end
end
@@ -585,10 +807,15 @@
}
def struct_fields; FIELDS; end
def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keyspace is unset!') unless @keyspace
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keys is unset!') unless @keys
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_parent is unset!') unless @column_parent
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field predicate is unset!') unless @predicate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field consistency_level is unset!') unless @consistency_level
unless @consistency_level.nil? || CassandraThrift::ConsistencyLevel::VALID_VALUES.include?(@consistency_level)
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field consistency_level!')
end
end
@@ -632,10 +859,14 @@
}
def struct_fields; FIELDS; end
def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keyspace is unset!') unless @keyspace
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field key is unset!') unless @key
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_parent is unset!') unless @column_parent
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field consistency_level is unset!') unless @consistency_level
unless @consistency_level.nil? || CassandraThrift::ConsistencyLevel::VALID_VALUES.include?(@consistency_level)
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field consistency_level!')
end
end
@@ -661,49 +892,58 @@
def validate
end
end
- class Get_key_range_args
+ class Get_range_slice_args
include ::Thrift::Struct
KEYSPACE = 1
- COLUMN_FAMILY = 2
- START = 3
- FINISH = 4
- COUNT = 5
- CONSISTENCY_LEVEL = 6
+ COLUMN_PARENT = 2
+ PREDICATE = 3
+ START_KEY = 4
+ FINISH_KEY = 5
+ ROW_COUNT = 6
+ CONSISTENCY_LEVEL = 7
- ::Thrift::Struct.field_accessor self, :keyspace, :column_family, :start, :finish, :count, :consistency_level
+ ::Thrift::Struct.field_accessor self, :keyspace, :column_parent, :predicate, :start_key, :finish_key, :row_count, :consistency_level
FIELDS = {
KEYSPACE => {:type => ::Thrift::Types::STRING, :name => 'keyspace'},
- COLUMN_FAMILY => {:type => ::Thrift::Types::STRING, :name => 'column_family'},
- START => {:type => ::Thrift::Types::STRING, :name => 'start', :default => %q""},
- FINISH => {:type => ::Thrift::Types::STRING, :name => 'finish', :default => %q""},
- COUNT => {:type => ::Thrift::Types::I32, :name => 'count', :default => 100},
+ COLUMN_PARENT => {:type => ::Thrift::Types::STRUCT, :name => 'column_parent', :class => CassandraThrift::ColumnParent},
+ PREDICATE => {:type => ::Thrift::Types::STRUCT, :name => 'predicate', :class => CassandraThrift::SlicePredicate},
+ START_KEY => {:type => ::Thrift::Types::STRING, :name => 'start_key', :default => %q""},
+ FINISH_KEY => {:type => ::Thrift::Types::STRING, :name => 'finish_key', :default => %q""},
+ ROW_COUNT => {:type => ::Thrift::Types::I32, :name => 'row_count', :default => 100},
CONSISTENCY_LEVEL => {:type => ::Thrift::Types::I32, :name => 'consistency_level', :default => 1, :enum_class => CassandraThrift::ConsistencyLevel}
}
def struct_fields; FIELDS; end
def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keyspace is unset!') unless @keyspace
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_parent is unset!') unless @column_parent
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field predicate is unset!') unless @predicate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field start_key is unset!') unless @start_key
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field finish_key is unset!') unless @finish_key
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field row_count is unset!') unless @row_count
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field consistency_level is unset!') unless @consistency_level
unless @consistency_level.nil? || CassandraThrift::ConsistencyLevel::VALID_VALUES.include?(@consistency_level)
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field consistency_level!')
end
end
end
- class Get_key_range_result
+ class Get_range_slice_result
include ::Thrift::Struct
SUCCESS = 0
IRE = 1
UE = 2
TE = 3
::Thrift::Struct.field_accessor self, :success, :ire, :ue, :te
FIELDS = {
- SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}},
+ SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => CassandraThrift::KeySlice}},
IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => CassandraThrift::InvalidRequestException},
UE => {:type => ::Thrift::Types::STRUCT, :name => 'ue', :class => CassandraThrift::UnavailableException},
TE => {:type => ::Thrift::Types::STRUCT, :name => 'te', :class => CassandraThrift::TimedOutException}
}
@@ -712,42 +952,43 @@
def validate
end
end
- class Get_range_slice_args
+ class Get_range_slices_args
include ::Thrift::Struct
KEYSPACE = 1
COLUMN_PARENT = 2
PREDICATE = 3
- START_KEY = 4
- FINISH_KEY = 5
- ROW_COUNT = 6
- CONSISTENCY_LEVEL = 7
+ RANGE = 4
+ CONSISTENCY_LEVEL = 5
- ::Thrift::Struct.field_accessor self, :keyspace, :column_parent, :predicate, :start_key, :finish_key, :row_count, :consistency_level
+ ::Thrift::Struct.field_accessor self, :keyspace, :column_parent, :predicate, :range, :consistency_level
FIELDS = {
KEYSPACE => {:type => ::Thrift::Types::STRING, :name => 'keyspace'},
COLUMN_PARENT => {:type => ::Thrift::Types::STRUCT, :name => 'column_parent', :class => CassandraThrift::ColumnParent},
PREDICATE => {:type => ::Thrift::Types::STRUCT, :name => 'predicate', :class => CassandraThrift::SlicePredicate},
- START_KEY => {:type => ::Thrift::Types::STRING, :name => 'start_key', :default => %q""},
- FINISH_KEY => {:type => ::Thrift::Types::STRING, :name => 'finish_key', :default => %q""},
- ROW_COUNT => {:type => ::Thrift::Types::I32, :name => 'row_count', :default => 100},
+ RANGE => {:type => ::Thrift::Types::STRUCT, :name => 'range', :class => CassandraThrift::KeyRange},
CONSISTENCY_LEVEL => {:type => ::Thrift::Types::I32, :name => 'consistency_level', :default => 1, :enum_class => CassandraThrift::ConsistencyLevel}
}
def struct_fields; FIELDS; end
def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keyspace is unset!') unless @keyspace
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_parent is unset!') unless @column_parent
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field predicate is unset!') unless @predicate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field range is unset!') unless @range
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field consistency_level is unset!') unless @consistency_level
unless @consistency_level.nil? || CassandraThrift::ConsistencyLevel::VALID_VALUES.include?(@consistency_level)
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field consistency_level!')
end
end
end
- class Get_range_slice_result
+ class Get_range_slices_result
include ::Thrift::Struct
SUCCESS = 0
IRE = 1
UE = 2
TE = 3
@@ -787,10 +1028,16 @@
}
def struct_fields; FIELDS; end
def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keyspace is unset!') unless @keyspace
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field key is unset!') unless @key
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_path is unset!') unless @column_path
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field value is unset!') unless @value
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field timestamp is unset!') unless @timestamp
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field consistency_level is unset!') unless @consistency_level
unless @consistency_level.nil? || CassandraThrift::ConsistencyLevel::VALID_VALUES.include?(@consistency_level)
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field consistency_level!')
end
end
@@ -832,10 +1079,14 @@
}
def struct_fields; FIELDS; end
def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keyspace is unset!') unless @keyspace
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field key is unset!') unless @key
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field cfmap is unset!') unless @cfmap
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field consistency_level is unset!') unless @consistency_level
unless @consistency_level.nil? || CassandraThrift::ConsistencyLevel::VALID_VALUES.include?(@consistency_level)
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field consistency_level!')
end
end
@@ -879,10 +1130,14 @@
}
def struct_fields; FIELDS; end
def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keyspace is unset!') unless @keyspace
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field key is unset!') unless @key
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_path is unset!') unless @column_path
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field timestamp is unset!') unless @timestamp
unless @consistency_level.nil? || CassandraThrift::ConsistencyLevel::VALID_VALUES.include?(@consistency_level)
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field consistency_level!')
end
end
@@ -906,10 +1161,56 @@
def validate
end
end
+ class Batch_mutate_args
+ include ::Thrift::Struct
+ KEYSPACE = 1
+ MUTATION_MAP = 2
+ CONSISTENCY_LEVEL = 3
+
+ ::Thrift::Struct.field_accessor self, :keyspace, :mutation_map, :consistency_level
+ FIELDS = {
+ KEYSPACE => {:type => ::Thrift::Types::STRING, :name => 'keyspace'},
+ MUTATION_MAP => {:type => ::Thrift::Types::MAP, :name => 'mutation_map', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::MAP, :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRUCT, :class => CassandraThrift::Mutation}}}},
+ CONSISTENCY_LEVEL => {:type => ::Thrift::Types::I32, :name => 'consistency_level', :default => 0, :enum_class => CassandraThrift::ConsistencyLevel}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keyspace is unset!') unless @keyspace
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field mutation_map is unset!') unless @mutation_map
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field consistency_level is unset!') unless @consistency_level
+ unless @consistency_level.nil? || CassandraThrift::ConsistencyLevel::VALID_VALUES.include?(@consistency_level)
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field consistency_level!')
+ end
+ end
+
+ end
+
+ class Batch_mutate_result
+ include ::Thrift::Struct
+ IRE = 1
+ UE = 2
+ TE = 3
+
+ ::Thrift::Struct.field_accessor self, :ire, :ue, :te
+ FIELDS = {
+ IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => CassandraThrift::InvalidRequestException},
+ UE => {:type => ::Thrift::Types::STRUCT, :name => 'ue', :class => CassandraThrift::UnavailableException},
+ TE => {:type => ::Thrift::Types::STRUCT, :name => 'te', :class => CassandraThrift::TimedOutException}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ end
+
class Get_string_property_args
include ::Thrift::Struct
PROPERTY = 1
::Thrift::Struct.field_accessor self, :property
@@ -918,10 +1219,11 @@
}
def struct_fields; FIELDS; end
def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field property is unset!') unless @property
end
end
class Get_string_property_result
@@ -950,10 +1252,11 @@
}
def struct_fields; FIELDS; end
def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field property is unset!') unless @property
end
end
class Get_string_list_property_result
@@ -970,10 +1273,133 @@
def validate
end
end
+ class Describe_keyspaces_args
+ include ::Thrift::Struct
+
+ FIELDS = {
+
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ end
+
+ class Describe_keyspaces_result
+ include ::Thrift::Struct
+ SUCCESS = 0
+
+ ::Thrift::Struct.field_accessor self, :success
+ FIELDS = {
+ SUCCESS => {:type => ::Thrift::Types::SET, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ end
+
+ class Describe_cluster_name_args
+ include ::Thrift::Struct
+
+ FIELDS = {
+
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ end
+
+ class Describe_cluster_name_result
+ include ::Thrift::Struct
+ SUCCESS = 0
+
+ ::Thrift::Struct.field_accessor self, :success
+ FIELDS = {
+ SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ end
+
+ class Describe_version_args
+ include ::Thrift::Struct
+
+ FIELDS = {
+
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ end
+
+ class Describe_version_result
+ include ::Thrift::Struct
+ SUCCESS = 0
+
+ ::Thrift::Struct.field_accessor self, :success
+ FIELDS = {
+ SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ end
+
+ class Describe_ring_args
+ include ::Thrift::Struct
+ KEYSPACE = 1
+
+ ::Thrift::Struct.field_accessor self, :keyspace
+ FIELDS = {
+ KEYSPACE => {:type => ::Thrift::Types::STRING, :name => 'keyspace'}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keyspace is unset!') unless @keyspace
+ end
+
+ end
+
+ class Describe_ring_result
+ include ::Thrift::Struct
+ SUCCESS = 0
+
+ ::Thrift::Struct.field_accessor self, :success
+ FIELDS = {
+ SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => CassandraThrift::TokenRange}}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ end
+
class Describe_keyspace_args
include ::Thrift::Struct
KEYSPACE = 1
::Thrift::Struct.field_accessor self, :keyspace
@@ -982,10 +1408,11 @@
}
def struct_fields; FIELDS; end
def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keyspace is unset!') unless @keyspace
end
end
class Describe_keyspace_result
@@ -995,9 +1422,48 @@
::Thrift::Struct.field_accessor self, :success, :nfe
FIELDS = {
SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::MAP, :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}},
NFE => {:type => ::Thrift::Types::STRUCT, :name => 'nfe', :class => CassandraThrift::NotFoundException}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ end
+
+ class Describe_splits_args
+ include ::Thrift::Struct
+ START_TOKEN = 1
+ END_TOKEN = 2
+ KEYS_PER_SPLIT = 3
+
+ ::Thrift::Struct.field_accessor self, :start_token, :end_token, :keys_per_split
+ FIELDS = {
+ START_TOKEN => {:type => ::Thrift::Types::STRING, :name => 'start_token'},
+ END_TOKEN => {:type => ::Thrift::Types::STRING, :name => 'end_token'},
+ KEYS_PER_SPLIT => {:type => ::Thrift::Types::I32, :name => 'keys_per_split'}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field start_token is unset!') unless @start_token
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field end_token is unset!') unless @end_token
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keys_per_split is unset!') unless @keys_per_split
+ end
+
+ end
+
+ class Describe_splits_result
+ include ::Thrift::Struct
+ SUCCESS = 0
+
+ ::Thrift::Struct.field_accessor self, :success
+ FIELDS = {
+ SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}
}
def struct_fields; FIELDS; end
def validate