Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #177 from hannosch/protocol-19.35.0

Protocol 19.35.0 and thrift 0.9
  • Loading branch information...
commit 79bb07d90419daabf0ec6fdcc4c0c6e09efe5b02 2 parents 4b8741c + 73862c4
@thobbs thobbs authored
View
1,311 pycassa/cassandra/Cassandra.py
@@ -1,15 +1,12 @@
#
-# Autogenerated by Thrift Compiler (0.8.0)
+# Autogenerated by Thrift Compiler (0.9.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
# options string: py:new_style
#
-# Manually add missing import
-from thrift.Thrift import TApplicationException
-
-from thrift.Thrift import TType, TMessageType, TException
+from thrift.Thrift import TType, TMessageType, TException, TApplicationException
from ttypes import *
from thrift.Thrift import TProcessor
from thrift.transport import TTransport
@@ -124,7 +121,7 @@ def get_paged_slice(self, column_family, range, start_column, consistency_level)
def get_indexed_slices(self, column_parent, index_clause, column_predicate, consistency_level):
"""
Returns the subset of columns specified in SlicePredicate for the rows matching the IndexClause
- @Deprecated; use get_range_slices instead with range.row_filter specified
+ @deprecated use get_range_slices instead with range.row_filter specified
Parameters:
- column_parent
@@ -319,6 +316,16 @@ def trace_next_query(self, ):
"""
pass
+ def describe_splits_ex(self, cfName, start_token, end_token, keys_per_split):
+ """
+ Parameters:
+ - cfName
+ - start_token
+ - end_token
+ - keys_per_split
+ """
+ pass
+
def system_add_column_family(self, cf_def):
"""
adds a column family. returns the new schema id.
@@ -384,6 +391,15 @@ def execute_cql_query(self, query, compression):
"""
pass
+ def execute_cql3_query(self, query, compression, consistency):
+ """
+ Parameters:
+ - query
+ - compression
+ - consistency
+ """
+ pass
+
def prepare_cql_query(self, query, compression):
"""
Prepare a CQL (Cassandra Query Language) statement by compiling and returning
@@ -397,6 +413,14 @@ def prepare_cql_query(self, query, compression):
"""
pass
+ def prepare_cql3_query(self, query, compression):
+ """
+ Parameters:
+ - query
+ - compression
+ """
+ pass
+
def execute_prepared_cql_query(self, itemId, values):
"""
Executes a prepared CQL (Cassandra Query Language) statement by passing an id token and a list of variables
@@ -408,8 +432,19 @@ def execute_prepared_cql_query(self, itemId, values):
"""
pass
+ def execute_prepared_cql3_query(self, itemId, values, consistency):
+ """
+ Parameters:
+ - itemId
+ - values
+ - consistency
+ """
+ pass
+
def set_cql_version(self, version):
"""
+ @deprecated This is now a no-op. Please use the CQL3 specific methods instead.
+
Parameters:
- version
"""
@@ -799,7 +834,7 @@ def recv_get_paged_slice(self, ):
def get_indexed_slices(self, column_parent, index_clause, column_predicate, consistency_level):
"""
Returns the subset of columns specified in SlicePredicate for the rows matching the IndexClause
- @Deprecated; use get_range_slices instead with range.row_filter specified
+ @deprecated use get_range_slices instead with range.row_filter specified
Parameters:
- column_parent
@@ -1490,6 +1525,44 @@ def recv_trace_next_query(self, ):
return result.success
raise TApplicationException(TApplicationException.MISSING_RESULT, "trace_next_query failed: unknown result");
+ def describe_splits_ex(self, cfName, start_token, end_token, keys_per_split):
+ """
+ Parameters:
+ - cfName
+ - start_token
+ - end_token
+ - keys_per_split
+ """
+ self.send_describe_splits_ex(cfName, start_token, end_token, keys_per_split)
+ return self.recv_describe_splits_ex()
+
+ def send_describe_splits_ex(self, cfName, start_token, end_token, keys_per_split):
+ self._oprot.writeMessageBegin('describe_splits_ex', TMessageType.CALL, self._seqid)
+ args = describe_splits_ex_args()
+ args.cfName = cfName
+ args.start_token = start_token
+ args.end_token = end_token
+ args.keys_per_split = keys_per_split
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_describe_splits_ex(self, ):
+ (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(self._iprot)
+ self._iprot.readMessageEnd()
+ raise x
+ result = describe_splits_ex_result()
+ result.read(self._iprot)
+ self._iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.ire is not None:
+ raise result.ire
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "describe_splits_ex failed: unknown result");
+
def system_add_column_family(self, cf_def):
"""
adds a column family. returns the new schema id.
@@ -1749,6 +1822,48 @@ def recv_execute_cql_query(self, ):
raise result.sde
raise TApplicationException(TApplicationException.MISSING_RESULT, "execute_cql_query failed: unknown result");
+ def execute_cql3_query(self, query, compression, consistency):
+ """
+ Parameters:
+ - query
+ - compression
+ - consistency
+ """
+ self.send_execute_cql3_query(query, compression, consistency)
+ return self.recv_execute_cql3_query()
+
+ def send_execute_cql3_query(self, query, compression, consistency):
+ self._oprot.writeMessageBegin('execute_cql3_query', TMessageType.CALL, self._seqid)
+ args = execute_cql3_query_args()
+ args.query = query
+ args.compression = compression
+ args.consistency = consistency
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_execute_cql3_query(self, ):
+ (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(self._iprot)
+ self._iprot.readMessageEnd()
+ raise x
+ result = execute_cql3_query_result()
+ result.read(self._iprot)
+ self._iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.ire is not None:
+ raise result.ire
+ if result.ue is not None:
+ raise result.ue
+ if result.te is not None:
+ raise result.te
+ if result.sde is not None:
+ raise result.sde
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "execute_cql3_query failed: unknown result");
+
def prepare_cql_query(self, query, compression):
"""
Prepare a CQL (Cassandra Query Language) statement by compiling and returning
@@ -1788,6 +1903,40 @@ def recv_prepare_cql_query(self, ):
raise result.ire
raise TApplicationException(TApplicationException.MISSING_RESULT, "prepare_cql_query failed: unknown result");
+ def prepare_cql3_query(self, query, compression):
+ """
+ Parameters:
+ - query
+ - compression
+ """
+ self.send_prepare_cql3_query(query, compression)
+ return self.recv_prepare_cql3_query()
+
+ def send_prepare_cql3_query(self, query, compression):
+ self._oprot.writeMessageBegin('prepare_cql3_query', TMessageType.CALL, self._seqid)
+ args = prepare_cql3_query_args()
+ args.query = query
+ args.compression = compression
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_prepare_cql3_query(self, ):
+ (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(self._iprot)
+ self._iprot.readMessageEnd()
+ raise x
+ result = prepare_cql3_query_result()
+ result.read(self._iprot)
+ self._iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.ire is not None:
+ raise result.ire
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "prepare_cql3_query failed: unknown result");
+
def execute_prepared_cql_query(self, itemId, values):
"""
Executes a prepared CQL (Cassandra Query Language) statement by passing an id token and a list of variables
@@ -1831,8 +1980,52 @@ def recv_execute_prepared_cql_query(self, ):
raise result.sde
raise TApplicationException(TApplicationException.MISSING_RESULT, "execute_prepared_cql_query failed: unknown result");
+ def execute_prepared_cql3_query(self, itemId, values, consistency):
+ """
+ Parameters:
+ - itemId
+ - values
+ - consistency
+ """
+ self.send_execute_prepared_cql3_query(itemId, values, consistency)
+ return self.recv_execute_prepared_cql3_query()
+
+ def send_execute_prepared_cql3_query(self, itemId, values, consistency):
+ self._oprot.writeMessageBegin('execute_prepared_cql3_query', TMessageType.CALL, self._seqid)
+ args = execute_prepared_cql3_query_args()
+ args.itemId = itemId
+ args.values = values
+ args.consistency = consistency
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_execute_prepared_cql3_query(self, ):
+ (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(self._iprot)
+ self._iprot.readMessageEnd()
+ raise x
+ result = execute_prepared_cql3_query_result()
+ result.read(self._iprot)
+ self._iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.ire is not None:
+ raise result.ire
+ if result.ue is not None:
+ raise result.ue
+ if result.te is not None:
+ raise result.te
+ if result.sde is not None:
+ raise result.sde
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "execute_prepared_cql3_query failed: unknown result");
+
def set_cql_version(self, version):
"""
+ @deprecated This is now a no-op. Please use the CQL3 specific methods instead.
+
Parameters:
- version
"""
@@ -1894,6 +2087,7 @@ def __init__(self, handler):
self._processMap["describe_keyspace"] = Processor.process_describe_keyspace
self._processMap["describe_splits"] = Processor.process_describe_splits
self._processMap["trace_next_query"] = Processor.process_trace_next_query
+ self._processMap["describe_splits_ex"] = Processor.process_describe_splits_ex
self._processMap["system_add_column_family"] = Processor.process_system_add_column_family
self._processMap["system_drop_column_family"] = Processor.process_system_drop_column_family
self._processMap["system_add_keyspace"] = Processor.process_system_add_keyspace
@@ -1901,8 +2095,11 @@ def __init__(self, handler):
self._processMap["system_update_keyspace"] = Processor.process_system_update_keyspace
self._processMap["system_update_column_family"] = Processor.process_system_update_column_family
self._processMap["execute_cql_query"] = Processor.process_execute_cql_query
+ self._processMap["execute_cql3_query"] = Processor.process_execute_cql3_query
self._processMap["prepare_cql_query"] = Processor.process_prepare_cql_query
+ self._processMap["prepare_cql3_query"] = Processor.process_prepare_cql3_query
self._processMap["execute_prepared_cql_query"] = Processor.process_execute_prepared_cql_query
+ self._processMap["execute_prepared_cql3_query"] = Processor.process_execute_prepared_cql3_query
self._processMap["set_cql_version"] = Processor.process_set_cql_version
def process(self, iprot, oprot):
@@ -1927,9 +2124,9 @@ def process_login(self, seqid, iprot, oprot):
result = login_result()
try:
self._handler.login(args.auth_request)
- except AuthenticationException, authnx:
+ except AuthenticationException as authnx:
result.authnx = authnx
- except AuthorizationException, authzx:
+ except AuthorizationException as authzx:
result.authzx = authzx
oprot.writeMessageBegin("login", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -1943,7 +2140,7 @@ def process_set_keyspace(self, seqid, iprot, oprot):
result = set_keyspace_result()
try:
self._handler.set_keyspace(args.keyspace)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
oprot.writeMessageBegin("set_keyspace", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -1957,13 +2154,13 @@ def process_get(self, seqid, iprot, oprot):
result = get_result()
try:
result.success = self._handler.get(args.key, args.column_path, args.consistency_level)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except NotFoundException, nfe:
+ except NotFoundException as nfe:
result.nfe = nfe
- except UnavailableException, ue:
+ except UnavailableException as ue:
result.ue = ue
- except TimedOutException, te:
+ except TimedOutException as te:
result.te = te
oprot.writeMessageBegin("get", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -1977,11 +2174,11 @@ def process_get_slice(self, seqid, iprot, oprot):
result = get_slice_result()
try:
result.success = self._handler.get_slice(args.key, args.column_parent, args.predicate, args.consistency_level)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except UnavailableException, ue:
+ except UnavailableException as ue:
result.ue = ue
- except TimedOutException, te:
+ except TimedOutException as te:
result.te = te
oprot.writeMessageBegin("get_slice", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -1995,11 +2192,11 @@ def process_get_count(self, seqid, iprot, oprot):
result = get_count_result()
try:
result.success = self._handler.get_count(args.key, args.column_parent, args.predicate, args.consistency_level)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except UnavailableException, ue:
+ except UnavailableException as ue:
result.ue = ue
- except TimedOutException, te:
+ except TimedOutException as te:
result.te = te
oprot.writeMessageBegin("get_count", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2013,11 +2210,11 @@ def process_multiget_slice(self, seqid, iprot, oprot):
result = multiget_slice_result()
try:
result.success = self._handler.multiget_slice(args.keys, args.column_parent, args.predicate, args.consistency_level)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except UnavailableException, ue:
+ except UnavailableException as ue:
result.ue = ue
- except TimedOutException, te:
+ except TimedOutException as te:
result.te = te
oprot.writeMessageBegin("multiget_slice", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2031,11 +2228,11 @@ def process_multiget_count(self, seqid, iprot, oprot):
result = multiget_count_result()
try:
result.success = self._handler.multiget_count(args.keys, args.column_parent, args.predicate, args.consistency_level)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except UnavailableException, ue:
+ except UnavailableException as ue:
result.ue = ue
- except TimedOutException, te:
+ except TimedOutException as te:
result.te = te
oprot.writeMessageBegin("multiget_count", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2049,11 +2246,11 @@ def process_get_range_slices(self, seqid, iprot, oprot):
result = get_range_slices_result()
try:
result.success = self._handler.get_range_slices(args.column_parent, args.predicate, args.range, args.consistency_level)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except UnavailableException, ue:
+ except UnavailableException as ue:
result.ue = ue
- except TimedOutException, te:
+ except TimedOutException as te:
result.te = te
oprot.writeMessageBegin("get_range_slices", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2067,11 +2264,11 @@ def process_get_paged_slice(self, seqid, iprot, oprot):
result = get_paged_slice_result()
try:
result.success = self._handler.get_paged_slice(args.column_family, args.range, args.start_column, args.consistency_level)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except UnavailableException, ue:
+ except UnavailableException as ue:
result.ue = ue
- except TimedOutException, te:
+ except TimedOutException as te:
result.te = te
oprot.writeMessageBegin("get_paged_slice", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2085,11 +2282,11 @@ def process_get_indexed_slices(self, seqid, iprot, oprot):
result = get_indexed_slices_result()
try:
result.success = self._handler.get_indexed_slices(args.column_parent, args.index_clause, args.column_predicate, args.consistency_level)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except UnavailableException, ue:
+ except UnavailableException as ue:
result.ue = ue
- except TimedOutException, te:
+ except TimedOutException as te:
result.te = te
oprot.writeMessageBegin("get_indexed_slices", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2103,11 +2300,11 @@ def process_insert(self, seqid, iprot, oprot):
result = insert_result()
try:
self._handler.insert(args.key, args.column_parent, args.column, args.consistency_level)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except UnavailableException, ue:
+ except UnavailableException as ue:
result.ue = ue
- except TimedOutException, te:
+ except TimedOutException as te:
result.te = te
oprot.writeMessageBegin("insert", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2121,11 +2318,11 @@ def process_add(self, seqid, iprot, oprot):
result = add_result()
try:
self._handler.add(args.key, args.column_parent, args.column, args.consistency_level)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except UnavailableException, ue:
+ except UnavailableException as ue:
result.ue = ue
- except TimedOutException, te:
+ except TimedOutException as te:
result.te = te
oprot.writeMessageBegin("add", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2139,11 +2336,11 @@ def process_remove(self, seqid, iprot, oprot):
result = remove_result()
try:
self._handler.remove(args.key, args.column_path, args.timestamp, args.consistency_level)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except UnavailableException, ue:
+ except UnavailableException as ue:
result.ue = ue
- except TimedOutException, te:
+ except TimedOutException as te:
result.te = te
oprot.writeMessageBegin("remove", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2157,11 +2354,11 @@ def process_remove_counter(self, seqid, iprot, oprot):
result = remove_counter_result()
try:
self._handler.remove_counter(args.key, args.path, args.consistency_level)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except UnavailableException, ue:
+ except UnavailableException as ue:
result.ue = ue
- except TimedOutException, te:
+ except TimedOutException as te:
result.te = te
oprot.writeMessageBegin("remove_counter", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2175,11 +2372,11 @@ def process_batch_mutate(self, seqid, iprot, oprot):
result = batch_mutate_result()
try:
self._handler.batch_mutate(args.mutation_map, args.consistency_level)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except UnavailableException, ue:
+ except UnavailableException as ue:
result.ue = ue
- except TimedOutException, te:
+ except TimedOutException as te:
result.te = te
oprot.writeMessageBegin("batch_mutate", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2193,11 +2390,11 @@ def process_atomic_batch_mutate(self, seqid, iprot, oprot):
result = atomic_batch_mutate_result()
try:
self._handler.atomic_batch_mutate(args.mutation_map, args.consistency_level)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except UnavailableException, ue:
+ except UnavailableException as ue:
result.ue = ue
- except TimedOutException, te:
+ except TimedOutException as te:
result.te = te
oprot.writeMessageBegin("atomic_batch_mutate", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2211,11 +2408,11 @@ def process_truncate(self, seqid, iprot, oprot):
result = truncate_result()
try:
self._handler.truncate(args.cfname)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except UnavailableException, ue:
+ except UnavailableException as ue:
result.ue = ue
- except TimedOutException, te:
+ except TimedOutException as te:
result.te = te
oprot.writeMessageBegin("truncate", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2229,7 +2426,7 @@ def process_describe_schema_versions(self, seqid, iprot, oprot):
result = describe_schema_versions_result()
try:
result.success = self._handler.describe_schema_versions()
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
oprot.writeMessageBegin("describe_schema_versions", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2243,7 +2440,7 @@ def process_describe_keyspaces(self, seqid, iprot, oprot):
result = describe_keyspaces_result()
try:
result.success = self._handler.describe_keyspaces()
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
oprot.writeMessageBegin("describe_keyspaces", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2279,7 +2476,7 @@ def process_describe_ring(self, seqid, iprot, oprot):
result = describe_ring_result()
try:
result.success = self._handler.describe_ring(args.keyspace)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
oprot.writeMessageBegin("describe_ring", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2293,7 +2490,7 @@ def process_describe_token_map(self, seqid, iprot, oprot):
result = describe_token_map_result()
try:
result.success = self._handler.describe_token_map()
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
oprot.writeMessageBegin("describe_token_map", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2329,9 +2526,9 @@ def process_describe_keyspace(self, seqid, iprot, oprot):
result = describe_keyspace_result()
try:
result.success = self._handler.describe_keyspace(args.keyspace)
- except NotFoundException, nfe:
+ except NotFoundException as nfe:
result.nfe = nfe
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
oprot.writeMessageBegin("describe_keyspace", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2345,7 +2542,7 @@ def process_describe_splits(self, seqid, iprot, oprot):
result = describe_splits_result()
try:
result.success = self._handler.describe_splits(args.cfName, args.start_token, args.end_token, args.keys_per_split)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
oprot.writeMessageBegin("describe_splits", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2363,6 +2560,20 @@ def process_trace_next_query(self, seqid, iprot, oprot):
oprot.writeMessageEnd()
oprot.trans.flush()
+ def process_describe_splits_ex(self, seqid, iprot, oprot):
+ args = describe_splits_ex_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = describe_splits_ex_result()
+ try:
+ result.success = self._handler.describe_splits_ex(args.cfName, args.start_token, args.end_token, args.keys_per_split)
+ except InvalidRequestException as ire:
+ result.ire = ire
+ oprot.writeMessageBegin("describe_splits_ex", TMessageType.REPLY, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
def process_system_add_column_family(self, seqid, iprot, oprot):
args = system_add_column_family_args()
args.read(iprot)
@@ -2370,9 +2581,9 @@ def process_system_add_column_family(self, seqid, iprot, oprot):
result = system_add_column_family_result()
try:
result.success = self._handler.system_add_column_family(args.cf_def)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except SchemaDisagreementException, sde:
+ except SchemaDisagreementException as sde:
result.sde = sde
oprot.writeMessageBegin("system_add_column_family", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2386,9 +2597,9 @@ def process_system_drop_column_family(self, seqid, iprot, oprot):
result = system_drop_column_family_result()
try:
result.success = self._handler.system_drop_column_family(args.column_family)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except SchemaDisagreementException, sde:
+ except SchemaDisagreementException as sde:
result.sde = sde
oprot.writeMessageBegin("system_drop_column_family", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2402,9 +2613,9 @@ def process_system_add_keyspace(self, seqid, iprot, oprot):
result = system_add_keyspace_result()
try:
result.success = self._handler.system_add_keyspace(args.ks_def)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except SchemaDisagreementException, sde:
+ except SchemaDisagreementException as sde:
result.sde = sde
oprot.writeMessageBegin("system_add_keyspace", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2418,9 +2629,9 @@ def process_system_drop_keyspace(self, seqid, iprot, oprot):
result = system_drop_keyspace_result()
try:
result.success = self._handler.system_drop_keyspace(args.keyspace)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except SchemaDisagreementException, sde:
+ except SchemaDisagreementException as sde:
result.sde = sde
oprot.writeMessageBegin("system_drop_keyspace", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2434,9 +2645,9 @@ def process_system_update_keyspace(self, seqid, iprot, oprot):
result = system_update_keyspace_result()
try:
result.success = self._handler.system_update_keyspace(args.ks_def)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except SchemaDisagreementException, sde:
+ except SchemaDisagreementException as sde:
result.sde = sde
oprot.writeMessageBegin("system_update_keyspace", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2450,9 +2661,9 @@ def process_system_update_column_family(self, seqid, iprot, oprot):
result = system_update_column_family_result()
try:
result.success = self._handler.system_update_column_family(args.cf_def)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except SchemaDisagreementException, sde:
+ except SchemaDisagreementException as sde:
result.sde = sde
oprot.writeMessageBegin("system_update_column_family", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -2466,19 +2677,39 @@ def process_execute_cql_query(self, seqid, iprot, oprot):
result = execute_cql_query_result()
try:
result.success = self._handler.execute_cql_query(args.query, args.compression)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except UnavailableException, ue:
+ except UnavailableException as ue:
result.ue = ue
- except TimedOutException, te:
+ except TimedOutException as te:
result.te = te
- except SchemaDisagreementException, sde:
+ except SchemaDisagreementException as sde:
result.sde = sde
oprot.writeMessageBegin("execute_cql_query", TMessageType.REPLY, seqid)
result.write(oprot)
oprot.writeMessageEnd()
oprot.trans.flush()
+ def process_execute_cql3_query(self, seqid, iprot, oprot):
+ args = execute_cql3_query_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = execute_cql3_query_result()
+ try:
+ result.success = self._handler.execute_cql3_query(args.query, args.compression, args.consistency)
+ except InvalidRequestException as ire:
+ result.ire = ire
+ except UnavailableException as ue:
+ result.ue = ue
+ except TimedOutException as te:
+ result.te = te
+ except SchemaDisagreementException as sde:
+ result.sde = sde
+ oprot.writeMessageBegin("execute_cql3_query", TMessageType.REPLY, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
def process_prepare_cql_query(self, seqid, iprot, oprot):
args = prepare_cql_query_args()
args.read(iprot)
@@ -2486,13 +2717,27 @@ def process_prepare_cql_query(self, seqid, iprot, oprot):
result = prepare_cql_query_result()
try:
result.success = self._handler.prepare_cql_query(args.query, args.compression)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
oprot.writeMessageBegin("prepare_cql_query", TMessageType.REPLY, seqid)
result.write(oprot)
oprot.writeMessageEnd()
oprot.trans.flush()
+ def process_prepare_cql3_query(self, seqid, iprot, oprot):
+ args = prepare_cql3_query_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = prepare_cql3_query_result()
+ try:
+ result.success = self._handler.prepare_cql3_query(args.query, args.compression)
+ except InvalidRequestException as ire:
+ result.ire = ire
+ oprot.writeMessageBegin("prepare_cql3_query", TMessageType.REPLY, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
def process_execute_prepared_cql_query(self, seqid, iprot, oprot):
args = execute_prepared_cql_query_args()
args.read(iprot)
@@ -2500,19 +2745,39 @@ def process_execute_prepared_cql_query(self, seqid, iprot, oprot):
result = execute_prepared_cql_query_result()
try:
result.success = self._handler.execute_prepared_cql_query(args.itemId, args.values)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
- except UnavailableException, ue:
+ except UnavailableException as ue:
result.ue = ue
- except TimedOutException, te:
+ except TimedOutException as te:
result.te = te
- except SchemaDisagreementException, sde:
+ except SchemaDisagreementException as sde:
result.sde = sde
oprot.writeMessageBegin("execute_prepared_cql_query", TMessageType.REPLY, seqid)
result.write(oprot)
oprot.writeMessageEnd()
oprot.trans.flush()
+ def process_execute_prepared_cql3_query(self, seqid, iprot, oprot):
+ args = execute_prepared_cql3_query_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = execute_prepared_cql3_query_result()
+ try:
+ result.success = self._handler.execute_prepared_cql3_query(args.itemId, args.values, args.consistency)
+ except InvalidRequestException as ire:
+ result.ire = ire
+ except UnavailableException as ue:
+ result.ue = ue
+ except TimedOutException as te:
+ result.te = te
+ except SchemaDisagreementException as sde:
+ result.sde = sde
+ oprot.writeMessageBegin("execute_prepared_cql3_query", TMessageType.REPLY, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
def process_set_cql_version(self, seqid, iprot, oprot):
args = set_cql_version_args()
args.read(iprot)
@@ -2520,7 +2785,7 @@ def process_set_cql_version(self, seqid, iprot, oprot):
result = set_cql_version_result()
try:
self._handler.set_cql_version(args.version)
- except InvalidRequestException, ire:
+ except InvalidRequestException as ire:
result.ire = ire
oprot.writeMessageBegin("set_cql_version", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -7149,19 +7414,28 @@ def __eq__(self, other):
def __ne__(self, other):
return not (self == other)
-class system_add_column_family_args(object):
+class describe_splits_ex_args(object):
"""
Attributes:
- - cf_def
+ - cfName
+ - start_token
+ - end_token
+ - keys_per_split
"""
thrift_spec = (
None, # 0
- (1, TType.STRUCT, 'cf_def', (CfDef, CfDef.thrift_spec), None, ), # 1
+ (1, TType.STRING, 'cfName', None, None, ), # 1
+ (2, TType.STRING, 'start_token', None, None, ), # 2
+ (3, TType.STRING, 'end_token', None, None, ), # 3
+ (4, TType.I32, 'keys_per_split', None, None, ), # 4
)
- def __init__(self, cf_def=None,):
- self.cf_def = cf_def
+ def __init__(self, cfName=None, start_token=None, end_token=None, keys_per_split=None,):
+ self.cfName = cfName
+ self.start_token = start_token
+ self.end_token = end_token
+ self.keys_per_split = keys_per_split
def read(self, iprot):
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
@@ -7173,9 +7447,23 @@ def read(self, iprot):
if ftype == TType.STOP:
break
if fid == 1:
- if ftype == TType.STRUCT:
- self.cf_def = CfDef()
- self.cf_def.read(iprot)
+ if ftype == TType.STRING:
+ self.cfName = iprot.readString();
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.STRING:
+ self.start_token = iprot.readString();
+ else:
+ iprot.skip(ftype)
+ elif fid == 3:
+ if ftype == TType.STRING:
+ self.end_token = iprot.readString();
+ else:
+ iprot.skip(ftype)
+ elif fid == 4:
+ if ftype == TType.I32:
+ self.keys_per_split = iprot.readI32();
else:
iprot.skip(ftype)
else:
@@ -7187,17 +7475,35 @@ def write(self, oprot):
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
return
- oprot.writeStructBegin('system_add_column_family_args')
- if self.cf_def is not None:
- oprot.writeFieldBegin('cf_def', TType.STRUCT, 1)
- self.cf_def.write(oprot)
+ oprot.writeStructBegin('describe_splits_ex_args')
+ if self.cfName is not None:
+ oprot.writeFieldBegin('cfName', TType.STRING, 1)
+ oprot.writeString(self.cfName)
+ oprot.writeFieldEnd()
+ if self.start_token is not None:
+ oprot.writeFieldBegin('start_token', TType.STRING, 2)
+ oprot.writeString(self.start_token)
+ oprot.writeFieldEnd()
+ if self.end_token is not None:
+ oprot.writeFieldBegin('end_token', TType.STRING, 3)
+ oprot.writeString(self.end_token)
+ oprot.writeFieldEnd()
+ if self.keys_per_split is not None:
+ oprot.writeFieldBegin('keys_per_split', TType.I32, 4)
+ oprot.writeI32(self.keys_per_split)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
- if self.cf_def is None:
- raise TProtocol.TProtocolException(message='Required field cf_def is unset!')
+ if self.cfName is None:
+ raise TProtocol.TProtocolException(message='Required field cfName is unset!')
+ if self.start_token is None:
+ raise TProtocol.TProtocolException(message='Required field start_token is unset!')
+ if self.end_token is None:
+ raise TProtocol.TProtocolException(message='Required field end_token is unset!')
+ if self.keys_per_split is None:
+ raise TProtocol.TProtocolException(message='Required field keys_per_split is unset!')
return
@@ -7212,12 +7518,156 @@ def __eq__(self, other):
def __ne__(self, other):
return not (self == other)
-class system_add_column_family_result(object):
+class describe_splits_ex_result(object):
"""
Attributes:
- success
- ire
- - sde
+ """
+
+ thrift_spec = (
+ (0, TType.LIST, 'success', (TType.STRUCT,(CfSplit, CfSplit.thrift_spec)), None, ), # 0
+ (1, TType.STRUCT, 'ire', (InvalidRequestException, InvalidRequestException.thrift_spec), None, ), # 1
+ )
+
+ def __init__(self, success=None, ire=None,):
+ self.success = success
+ self.ire = ire
+
+ def read(self, iprot):
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ if fid == 0:
+ if ftype == TType.LIST:
+ self.success = []
+ (_etype334, _size331) = iprot.readListBegin()
+ for _i335 in xrange(_size331):
+ _elem336 = CfSplit()
+ _elem336.read(iprot)
+ self.success.append(_elem336)
+ iprot.readListEnd()
+ else:
+ iprot.skip(ftype)
+ elif fid == 1:
+ if ftype == TType.STRUCT:
+ self.ire = InvalidRequestException()
+ self.ire.read(iprot)
+ else:
+ iprot.skip(ftype)
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('describe_splits_ex_result')
+ if self.success is not None:
+ oprot.writeFieldBegin('success', TType.LIST, 0)
+ oprot.writeListBegin(TType.STRUCT, len(self.success))
+ for iter337 in self.success:
+ iter337.write(oprot)
+ oprot.writeListEnd()
+ oprot.writeFieldEnd()
+ if self.ire is not None:
+ oprot.writeFieldBegin('ire', TType.STRUCT, 1)
+ self.ire.write(oprot)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ return
+
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.iteritems()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+
+class system_add_column_family_args(object):
+ """
+ Attributes:
+ - cf_def
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.STRUCT, 'cf_def', (CfDef, CfDef.thrift_spec), None, ), # 1
+ )
+
+ def __init__(self, cf_def=None,):
+ self.cf_def = cf_def
+
+ def read(self, iprot):
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ if fid == 1:
+ if ftype == TType.STRUCT:
+ self.cf_def = CfDef()
+ self.cf_def.read(iprot)
+ else:
+ iprot.skip(ftype)
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('system_add_column_family_args')
+ if self.cf_def is not None:
+ oprot.writeFieldBegin('cf_def', TType.STRUCT, 1)
+ self.cf_def.write(oprot)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ if self.cf_def is None:
+ raise TProtocol.TProtocolException(message='Required field cf_def is unset!')
+ return
+
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.iteritems()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+
+class system_add_column_family_result(object):
+ """
+ Attributes:
+ - success
+ - ire
+ - sde
"""
thrift_spec = (
@@ -8223,22 +8673,25 @@ def __eq__(self, other):
def __ne__(self, other):
return not (self == other)
-class prepare_cql_query_args(object):
+class execute_cql3_query_args(object):
"""
Attributes:
- query
- compression
+ - consistency
"""
thrift_spec = (
None, # 0
(1, TType.STRING, 'query', None, None, ), # 1
(2, TType.I32, 'compression', None, None, ), # 2
+ (3, TType.I32, 'consistency', None, None, ), # 3
)
- def __init__(self, query=None, compression=None,):
+ def __init__(self, query=None, compression=None, consistency=None,):
self.query = query
self.compression = compression
+ self.consistency = consistency
def read(self, iprot):
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
@@ -8259,6 +8712,11 @@ def read(self, iprot):
self.compression = iprot.readI32();
else:
iprot.skip(ftype)
+ elif fid == 3:
+ if ftype == TType.I32:
+ self.consistency = iprot.readI32();
+ else:
+ iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -8268,7 +8726,7 @@ def write(self, oprot):
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
return
- oprot.writeStructBegin('prepare_cql_query_args')
+ oprot.writeStructBegin('execute_cql3_query_args')
if self.query is not None:
oprot.writeFieldBegin('query', TType.STRING, 1)
oprot.writeString(self.query)
@@ -8277,6 +8735,10 @@ def write(self, oprot):
oprot.writeFieldBegin('compression', TType.I32, 2)
oprot.writeI32(self.compression)
oprot.writeFieldEnd()
+ if self.consistency is not None:
+ oprot.writeFieldBegin('consistency', TType.I32, 3)
+ oprot.writeI32(self.consistency)
+ oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -8285,6 +8747,8 @@ def validate(self):
raise TProtocol.TProtocolException(message='Required field query is unset!')
if self.compression is None:
raise TProtocol.TProtocolException(message='Required field compression is unset!')
+ if self.consistency is None:
+ raise TProtocol.TProtocolException(message='Required field consistency is unset!')
return
@@ -8299,21 +8763,30 @@ def __eq__(self, other):
def __ne__(self, other):
return not (self == other)
-class prepare_cql_query_result(object):
+class execute_cql3_query_result(object):
"""
Attributes:
- success
- ire
+ - ue
+ - te
+ - sde
"""
thrift_spec = (
- (0, TType.STRUCT, 'success', (CqlPreparedResult, CqlPreparedResult.thrift_spec), None, ), # 0
+ (0, TType.STRUCT, 'success', (CqlResult, CqlResult.thrift_spec), None, ), # 0
(1, TType.STRUCT, 'ire', (InvalidRequestException, InvalidRequestException.thrift_spec), None, ), # 1
+ (2, TType.STRUCT, 'ue', (UnavailableException, UnavailableException.thrift_spec), None, ), # 2
+ (3, TType.STRUCT, 'te', (TimedOutException, TimedOutException.thrift_spec), None, ), # 3
+ (4, TType.STRUCT, 'sde', (SchemaDisagreementException, SchemaDisagreementException.thrift_spec), None, ), # 4
)
- def __init__(self, success=None, ire=None,):
+ def __init__(self, success=None, ire=None, ue=None, te=None, sde=None,):
self.success = success
self.ire = ire
+ self.ue = ue
+ self.te = te
+ self.sde = sde
def read(self, iprot):
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
@@ -8326,7 +8799,7 @@ def read(self, iprot):
break
if fid == 0:
if ftype == TType.STRUCT:
- self.success = CqlPreparedResult()
+ self.success = CqlResult()
self.success.read(iprot)
else:
iprot.skip(ftype)
@@ -8336,6 +8809,24 @@ def read(self, iprot):
self.ire.read(iprot)
else:
iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.STRUCT:
+ self.ue = UnavailableException()
+ self.ue.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 3:
+ if ftype == TType.STRUCT:
+ self.te = TimedOutException()
+ self.te.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 4:
+ if ftype == TType.STRUCT:
+ self.sde = SchemaDisagreementException()
+ self.sde.read(iprot)
+ else:
+ iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -8345,7 +8836,7 @@ def write(self, oprot):
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
return
- oprot.writeStructBegin('prepare_cql_query_result')
+ oprot.writeStructBegin('execute_cql3_query_result')
if self.success is not None:
oprot.writeFieldBegin('success', TType.STRUCT, 0)
self.success.write(oprot)
@@ -8354,6 +8845,18 @@ def write(self, oprot):
oprot.writeFieldBegin('ire', TType.STRUCT, 1)
self.ire.write(oprot)
oprot.writeFieldEnd()
+ if self.ue is not None:
+ oprot.writeFieldBegin('ue', TType.STRUCT, 2)
+ self.ue.write(oprot)
+ oprot.writeFieldEnd()
+ if self.te is not None:
+ oprot.writeFieldBegin('te', TType.STRUCT, 3)
+ self.te.write(oprot)
+ oprot.writeFieldEnd()
+ if self.sde is not None:
+ oprot.writeFieldBegin('sde', TType.STRUCT, 4)
+ self.sde.write(oprot)
+ oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -8372,22 +8875,22 @@ def __eq__(self, other):
def __ne__(self, other):
return not (self == other)
-class execute_prepared_cql_query_args(object):
+class prepare_cql_query_args(object):
"""
Attributes:
- - itemId
- - values
+ - query
+ - compression
"""
thrift_spec = (
None, # 0
- (1, TType.I32, 'itemId', None, None, ), # 1
- (2, TType.LIST, 'values', (TType.STRING,None), None, ), # 2
+ (1, TType.STRING, 'query', None, None, ), # 1
+ (2, TType.I32, 'compression', None, None, ), # 2
)
- def __init__(self, itemId=None, values=None,):
- self.itemId = itemId
- self.values = values
+ def __init__(self, query=None, compression=None,):
+ self.query = query
+ self.compression = compression
def read(self, iprot):
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
@@ -8399,18 +8902,13 @@ def read(self, iprot):
if ftype == TType.STOP:
break
if fid == 1:
- if ftype == TType.I32:
- self.itemId = iprot.readI32();
+ if ftype == TType.STRING:
+ self.query = iprot.readString();
else:
iprot.skip(ftype)
elif fid == 2:
- if ftype == TType.LIST:
- self.values = []
- (_etype334, _size331) = iprot.readListBegin()
- for _i335 in xrange(_size331):
- _elem336 = iprot.readString();
- self.values.append(_elem336)
- iprot.readListEnd()
+ if ftype == TType.I32:
+ self.compression = iprot.readI32();
else:
iprot.skip(ftype)
else:
@@ -8422,26 +8920,23 @@ def write(self, oprot):
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
return
- oprot.writeStructBegin('execute_prepared_cql_query_args')
- if self.itemId is not None:
- oprot.writeFieldBegin('itemId', TType.I32, 1)
- oprot.writeI32(self.itemId)
+ oprot.writeStructBegin('prepare_cql_query_args')
+ if self.query is not None:
+ oprot.writeFieldBegin('query', TType.STRING, 1)
+ oprot.writeString(self.query)
oprot.writeFieldEnd()
- if self.values is not None:
- oprot.writeFieldBegin('values', TType.LIST, 2)
- oprot.writeListBegin(TType.STRING, len(self.values))
- for iter337 in self.values:
- oprot.writeString(iter337)
- oprot.writeListEnd()
+ if self.compression is not None:
+ oprot.writeFieldBegin('compression', TType.I32, 2)
+ oprot.writeI32(self.compression)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
- if self.itemId is None:
- raise TProtocol.TProtocolException(message='Required field itemId is unset!')
- if self.values is None:
- raise TProtocol.TProtocolException(message='Required field values is unset!')
+ if self.query is None:
+ raise TProtocol.TProtocolException(message='Required field query is unset!')
+ if self.compression is None:
+ raise TProtocol.TProtocolException(message='Required field compression is unset!')
return
@@ -8456,28 +8951,334 @@ def __eq__(self, other):
def __ne__(self, other):
return not (self == other)
-class execute_prepared_cql_query_result(object):
+class prepare_cql_query_result(object):
"""
Attributes:
- success
- ire
- - ue
- - te
- - sde
"""
thrift_spec = (
- (0, TType.STRUCT, 'success', (CqlResult, CqlResult.thrift_spec), None, ), # 0
+ (0, TType.STRUCT, 'success', (CqlPreparedResult, CqlPreparedResult.thrift_spec), None, ), # 0
(1, TType.STRUCT, 'ire', (InvalidRequestException, InvalidRequestException.thrift_spec), None, ), # 1
- (2, TType.STRUCT, 'ue', (UnavailableException, UnavailableException.thrift_spec), None, ), # 2
- (3, TType.STRUCT, 'te', (TimedOutException, TimedOutException.thrift_spec), None, ), # 3
- (4, TType.STRUCT, 'sde', (SchemaDisagreementException, SchemaDisagreementException.thrift_spec), None, ), # 4
)
- def __init__(self, success=None, ire=None, ue=None, te=None, sde=None,):
+ def __init__(self, success=None, ire=None,):
self.success = success
self.ire = ire
- self.ue = ue
+
+ def read(self, iprot):
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ if fid == 0:
+ if ftype == TType.STRUCT:
+ self.success = CqlPreparedResult()
+ self.success.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 1:
+ if ftype == TType.STRUCT:
+ self.ire = InvalidRequestException()
+ self.ire.read(iprot)
+ else:
+ iprot.skip(ftype)
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('prepare_cql_query_result')
+ if self.success is not None:
+ oprot.writeFieldBegin('success', TType.STRUCT, 0)
+ self.success.write(oprot)
+ oprot.writeFieldEnd()
+ if self.ire is not None:
+ oprot.writeFieldBegin('ire', TType.STRUCT, 1)
+ self.ire.write(oprot)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ return
+
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.iteritems()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+
+class prepare_cql3_query_args(object):
+ """
+ Attributes:
+ - query
+ - compression
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.STRING, 'query', None, None, ), # 1
+ (2, TType.I32, 'compression', None, None, ), # 2
+ )
+
+ def __init__(self, query=None, compression=None,):
+ self.query = query
+ self.compression = compression
+
+ def read(self, iprot):
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ if fid == 1:
+ if ftype == TType.STRING:
+ self.query = iprot.readString();
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.I32:
+ self.compression = iprot.readI32();
+ else:
+ iprot.skip(ftype)
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('prepare_cql3_query_args')
+ if self.query is not None:
+ oprot.writeFieldBegin('query', TType.STRING, 1)
+ oprot.writeString(self.query)
+ oprot.writeFieldEnd()
+ if self.compression is not None:
+ oprot.writeFieldBegin('compression', TType.I32, 2)
+ oprot.writeI32(self.compression)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ if self.query is None:
+ raise TProtocol.TProtocolException(message='Required field query is unset!')
+ if self.compression is None:
+ raise TProtocol.TProtocolException(message='Required field compression is unset!')
+ return
+
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.iteritems()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+
+class prepare_cql3_query_result(object):
+ """
+ Attributes:
+ - success
+ - ire
+ """
+
+ thrift_spec = (
+ (0, TType.STRUCT, 'success', (CqlPreparedResult, CqlPreparedResult.thrift_spec), None, ), # 0
+ (1, TType.STRUCT, 'ire', (InvalidRequestException, InvalidRequestException.thrift_spec), None, ), # 1
+ )
+
+ def __init__(self, success=None, ire=None,):
+ self.success = success
+ self.ire = ire
+
+ def read(self, iprot):
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ if fid == 0:
+ if ftype == TType.STRUCT:
+ self.success = CqlPreparedResult()
+ self.success.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 1:
+ if ftype == TType.STRUCT:
+ self.ire = InvalidRequestException()
+ self.ire.read(iprot)
+ else:
+ iprot.skip(ftype)
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('prepare_cql3_query_result')
+ if self.success is not None:
+ oprot.writeFieldBegin('success', TType.STRUCT, 0)
+ self.success.write(oprot)
+ oprot.writeFieldEnd()
+ if self.ire is not None:
+ oprot.writeFieldBegin('ire', TType.STRUCT, 1)
+ self.ire.write(oprot)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ return
+
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.iteritems()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+
+class execute_prepared_cql_query_args(object):
+ """
+ Attributes:
+ - itemId
+ - values
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.I32, 'itemId', None, None, ), # 1
+ (2, TType.LIST, 'values', (TType.STRING,None), None, ), # 2
+ )
+
+ def __init__(self, itemId=None, values=None,):
+ self.itemId = itemId
+ self.values = values
+
+ def read(self, iprot):
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ if fid == 1:
+ if ftype == TType.I32:
+ self.itemId = iprot.readI32();
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.LIST:
+ self.values = []
+ (_etype341, _size338) = iprot.readListBegin()
+ for _i342 in xrange(_size338):
+ _elem343 = iprot.readString();
+ self.values.append(_elem343)
+ iprot.readListEnd()
+ else:
+ iprot.skip(ftype)
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('execute_prepared_cql_query_args')
+ if self.itemId is not None:
+ oprot.writeFieldBegin('itemId', TType.I32, 1)
+ oprot.writeI32(self.itemId)
+ oprot.writeFieldEnd()
+ if self.values is not None:
+ oprot.writeFieldBegin('values', TType.LIST, 2)
+ oprot.writeListBegin(TType.STRING, len(self.values))
+ for iter344 in self.values:
+ oprot.writeString(iter344)
+ oprot.writeListEnd()
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ if self.itemId is None:
+ raise TProtocol.TProtocolException(message='Required field itemId is unset!')
+ if self.values is None:
+ raise TProtocol.TProtocolException(message='Required field values is unset!')
+ return
+
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.iteritems()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+
+class execute_prepared_cql_query_result(object):
+ """
+ Attributes:
+ - success
+ - ire
+ - ue
+ - te
+ - sde
+ """
+
+ thrift_spec = (
+ (0, TType.STRUCT, 'success', (CqlResult, CqlResult.thrift_spec), None, ), # 0
+ (1, TType.STRUCT, 'ire', (InvalidRequestException, InvalidRequestException.thrift_spec), None, ), # 1
+ (2, TType.STRUCT, 'ue', (UnavailableException, UnavailableException.thrift_spec), None, ), # 2
+ (3, TType.STRUCT, 'te', (TimedOutException, TimedOutException.thrift_spec), None, ), # 3
+ (4, TType.STRUCT, 'sde', (SchemaDisagreementException, SchemaDisagreementException.thrift_spec), None, ), # 4
+ )
+
+ def __init__(self, success=None, ire=None, ue=None, te=None, sde=None,):
+ self.success = success
+ self.ire = ire
+ self.ue = ue
self.te = te
self.sde = sde
@@ -8568,6 +9369,216 @@ def __eq__(self, other):
def __ne__(self, other):
return not (self == other)
+class execute_prepared_cql3_query_args(object):
+ """
+ Attributes:
+ - itemId
+ - values
+ - consistency
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.I32, 'itemId', None, None, ), # 1
+ (2, TType.LIST, 'values', (TType.STRING,None), None, ), # 2
+ (3, TType.I32, 'consistency', None, None, ), # 3
+ )
+
+ def __init__(self, itemId=None, values=None, consistency=None,):
+ self.itemId = itemId
+ self.values = values
+ self.consistency = consistency
+
+ def read(self, iprot):
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ if fid == 1:
+ if ftype == TType.I32:
+ self.itemId = iprot.readI32();
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.LIST:
+ self.values = []
+ (_etype348, _size345) = iprot.readListBegin()
+ for _i349 in xrange(_size345):
+ _elem350 = iprot.readString();
+ self.values.append(_elem350)
+ iprot.readListEnd()
+ else:
+ iprot.skip(ftype)
+ elif fid == 3:
+ if ftype == TType.I32:
+ self.consistency = iprot.readI32();
+ else:
+ iprot.skip(ftype)
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('execute_prepared_cql3_query_args')
+ if self.itemId is not None:
+ oprot.writeFieldBegin('itemId', TType.I32, 1)
+ oprot.writeI32(self.itemId)
+ oprot.writeFieldEnd()
+ if self.values is not None:
+ oprot.writeFieldBegin('values', TType.LIST, 2)
+ oprot.writeListBegin(TType.STRING, len(self.values))
+ for iter351 in self.values:
+ oprot.writeString(iter351)
+ oprot.writeListEnd()
+ oprot.writeFieldEnd()
+ if self.consistency is not None:
+ oprot.writeFieldBegin('consistency', TType.I32, 3)
+ oprot.writeI32(self.consistency)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ if self.itemId is None:
+ raise TProtocol.TProtocolException(message='Required field itemId is unset!')
+ if self.values is None:
+ raise TProtocol.TProtocolException(message='Required field values is unset!')
+ if self.consistency is None:
+ raise TProtocol.TProtocolException(message='Required field consistency is unset!')
+ return
+
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.iteritems()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+
+class execute_prepared_cql3_query_result(object):
+ """
+ Attributes:
+ - success
+ - ire
+ - ue
+ - te
+ - sde
+ """
+
+ thrift_spec = (
+ (0, TType.STRUCT, 'success', (CqlResult, CqlResult.thrift_spec), None, ), # 0
+ (1, TType.STRUCT, 'ire', (InvalidRequestException, InvalidRequestException.thrift_spec), None, ), # 1
+ (2, TType.STRUCT, 'ue', (UnavailableException, UnavailableException.thrift_spec), None, ), # 2
+ (3, TType.STRUCT, 'te', (TimedOutException, TimedOutException.thrift_spec), None, ), # 3
+ (4, TType.STRUCT, 'sde', (SchemaDisagreementException, SchemaDisagreementException.thrift_spec), None, ), # 4
+ )
+
+ def __init__(self, success=None, ire=None, ue=None, te=None, sde=None,):
+ self.success = success
+ self.ire = ire
+ self.ue = ue
+ self.te = te
+ self.sde = sde
+
+ def read(self, iprot):
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ if fid == 0:
+ if ftype == TType.STRUCT:
+ self.success = CqlResult()
+ self.success.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 1:
+ if ftype == TType.STRUCT:
+ self.ire = InvalidRequestException()
+ self.ire.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.STRUCT:
+ self.ue = UnavailableException()
+ self.ue.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 3:
+ if ftype == TType.STRUCT:
+ self.te = TimedOutException()
+ self.te.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 4:
+ if ftype == TType.STRUCT:
+ self.sde = SchemaDisagreementException()
+ self.sde.read(iprot)
+ else:
+ iprot.skip(ftype)
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('execute_prepared_cql3_query_result')
+ if self.success is not None:
+ oprot.writeFieldBegin('success', TType.STRUCT, 0)
+ self.success.write(oprot)
+ oprot.writeFieldEnd()
+ if self.ire is not None:
+ oprot.writeFieldBegin('ire', TType.STRUCT, 1)
+ self.ire.write(oprot)
+ oprot.writeFieldEnd()
+ if self.ue is not None:
+ oprot.writeFieldBegin('ue', TType.STRUCT, 2)
+ self.ue.write(oprot)
+ oprot.writeFieldEnd()
+ if self.te is not None:
+ oprot.writeFieldBegin('te', TType.STRUCT, 3)
+ self.te.write(oprot)
+ oprot.writeFieldEnd()
+ if self.sde is not None:
+ oprot.writeFieldBegin('sde', TType.STRUCT, 4)
+ self.sde.write(oprot)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ return
+
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.iteritems()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+
class set_cql_version_args(object):
"""
Attributes:
View
6 pycassa/cassandra/constants.py
@@ -1,12 +1,12 @@
#
-# Autogenerated by Thrift Compiler (0.8.0)
+# Autogenerated by Thrift Compiler (0.9.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
# options string: py:new_style
#
-from thrift.Thrift import TType, TMessageType, TException
+from thrift.Thrift import TType, TMessageType, TException, TApplicationException
from ttypes import *
-VERSION = "19.34.0"
+VERSION = "19.35.0"
View
100 pycassa/cassandra/ttypes.py
@@ -1,12 +1,12 @@
#
-# Autogenerated by Thrift Compiler (0.8.0)
+# Autogenerated by Thrift Compiler (0.9.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
# options string: py:new_style
#
-from thrift.Thrift import TType, TMessageType, TException
+from thrift.Thrift import TType, TMessageType, TException, TApplicationException
from thrift.transport import TTransport
from thrift.protocol import TBinaryProtocol, TProtocol
@@ -1544,7 +1544,7 @@ def __ne__(self, other):
class IndexClause(object):
"""
- @Deprecated: use a KeyRange with row_filter in get_range_slices instead
+ @deprecated use a KeyRange with row_filter in get_range_slices instead
Attributes:
- expressions
@@ -3015,7 +3015,7 @@ class KsDef(object):
- name
- strategy_class
- strategy_options
- - replication_factor: @deprecated, ignored
+ - replication_factor: @deprecated ignored
- cf_defs
- durable_writes
"""
@@ -3588,3 +3588,95 @@ def __eq__(self, other):
def __ne__(self, other):
return not (self == other)
+
+class CfSplit(object):
+ """
+ Represents input splits used by hadoop ColumnFamilyRecordReaders
+
+ Attributes:
+ - start_token
+ - end_token
+ - row_count
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.STRING, 'start_token', None, None, ), # 1
+ (2, TType.STRING, 'end_token', None, None, ), # 2
+ (3, TType.I64, 'row_count', None, None, ), # 3
+ )
+
+ def __init__(self, start_token=None, end_token=None, row_count=None,):
+ self.start_token = start_token
+ self.end_token = end_token
+ self.row_count = row_count
+
+ def read(self, iprot):
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ if fid == 1:
+ if ftype == TType.STRING:
+ self.start_token = iprot.readString();
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.STRING:
+ self.end_token = iprot.readString();
+ else:
+ iprot.skip(ftype)
+ elif fid == 3:
+ if ftype == TType.I64:
+ self.row_count = iprot.readI64();
+ else:
+ iprot.skip(ftype)
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('CfSplit')
+ if self.start_token is not None:
+ oprot.writeFieldBegin('start_token', TType.STRING, 1)
+ oprot.writeString(self.start_token)
+ oprot.writeFieldEnd()
+ if self.end_token is not None:
+ oprot.writeFieldBegin('end_token', TType.STRING, 2)
+ oprot.writeString(self.end_token)
+ oprot.writeFieldEnd()
+ if self.row_count is not None:
+ oprot.writeFieldBegin('row_count', TType.I64, 3)
+ oprot.writeI64(self.row_count)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ if self.start_token is None:
+ raise TProtocol.TProtocolException(message='Required field start_token is unset!')
+ if self.end_token is None:
+ raise TProtocol.TProtocolException(message='Required field end_token is unset!')
+ if self.row_count is None:
+ raise TProtocol.TProtocolException(message='Required field row_count is unset!')
+ return
+
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.iteritems()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
Please sign in to comment.
Something went wrong with that request. Please try again.