diff --git a/lib/Core.class.php b/lib/Core.class.php index adaa0fb..c2055f6 100755 --- a/lib/Core.class.php +++ b/lib/Core.class.php @@ -214,7 +214,7 @@ static public function disconnectAll() { static public function connect($connectionID, $host, $keySpace = DEFAULT_POOL_NAME, $port = THRIFT_PORT_DEFAULT) { try { - // check connectionid hasn't been marked as down + // check connectionId hasn't been marked as down if (self::_priorFail($connectionID)) { self::registerError($host.'/'.$port.' is marked DOWN', PandraLog::LOG_CRIT); } else { @@ -226,18 +226,23 @@ static public function connect($connectionID, $host, $keySpace = DEFAULT_POOL_NA if (!array_key_exists($keySpace, self::$_socketPool)) self::$_socketPool[$keySpace] = array(); // Create Thrift transport and binary protocol cassandra client - $transport = new TBufferedTransport(new TSocket($host, $port, PERSIST_CONNECTIONS, 'PandraCore::registerError'), 1024, 1024); + $transport = new TFramedTransport(new TSocket($host, $port, PERSIST_CONNECTIONS, 'PandraCore::registerError'), true, true); self::_authOpen($transport, $keySpace); + $client = new CassandraClient( + (PANDRA_64 && + function_exists("thrift_protocol_write_binary") ? + new TBinaryProtocolAccelerated($transport) : + new TBinaryProtocol($transport))); + + // Cassandra 0.7 won't let you do anything without an active keyspace + $client->set_keyspace($keySpace); + self::$_socketPool[$keySpace][$connectionID] = array( 'retries' => 0, 'transport' => $transport, - 'client' => new CassandraClient( - (PANDRA_64 && - function_exists("thrift_protocol_write_binary") ? - new TBinaryProtocolAccelerated($transport) : - new TBinaryProtocol($transport))) + 'client' => $client ); // set new connection the active, working master @@ -325,15 +330,16 @@ static public function authKeyspace($keySpace, $username, $password) { } /** - * Alias for connectBySeed (deprecated) + * Alias for connectSeededKeypsace. + * @deprecated use connectSeededKeypsace instead. */ static public function auto($hosts, $keySpace = DEFAULT_POOL_NAME, $port = THRIFT_PORT_DEFAULT) { return self::connectSeededKeyspace($hosts, $keySpace, $port); } /** - * Given a single host, attempts to find other nodes in the cluster and attaches them - * to the pool + * Given a single host, attempts to find other nodes in the cluster and + * attach them to the pool * @todo build connections from token map * @param mixed $hosts host name or IP of connecting node (or array thereof) * @param string $keySpace name of the connection pool (cluster name - usually keyspace) @@ -349,7 +355,7 @@ static public function connectSeededKeyspace($hosts, $keySpace = DEFAULT_POOL_NA foreach ($hosts as $host) { try { // Create Thrift transport and binary protocol cassandra client - $transport = new TBufferedTransport(new TSocket($host, $port, PERSIST_CONNECTIONS, 'PandraCore::registerError'), 1024, 1024); + $transport = new TFramedTransport(new TSocket($host, $port, PERSIST_CONNECTIONS, 'PandraCore::registerError'), true, true); $transport->open(); $client = new CassandraClient( (function_exists("thrift_protocol_write_binary") ? @@ -492,12 +498,12 @@ static public function getClient($writeMode = FALSE, $keySpace = DEFAULT_POOL_NA * @param $transport * @param $keySpace */ - static private function _authOpen(TBufferedTransport &$transport, $keySpace) { + static private function _authOpen(TFramedTransport &$transport, $keySpace) { $transport->open(); if (array_key_exists($keySpace, self::$_ksAuth)) { try { $client = self::$_socketPool[self::$_activePool][self::$_activeNode]['client']; - $client->login($keySpace, self::$_ksAuth[$keySpace]); + $client->login(self::$_ksAuth[$keySpace]); } catch (cassandra_AuthenticationException $e) { self::registerError($e->why, PandraLog::LOG_CRIT); throw new TException($e->why); @@ -666,7 +672,7 @@ static public function deleteColumnPath($keySpace, if ($time === NULL) { $time = self::getTime(); } - $client->remove($keySpace, $keyID, $columnPath, $time, self::getConsistency($consistencyLevel)); + $client->remove($keyID, $columnPath, $time, self::getConsistency($consistencyLevel)); } catch (TException $te) { self::registerError( 'TException: '.$te->getMessage().' '.(isset($te->why) ? $te->why : '')); return FALSE; @@ -685,7 +691,7 @@ static public function deleteColumnPath($keySpace, */ static public function saveColumnPath($keySpace, $keyID, - cassandra_ColumnPath $columnPath, + cassandra_ColumnPath $path, $value, $time = NULL, $consistencyLevel = NULL) { @@ -694,7 +700,23 @@ static public function saveColumnPath($keySpace, if ($time === NULL) { $time = self::getTime(); } - $client->insert($keySpace, $keyID, $columnPath, $value, $time, self::getConsistency($consistencyLevel)); + + xdebug_break(); + + // Pretty sure this isn't the "Pandra Way". Feel free to fix it. + $col = new cassandra_Column( + array( + "name" => $path->column, + "value" => $value, + 'timestamp' => $time + )); + $parent = new cassandra_ColumnParent( + array( + 'column_family' => $path->column_family, + 'super_column' => $path->super_column, + )); + + $client->insert($keyID, $parent, $col, self::getConsistency($consistencyLevel)); } catch (TException $te) { self::registerError( 'TException: '.$te->getMessage().' '.(isset($te->why) ? $te->why : '')); return FALSE; @@ -709,10 +731,10 @@ static public function saveColumnPath($keySpace, * @param int $consistencyLevel response consistency level * @return bool mutate operation completed OK */ - public function batchMutate($keySpace, $mutation, $consistencyLevel = NULL) { + static public function batchMutate($keySpace, $mutation, $consistencyLevel = NULL) { try { $client = self::getClient(TRUE, $keySpace); - $client->batch_mutate($keySpace, $mutation, self::getConsistency($consistencyLevel)); + $client->batch_mutate($mutation, self::getConsistency($consistencyLevel)); } catch (TException $te) { self::registerError( 'TException: '.$te->getMessage().' '.(isset($te->why) ? $te->why : '')); return FALSE; @@ -738,7 +760,7 @@ static public function getCFSlice($keySpace, $client = self::getClient(FALSE, $keySpace); try { - return $client->get_slice($keySpace, $keyID, $columnParent, $predicate, self::getConsistency($consistencyLevel)); + return $client->get_slice($keyID, $columnParent, $predicate, self::getConsistency($consistencyLevel)); } catch (TException $te) { self::registerError( 'TException: '.$te->getMessage().' '.(isset($te->why) ? $te->why : '')); return NULL; @@ -764,7 +786,7 @@ static public function getCFSliceMulti($keySpace, $client = self::getClient(FALSE, $keySpace); try { - return $client->multiget_slice($keySpace, $keyIDs, $columnParent, $predicate, self::getConsistency($consistencyLevel)); + return $client->multiget_slice($keyIDs, $columnParent, $predicate, self::getConsistency($consistencyLevel)); } catch (TException $te) { self::registerError( 'TException: '.$te->getMessage().' '.(isset($te->why) ? $te->why : '')); return NULL; @@ -781,14 +803,15 @@ static public function getCFSliceMulti($keySpace, */ static public function getCFColumnCount($keySpace, $keyID, - cassandra_ColumnParent - $columnParent, + cassandra_ColumnParent $columnParent, + cassandra_SlicePredicate $predicate, $consistencyLevel = NULL) { $client = self::getClient(FALSE, $keySpace); try { - return $client->get_count($keySpace, $keyID, $columnParent, self::getConsistency($consistencyLevel)); + return $client->get_count($keyID, $columnParent, $predicate, + self::getConsistency($consistencyLevel)); } catch (TException $te) { self::registerError( 'TException: '.$te->getMessage().' '.(isset($te->why) ? $te->why : '')); return NULL; @@ -836,7 +859,7 @@ static public function getColumnPath($keySpace, $client = self::getClient(FALSE, $keySpace); try { - return $client->get($keySpace, $keyID, $columnPath, self::getConsistency($consistencyLevel)); + return $client->get($keyID, $columnPath, self::getConsistency($consistencyLevel)); } catch (TException $te) { self::registerError( 'TException: '.$te->getMessage().' '.(isset($te->why) ? $te->why : '')); return NULL; @@ -844,11 +867,11 @@ static public function getColumnPath($keySpace, } /** + * numRows is no longer supported; that option has been folded into the slice predicate. * @param string $keySpace keyspace of key * @param cassandra_KeyRange $keyRange * @param cassandra_ColumnParent $columnParent * @param cassandra_SlicePredicate $predicate column names or range predicate - * @param int number of rows to return * @param int $consistencyLevel response consistency level * @return */ @@ -862,11 +885,11 @@ static public function getRangeSlices($keySpace, $client = self::getClient(FALSE, $keySpace); try { - return $client->get_range_slices($keySpace, + return $client->get_range_slices( $columnParent, $predicate, $keyRange, - $numRows, + // $numRows, // DEPRECATED, see above self::getConsistency($consistencyLevel)); } catch (TException $te) { self::registerError( 'TException: '.$te->getMessage().' '.(isset($te->why) ? $te->why : '')); diff --git a/lib/thrift/cassandra.thrift b/lib/thrift/cassandra.thrift index ae49643..1204cd1 100755 --- a/lib/thrift/cassandra.thrift +++ b/lib/thrift/cassandra.thrift @@ -46,22 +46,24 @@ namespace rb CassandraThrift # for every edit that doesn't result in a change to major/minor. # # See the Semantic Versioning Specification (SemVer) http://semver.org. -const string VERSION = "2.1.0" +const string VERSION = "17.1.0" + # # data structures # /** Basic unit of data within a ColumnFamily. - * @param name. A column name can act both as structure (a label) or as data (like value). Regardless, the name of the column - * is used as a key to its value. - * @param value. Some data - * @param timestamp. Used to record when data was sent to be written. + * @param name, the name by which this column is set and retrieved. Maximum 64KB long. + * @param value. The data associated with the name. Maximum 2GB long, but in practice you should limit it to small numbers of MB (since Thrift must read the full value into memory to operate on it). + * @param timestamp. The timestamp is used for conflict detection/resolution when two columns with same name need to be compared. + * @param ttl. An optional, positive delay (in seconds) after which the column will be automatically deleted. */ struct Column { 1: required binary name, 2: required binary value, 3: required i64 timestamp, + 4: optional i32 ttl, } /** A named list of columns. @@ -114,7 +116,7 @@ exception UnavailableException { exception TimedOutException { } -/** invalid authentication request (user does not exist or credentials invalid) */ +/** invalid authentication request (invalid keyspace, user does not exist, or credentials invalid) */ exception AuthenticationException { 1: required string why } @@ -136,22 +138,23 @@ exception AuthorizationException { * allowing availability in the face of node failures up to half of . Of course if latency is more * important than consistency then you can use lower values for either or both. * - * Write: - * ZERO Ensure nothing. A write happens asynchronously in background - * ANY Ensure that the write has been written once somewhere, including possibly being hinted in a non-target node. - * ONE Ensure that the write has been written to at least 1 node's commit log and memory table before responding to the client. - * QUORUM Ensure that the write has been written to / 2 + 1 nodes before responding to the client. - * ALL Ensure that the write is written to <ReplicationFactor> nodes before responding to the client. + * Write consistency levels make the following guarantees before reporting success to the client: + * ZERO Ensure nothing. A write happens asynchronously in background + * ANY Ensure that the write has been written once somewhere, including possibly being hinted in a non-target node. + * ONE Ensure that the write has been written to at least 1 node's commit log and memory table + * QUORUM Ensure that the write has been written to / 2 + 1 nodes + * DCQUORUM Ensure that the write has been written to / 2 + 1 nodes, within the local datacenter (requires NetworkTopologyStrategy) + * DCQUORUMSYNC Ensure that the write has been written to / 2 + 1 nodes in each datacenter (requires NetworkTopologyStrategy) + * ALL Ensure that the write is written to <ReplicationFactor> nodes before responding to the client. * * Read: - * ZERO Not supported, because it doesn't make sense. - * ANY Not supported. You probably want ONE instead. - * ONE Will return the record returned by the first node to respond. A consistency check is always done in a - * background thread to fix any consistency issues when ConsistencyLevel.ONE is used. This means subsequent - * calls will have correct data even if the initial read gets an older value. (This is called 'read repair'.) - * QUORUM Will query all storage nodes and return the record with the most recent timestamp once it has at least a - * majority of replicas reported. Again, the remaining replicas will be checked in the background. - * ALL Queries all storage nodes and returns the record with the most recent timestamp. + * ZERO Not supported, because it doesn't make sense. + * ANY Not supported. You probably want ONE instead. + * ONE Will return the record returned by the first node to respond. A consistency check is always done in a background thread to fix any consistency issues when ConsistencyLevel.ONE is used. This means subsequent calls will have correct data even if the initial read gets an older value. (This is called 'read repair'.) + * QUORUM Will query all storage nodes and return the record with the most recent timestamp once it has at least a majority of replicas reported. Again, the remaining replicas will be checked in the background. + * DCQUORUM Returns the record with the most recent timestamp once a majority of replicas within the local datacenter have replied. + * DCQUORUMSYNC Returns the record with the most recent timestamp once a majority of replicas within each datacenter have replied. + * ALL Queries all storage nodes and returns the record with the most recent timestamp. */ enum ConsistencyLevel { ZERO = 0, @@ -200,7 +203,7 @@ struct ColumnPath { and can be safely set to an empty byte array to not stop until 'count' results are seen. Otherwise, it must also be a valid value to the ColumnFamily Comparator. @param reversed. Whether the results should be ordered in reversed order. Similar to ORDER BY blah DESC in SQL. - @param count. How many keys to return. Similar to LIMIT 100 in SQL. May be arbitrarily large, but Thrift will + @param count. How many columns to return. Similar to LIMIT in SQL. May be arbitrarily large, but Thrift will materialize the whole result into memory before returning it to the client, so be aware that you may be better served by iterating through slices by passing the last value of one call in as the 'start' of the next instead of increasing 'count' arbitrarily large. @@ -229,6 +232,26 @@ struct SlicePredicate { 2: optional SliceRange slice_range, } +enum IndexOperator { + EQ, + GTE, + GT, + LTE, + LT +} + +struct IndexExpression { + 1: required binary column_name, + 2: required IndexOperator op, + 3: required binary value, +} + +struct IndexClause { + 1: required list expressions + 2: required binary start_key, + 3: required i32 count=100, +} + /** The semantics of start keys and tokens are slightly different. Keys are start-inclusive; tokens are start-exclusive. Token @@ -238,8 +261,8 @@ one-element range, but a range from tokenY to tokenY is the full ring. */ struct KeyRange { - 1: optional string start_key, - 2: optional string end_key, + 1: optional binary start_key, + 2: optional binary end_key, 3: optional string start_token, 4: optional string end_token, 5: required i32 count=100 @@ -253,10 +276,15 @@ struct KeyRange { a SlicePredicate. */ struct KeySlice { - 1: required string key, + 1: required binary key, 2: required list columns, } +struct KeyCount { + 1: required binary key, + 2: required i32 count +} + struct Deletion { 1: required i64 timestamp, 2: optional binary super_column, @@ -280,119 +308,135 @@ struct TokenRange { } /** - Authentication requests can contain any data, dependent on the AuthenticationBackend used + Authentication requests can contain any data, dependent on the IAuthenticator used */ struct AuthenticationRequest { - 1: required map credentials, + 1: required map credentials +} + +enum IndexType { + KEYS, +} + +/* describes a column in a column family. */ +struct ColumnDef { + 1: required binary name, + 2: required string validation_class, + 3: optional IndexType index_type, + 4: optional string index_name } +/* describes a column family. */ +struct CfDef { + 1: required string keyspace, + 2: required string name, + 3: optional string column_type="Standard", + 5: optional string comparator_type="BytesType", + 6: optional string subcomparator_type, + 8: optional string comment, + 9: optional double row_cache_size=0, + 10: optional bool preload_row_cache=0, + 11: optional double key_cache_size=200000, + 12: optional double read_repair_chance=1.0, + 13: optional list column_metadata, + 14: optional i32 gc_grace_seconds, + 15: optional string default_validation_class, + 16: optional i32 id, + 17: optional i32 min_compaction_threshold, + 18: optional i32 max_compaction_threshold, +} + +/* describes a keyspace. */ +struct KsDef { + 1: required string name, + 2: required string strategy_class, + 3: optional map strategy_options, + 4: required i32 replication_factor, + 5: required list cf_defs, +} + service Cassandra { # auth methods - void login(1: required string keyspace, 2:required AuthenticationRequest auth_request) throws (1:AuthenticationException authnx, 2:AuthorizationException authzx), + void login(1: required AuthenticationRequest auth_request) throws (1:AuthenticationException authnx, 2:AuthorizationException authzx), + # set keyspace + void set_keyspace(1: required string keyspace) throws (1:InvalidRequestException ire), + # retrieval methods /** Get the Column or SuperColumn at the given column_path. If no value is present, NotFoundException is thrown. (This is the only method that can throw an exception under non-failure conditions.) */ - ColumnOrSuperColumn get(1:required string keyspace, - 2:required string key, - 3:required ColumnPath column_path, - 4:required ConsistencyLevel consistency_level=ONE) + ColumnOrSuperColumn get(1:required binary key, + 2:required ColumnPath column_path, + 3:required ConsistencyLevel consistency_level=ConsistencyLevel.ONE) throws (1:InvalidRequestException ire, 2:NotFoundException nfe, 3:UnavailableException ue, 4:TimedOutException te), /** Get the group of columns contained by column_parent (either a ColumnFamily name or a ColumnFamily/SuperColumn name pair) specified by the given SlicePredicate. If no matching values are found, an empty list is returned. */ - list get_slice(1:required string keyspace, - 2:required string key, - 3:required ColumnParent column_parent, - 4:required SlicePredicate predicate, - 5:required ConsistencyLevel consistency_level=ONE) + list get_slice(1:required binary key, + 2:required ColumnParent column_parent, + 3:required SlicePredicate predicate, + 4:required ConsistencyLevel consistency_level=ConsistencyLevel.ONE) throws (1:InvalidRequestException ire, 2:UnavailableException ue, 3:TimedOutException te), /** - Perform a get for column_path in parallel on the given list keys. The return value maps keys to the - ColumnOrSuperColumn found. If no value corresponding to a key is present, the key will still be in the map, but both - the column and super_column references of the ColumnOrSuperColumn object it maps to will be null. - @deprecated; use multiget_slice + returns the number of columns matching predicate for a particular key, + ColumnFamily and optionally SuperColumn. */ - map multiget(1:required string keyspace, - 2:required list keys, - 3:required ColumnPath column_path, - 4:required ConsistencyLevel consistency_level=ONE) - throws (1:InvalidRequestException ire, 2:UnavailableException ue, 3:TimedOutException te), + i32 get_count(1:required binary key, + 2:required ColumnParent column_parent, + 3:required SlicePredicate predicate, + 4:required ConsistencyLevel consistency_level=ConsistencyLevel.ONE) + throws (1:InvalidRequestException ire, 2:UnavailableException ue, 3:TimedOutException te), /** Performs a get_slice for column_parent and predicate for the given keys in parallel. */ - map> multiget_slice(1:required string keyspace, - 2:required list keys, - 3:required ColumnParent column_parent, - 4:required SlicePredicate predicate, - 5:required ConsistencyLevel consistency_level=ONE) + map> multiget_slice(1:required list keys, + 2:required ColumnParent column_parent, + 3:required SlicePredicate predicate, + 4:required ConsistencyLevel consistency_level=ConsistencyLevel.ONE) throws (1:InvalidRequestException ire, 2:UnavailableException ue, 3:TimedOutException te), /** - returns the number of columns for a particular key and ColumnFamily or SuperColumn. + Perform a get_count in parallel on the given list keys. The return value maps keys to the count found. */ - i32 get_count(1:required string keyspace, - 2:required string key, - 3:required ColumnParent column_parent, - 4:required ConsistencyLevel consistency_level=ONE) + map multiget_count(1:required list keys, + 2:required ColumnParent column_parent, + 3:required SlicePredicate predicate, + 4:required ConsistencyLevel consistency_level=ConsistencyLevel.ONE) throws (1:InvalidRequestException ire, 2:UnavailableException ue, 3:TimedOutException te), /** - returns a subset of columns for a range of keys. - @Deprecated. Use get_range_slices instead + returns a subset of columns for a contiguous range of keys. */ - list get_range_slice(1:required string keyspace, - 2:required ColumnParent column_parent, - 3:required SlicePredicate predicate, - 4:required string start_key="", - 5:required string finish_key="", - 6:required i32 row_count=100, - 7:required ConsistencyLevel consistency_level=ONE) + list get_range_slices(1:required ColumnParent column_parent, + 2:required SlicePredicate predicate, + 3:required KeyRange range, + 4:required ConsistencyLevel consistency_level=ConsistencyLevel.ONE) throws (1:InvalidRequestException ire, 2:UnavailableException ue, 3:TimedOutException te), - /** - returns a subset of columns for a range of keys. - */ - list get_range_slices(1:required string keyspace, - 2:required ColumnParent column_parent, - 3:required SlicePredicate predicate, - 4:required KeyRange range, - 5:required ConsistencyLevel consistency_level=ONE) + /** Returns the subset of columns specified in SlicePredicate for the rows matching the IndexClause */ + list get_indexed_slices(1:required ColumnParent column_parent, + 2:required IndexClause index_clause, + 3:required SlicePredicate column_predicate, + 4:required ConsistencyLevel consistency_level=ConsistencyLevel.ONE) throws (1:InvalidRequestException ire, 2:UnavailableException ue, 3:TimedOutException te), # modification methods /** - Insert a Column consisting of (column_path.column, value, timestamp) at the given column_path.column_family and optional - column_path.super_column. Note that column_path.column is here required, since a SuperColumn cannot directly contain binary - values -- it can only contain sub-Columns. - */ - void insert(1:required string keyspace, - 2:required string key, - 3:required ColumnPath column_path, - 4:required binary value, - 5:required i64 timestamp, - 6:required ConsistencyLevel consistency_level=ONE) - throws (1:InvalidRequestException ire, 2:UnavailableException ue, 3:TimedOutException te), - - /** - Insert Columns or SuperColumns across different Column Families for the same row key. batch_mutation is a - map> -- a map which pairs column family names with the relevant ColumnOrSuperColumn - objects to insert. - @deprecated; use batch_mutate instead + * Insert a Column at the given column_parent.column_family and optional column_parent.super_column. */ - void batch_insert(1:required string keyspace, - 2:required string key, - 3:required map> cfmap, - 4:required ConsistencyLevel consistency_level=ONE) + void insert(1:required binary key, + 2:required ColumnParent column_parent, + 3:required Column column, + 4:required ConsistencyLevel consistency_level=ConsistencyLevel.ONE) throws (1:InvalidRequestException ire, 2:UnavailableException ue, 3:TimedOutException te), /** @@ -400,11 +444,10 @@ service Cassandra { that all the values in column_path besides column_path.column_family are truly optional: you can remove the entire row by just specifying the ColumnFamily, or you can remove a SuperColumn or a single Column by specifying those levels too. */ - void remove(1:required string keyspace, - 2:required string key, - 3:required ColumnPath column_path, - 4:required i64 timestamp, - 5:ConsistencyLevel consistency_level=ONE) + void remove(1:required binary key, + 2:required ColumnPath column_path, + 3:required i64 timestamp, + 4:ConsistencyLevel consistency_level=ConsistencyLevel.ONE) throws (1:InvalidRequestException ire, 2:UnavailableException ue, 3:TimedOutException te), /** @@ -412,22 +455,34 @@ service Cassandra { mutation_map maps key to column family to a list of Mutation objects to take place at that scope. **/ - void batch_mutate(1:required string keyspace, - 2:required map>> mutation_map, - 3:required ConsistencyLevel consistency_level=ONE) + void batch_mutate(1:required map>> mutation_map, + 2:required ConsistencyLevel consistency_level=ConsistencyLevel.ONE) throws (1:InvalidRequestException ire, 2:UnavailableException ue, 3:TimedOutException te), + /** + Truncate will mark and entire column family as deleted. + From the user's perspective a successful call to truncate will result complete data deletion from cfname. + Internally, however, disk space will not be immediatily released, as with all deletes in cassandra, this one + only marks the data as deleted. + The operation succeeds only if all hosts in the cluster at available and will throw an UnavailableException if + some hosts are down. + */ + void truncate(1:required string cfname) + throws (1: InvalidRequestException ire, 2: UnavailableException ue), + // Meta-APIs -- APIs to get information about the node or cluster, // rather than user data. The nodeprobe program provides usage examples. - - /** get property whose value is of type string. @Deprecated */ - string get_string_property(1:required string property), - - /** get property whose value is list of strings. @Deprecated */ - list get_string_list_property(1:required string property), + + /** + * for each schema version present in the cluster, returns a list of nodes at that version. + * hosts that do not respond will be under the key DatabaseDescriptor.INITIAL_VERSION. + * the cluster is all on the same version if the size of the map is 1. + */ + map> describe_schema_versions() + throws (1: InvalidRequestException ire), /** list the defined keyspaces in this cluster */ - set describe_keyspaces(), + list describe_keyspaces(), /** get the cluster name */ string describe_cluster_name(), @@ -446,16 +501,55 @@ service Cassandra { list describe_ring(1:required string keyspace) throws (1:InvalidRequestException ire), + /** returns the partitioner used by this cluster */ + string describe_partitioner(), + + /** returns the snitch used by this cluster */ + string describe_snitch(), + /** describe specified keyspace */ - map> describe_keyspace(1:required string keyspace) - throws (1:NotFoundException nfe), + KsDef describe_keyspace(1:required string keyspace) + throws (1:NotFoundException nfe), /** experimental API for hadoop/parallel query support. may change violently and without warning. returns list of token strings such that first subrange is (list[0], list[1]], next is (list[1], list[2]], etc. */ - list describe_splits(1:required string start_token, - 2:required string end_token, - 3:required i32 keys_per_split), + list describe_splits(1:required string cfName, + 2:required string start_token, + 3:required string end_token, + 4:required i32 keys_per_split), + + /** adds a column family. returns the new schema id. */ + string system_add_column_family(1:required CfDef cf_def) + throws (1:InvalidRequestException ire), + + /** drops a column family. returns the new schema id. */ + string system_drop_column_family(1:required string column_family) + throws (1:InvalidRequestException ire), + + /** renames a column family. returns the new schema id. */ + string system_rename_column_family(1:required string old_name, 2:required string new_name) + throws (1:InvalidRequestException ire), + + /** adds a keyspace and any column families that are part of it. returns the new schema id. */ + string system_add_keyspace(1:required KsDef ks_def) + throws (1:InvalidRequestException ire), + + /** drops a keyspace and any column families that are part of it. returns the new schema id. */ + string system_drop_keyspace(1:required string keyspace) + throws (1:InvalidRequestException ire), + + /** renames a keyspace. returns the new schema id. */ + string system_rename_keyspace(1:required string old_name, 2:required string new_name) + throws (1:InvalidRequestException ire), + + /** updates properties of a keyspace. returns the new schema id. */ + string system_update_keyspace(1:required KsDef ks_def) + throws (1:InvalidRequestException ire), + + /** updates properties of a column family. returns the new schema id. */ + string system_update_column_family(1:required CfDef cf_def) + throws (1:InvalidRequestException ire), } diff --git a/lib/thrift/packages/cassandra/Cassandra.php b/lib/thrift/packages/cassandra/Cassandra.php index 5a46901..5e5332a 100644 --- a/lib/thrift/packages/cassandra/Cassandra.php +++ b/lib/thrift/packages/cassandra/Cassandra.php @@ -9,26 +9,36 @@ include_once $GLOBALS['THRIFT_ROOT'].'/packages/cassandra/cassandra_types.php'; interface CassandraIf { - public function login($keyspace, $auth_request); - public function get($keyspace, $key, $column_path, $consistency_level); - public function get_slice($keyspace, $key, $column_parent, $predicate, $consistency_level); - public function multiget($keyspace, $keys, $column_path, $consistency_level); - public function multiget_slice($keyspace, $keys, $column_parent, $predicate, $consistency_level); - public function get_count($keyspace, $key, $column_parent, $consistency_level); - public function get_range_slice($keyspace, $column_parent, $predicate, $start_key, $finish_key, $row_count, $consistency_level); - public function get_range_slices($keyspace, $column_parent, $predicate, $range, $consistency_level); - public function insert($keyspace, $key, $column_path, $value, $timestamp, $consistency_level); - public function batch_insert($keyspace, $key, $cfmap, $consistency_level); - public function remove($keyspace, $key, $column_path, $timestamp, $consistency_level); - public function batch_mutate($keyspace, $mutation_map, $consistency_level); - public function get_string_property($property); - public function get_string_list_property($property); + public function login($auth_request); + public function set_keyspace($keyspace); + public function get($key, $column_path, $consistency_level); + public function get_slice($key, $column_parent, $predicate, $consistency_level); + public function get_count($key, $column_parent, $predicate, $consistency_level); + public function multiget_slice($keys, $column_parent, $predicate, $consistency_level); + public function multiget_count($keys, $column_parent, $predicate, $consistency_level); + public function get_range_slices($column_parent, $predicate, $range, $consistency_level); + public function get_indexed_slices($column_parent, $index_clause, $column_predicate, $consistency_level); + public function insert($key, $column_parent, $column, $consistency_level); + public function remove($key, $column_path, $timestamp, $consistency_level); + public function batch_mutate($mutation_map, $consistency_level); + public function truncate($cfname); + public function describe_schema_versions(); public function describe_keyspaces(); public function describe_cluster_name(); public function describe_version(); public function describe_ring($keyspace); + public function describe_partitioner(); + public function describe_snitch(); public function describe_keyspace($keyspace); - public function describe_splits($start_token, $end_token, $keys_per_split); + public function describe_splits($cfName, $start_token, $end_token, $keys_per_split); + public function system_add_column_family($cf_def); + public function system_drop_column_family($column_family); + public function system_rename_column_family($old_name, $new_name); + public function system_add_keyspace($ks_def); + public function system_drop_keyspace($keyspace); + public function system_rename_keyspace($old_name, $new_name); + public function system_update_keyspace($ks_def); + public function system_update_column_family($cf_def); } class CassandraClient implements CassandraIf { @@ -42,16 +52,15 @@ public function __construct($input, $output=null) { $this->output_ = $output ? $output : $input; } - public function login($keyspace, $auth_request) + public function login($auth_request) { - $this->send_login($keyspace, $auth_request); + $this->send_login($auth_request); $this->recv_login(); } - public function send_login($keyspace, $auth_request) + public function send_login($auth_request) { $args = new cassandra_Cassandra_login_args(); - $args->keyspace = $keyspace; $args->auth_request = $auth_request; $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); if ($bin_accel) @@ -97,37 +106,34 @@ public function recv_login() return; } - public function get($keyspace, $key, $column_path, $consistency_level) + public function set_keyspace($keyspace) { - $this->send_get($keyspace, $key, $column_path, $consistency_level); - return $this->recv_get(); + $this->send_set_keyspace($keyspace); + $this->recv_set_keyspace(); } - public function send_get($keyspace, $key, $column_path, $consistency_level) + public function send_set_keyspace($keyspace) { - $args = new cassandra_Cassandra_get_args(); + $args = new cassandra_Cassandra_set_keyspace_args(); $args->keyspace = $keyspace; - $args->key = $key; - $args->column_path = $column_path; - $args->consistency_level = $consistency_level; $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); if ($bin_accel) { - thrift_protocol_write_binary($this->output_, 'get', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + thrift_protocol_write_binary($this->output_, 'set_keyspace', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('get', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('set_keyspace', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_get() + public function recv_set_keyspace() { $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_get_result', $this->input_->isStrictRead()); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_set_keyspace_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -141,60 +147,46 @@ public function recv_get() $this->input_->readMessageEnd(); throw $x; } - $result = new cassandra_Cassandra_get_result(); + $result = new cassandra_Cassandra_set_keyspace_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } - if ($result->success !== null) { - return $result->success; - } if ($result->ire !== null) { throw $result->ire; } - if ($result->nfe !== null) { - throw $result->nfe; - } - if ($result->ue !== null) { - throw $result->ue; - } - if ($result->te !== null) { - throw $result->te; - } - throw new Exception("get failed: unknown result"); + return; } - public function get_slice($keyspace, $key, $column_parent, $predicate, $consistency_level) + public function get($key, $column_path, $consistency_level) { - $this->send_get_slice($keyspace, $key, $column_parent, $predicate, $consistency_level); - return $this->recv_get_slice(); + $this->send_get($key, $column_path, $consistency_level); + return $this->recv_get(); } - public function send_get_slice($keyspace, $key, $column_parent, $predicate, $consistency_level) + public function send_get($key, $column_path, $consistency_level) { - $args = new cassandra_Cassandra_get_slice_args(); - $args->keyspace = $keyspace; + $args = new cassandra_Cassandra_get_args(); $args->key = $key; - $args->column_parent = $column_parent; - $args->predicate = $predicate; + $args->column_path = $column_path; $args->consistency_level = $consistency_level; $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); if ($bin_accel) { - thrift_protocol_write_binary($this->output_, 'get_slice', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + thrift_protocol_write_binary($this->output_, 'get', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('get_slice', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('get', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_get_slice() + public function recv_get() { $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_get_slice_result', $this->input_->isStrictRead()); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_get_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -208,7 +200,7 @@ public function recv_get_slice() $this->input_->readMessageEnd(); throw $x; } - $result = new cassandra_Cassandra_get_slice_result(); + $result = new cassandra_Cassandra_get_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -218,46 +210,49 @@ public function recv_get_slice() if ($result->ire !== null) { throw $result->ire; } + if ($result->nfe !== null) { + throw $result->nfe; + } if ($result->ue !== null) { throw $result->ue; } if ($result->te !== null) { throw $result->te; } - throw new Exception("get_slice failed: unknown result"); + throw new Exception("get failed: unknown result"); } - public function multiget($keyspace, $keys, $column_path, $consistency_level) + public function get_slice($key, $column_parent, $predicate, $consistency_level) { - $this->send_multiget($keyspace, $keys, $column_path, $consistency_level); - return $this->recv_multiget(); + $this->send_get_slice($key, $column_parent, $predicate, $consistency_level); + return $this->recv_get_slice(); } - public function send_multiget($keyspace, $keys, $column_path, $consistency_level) + public function send_get_slice($key, $column_parent, $predicate, $consistency_level) { - $args = new cassandra_Cassandra_multiget_args(); - $args->keyspace = $keyspace; - $args->keys = $keys; - $args->column_path = $column_path; + $args = new cassandra_Cassandra_get_slice_args(); + $args->key = $key; + $args->column_parent = $column_parent; + $args->predicate = $predicate; $args->consistency_level = $consistency_level; $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); if ($bin_accel) { - thrift_protocol_write_binary($this->output_, 'multiget', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + thrift_protocol_write_binary($this->output_, 'get_slice', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('multiget', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('get_slice', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_multiget() + public function recv_get_slice() { $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_multiget_result', $this->input_->isStrictRead()); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_get_slice_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -271,7 +266,7 @@ public function recv_multiget() $this->input_->readMessageEnd(); throw $x; } - $result = new cassandra_Cassandra_multiget_result(); + $result = new cassandra_Cassandra_get_slice_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -287,41 +282,40 @@ public function recv_multiget() if ($result->te !== null) { throw $result->te; } - throw new Exception("multiget failed: unknown result"); + throw new Exception("get_slice failed: unknown result"); } - public function multiget_slice($keyspace, $keys, $column_parent, $predicate, $consistency_level) + public function get_count($key, $column_parent, $predicate, $consistency_level) { - $this->send_multiget_slice($keyspace, $keys, $column_parent, $predicate, $consistency_level); - return $this->recv_multiget_slice(); + $this->send_get_count($key, $column_parent, $predicate, $consistency_level); + return $this->recv_get_count(); } - public function send_multiget_slice($keyspace, $keys, $column_parent, $predicate, $consistency_level) + public function send_get_count($key, $column_parent, $predicate, $consistency_level) { - $args = new cassandra_Cassandra_multiget_slice_args(); - $args->keyspace = $keyspace; - $args->keys = $keys; + $args = new cassandra_Cassandra_get_count_args(); + $args->key = $key; $args->column_parent = $column_parent; $args->predicate = $predicate; $args->consistency_level = $consistency_level; $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); if ($bin_accel) { - thrift_protocol_write_binary($this->output_, 'multiget_slice', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + thrift_protocol_write_binary($this->output_, 'get_count', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('multiget_slice', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('get_count', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_multiget_slice() + public function recv_get_count() { $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_multiget_slice_result', $this->input_->isStrictRead()); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_get_count_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -335,7 +329,7 @@ public function recv_multiget_slice() $this->input_->readMessageEnd(); throw $x; } - $result = new cassandra_Cassandra_multiget_slice_result(); + $result = new cassandra_Cassandra_get_count_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -351,40 +345,40 @@ public function recv_multiget_slice() if ($result->te !== null) { throw $result->te; } - throw new Exception("multiget_slice failed: unknown result"); + throw new Exception("get_count failed: unknown result"); } - public function get_count($keyspace, $key, $column_parent, $consistency_level) + public function multiget_slice($keys, $column_parent, $predicate, $consistency_level) { - $this->send_get_count($keyspace, $key, $column_parent, $consistency_level); - return $this->recv_get_count(); + $this->send_multiget_slice($keys, $column_parent, $predicate, $consistency_level); + return $this->recv_multiget_slice(); } - public function send_get_count($keyspace, $key, $column_parent, $consistency_level) + public function send_multiget_slice($keys, $column_parent, $predicate, $consistency_level) { - $args = new cassandra_Cassandra_get_count_args(); - $args->keyspace = $keyspace; - $args->key = $key; + $args = new cassandra_Cassandra_multiget_slice_args(); + $args->keys = $keys; $args->column_parent = $column_parent; + $args->predicate = $predicate; $args->consistency_level = $consistency_level; $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); if ($bin_accel) { - thrift_protocol_write_binary($this->output_, 'get_count', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + thrift_protocol_write_binary($this->output_, 'multiget_slice', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('get_count', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('multiget_slice', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_get_count() + public function recv_multiget_slice() { $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_get_count_result', $this->input_->isStrictRead()); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_multiget_slice_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -398,7 +392,7 @@ public function recv_get_count() $this->input_->readMessageEnd(); throw $x; } - $result = new cassandra_Cassandra_get_count_result(); + $result = new cassandra_Cassandra_multiget_slice_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -414,43 +408,40 @@ public function recv_get_count() if ($result->te !== null) { throw $result->te; } - throw new Exception("get_count failed: unknown result"); + throw new Exception("multiget_slice failed: unknown result"); } - public function get_range_slice($keyspace, $column_parent, $predicate, $start_key, $finish_key, $row_count, $consistency_level) + public function multiget_count($keys, $column_parent, $predicate, $consistency_level) { - $this->send_get_range_slice($keyspace, $column_parent, $predicate, $start_key, $finish_key, $row_count, $consistency_level); - return $this->recv_get_range_slice(); + $this->send_multiget_count($keys, $column_parent, $predicate, $consistency_level); + return $this->recv_multiget_count(); } - public function send_get_range_slice($keyspace, $column_parent, $predicate, $start_key, $finish_key, $row_count, $consistency_level) + public function send_multiget_count($keys, $column_parent, $predicate, $consistency_level) { - $args = new cassandra_Cassandra_get_range_slice_args(); - $args->keyspace = $keyspace; + $args = new cassandra_Cassandra_multiget_count_args(); + $args->keys = $keys; $args->column_parent = $column_parent; $args->predicate = $predicate; - $args->start_key = $start_key; - $args->finish_key = $finish_key; - $args->row_count = $row_count; $args->consistency_level = $consistency_level; $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); if ($bin_accel) { - thrift_protocol_write_binary($this->output_, 'get_range_slice', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + thrift_protocol_write_binary($this->output_, 'multiget_count', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('get_range_slice', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('multiget_count', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_get_range_slice() + public function recv_multiget_count() { $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_get_range_slice_result', $this->input_->isStrictRead()); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_multiget_count_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -464,7 +455,7 @@ public function recv_get_range_slice() $this->input_->readMessageEnd(); throw $x; } - $result = new cassandra_Cassandra_get_range_slice_result(); + $result = new cassandra_Cassandra_multiget_count_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -480,19 +471,18 @@ public function recv_get_range_slice() if ($result->te !== null) { throw $result->te; } - throw new Exception("get_range_slice failed: unknown result"); + throw new Exception("multiget_count failed: unknown result"); } - public function get_range_slices($keyspace, $column_parent, $predicate, $range, $consistency_level) + public function get_range_slices($column_parent, $predicate, $range, $consistency_level) { - $this->send_get_range_slices($keyspace, $column_parent, $predicate, $range, $consistency_level); + $this->send_get_range_slices($column_parent, $predicate, $range, $consistency_level); return $this->recv_get_range_slices(); } - public function send_get_range_slices($keyspace, $column_parent, $predicate, $range, $consistency_level) + public function send_get_range_slices($column_parent, $predicate, $range, $consistency_level) { $args = new cassandra_Cassandra_get_range_slices_args(); - $args->keyspace = $keyspace; $args->column_parent = $column_parent; $args->predicate = $predicate; $args->range = $range; @@ -547,39 +537,37 @@ public function recv_get_range_slices() throw new Exception("get_range_slices failed: unknown result"); } - public function insert($keyspace, $key, $column_path, $value, $timestamp, $consistency_level) + public function get_indexed_slices($column_parent, $index_clause, $column_predicate, $consistency_level) { - $this->send_insert($keyspace, $key, $column_path, $value, $timestamp, $consistency_level); - $this->recv_insert(); + $this->send_get_indexed_slices($column_parent, $index_clause, $column_predicate, $consistency_level); + return $this->recv_get_indexed_slices(); } - public function send_insert($keyspace, $key, $column_path, $value, $timestamp, $consistency_level) + public function send_get_indexed_slices($column_parent, $index_clause, $column_predicate, $consistency_level) { - $args = new cassandra_Cassandra_insert_args(); - $args->keyspace = $keyspace; - $args->key = $key; - $args->column_path = $column_path; - $args->value = $value; - $args->timestamp = $timestamp; + $args = new cassandra_Cassandra_get_indexed_slices_args(); + $args->column_parent = $column_parent; + $args->index_clause = $index_clause; + $args->column_predicate = $column_predicate; $args->consistency_level = $consistency_level; $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); if ($bin_accel) { - thrift_protocol_write_binary($this->output_, 'insert', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + thrift_protocol_write_binary($this->output_, 'get_indexed_slices', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('insert', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('get_indexed_slices', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_insert() + public function recv_get_indexed_slices() { $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_insert_result', $this->input_->isStrictRead()); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_get_indexed_slices_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -593,10 +581,13 @@ public function recv_insert() $this->input_->readMessageEnd(); throw $x; } - $result = new cassandra_Cassandra_insert_result(); + $result = new cassandra_Cassandra_get_indexed_slices_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } + if ($result->success !== null) { + return $result->success; + } if ($result->ire !== null) { throw $result->ire; } @@ -606,40 +597,40 @@ public function recv_insert() if ($result->te !== null) { throw $result->te; } - return; + throw new Exception("get_indexed_slices failed: unknown result"); } - public function batch_insert($keyspace, $key, $cfmap, $consistency_level) + public function insert($key, $column_parent, $column, $consistency_level) { - $this->send_batch_insert($keyspace, $key, $cfmap, $consistency_level); - $this->recv_batch_insert(); + $this->send_insert($key, $column_parent, $column, $consistency_level); + $this->recv_insert(); } - public function send_batch_insert($keyspace, $key, $cfmap, $consistency_level) + public function send_insert($key, $column_parent, $column, $consistency_level) { - $args = new cassandra_Cassandra_batch_insert_args(); - $args->keyspace = $keyspace; + $args = new cassandra_Cassandra_insert_args(); $args->key = $key; - $args->cfmap = $cfmap; + $args->column_parent = $column_parent; + $args->column = $column; $args->consistency_level = $consistency_level; $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); if ($bin_accel) { - thrift_protocol_write_binary($this->output_, 'batch_insert', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + thrift_protocol_write_binary($this->output_, 'insert', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('batch_insert', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('insert', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_batch_insert() + public function recv_insert() { $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_batch_insert_result', $this->input_->isStrictRead()); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_insert_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -653,7 +644,7 @@ public function recv_batch_insert() $this->input_->readMessageEnd(); throw $x; } - $result = new cassandra_Cassandra_batch_insert_result(); + $result = new cassandra_Cassandra_insert_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -669,16 +660,15 @@ public function recv_batch_insert() return; } - public function remove($keyspace, $key, $column_path, $timestamp, $consistency_level) + public function remove($key, $column_path, $timestamp, $consistency_level) { - $this->send_remove($keyspace, $key, $column_path, $timestamp, $consistency_level); + $this->send_remove($key, $column_path, $timestamp, $consistency_level); $this->recv_remove(); } - public function send_remove($keyspace, $key, $column_path, $timestamp, $consistency_level) + public function send_remove($key, $column_path, $timestamp, $consistency_level) { $args = new cassandra_Cassandra_remove_args(); - $args->keyspace = $keyspace; $args->key = $key; $args->column_path = $column_path; $args->timestamp = $timestamp; @@ -730,16 +720,15 @@ public function recv_remove() return; } - public function batch_mutate($keyspace, $mutation_map, $consistency_level) + public function batch_mutate($mutation_map, $consistency_level) { - $this->send_batch_mutate($keyspace, $mutation_map, $consistency_level); + $this->send_batch_mutate($mutation_map, $consistency_level); $this->recv_batch_mutate(); } - public function send_batch_mutate($keyspace, $mutation_map, $consistency_level) + public function send_batch_mutate($mutation_map, $consistency_level) { $args = new cassandra_Cassandra_batch_mutate_args(); - $args->keyspace = $keyspace; $args->mutation_map = $mutation_map; $args->consistency_level = $consistency_level; $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); @@ -789,34 +778,34 @@ public function recv_batch_mutate() return; } - public function get_string_property($property) + public function truncate($cfname) { - $this->send_get_string_property($property); - return $this->recv_get_string_property(); + $this->send_truncate($cfname); + $this->recv_truncate(); } - public function send_get_string_property($property) + public function send_truncate($cfname) { - $args = new cassandra_Cassandra_get_string_property_args(); - $args->property = $property; + $args = new cassandra_Cassandra_truncate_args(); + $args->cfname = $cfname; $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); if ($bin_accel) { - thrift_protocol_write_binary($this->output_, 'get_string_property', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + thrift_protocol_write_binary($this->output_, 'truncate', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('get_string_property', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('truncate', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_get_string_property() + public function recv_truncate() { $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_get_string_property_result', $this->input_->isStrictRead()); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_truncate_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -830,44 +819,46 @@ public function recv_get_string_property() $this->input_->readMessageEnd(); throw $x; } - $result = new cassandra_Cassandra_get_string_property_result(); + $result = new cassandra_Cassandra_truncate_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } - if ($result->success !== null) { - return $result->success; + if ($result->ire !== null) { + throw $result->ire; + } + if ($result->ue !== null) { + throw $result->ue; } - throw new Exception("get_string_property failed: unknown result"); + return; } - public function get_string_list_property($property) + public function describe_schema_versions() { - $this->send_get_string_list_property($property); - return $this->recv_get_string_list_property(); + $this->send_describe_schema_versions(); + return $this->recv_describe_schema_versions(); } - public function send_get_string_list_property($property) + public function send_describe_schema_versions() { - $args = new cassandra_Cassandra_get_string_list_property_args(); - $args->property = $property; + $args = new cassandra_Cassandra_describe_schema_versions_args(); $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); if ($bin_accel) { - thrift_protocol_write_binary($this->output_, 'get_string_list_property', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + thrift_protocol_write_binary($this->output_, 'describe_schema_versions', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('get_string_list_property', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('describe_schema_versions', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_get_string_list_property() + public function recv_describe_schema_versions() { $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_get_string_list_property_result', $this->input_->isStrictRead()); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_describe_schema_versions_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -881,14 +872,17 @@ public function recv_get_string_list_property() $this->input_->readMessageEnd(); throw $x; } - $result = new cassandra_Cassandra_get_string_list_property_result(); + $result = new cassandra_Cassandra_describe_schema_versions_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } if ($result->success !== null) { return $result->success; } - throw new Exception("get_string_list_property failed: unknown result"); + if ($result->ire !== null) { + throw $result->ire; + } + throw new Exception("describe_schema_versions failed: unknown result"); } public function describe_keyspaces() @@ -1095,6 +1089,106 @@ public function recv_describe_ring() throw new Exception("describe_ring failed: unknown result"); } + public function describe_partitioner() + { + $this->send_describe_partitioner(); + return $this->recv_describe_partitioner(); + } + + public function send_describe_partitioner() + { + $args = new cassandra_Cassandra_describe_partitioner_args(); + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'describe_partitioner', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('describe_partitioner', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_describe_partitioner() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_describe_partitioner_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new cassandra_Cassandra_describe_partitioner_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + throw new Exception("describe_partitioner failed: unknown result"); + } + + public function describe_snitch() + { + $this->send_describe_snitch(); + return $this->recv_describe_snitch(); + } + + public function send_describe_snitch() + { + $args = new cassandra_Cassandra_describe_snitch_args(); + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'describe_snitch', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('describe_snitch', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_describe_snitch() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_describe_snitch_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new cassandra_Cassandra_describe_snitch_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + throw new Exception("describe_snitch failed: unknown result"); + } + public function describe_keyspace($keyspace) { $this->send_describe_keyspace($keyspace); @@ -1149,15 +1243,16 @@ public function recv_describe_keyspace() throw new Exception("describe_keyspace failed: unknown result"); } - public function describe_splits($start_token, $end_token, $keys_per_split) + public function describe_splits($cfName, $start_token, $end_token, $keys_per_split) { - $this->send_describe_splits($start_token, $end_token, $keys_per_split); + $this->send_describe_splits($cfName, $start_token, $end_token, $keys_per_split); return $this->recv_describe_splits(); } - public function send_describe_splits($start_token, $end_token, $keys_per_split) + public function send_describe_splits($cfName, $start_token, $end_token, $keys_per_split) { $args = new cassandra_Cassandra_describe_splits_args(); + $args->cfName = $cfName; $args->start_token = $start_token; $args->end_token = $end_token; $args->keys_per_split = $keys_per_split; @@ -1202,66 +1297,1300 @@ public function recv_describe_splits() throw new Exception("describe_splits failed: unknown result"); } -} - -// HELPER FUNCTIONS AND STRUCTURES - -class cassandra_Cassandra_login_args extends TBase { - static $_TSPEC; - - public $keyspace = null; - public $auth_request = null; + public function system_add_column_family($cf_def) + { + $this->send_system_add_column_family($cf_def); + return $this->recv_system_add_column_family(); + } - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'keyspace', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'auth_request', - 'type' => TType::STRUCT, - 'class' => 'cassandra_AuthenticationRequest', - ), - ); + public function send_system_add_column_family($cf_def) + { + $args = new cassandra_Cassandra_system_add_column_family_args(); + $args->cf_def = $cf_def; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'system_add_column_family', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); + else + { + $this->output_->writeMessageBegin('system_add_column_family', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); } } - public function getName() { + public function recv_system_add_column_family() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_system_add_column_family_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new cassandra_Cassandra_system_add_column_family_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->ire !== null) { + throw $result->ire; + } + throw new Exception("system_add_column_family failed: unknown result"); + } + + public function system_drop_column_family($column_family) + { + $this->send_system_drop_column_family($column_family); + return $this->recv_system_drop_column_family(); + } + + public function send_system_drop_column_family($column_family) + { + $args = new cassandra_Cassandra_system_drop_column_family_args(); + $args->column_family = $column_family; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'system_drop_column_family', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('system_drop_column_family', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_system_drop_column_family() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_system_drop_column_family_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new cassandra_Cassandra_system_drop_column_family_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->ire !== null) { + throw $result->ire; + } + throw new Exception("system_drop_column_family failed: unknown result"); + } + + public function system_rename_column_family($old_name, $new_name) + { + $this->send_system_rename_column_family($old_name, $new_name); + return $this->recv_system_rename_column_family(); + } + + public function send_system_rename_column_family($old_name, $new_name) + { + $args = new cassandra_Cassandra_system_rename_column_family_args(); + $args->old_name = $old_name; + $args->new_name = $new_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'system_rename_column_family', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('system_rename_column_family', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_system_rename_column_family() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_system_rename_column_family_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new cassandra_Cassandra_system_rename_column_family_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->ire !== null) { + throw $result->ire; + } + throw new Exception("system_rename_column_family failed: unknown result"); + } + + public function system_add_keyspace($ks_def) + { + $this->send_system_add_keyspace($ks_def); + return $this->recv_system_add_keyspace(); + } + + public function send_system_add_keyspace($ks_def) + { + $args = new cassandra_Cassandra_system_add_keyspace_args(); + $args->ks_def = $ks_def; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'system_add_keyspace', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('system_add_keyspace', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_system_add_keyspace() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_system_add_keyspace_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new cassandra_Cassandra_system_add_keyspace_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->ire !== null) { + throw $result->ire; + } + throw new Exception("system_add_keyspace failed: unknown result"); + } + + public function system_drop_keyspace($keyspace) + { + $this->send_system_drop_keyspace($keyspace); + return $this->recv_system_drop_keyspace(); + } + + public function send_system_drop_keyspace($keyspace) + { + $args = new cassandra_Cassandra_system_drop_keyspace_args(); + $args->keyspace = $keyspace; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'system_drop_keyspace', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('system_drop_keyspace', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_system_drop_keyspace() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_system_drop_keyspace_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new cassandra_Cassandra_system_drop_keyspace_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->ire !== null) { + throw $result->ire; + } + throw new Exception("system_drop_keyspace failed: unknown result"); + } + + public function system_rename_keyspace($old_name, $new_name) + { + $this->send_system_rename_keyspace($old_name, $new_name); + return $this->recv_system_rename_keyspace(); + } + + public function send_system_rename_keyspace($old_name, $new_name) + { + $args = new cassandra_Cassandra_system_rename_keyspace_args(); + $args->old_name = $old_name; + $args->new_name = $new_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'system_rename_keyspace', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('system_rename_keyspace', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_system_rename_keyspace() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_system_rename_keyspace_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new cassandra_Cassandra_system_rename_keyspace_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->ire !== null) { + throw $result->ire; + } + throw new Exception("system_rename_keyspace failed: unknown result"); + } + + public function system_update_keyspace($ks_def) + { + $this->send_system_update_keyspace($ks_def); + return $this->recv_system_update_keyspace(); + } + + public function send_system_update_keyspace($ks_def) + { + $args = new cassandra_Cassandra_system_update_keyspace_args(); + $args->ks_def = $ks_def; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'system_update_keyspace', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('system_update_keyspace', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_system_update_keyspace() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_system_update_keyspace_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new cassandra_Cassandra_system_update_keyspace_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->ire !== null) { + throw $result->ire; + } + throw new Exception("system_update_keyspace failed: unknown result"); + } + + public function system_update_column_family($cf_def) + { + $this->send_system_update_column_family($cf_def); + return $this->recv_system_update_column_family(); + } + + public function send_system_update_column_family($cf_def) + { + $args = new cassandra_Cassandra_system_update_column_family_args(); + $args->cf_def = $cf_def; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'system_update_column_family', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('system_update_column_family', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_system_update_column_family() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'cassandra_Cassandra_system_update_column_family_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new cassandra_Cassandra_system_update_column_family_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->ire !== null) { + throw $result->ire; + } + throw new Exception("system_update_column_family failed: unknown result"); + } + +} + +// HELPER FUNCTIONS AND STRUCTURES + +class cassandra_Cassandra_login_args extends TBase { + static $_TSPEC; + + public $auth_request = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'auth_request', + 'type' => TType::STRUCT, + 'class' => 'cassandra_AuthenticationRequest', + ), + ); + } + if (is_array($vals)) { + parent::__construct(self::$_TSPEC, $vals); + } + } + + public function getName() { return 'Cassandra_login_args'; } public function read($input) { - return $this->_read('Cassandra_login_args', self::$_TSPEC, $input); + return $this->_read('Cassandra_login_args', self::$_TSPEC, $input); + } + public function write($output) { + return $this->_write('Cassandra_login_args', self::$_TSPEC, $output); + } +} + +class cassandra_Cassandra_login_result extends TBase { + static $_TSPEC; + + public $authnx = null; + public $authzx = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'authnx', + 'type' => TType::STRUCT, + 'class' => 'cassandra_AuthenticationException', + ), + 2 => array( + 'var' => 'authzx', + 'type' => TType::STRUCT, + 'class' => 'cassandra_AuthorizationException', + ), + ); + } + if (is_array($vals)) { + parent::__construct(self::$_TSPEC, $vals); + } + } + + public function getName() { + return 'Cassandra_login_result'; + } + + public function read($input) + { + return $this->_read('Cassandra_login_result', self::$_TSPEC, $input); + } + public function write($output) { + return $this->_write('Cassandra_login_result', self::$_TSPEC, $output); + } +} + +class cassandra_Cassandra_set_keyspace_args extends TBase { + static $_TSPEC; + + public $keyspace = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'keyspace', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + parent::__construct(self::$_TSPEC, $vals); + } + } + + public function getName() { + return 'Cassandra_set_keyspace_args'; + } + + public function read($input) + { + return $this->_read('Cassandra_set_keyspace_args', self::$_TSPEC, $input); + } + public function write($output) { + return $this->_write('Cassandra_set_keyspace_args', self::$_TSPEC, $output); + } +} + +class cassandra_Cassandra_set_keyspace_result extends TBase { + static $_TSPEC; + + public $ire = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'ire', + 'type' => TType::STRUCT, + 'class' => 'cassandra_InvalidRequestException', + ), + ); + } + if (is_array($vals)) { + parent::__construct(self::$_TSPEC, $vals); + } + } + + public function getName() { + return 'Cassandra_set_keyspace_result'; + } + + public function read($input) + { + return $this->_read('Cassandra_set_keyspace_result', self::$_TSPEC, $input); + } + public function write($output) { + return $this->_write('Cassandra_set_keyspace_result', self::$_TSPEC, $output); + } +} + +class cassandra_Cassandra_get_args extends TBase { + static $_TSPEC; + + public $key = null; + public $column_path = null; + public $consistency_level = 1; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'key', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'column_path', + 'type' => TType::STRUCT, + 'class' => 'cassandra_ColumnPath', + ), + 3 => array( + 'var' => 'consistency_level', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + parent::__construct(self::$_TSPEC, $vals); + } + } + + public function getName() { + return 'Cassandra_get_args'; + } + + public function read($input) + { + return $this->_read('Cassandra_get_args', self::$_TSPEC, $input); + } + public function write($output) { + return $this->_write('Cassandra_get_args', self::$_TSPEC, $output); + } +} + +class cassandra_Cassandra_get_result extends TBase { + static $_TSPEC; + + public $success = null; + public $ire = null; + public $nfe = null; + public $ue = null; + public $te = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => 'cassandra_ColumnOrSuperColumn', + ), + 1 => array( + 'var' => 'ire', + 'type' => TType::STRUCT, + 'class' => 'cassandra_InvalidRequestException', + ), + 2 => array( + 'var' => 'nfe', + 'type' => TType::STRUCT, + 'class' => 'cassandra_NotFoundException', + ), + 3 => array( + 'var' => 'ue', + 'type' => TType::STRUCT, + 'class' => 'cassandra_UnavailableException', + ), + 4 => array( + 'var' => 'te', + 'type' => TType::STRUCT, + 'class' => 'cassandra_TimedOutException', + ), + ); + } + if (is_array($vals)) { + parent::__construct(self::$_TSPEC, $vals); + } + } + + public function getName() { + return 'Cassandra_get_result'; + } + + public function read($input) + { + return $this->_read('Cassandra_get_result', self::$_TSPEC, $input); + } + public function write($output) { + return $this->_write('Cassandra_get_result', self::$_TSPEC, $output); + } +} + +class cassandra_Cassandra_get_slice_args extends TBase { + static $_TSPEC; + + public $key = null; + public $column_parent = null; + public $predicate = null; + public $consistency_level = 1; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'key', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'column_parent', + 'type' => TType::STRUCT, + 'class' => 'cassandra_ColumnParent', + ), + 3 => array( + 'var' => 'predicate', + 'type' => TType::STRUCT, + 'class' => 'cassandra_SlicePredicate', + ), + 4 => array( + 'var' => 'consistency_level', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + parent::__construct(self::$_TSPEC, $vals); + } + } + + public function getName() { + return 'Cassandra_get_slice_args'; + } + + public function read($input) + { + return $this->_read('Cassandra_get_slice_args', self::$_TSPEC, $input); + } + public function write($output) { + return $this->_write('Cassandra_get_slice_args', self::$_TSPEC, $output); + } +} + +class cassandra_Cassandra_get_slice_result extends TBase { + static $_TSPEC; + + public $success = null; + public $ire = null; + public $ue = null; + public $te = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'cassandra_ColumnOrSuperColumn', + ), + ), + 1 => array( + 'var' => 'ire', + 'type' => TType::STRUCT, + 'class' => 'cassandra_InvalidRequestException', + ), + 2 => array( + 'var' => 'ue', + 'type' => TType::STRUCT, + 'class' => 'cassandra_UnavailableException', + ), + 3 => array( + 'var' => 'te', + 'type' => TType::STRUCT, + 'class' => 'cassandra_TimedOutException', + ), + ); + } + if (is_array($vals)) { + parent::__construct(self::$_TSPEC, $vals); + } + } + + public function getName() { + return 'Cassandra_get_slice_result'; + } + + public function read($input) + { + return $this->_read('Cassandra_get_slice_result', self::$_TSPEC, $input); + } + public function write($output) { + return $this->_write('Cassandra_get_slice_result', self::$_TSPEC, $output); + } +} + +class cassandra_Cassandra_get_count_args extends TBase { + static $_TSPEC; + + public $key = null; + public $column_parent = null; + public $predicate = null; + public $consistency_level = 1; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'key', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'column_parent', + 'type' => TType::STRUCT, + 'class' => 'cassandra_ColumnParent', + ), + 3 => array( + 'var' => 'predicate', + 'type' => TType::STRUCT, + 'class' => 'cassandra_SlicePredicate', + ), + 4 => array( + 'var' => 'consistency_level', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + parent::__construct(self::$_TSPEC, $vals); + } + } + + public function getName() { + return 'Cassandra_get_count_args'; + } + + public function read($input) + { + return $this->_read('Cassandra_get_count_args', self::$_TSPEC, $input); + } + public function write($output) { + return $this->_write('Cassandra_get_count_args', self::$_TSPEC, $output); + } +} + +class cassandra_Cassandra_get_count_result extends TBase { + static $_TSPEC; + + public $success = null; + public $ire = null; + public $ue = null; + public $te = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::I32, + ), + 1 => array( + 'var' => 'ire', + 'type' => TType::STRUCT, + 'class' => 'cassandra_InvalidRequestException', + ), + 2 => array( + 'var' => 'ue', + 'type' => TType::STRUCT, + 'class' => 'cassandra_UnavailableException', + ), + 3 => array( + 'var' => 'te', + 'type' => TType::STRUCT, + 'class' => 'cassandra_TimedOutException', + ), + ); + } + if (is_array($vals)) { + parent::__construct(self::$_TSPEC, $vals); + } + } + + public function getName() { + return 'Cassandra_get_count_result'; + } + + public function read($input) + { + return $this->_read('Cassandra_get_count_result', self::$_TSPEC, $input); + } + public function write($output) { + return $this->_write('Cassandra_get_count_result', self::$_TSPEC, $output); + } +} + +class cassandra_Cassandra_multiget_slice_args extends TBase { + static $_TSPEC; + + public $keys = null; + public $column_parent = null; + public $predicate = null; + public $consistency_level = 1; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'keys', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 2 => array( + 'var' => 'column_parent', + 'type' => TType::STRUCT, + 'class' => 'cassandra_ColumnParent', + ), + 3 => array( + 'var' => 'predicate', + 'type' => TType::STRUCT, + 'class' => 'cassandra_SlicePredicate', + ), + 4 => array( + 'var' => 'consistency_level', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + parent::__construct(self::$_TSPEC, $vals); + } + } + + public function getName() { + return 'Cassandra_multiget_slice_args'; + } + + public function read($input) + { + return $this->_read('Cassandra_multiget_slice_args', self::$_TSPEC, $input); + } + public function write($output) { + return $this->_write('Cassandra_multiget_slice_args', self::$_TSPEC, $output); + } +} + +class cassandra_Cassandra_multiget_slice_result extends TBase { + static $_TSPEC; + + public $success = null; + public $ire = null; + public $ue = null; + public $te = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::LST, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'cassandra_ColumnOrSuperColumn', + ), + ), + ), + 1 => array( + 'var' => 'ire', + 'type' => TType::STRUCT, + 'class' => 'cassandra_InvalidRequestException', + ), + 2 => array( + 'var' => 'ue', + 'type' => TType::STRUCT, + 'class' => 'cassandra_UnavailableException', + ), + 3 => array( + 'var' => 'te', + 'type' => TType::STRUCT, + 'class' => 'cassandra_TimedOutException', + ), + ); + } + if (is_array($vals)) { + parent::__construct(self::$_TSPEC, $vals); + } + } + + public function getName() { + return 'Cassandra_multiget_slice_result'; + } + + public function read($input) + { + return $this->_read('Cassandra_multiget_slice_result', self::$_TSPEC, $input); + } + public function write($output) { + return $this->_write('Cassandra_multiget_slice_result', self::$_TSPEC, $output); + } +} + +class cassandra_Cassandra_multiget_count_args extends TBase { + static $_TSPEC; + + public $keys = null; + public $column_parent = null; + public $predicate = null; + public $consistency_level = 1; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'keys', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 2 => array( + 'var' => 'column_parent', + 'type' => TType::STRUCT, + 'class' => 'cassandra_ColumnParent', + ), + 3 => array( + 'var' => 'predicate', + 'type' => TType::STRUCT, + 'class' => 'cassandra_SlicePredicate', + ), + 4 => array( + 'var' => 'consistency_level', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + parent::__construct(self::$_TSPEC, $vals); + } + } + + public function getName() { + return 'Cassandra_multiget_count_args'; + } + + public function read($input) + { + return $this->_read('Cassandra_multiget_count_args', self::$_TSPEC, $input); + } + public function write($output) { + return $this->_write('Cassandra_multiget_count_args', self::$_TSPEC, $output); + } +} + +class cassandra_Cassandra_multiget_count_result extends TBase { + static $_TSPEC; + + public $success = null; + public $ire = null; + public $ue = null; + public $te = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::I32, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::I32, + ), + ), + 1 => array( + 'var' => 'ire', + 'type' => TType::STRUCT, + 'class' => 'cassandra_InvalidRequestException', + ), + 2 => array( + 'var' => 'ue', + 'type' => TType::STRUCT, + 'class' => 'cassandra_UnavailableException', + ), + 3 => array( + 'var' => 'te', + 'type' => TType::STRUCT, + 'class' => 'cassandra_TimedOutException', + ), + ); + } + if (is_array($vals)) { + parent::__construct(self::$_TSPEC, $vals); + } + } + + public function getName() { + return 'Cassandra_multiget_count_result'; + } + + public function read($input) + { + return $this->_read('Cassandra_multiget_count_result', self::$_TSPEC, $input); + } + public function write($output) { + return $this->_write('Cassandra_multiget_count_result', self::$_TSPEC, $output); + } +} + +class cassandra_Cassandra_get_range_slices_args extends TBase { + static $_TSPEC; + + public $column_parent = null; + public $predicate = null; + public $range = null; + public $consistency_level = 1; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'column_parent', + 'type' => TType::STRUCT, + 'class' => 'cassandra_ColumnParent', + ), + 2 => array( + 'var' => 'predicate', + 'type' => TType::STRUCT, + 'class' => 'cassandra_SlicePredicate', + ), + 3 => array( + 'var' => 'range', + 'type' => TType::STRUCT, + 'class' => 'cassandra_KeyRange', + ), + 4 => array( + 'var' => 'consistency_level', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + parent::__construct(self::$_TSPEC, $vals); + } + } + + public function getName() { + return 'Cassandra_get_range_slices_args'; + } + + public function read($input) + { + return $this->_read('Cassandra_get_range_slices_args', self::$_TSPEC, $input); + } + public function write($output) { + return $this->_write('Cassandra_get_range_slices_args', self::$_TSPEC, $output); + } +} + +class cassandra_Cassandra_get_range_slices_result extends TBase { + static $_TSPEC; + + public $success = null; + public $ire = null; + public $ue = null; + public $te = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'cassandra_KeySlice', + ), + ), + 1 => array( + 'var' => 'ire', + 'type' => TType::STRUCT, + 'class' => 'cassandra_InvalidRequestException', + ), + 2 => array( + 'var' => 'ue', + 'type' => TType::STRUCT, + 'class' => 'cassandra_UnavailableException', + ), + 3 => array( + 'var' => 'te', + 'type' => TType::STRUCT, + 'class' => 'cassandra_TimedOutException', + ), + ); + } + if (is_array($vals)) { + parent::__construct(self::$_TSPEC, $vals); + } + } + + public function getName() { + return 'Cassandra_get_range_slices_result'; + } + + public function read($input) + { + return $this->_read('Cassandra_get_range_slices_result', self::$_TSPEC, $input); + } + public function write($output) { + return $this->_write('Cassandra_get_range_slices_result', self::$_TSPEC, $output); + } +} + +class cassandra_Cassandra_get_indexed_slices_args extends TBase { + static $_TSPEC; + + public $column_parent = null; + public $index_clause = null; + public $column_predicate = null; + public $consistency_level = 1; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'column_parent', + 'type' => TType::STRUCT, + 'class' => 'cassandra_ColumnParent', + ), + 2 => array( + 'var' => 'index_clause', + 'type' => TType::STRUCT, + 'class' => 'cassandra_IndexClause', + ), + 3 => array( + 'var' => 'column_predicate', + 'type' => TType::STRUCT, + 'class' => 'cassandra_SlicePredicate', + ), + 4 => array( + 'var' => 'consistency_level', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + parent::__construct(self::$_TSPEC, $vals); + } + } + + public function getName() { + return 'Cassandra_get_indexed_slices_args'; + } + + public function read($input) + { + return $this->_read('Cassandra_get_indexed_slices_args', self::$_TSPEC, $input); } public function write($output) { - return $this->_write('Cassandra_login_args', self::$_TSPEC, $output); + return $this->_write('Cassandra_get_indexed_slices_args', self::$_TSPEC, $output); } } -class cassandra_Cassandra_login_result extends TBase { +class cassandra_Cassandra_get_indexed_slices_result extends TBase { static $_TSPEC; - public $authnx = null; - public $authzx = null; + public $success = null; + public $ire = null; + public $ue = null; + public $te = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'cassandra_KeySlice', + ), + ), 1 => array( - 'var' => 'authnx', + 'var' => 'ire', 'type' => TType::STRUCT, - 'class' => 'cassandra_AuthenticationException', + 'class' => 'cassandra_InvalidRequestException', ), 2 => array( - 'var' => 'authzx', + 'var' => 'ue', 'type' => TType::STRUCT, - 'class' => 'cassandra_AuthorizationException', + 'class' => 'cassandra_UnavailableException', + ), + 3 => array( + 'var' => 'te', + 'type' => TType::STRUCT, + 'class' => 'cassandra_TimedOutException', ), ); } @@ -1271,41 +2600,42 @@ public function __construct($vals=null) { } public function getName() { - return 'Cassandra_login_result'; + return 'Cassandra_get_indexed_slices_result'; } public function read($input) { - return $this->_read('Cassandra_login_result', self::$_TSPEC, $input); + return $this->_read('Cassandra_get_indexed_slices_result', self::$_TSPEC, $input); } public function write($output) { - return $this->_write('Cassandra_login_result', self::$_TSPEC, $output); + return $this->_write('Cassandra_get_indexed_slices_result', self::$_TSPEC, $output); } } -class cassandra_Cassandra_get_args extends TBase { +class cassandra_Cassandra_insert_args extends TBase { static $_TSPEC; - public $keyspace = null; public $key = null; - public $column_path = null; + public $column_parent = null; + public $column = null; public $consistency_level = 1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'keyspace', + 'var' => 'key', 'type' => TType::STRING, ), 2 => array( - 'var' => 'key', - 'type' => TType::STRING, + 'var' => 'column_parent', + 'type' => TType::STRUCT, + 'class' => 'cassandra_ColumnParent', ), 3 => array( - 'var' => 'column_path', + 'var' => 'column', 'type' => TType::STRUCT, - 'class' => 'cassandra_ColumnPath', + 'class' => 'cassandra_Column', ), 4 => array( 'var' => 'consistency_level', @@ -1319,51 +2649,39 @@ public function __construct($vals=null) { } public function getName() { - return 'Cassandra_get_args'; + return 'Cassandra_insert_args'; } public function read($input) { - return $this->_read('Cassandra_get_args', self::$_TSPEC, $input); + return $this->_read('Cassandra_insert_args', self::$_TSPEC, $input); } public function write($output) { - return $this->_write('Cassandra_get_args', self::$_TSPEC, $output); + return $this->_write('Cassandra_insert_args', self::$_TSPEC, $output); } } -class cassandra_Cassandra_get_result extends TBase { +class cassandra_Cassandra_insert_result extends TBase { static $_TSPEC; - public $success = null; public $ire = null; - public $nfe = null; public $ue = null; public $te = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => 'cassandra_ColumnOrSuperColumn', - ), 1 => array( 'var' => 'ire', 'type' => TType::STRUCT, 'class' => 'cassandra_InvalidRequestException', ), 2 => array( - 'var' => 'nfe', - 'type' => TType::STRUCT, - 'class' => 'cassandra_NotFoundException', - ), - 3 => array( 'var' => 'ue', 'type' => TType::STRUCT, 'class' => 'cassandra_UnavailableException', ), - 4 => array( + 3 => array( 'var' => 'te', 'type' => TType::STRUCT, 'class' => 'cassandra_TimedOutException', @@ -1376,49 +2694,43 @@ public function __construct($vals=null) { } public function getName() { - return 'Cassandra_get_result'; + return 'Cassandra_insert_result'; } public function read($input) { - return $this->_read('Cassandra_get_result', self::$_TSPEC, $input); + return $this->_read('Cassandra_insert_result', self::$_TSPEC, $input); } public function write($output) { - return $this->_write('Cassandra_get_result', self::$_TSPEC, $output); + return $this->_write('Cassandra_insert_result', self::$_TSPEC, $output); } } -class cassandra_Cassandra_get_slice_args extends TBase { +class cassandra_Cassandra_remove_args extends TBase { static $_TSPEC; - public $keyspace = null; public $key = null; - public $column_parent = null; - public $predicate = null; + public $column_path = null; + public $timestamp = null; public $consistency_level = 1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'keyspace', + 'var' => 'key', 'type' => TType::STRING, ), 2 => array( - 'var' => 'key', - 'type' => TType::STRING, + 'var' => 'column_path', + 'type' => TType::STRUCT, + 'class' => 'cassandra_ColumnPath', ), 3 => array( - 'var' => 'column_parent', - 'type' => TType::STRUCT, - 'class' => 'cassandra_ColumnParent', + 'var' => 'timestamp', + 'type' => TType::I64, ), 4 => array( - 'var' => 'predicate', - 'type' => TType::STRUCT, - 'class' => 'cassandra_SlicePredicate', - ), - 5 => array( 'var' => 'consistency_level', 'type' => TType::I32, ), @@ -1430,22 +2742,21 @@ public function __construct($vals=null) { } public function getName() { - return 'Cassandra_get_slice_args'; + return 'Cassandra_remove_args'; } public function read($input) { - return $this->_read('Cassandra_get_slice_args', self::$_TSPEC, $input); + return $this->_read('Cassandra_remove_args', self::$_TSPEC, $input); } public function write($output) { - return $this->_write('Cassandra_get_slice_args', self::$_TSPEC, $output); + return $this->_write('Cassandra_remove_args', self::$_TSPEC, $output); } } -class cassandra_Cassandra_get_slice_result extends TBase { +class cassandra_Cassandra_remove_result extends TBase { static $_TSPEC; - public $success = null; public $ire = null; public $ue = null; public $te = null; @@ -1453,15 +2764,6 @@ class cassandra_Cassandra_get_slice_result extends TBase { public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'cassandra_ColumnOrSuperColumn', - ), - ), 1 => array( 'var' => 'ire', 'type' => TType::STRUCT, @@ -1485,49 +2787,132 @@ public function __construct($vals=null) { } public function getName() { - return 'Cassandra_get_slice_result'; + return 'Cassandra_remove_result'; } public function read($input) { - return $this->_read('Cassandra_get_slice_result', self::$_TSPEC, $input); + return $this->_read('Cassandra_remove_result', self::$_TSPEC, $input); } public function write($output) { - return $this->_write('Cassandra_get_slice_result', self::$_TSPEC, $output); + return $this->_write('Cassandra_remove_result', self::$_TSPEC, $output); } } -class cassandra_Cassandra_multiget_args extends TBase { +class cassandra_Cassandra_batch_mutate_args extends TBase { static $_TSPEC; - public $keyspace = null; - public $keys = null; - public $column_path = null; + public $mutation_map = null; public $consistency_level = 1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'keyspace', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'keys', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( + 'var' => 'mutation_map', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::MAP, + 'key' => array( 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::LST, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'cassandra_Mutation', + ), + ), ), ), + 2 => array( + 'var' => 'consistency_level', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + parent::__construct(self::$_TSPEC, $vals); + } + } + + public function getName() { + return 'Cassandra_batch_mutate_args'; + } + + public function read($input) + { + return $this->_read('Cassandra_batch_mutate_args', self::$_TSPEC, $input); + } + public function write($output) { + return $this->_write('Cassandra_batch_mutate_args', self::$_TSPEC, $output); + } +} + +class cassandra_Cassandra_batch_mutate_result extends TBase { + static $_TSPEC; + + public $ire = null; + public $ue = null; + public $te = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'ire', + 'type' => TType::STRUCT, + 'class' => 'cassandra_InvalidRequestException', + ), + 2 => array( + 'var' => 'ue', + 'type' => TType::STRUCT, + 'class' => 'cassandra_UnavailableException', + ), 3 => array( - 'var' => 'column_path', + 'var' => 'te', 'type' => TType::STRUCT, - 'class' => 'cassandra_ColumnPath', + 'class' => 'cassandra_TimedOutException', ), - 4 => array( - 'var' => 'consistency_level', - 'type' => TType::I32, + ); + } + if (is_array($vals)) { + parent::__construct(self::$_TSPEC, $vals); + } + } + + public function getName() { + return 'Cassandra_batch_mutate_result'; + } + + public function read($input) + { + return $this->_read('Cassandra_batch_mutate_result', self::$_TSPEC, $input); + } + public function write($output) { + return $this->_write('Cassandra_batch_mutate_result', self::$_TSPEC, $output); + } +} + +class cassandra_Cassandra_truncate_args extends TBase { + static $_TSPEC; + + public $cfname = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'cfname', + 'type' => TType::STRING, ), ); } @@ -1537,42 +2922,27 @@ public function __construct($vals=null) { } public function getName() { - return 'Cassandra_multiget_args'; + return 'Cassandra_truncate_args'; } public function read($input) { - return $this->_read('Cassandra_multiget_args', self::$_TSPEC, $input); + return $this->_read('Cassandra_truncate_args', self::$_TSPEC, $input); } public function write($output) { - return $this->_write('Cassandra_multiget_args', self::$_TSPEC, $output); + return $this->_write('Cassandra_truncate_args', self::$_TSPEC, $output); } } -class cassandra_Cassandra_multiget_result extends TBase { +class cassandra_Cassandra_truncate_result extends TBase { static $_TSPEC; - public $success = null; public $ire = null; public $ue = null; - public $te = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRUCT, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRUCT, - 'class' => 'cassandra_ColumnOrSuperColumn', - ), - ), 1 => array( 'var' => 'ire', 'type' => TType::STRUCT, @@ -1583,11 +2953,6 @@ public function __construct($vals=null) { 'type' => TType::STRUCT, 'class' => 'cassandra_UnavailableException', ), - 3 => array( - 'var' => 'te', - 'type' => TType::STRUCT, - 'class' => 'cassandra_TimedOutException', - ), ); } if (is_array($vals)) { @@ -1596,83 +2961,47 @@ public function __construct($vals=null) { } public function getName() { - return 'Cassandra_multiget_result'; + return 'Cassandra_truncate_result'; } public function read($input) { - return $this->_read('Cassandra_multiget_result', self::$_TSPEC, $input); + return $this->_read('Cassandra_truncate_result', self::$_TSPEC, $input); } public function write($output) { - return $this->_write('Cassandra_multiget_result', self::$_TSPEC, $output); + return $this->_write('Cassandra_truncate_result', self::$_TSPEC, $output); } } -class cassandra_Cassandra_multiget_slice_args extends TBase { +class cassandra_Cassandra_describe_schema_versions_args extends TBase { static $_TSPEC; - public $keyspace = null; - public $keys = null; - public $column_parent = null; - public $predicate = null; - public $consistency_level = 1; - public function __construct($vals=null) { + public function __construct() { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( - 1 => array( - 'var' => 'keyspace', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'keys', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), - ), - 3 => array( - 'var' => 'column_parent', - 'type' => TType::STRUCT, - 'class' => 'cassandra_ColumnParent', - ), - 4 => array( - 'var' => 'predicate', - 'type' => TType::STRUCT, - 'class' => 'cassandra_SlicePredicate', - ), - 5 => array( - 'var' => 'consistency_level', - 'type' => TType::I32, - ), ); } - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } } public function getName() { - return 'Cassandra_multiget_slice_args'; + return 'Cassandra_describe_schema_versions_args'; } public function read($input) { - return $this->_read('Cassandra_multiget_slice_args', self::$_TSPEC, $input); + return $this->_read('Cassandra_describe_schema_versions_args', self::$_TSPEC, $input); } public function write($output) { - return $this->_write('Cassandra_multiget_slice_args', self::$_TSPEC, $output); + return $this->_write('Cassandra_describe_schema_versions_args', self::$_TSPEC, $output); } } -class cassandra_Cassandra_multiget_slice_result extends TBase { +class cassandra_Cassandra_describe_schema_versions_result extends TBase { static $_TSPEC; public $success = null; public $ire = null; - public $ue = null; - public $te = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -1687,10 +3016,9 @@ public function __construct($vals=null) { ), 'val' => array( 'type' => TType::LST, - 'etype' => TType::STRUCT, + 'etype' => TType::STRING, 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'cassandra_ColumnOrSuperColumn', + 'type' => TType::STRING, ), ), ), @@ -1699,16 +3027,6 @@ public function __construct($vals=null) { 'type' => TType::STRUCT, 'class' => 'cassandra_InvalidRequestException', ), - 2 => array( - 'var' => 'ue', - 'type' => TType::STRUCT, - 'class' => 'cassandra_UnavailableException', - ), - 3 => array( - 'var' => 'te', - 'type' => TType::STRUCT, - 'class' => 'cassandra_TimedOutException', - ), ); } if (is_array($vals)) { @@ -1717,95 +3035,58 @@ public function __construct($vals=null) { } public function getName() { - return 'Cassandra_multiget_slice_result'; + return 'Cassandra_describe_schema_versions_result'; } public function read($input) { - return $this->_read('Cassandra_multiget_slice_result', self::$_TSPEC, $input); + return $this->_read('Cassandra_describe_schema_versions_result', self::$_TSPEC, $input); } public function write($output) { - return $this->_write('Cassandra_multiget_slice_result', self::$_TSPEC, $output); + return $this->_write('Cassandra_describe_schema_versions_result', self::$_TSPEC, $output); } } -class cassandra_Cassandra_get_count_args extends TBase { +class cassandra_Cassandra_describe_keyspaces_args extends TBase { static $_TSPEC; - public $keyspace = null; - public $key = null; - public $column_parent = null; - public $consistency_level = 1; - public function __construct($vals=null) { + public function __construct() { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( - 1 => array( - 'var' => 'keyspace', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'key', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'column_parent', - 'type' => TType::STRUCT, - 'class' => 'cassandra_ColumnParent', - ), - 4 => array( - 'var' => 'consistency_level', - 'type' => TType::I32, - ), ); } - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } } public function getName() { - return 'Cassandra_get_count_args'; + return 'Cassandra_describe_keyspaces_args'; } public function read($input) { - return $this->_read('Cassandra_get_count_args', self::$_TSPEC, $input); + return $this->_read('Cassandra_describe_keyspaces_args', self::$_TSPEC, $input); } public function write($output) { - return $this->_write('Cassandra_get_count_args', self::$_TSPEC, $output); + return $this->_write('Cassandra_describe_keyspaces_args', self::$_TSPEC, $output); } } -class cassandra_Cassandra_get_count_result extends TBase { +class cassandra_Cassandra_describe_keyspaces_result extends TBase { static $_TSPEC; public $success = null; - public $ire = null; - public $ue = null; - public $te = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::I32, - ), - 1 => array( - 'var' => 'ire', - 'type' => TType::STRUCT, - 'class' => 'cassandra_InvalidRequestException', - ), - 2 => array( - 'var' => 'ue', - 'type' => TType::STRUCT, - 'class' => 'cassandra_UnavailableException', - ), - 3 => array( - 'var' => 'te', - 'type' => TType::STRUCT, - 'class' => 'cassandra_TimedOutException', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'cassandra_KsDef', + ), ), ); } @@ -1815,62 +3096,54 @@ public function __construct($vals=null) { } public function getName() { - return 'Cassandra_get_count_result'; + return 'Cassandra_describe_keyspaces_result'; } public function read($input) { - return $this->_read('Cassandra_get_count_result', self::$_TSPEC, $input); + return $this->_read('Cassandra_describe_keyspaces_result', self::$_TSPEC, $input); } public function write($output) { - return $this->_write('Cassandra_get_count_result', self::$_TSPEC, $output); + return $this->_write('Cassandra_describe_keyspaces_result', self::$_TSPEC, $output); + } +} + +class cassandra_Cassandra_describe_cluster_name_args extends TBase { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'Cassandra_describe_cluster_name_args'; + } + + public function read($input) + { + return $this->_read('Cassandra_describe_cluster_name_args', self::$_TSPEC, $input); + } + public function write($output) { + return $this->_write('Cassandra_describe_cluster_name_args', self::$_TSPEC, $output); } } -class cassandra_Cassandra_get_range_slice_args extends TBase { +class cassandra_Cassandra_describe_cluster_name_result extends TBase { static $_TSPEC; - public $keyspace = null; - public $column_parent = null; - public $predicate = null; - public $start_key = ""; - public $finish_key = ""; - public $row_count = 100; - public $consistency_level = 1; + public $success = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( - 1 => array( - 'var' => 'keyspace', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'column_parent', - 'type' => TType::STRUCT, - 'class' => 'cassandra_ColumnParent', - ), - 3 => array( - 'var' => 'predicate', - 'type' => TType::STRUCT, - 'class' => 'cassandra_SlicePredicate', - ), - 4 => array( - 'var' => 'start_key', - 'type' => TType::STRING, - ), - 5 => array( - 'var' => 'finish_key', + 0 => array( + 'var' => 'success', 'type' => TType::STRING, ), - 6 => array( - 'var' => 'row_count', - 'type' => TType::I32, - ), - 7 => array( - 'var' => 'consistency_level', - 'type' => TType::I32, - ), ); } if (is_array($vals)) { @@ -1879,52 +3152,53 @@ public function __construct($vals=null) { } public function getName() { - return 'Cassandra_get_range_slice_args'; + return 'Cassandra_describe_cluster_name_result'; } public function read($input) { - return $this->_read('Cassandra_get_range_slice_args', self::$_TSPEC, $input); + return $this->_read('Cassandra_describe_cluster_name_result', self::$_TSPEC, $input); } public function write($output) { - return $this->_write('Cassandra_get_range_slice_args', self::$_TSPEC, $output); + return $this->_write('Cassandra_describe_cluster_name_result', self::$_TSPEC, $output); } } -class cassandra_Cassandra_get_range_slice_result extends TBase { +class cassandra_Cassandra_describe_version_args extends TBase { static $_TSPEC; - public $success = null; - public $ire = null; - public $ue = null; - public $te = null; - public function __construct($vals=null) { + public function __construct() { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'cassandra_KeySlice', - ), - ), - 1 => array( - 'var' => 'ire', - 'type' => TType::STRUCT, - 'class' => 'cassandra_InvalidRequestException', - ), - 2 => array( - 'var' => 'ue', - 'type' => TType::STRUCT, - 'class' => 'cassandra_UnavailableException', - ), - 3 => array( - 'var' => 'te', - 'type' => TType::STRUCT, - 'class' => 'cassandra_TimedOutException', + ); + } + } + + public function getName() { + return 'Cassandra_describe_version_args'; + } + + public function read($input) + { + return $this->_read('Cassandra_describe_version_args', self::$_TSPEC, $input); + } + public function write($output) { + return $this->_write('Cassandra_describe_version_args', self::$_TSPEC, $output); + } +} + +class cassandra_Cassandra_describe_version_result extends TBase { + static $_TSPEC; + + public $success = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRING, ), ); } @@ -1934,26 +3208,22 @@ public function __construct($vals=null) { } public function getName() { - return 'Cassandra_get_range_slice_result'; + return 'Cassandra_describe_version_result'; } public function read($input) { - return $this->_read('Cassandra_get_range_slice_result', self::$_TSPEC, $input); + return $this->_read('Cassandra_describe_version_result', self::$_TSPEC, $input); } public function write($output) { - return $this->_write('Cassandra_get_range_slice_result', self::$_TSPEC, $output); + return $this->_write('Cassandra_describe_version_result', self::$_TSPEC, $output); } } -class cassandra_Cassandra_get_range_slices_args extends TBase { +class cassandra_Cassandra_describe_ring_args extends TBase { static $_TSPEC; public $keyspace = null; - public $column_parent = null; - public $predicate = null; - public $range = null; - public $consistency_level = 1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -1962,25 +3232,6 @@ public function __construct($vals=null) { 'var' => 'keyspace', 'type' => TType::STRING, ), - 2 => array( - 'var' => 'column_parent', - 'type' => TType::STRUCT, - 'class' => 'cassandra_ColumnParent', - ), - 3 => array( - 'var' => 'predicate', - 'type' => TType::STRUCT, - 'class' => 'cassandra_SlicePredicate', - ), - 4 => array( - 'var' => 'range', - 'type' => TType::STRUCT, - 'class' => 'cassandra_KeyRange', - ), - 5 => array( - 'var' => 'consistency_level', - 'type' => TType::I32, - ), ); } if (is_array($vals)) { @@ -1989,25 +3240,23 @@ public function __construct($vals=null) { } public function getName() { - return 'Cassandra_get_range_slices_args'; + return 'Cassandra_describe_ring_args'; } public function read($input) { - return $this->_read('Cassandra_get_range_slices_args', self::$_TSPEC, $input); + return $this->_read('Cassandra_describe_ring_args', self::$_TSPEC, $input); } public function write($output) { - return $this->_write('Cassandra_get_range_slices_args', self::$_TSPEC, $output); + return $this->_write('Cassandra_describe_ring_args', self::$_TSPEC, $output); } } -class cassandra_Cassandra_get_range_slices_result extends TBase { +class cassandra_Cassandra_describe_ring_result extends TBase { static $_TSPEC; public $success = null; public $ire = null; - public $ue = null; - public $te = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -2018,7 +3267,7 @@ public function __construct($vals=null) { 'etype' => TType::STRUCT, 'elem' => array( 'type' => TType::STRUCT, - 'class' => 'cassandra_KeySlice', + 'class' => 'cassandra_TokenRange', ), ), 1 => array( @@ -2026,16 +3275,6 @@ public function __construct($vals=null) { 'type' => TType::STRUCT, 'class' => 'cassandra_InvalidRequestException', ), - 2 => array( - 'var' => 'ue', - 'type' => TType::STRUCT, - 'class' => 'cassandra_UnavailableException', - ), - 3 => array( - 'var' => 'te', - 'type' => TType::STRUCT, - 'class' => 'cassandra_TimedOutException', - ), ); } if (is_array($vals)) { @@ -2044,100 +3283,53 @@ public function __construct($vals=null) { } public function getName() { - return 'Cassandra_get_range_slices_result'; + return 'Cassandra_describe_ring_result'; } public function read($input) { - return $this->_read('Cassandra_get_range_slices_result', self::$_TSPEC, $input); + return $this->_read('Cassandra_describe_ring_result', self::$_TSPEC, $input); } public function write($output) { - return $this->_write('Cassandra_get_range_slices_result', self::$_TSPEC, $output); + return $this->_write('Cassandra_describe_ring_result', self::$_TSPEC, $output); } } -class cassandra_Cassandra_insert_args extends TBase { +class cassandra_Cassandra_describe_partitioner_args extends TBase { static $_TSPEC; - public $keyspace = null; - public $key = null; - public $column_path = null; - public $value = null; - public $timestamp = null; - public $consistency_level = 1; - public function __construct($vals=null) { + public function __construct() { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( - 1 => array( - 'var' => 'keyspace', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'key', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'column_path', - 'type' => TType::STRUCT, - 'class' => 'cassandra_ColumnPath', - ), - 4 => array( - 'var' => 'value', - 'type' => TType::STRING, - ), - 5 => array( - 'var' => 'timestamp', - 'type' => TType::I64, - ), - 6 => array( - 'var' => 'consistency_level', - 'type' => TType::I32, - ), ); } - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } } public function getName() { - return 'Cassandra_insert_args'; + return 'Cassandra_describe_partitioner_args'; } public function read($input) { - return $this->_read('Cassandra_insert_args', self::$_TSPEC, $input); + return $this->_read('Cassandra_describe_partitioner_args', self::$_TSPEC, $input); } public function write($output) { - return $this->_write('Cassandra_insert_args', self::$_TSPEC, $output); + return $this->_write('Cassandra_describe_partitioner_args', self::$_TSPEC, $output); } } -class cassandra_Cassandra_insert_result extends TBase { +class cassandra_Cassandra_describe_partitioner_result extends TBase { static $_TSPEC; - public $ire = null; - public $ue = null; - public $te = null; + public $success = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( - 1 => array( - 'var' => 'ire', - 'type' => TType::STRUCT, - 'class' => 'cassandra_InvalidRequestException', - ), - 2 => array( - 'var' => 'ue', - 'type' => TType::STRUCT, - 'class' => 'cassandra_UnavailableException', - ), - 3 => array( - 'var' => 'te', - 'type' => TType::STRUCT, - 'class' => 'cassandra_TimedOutException', + 0 => array( + 'var' => 'success', + 'type' => TType::STRING, ), ); } @@ -2147,102 +3339,53 @@ public function __construct($vals=null) { } public function getName() { - return 'Cassandra_insert_result'; + return 'Cassandra_describe_partitioner_result'; } public function read($input) { - return $this->_read('Cassandra_insert_result', self::$_TSPEC, $input); + return $this->_read('Cassandra_describe_partitioner_result', self::$_TSPEC, $input); } public function write($output) { - return $this->_write('Cassandra_insert_result', self::$_TSPEC, $output); + return $this->_write('Cassandra_describe_partitioner_result', self::$_TSPEC, $output); } } -class cassandra_Cassandra_batch_insert_args extends TBase { +class cassandra_Cassandra_describe_snitch_args extends TBase { static $_TSPEC; - public $keyspace = null; - public $key = null; - public $cfmap = null; - public $consistency_level = 1; - public function __construct($vals=null) { + public function __construct() { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( - 1 => array( - 'var' => 'keyspace', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'key', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'cfmap', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::LST, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'cassandra_ColumnOrSuperColumn', - ), - ), - ), - 4 => array( - 'var' => 'consistency_level', - 'type' => TType::I32, - ), ); } - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } } public function getName() { - return 'Cassandra_batch_insert_args'; + return 'Cassandra_describe_snitch_args'; } public function read($input) { - return $this->_read('Cassandra_batch_insert_args', self::$_TSPEC, $input); + return $this->_read('Cassandra_describe_snitch_args', self::$_TSPEC, $input); } public function write($output) { - return $this->_write('Cassandra_batch_insert_args', self::$_TSPEC, $output); + return $this->_write('Cassandra_describe_snitch_args', self::$_TSPEC, $output); } } -class cassandra_Cassandra_batch_insert_result extends TBase { +class cassandra_Cassandra_describe_snitch_result extends TBase { static $_TSPEC; - public $ire = null; - public $ue = null; - public $te = null; + public $success = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( - 1 => array( - 'var' => 'ire', - 'type' => TType::STRUCT, - 'class' => 'cassandra_InvalidRequestException', - ), - 2 => array( - 'var' => 'ue', - 'type' => TType::STRUCT, - 'class' => 'cassandra_UnavailableException', - ), - 3 => array( - 'var' => 'te', - 'type' => TType::STRUCT, - 'class' => 'cassandra_TimedOutException', + 0 => array( + 'var' => 'success', + 'type' => TType::STRING, ), ); } @@ -2252,26 +3395,22 @@ public function __construct($vals=null) { } public function getName() { - return 'Cassandra_batch_insert_result'; + return 'Cassandra_describe_snitch_result'; } public function read($input) { - return $this->_read('Cassandra_batch_insert_result', self::$_TSPEC, $input); + return $this->_read('Cassandra_describe_snitch_result', self::$_TSPEC, $input); } public function write($output) { - return $this->_write('Cassandra_batch_insert_result', self::$_TSPEC, $output); + return $this->_write('Cassandra_describe_snitch_result', self::$_TSPEC, $output); } } -class cassandra_Cassandra_remove_args extends TBase { +class cassandra_Cassandra_describe_keyspace_args extends TBase { static $_TSPEC; public $keyspace = null; - public $key = null; - public $column_path = null; - public $timestamp = null; - public $consistency_level = 1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -2280,23 +3419,6 @@ public function __construct($vals=null) { 'var' => 'keyspace', 'type' => TType::STRING, ), - 2 => array( - 'var' => 'key', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'column_path', - 'type' => TType::STRUCT, - 'class' => 'cassandra_ColumnPath', - ), - 4 => array( - 'var' => 'timestamp', - 'type' => TType::I64, - ), - 5 => array( - 'var' => 'consistency_level', - 'type' => TType::I32, - ), ); } if (is_array($vals)) { @@ -2305,42 +3427,36 @@ public function __construct($vals=null) { } public function getName() { - return 'Cassandra_remove_args'; + return 'Cassandra_describe_keyspace_args'; } public function read($input) { - return $this->_read('Cassandra_remove_args', self::$_TSPEC, $input); + return $this->_read('Cassandra_describe_keyspace_args', self::$_TSPEC, $input); } public function write($output) { - return $this->_write('Cassandra_remove_args', self::$_TSPEC, $output); + return $this->_write('Cassandra_describe_keyspace_args', self::$_TSPEC, $output); } } -class cassandra_Cassandra_remove_result extends TBase { +class cassandra_Cassandra_describe_keyspace_result extends TBase { static $_TSPEC; - public $ire = null; - public $ue = null; - public $te = null; + public $success = null; + public $nfe = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( - 1 => array( - 'var' => 'ire', - 'type' => TType::STRUCT, - 'class' => 'cassandra_InvalidRequestException', - ), - 2 => array( - 'var' => 'ue', + 0 => array( + 'var' => 'success', 'type' => TType::STRUCT, - 'class' => 'cassandra_UnavailableException', + 'class' => 'cassandra_KsDef', ), - 3 => array( - 'var' => 'te', + 1 => array( + 'var' => 'nfe', 'type' => TType::STRUCT, - 'class' => 'cassandra_TimedOutException', + 'class' => 'cassandra_NotFoundException', ), ); } @@ -2350,59 +3466,43 @@ public function __construct($vals=null) { } public function getName() { - return 'Cassandra_remove_result'; + return 'Cassandra_describe_keyspace_result'; } public function read($input) { - return $this->_read('Cassandra_remove_result', self::$_TSPEC, $input); + return $this->_read('Cassandra_describe_keyspace_result', self::$_TSPEC, $input); } public function write($output) { - return $this->_write('Cassandra_remove_result', self::$_TSPEC, $output); + return $this->_write('Cassandra_describe_keyspace_result', self::$_TSPEC, $output); } } -class cassandra_Cassandra_batch_mutate_args extends TBase { +class cassandra_Cassandra_describe_splits_args extends TBase { static $_TSPEC; - public $keyspace = null; - public $mutation_map = null; - public $consistency_level = 1; + public $cfName = null; + public $start_token = null; + public $end_token = null; + public $keys_per_split = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'keyspace', + 'var' => 'cfName', 'type' => TType::STRING, ), 2 => array( - 'var' => 'mutation_map', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::MAP, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::LST, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'cassandra_Mutation', - ), - ), - ), + 'var' => 'start_token', + 'type' => TType::STRING, ), 3 => array( - 'var' => 'consistency_level', + 'var' => 'end_token', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'keys_per_split', 'type' => TType::I32, ), ); @@ -2413,42 +3513,33 @@ public function __construct($vals=null) { } public function getName() { - return 'Cassandra_batch_mutate_args'; + return 'Cassandra_describe_splits_args'; } public function read($input) { - return $this->_read('Cassandra_batch_mutate_args', self::$_TSPEC, $input); + return $this->_read('Cassandra_describe_splits_args', self::$_TSPEC, $input); } public function write($output) { - return $this->_write('Cassandra_batch_mutate_args', self::$_TSPEC, $output); + return $this->_write('Cassandra_describe_splits_args', self::$_TSPEC, $output); } } -class cassandra_Cassandra_batch_mutate_result extends TBase { +class cassandra_Cassandra_describe_splits_result extends TBase { static $_TSPEC; - public $ire = null; - public $ue = null; - public $te = null; + public $success = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( - 1 => array( - 'var' => 'ire', - 'type' => TType::STRUCT, - 'class' => 'cassandra_InvalidRequestException', - ), - 2 => array( - 'var' => 'ue', - 'type' => TType::STRUCT, - 'class' => 'cassandra_UnavailableException', - ), - 3 => array( - 'var' => 'te', - 'type' => TType::STRUCT, - 'class' => 'cassandra_TimedOutException', + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), ), ); } @@ -2458,29 +3549,30 @@ public function __construct($vals=null) { } public function getName() { - return 'Cassandra_batch_mutate_result'; + return 'Cassandra_describe_splits_result'; } public function read($input) { - return $this->_read('Cassandra_batch_mutate_result', self::$_TSPEC, $input); + return $this->_read('Cassandra_describe_splits_result', self::$_TSPEC, $input); } public function write($output) { - return $this->_write('Cassandra_batch_mutate_result', self::$_TSPEC, $output); + return $this->_write('Cassandra_describe_splits_result', self::$_TSPEC, $output); } } -class cassandra_Cassandra_get_string_property_args extends TBase { +class cassandra_Cassandra_system_add_column_family_args extends TBase { static $_TSPEC; - public $property = null; + public $cf_def = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'property', - 'type' => TType::STRING, + 'var' => 'cf_def', + 'type' => TType::STRUCT, + 'class' => 'cassandra_CfDef', ), ); } @@ -2490,22 +3582,23 @@ public function __construct($vals=null) { } public function getName() { - return 'Cassandra_get_string_property_args'; + return 'Cassandra_system_add_column_family_args'; } public function read($input) { - return $this->_read('Cassandra_get_string_property_args', self::$_TSPEC, $input); + return $this->_read('Cassandra_system_add_column_family_args', self::$_TSPEC, $input); } public function write($output) { - return $this->_write('Cassandra_get_string_property_args', self::$_TSPEC, $output); + return $this->_write('Cassandra_system_add_column_family_args', self::$_TSPEC, $output); } } -class cassandra_Cassandra_get_string_property_result extends TBase { +class cassandra_Cassandra_system_add_column_family_result extends TBase { static $_TSPEC; public $success = null; + public $ire = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -2514,6 +3607,11 @@ public function __construct($vals=null) { 'var' => 'success', 'type' => TType::STRING, ), + 1 => array( + 'var' => 'ire', + 'type' => TType::STRUCT, + 'class' => 'cassandra_InvalidRequestException', + ), ); } if (is_array($vals)) { @@ -2522,28 +3620,28 @@ public function __construct($vals=null) { } public function getName() { - return 'Cassandra_get_string_property_result'; + return 'Cassandra_system_add_column_family_result'; } public function read($input) { - return $this->_read('Cassandra_get_string_property_result', self::$_TSPEC, $input); + return $this->_read('Cassandra_system_add_column_family_result', self::$_TSPEC, $input); } public function write($output) { - return $this->_write('Cassandra_get_string_property_result', self::$_TSPEC, $output); + return $this->_write('Cassandra_system_add_column_family_result', self::$_TSPEC, $output); } } -class cassandra_Cassandra_get_string_list_property_args extends TBase { +class cassandra_Cassandra_system_drop_column_family_args extends TBase { static $_TSPEC; - public $property = null; + public $column_family = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'property', + 'var' => 'column_family', 'type' => TType::STRING, ), ); @@ -2554,33 +3652,35 @@ public function __construct($vals=null) { } public function getName() { - return 'Cassandra_get_string_list_property_args'; + return 'Cassandra_system_drop_column_family_args'; } public function read($input) { - return $this->_read('Cassandra_get_string_list_property_args', self::$_TSPEC, $input); + return $this->_read('Cassandra_system_drop_column_family_args', self::$_TSPEC, $input); } public function write($output) { - return $this->_write('Cassandra_get_string_list_property_args', self::$_TSPEC, $output); + return $this->_write('Cassandra_system_drop_column_family_args', self::$_TSPEC, $output); } } -class cassandra_Cassandra_get_string_list_property_result extends TBase { +class cassandra_Cassandra_system_drop_column_family_result extends TBase { static $_TSPEC; public $success = null; + public $ire = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), + 'type' => TType::STRING, + ), + 1 => array( + 'var' => 'ire', + 'type' => TType::STRUCT, + 'class' => 'cassandra_InvalidRequestException', ), ); } @@ -2590,57 +3690,72 @@ public function __construct($vals=null) { } public function getName() { - return 'Cassandra_get_string_list_property_result'; + return 'Cassandra_system_drop_column_family_result'; } public function read($input) { - return $this->_read('Cassandra_get_string_list_property_result', self::$_TSPEC, $input); + return $this->_read('Cassandra_system_drop_column_family_result', self::$_TSPEC, $input); } public function write($output) { - return $this->_write('Cassandra_get_string_list_property_result', self::$_TSPEC, $output); + return $this->_write('Cassandra_system_drop_column_family_result', self::$_TSPEC, $output); } } -class cassandra_Cassandra_describe_keyspaces_args extends TBase { +class cassandra_Cassandra_system_rename_column_family_args extends TBase { static $_TSPEC; + public $old_name = null; + public $new_name = null; - public function __construct() { + public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( + 1 => array( + 'var' => 'old_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'new_name', + 'type' => TType::STRING, + ), ); } + if (is_array($vals)) { + parent::__construct(self::$_TSPEC, $vals); + } } public function getName() { - return 'Cassandra_describe_keyspaces_args'; + return 'Cassandra_system_rename_column_family_args'; } public function read($input) { - return $this->_read('Cassandra_describe_keyspaces_args', self::$_TSPEC, $input); + return $this->_read('Cassandra_system_rename_column_family_args', self::$_TSPEC, $input); } public function write($output) { - return $this->_write('Cassandra_describe_keyspaces_args', self::$_TSPEC, $output); + return $this->_write('Cassandra_system_rename_column_family_args', self::$_TSPEC, $output); } } -class cassandra_Cassandra_describe_keyspaces_result extends TBase { +class cassandra_Cassandra_system_rename_column_family_result extends TBase { static $_TSPEC; public $success = null; + public $ire = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::SET, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), + 'type' => TType::STRING, + ), + 1 => array( + 'var' => 'ire', + 'type' => TType::STRUCT, + 'class' => 'cassandra_InvalidRequestException', ), ); } @@ -2650,46 +3765,56 @@ public function __construct($vals=null) { } public function getName() { - return 'Cassandra_describe_keyspaces_result'; + return 'Cassandra_system_rename_column_family_result'; } public function read($input) { - return $this->_read('Cassandra_describe_keyspaces_result', self::$_TSPEC, $input); + return $this->_read('Cassandra_system_rename_column_family_result', self::$_TSPEC, $input); } public function write($output) { - return $this->_write('Cassandra_describe_keyspaces_result', self::$_TSPEC, $output); + return $this->_write('Cassandra_system_rename_column_family_result', self::$_TSPEC, $output); } } -class cassandra_Cassandra_describe_cluster_name_args extends TBase { +class cassandra_Cassandra_system_add_keyspace_args extends TBase { static $_TSPEC; + public $ks_def = null; - public function __construct() { + public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( + 1 => array( + 'var' => 'ks_def', + 'type' => TType::STRUCT, + 'class' => 'cassandra_KsDef', + ), ); } + if (is_array($vals)) { + parent::__construct(self::$_TSPEC, $vals); + } } public function getName() { - return 'Cassandra_describe_cluster_name_args'; + return 'Cassandra_system_add_keyspace_args'; } public function read($input) { - return $this->_read('Cassandra_describe_cluster_name_args', self::$_TSPEC, $input); + return $this->_read('Cassandra_system_add_keyspace_args', self::$_TSPEC, $input); } public function write($output) { - return $this->_write('Cassandra_describe_cluster_name_args', self::$_TSPEC, $output); + return $this->_write('Cassandra_system_add_keyspace_args', self::$_TSPEC, $output); } } -class cassandra_Cassandra_describe_cluster_name_result extends TBase { +class cassandra_Cassandra_system_add_keyspace_result extends TBase { static $_TSPEC; public $success = null; + public $ire = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -2698,6 +3823,11 @@ public function __construct($vals=null) { 'var' => 'success', 'type' => TType::STRING, ), + 1 => array( + 'var' => 'ire', + 'type' => TType::STRUCT, + 'class' => 'cassandra_InvalidRequestException', + ), ); } if (is_array($vals)) { @@ -2706,46 +3836,55 @@ public function __construct($vals=null) { } public function getName() { - return 'Cassandra_describe_cluster_name_result'; + return 'Cassandra_system_add_keyspace_result'; } public function read($input) { - return $this->_read('Cassandra_describe_cluster_name_result', self::$_TSPEC, $input); + return $this->_read('Cassandra_system_add_keyspace_result', self::$_TSPEC, $input); } public function write($output) { - return $this->_write('Cassandra_describe_cluster_name_result', self::$_TSPEC, $output); + return $this->_write('Cassandra_system_add_keyspace_result', self::$_TSPEC, $output); } } -class cassandra_Cassandra_describe_version_args extends TBase { +class cassandra_Cassandra_system_drop_keyspace_args extends TBase { static $_TSPEC; + public $keyspace = null; - public function __construct() { + public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( + 1 => array( + 'var' => 'keyspace', + 'type' => TType::STRING, + ), ); } + if (is_array($vals)) { + parent::__construct(self::$_TSPEC, $vals); + } } public function getName() { - return 'Cassandra_describe_version_args'; + return 'Cassandra_system_drop_keyspace_args'; } public function read($input) { - return $this->_read('Cassandra_describe_version_args', self::$_TSPEC, $input); + return $this->_read('Cassandra_system_drop_keyspace_args', self::$_TSPEC, $input); } public function write($output) { - return $this->_write('Cassandra_describe_version_args', self::$_TSPEC, $output); + return $this->_write('Cassandra_system_drop_keyspace_args', self::$_TSPEC, $output); } } -class cassandra_Cassandra_describe_version_result extends TBase { +class cassandra_Cassandra_system_drop_keyspace_result extends TBase { static $_TSPEC; public $success = null; + public $ire = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -2754,6 +3893,11 @@ public function __construct($vals=null) { 'var' => 'success', 'type' => TType::STRING, ), + 1 => array( + 'var' => 'ire', + 'type' => TType::STRUCT, + 'class' => 'cassandra_InvalidRequestException', + ), ); } if (is_array($vals)) { @@ -2762,28 +3906,33 @@ public function __construct($vals=null) { } public function getName() { - return 'Cassandra_describe_version_result'; + return 'Cassandra_system_drop_keyspace_result'; } public function read($input) { - return $this->_read('Cassandra_describe_version_result', self::$_TSPEC, $input); + return $this->_read('Cassandra_system_drop_keyspace_result', self::$_TSPEC, $input); } public function write($output) { - return $this->_write('Cassandra_describe_version_result', self::$_TSPEC, $output); + return $this->_write('Cassandra_system_drop_keyspace_result', self::$_TSPEC, $output); } } -class cassandra_Cassandra_describe_ring_args extends TBase { +class cassandra_Cassandra_system_rename_keyspace_args extends TBase { static $_TSPEC; - public $keyspace = null; + public $old_name = null; + public $new_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'keyspace', + 'var' => 'old_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'new_name', 'type' => TType::STRING, ), ); @@ -2794,19 +3943,19 @@ public function __construct($vals=null) { } public function getName() { - return 'Cassandra_describe_ring_args'; + return 'Cassandra_system_rename_keyspace_args'; } public function read($input) { - return $this->_read('Cassandra_describe_ring_args', self::$_TSPEC, $input); + return $this->_read('Cassandra_system_rename_keyspace_args', self::$_TSPEC, $input); } public function write($output) { - return $this->_write('Cassandra_describe_ring_args', self::$_TSPEC, $output); + return $this->_write('Cassandra_system_rename_keyspace_args', self::$_TSPEC, $output); } } -class cassandra_Cassandra_describe_ring_result extends TBase { +class cassandra_Cassandra_system_rename_keyspace_result extends TBase { static $_TSPEC; public $success = null; @@ -2817,12 +3966,7 @@ public function __construct($vals=null) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'cassandra_TokenRange', - ), + 'type' => TType::STRING, ), 1 => array( 'var' => 'ire', @@ -2837,29 +3981,30 @@ public function __construct($vals=null) { } public function getName() { - return 'Cassandra_describe_ring_result'; + return 'Cassandra_system_rename_keyspace_result'; } public function read($input) { - return $this->_read('Cassandra_describe_ring_result', self::$_TSPEC, $input); + return $this->_read('Cassandra_system_rename_keyspace_result', self::$_TSPEC, $input); } public function write($output) { - return $this->_write('Cassandra_describe_ring_result', self::$_TSPEC, $output); + return $this->_write('Cassandra_system_rename_keyspace_result', self::$_TSPEC, $output); } } -class cassandra_Cassandra_describe_keyspace_args extends TBase { +class cassandra_Cassandra_system_update_keyspace_args extends TBase { static $_TSPEC; - public $keyspace = null; + public $ks_def = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'keyspace', - 'type' => TType::STRING, + 'var' => 'ks_def', + 'type' => TType::STRUCT, + 'class' => 'cassandra_KsDef', ), ); } @@ -2869,51 +4014,35 @@ public function __construct($vals=null) { } public function getName() { - return 'Cassandra_describe_keyspace_args'; + return 'Cassandra_system_update_keyspace_args'; } public function read($input) { - return $this->_read('Cassandra_describe_keyspace_args', self::$_TSPEC, $input); + return $this->_read('Cassandra_system_update_keyspace_args', self::$_TSPEC, $input); } public function write($output) { - return $this->_write('Cassandra_describe_keyspace_args', self::$_TSPEC, $output); + return $this->_write('Cassandra_system_update_keyspace_args', self::$_TSPEC, $output); } } -class cassandra_Cassandra_describe_keyspace_result extends TBase { +class cassandra_Cassandra_system_update_keyspace_result extends TBase { static $_TSPEC; public $success = null; - public $nfe = null; + public $ire = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::MAP, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRING, - ), - ), + 'type' => TType::STRING, ), 1 => array( - 'var' => 'nfe', + 'var' => 'ire', 'type' => TType::STRUCT, - 'class' => 'cassandra_NotFoundException', + 'class' => 'cassandra_InvalidRequestException', ), ); } @@ -2923,39 +4052,30 @@ public function __construct($vals=null) { } public function getName() { - return 'Cassandra_describe_keyspace_result'; + return 'Cassandra_system_update_keyspace_result'; } public function read($input) { - return $this->_read('Cassandra_describe_keyspace_result', self::$_TSPEC, $input); + return $this->_read('Cassandra_system_update_keyspace_result', self::$_TSPEC, $input); } public function write($output) { - return $this->_write('Cassandra_describe_keyspace_result', self::$_TSPEC, $output); + return $this->_write('Cassandra_system_update_keyspace_result', self::$_TSPEC, $output); } } -class cassandra_Cassandra_describe_splits_args extends TBase { +class cassandra_Cassandra_system_update_column_family_args extends TBase { static $_TSPEC; - public $start_token = null; - public $end_token = null; - public $keys_per_split = null; + public $cf_def = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'start_token', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'end_token', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'keys_per_split', - 'type' => TType::I32, + 'var' => 'cf_def', + 'type' => TType::STRUCT, + 'class' => 'cassandra_CfDef', ), ); } @@ -2965,33 +4085,35 @@ public function __construct($vals=null) { } public function getName() { - return 'Cassandra_describe_splits_args'; + return 'Cassandra_system_update_column_family_args'; } public function read($input) { - return $this->_read('Cassandra_describe_splits_args', self::$_TSPEC, $input); + return $this->_read('Cassandra_system_update_column_family_args', self::$_TSPEC, $input); } public function write($output) { - return $this->_write('Cassandra_describe_splits_args', self::$_TSPEC, $output); + return $this->_write('Cassandra_system_update_column_family_args', self::$_TSPEC, $output); } } -class cassandra_Cassandra_describe_splits_result extends TBase { +class cassandra_Cassandra_system_update_column_family_result extends TBase { static $_TSPEC; public $success = null; + public $ire = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), + 'type' => TType::STRING, + ), + 1 => array( + 'var' => 'ire', + 'type' => TType::STRUCT, + 'class' => 'cassandra_InvalidRequestException', ), ); } @@ -3001,15 +4123,15 @@ public function __construct($vals=null) { } public function getName() { - return 'Cassandra_describe_splits_result'; + return 'Cassandra_system_update_column_family_result'; } public function read($input) { - return $this->_read('Cassandra_describe_splits_result', self::$_TSPEC, $input); + return $this->_read('Cassandra_system_update_column_family_result', self::$_TSPEC, $input); } public function write($output) { - return $this->_write('Cassandra_describe_splits_result', self::$_TSPEC, $output); + return $this->_write('Cassandra_system_update_column_family_result', self::$_TSPEC, $output); } } diff --git a/lib/thrift/packages/cassandra/cassandra_constants.php b/lib/thrift/packages/cassandra/cassandra_constants.php index 77185a6..b545930 100644 --- a/lib/thrift/packages/cassandra/cassandra_constants.php +++ b/lib/thrift/packages/cassandra/cassandra_constants.php @@ -8,6 +8,6 @@ $GLOBALS['cassandra_CONSTANTS'] = array(); -$GLOBALS['cassandra_CONSTANTS']['VERSION'] = "2.1.0"; +$GLOBALS['cassandra_CONSTANTS']['VERSION'] = "17.1.0"; ?> diff --git a/lib/thrift/packages/cassandra/cassandra_types.php b/lib/thrift/packages/cassandra/cassandra_types.php index 6183866..c761642 100644 --- a/lib/thrift/packages/cassandra/cassandra_types.php +++ b/lib/thrift/packages/cassandra/cassandra_types.php @@ -36,12 +36,47 @@ final class cassandra_ConsistencyLevel { ); } +$GLOBALS['cassandra_E_IndexOperator'] = array( + 'EQ' => 0, + 'GTE' => 1, + 'GT' => 2, + 'LTE' => 3, + 'LT' => 4, +); + +final class cassandra_IndexOperator { + const EQ = 0; + const GTE = 1; + const GT = 2; + const LTE = 3; + const LT = 4; + static public $__names = array( + 0 => 'EQ', + 1 => 'GTE', + 2 => 'GT', + 3 => 'LTE', + 4 => 'LT', + ); +} + +$GLOBALS['cassandra_E_IndexType'] = array( + 'KEYS' => 0, +); + +final class cassandra_IndexType { + const KEYS = 0; + static public $__names = array( + 0 => 'KEYS', + ); +} + class cassandra_Column extends TBase { static $_TSPEC; public $name = null; public $value = null; public $timestamp = null; + public $ttl = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -58,6 +93,10 @@ public function __construct($vals=null) { 'var' => 'timestamp', 'type' => TType::I64, ), + 4 => array( + 'var' => 'ttl', + 'type' => TType::I32, + ), ); } if (is_array($vals)) { @@ -495,6 +534,95 @@ public function write($output) { } } +class cassandra_IndexExpression extends TBase { + static $_TSPEC; + + public $column_name = null; + public $op = null; + public $value = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'column_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'op', + 'type' => TType::I32, + ), + 3 => array( + 'var' => 'value', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + parent::__construct(self::$_TSPEC, $vals); + } + } + + public function getName() { + return 'IndexExpression'; + } + + public function read($input) + { + return $this->_read('IndexExpression', self::$_TSPEC, $input); + } + public function write($output) { + return $this->_write('IndexExpression', self::$_TSPEC, $output); + } +} + +class cassandra_IndexClause extends TBase { + static $_TSPEC; + + public $expressions = null; + public $start_key = null; + public $count = 100; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'expressions', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'cassandra_IndexExpression', + ), + ), + 2 => array( + 'var' => 'start_key', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'count', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + parent::__construct(self::$_TSPEC, $vals); + } + } + + public function getName() { + return 'IndexClause'; + } + + public function read($input) + { + return $this->_read('IndexClause', self::$_TSPEC, $input); + } + public function write($output) { + return $this->_write('IndexClause', self::$_TSPEC, $output); + } +} + class cassandra_KeyRange extends TBase { static $_TSPEC; @@ -589,6 +717,43 @@ public function write($output) { } } +class cassandra_KeyCount extends TBase { + static $_TSPEC; + + public $key = null; + public $count = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'key', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'count', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + parent::__construct(self::$_TSPEC, $vals); + } + } + + public function getName() { + return 'KeyCount'; + } + + public function read($input) + { + return $this->_read('KeyCount', self::$_TSPEC, $input); + } + public function write($output) { + return $this->_write('KeyCount', self::$_TSPEC, $output); + } +} + class cassandra_Deletion extends TBase { static $_TSPEC; @@ -757,4 +922,228 @@ public function write($output) { } } +class cassandra_ColumnDef extends TBase { + static $_TSPEC; + + public $name = null; + public $validation_class = null; + public $index_type = null; + public $index_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'validation_class', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'index_type', + 'type' => TType::I32, + ), + 4 => array( + 'var' => 'index_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + parent::__construct(self::$_TSPEC, $vals); + } + } + + public function getName() { + return 'ColumnDef'; + } + + public function read($input) + { + return $this->_read('ColumnDef', self::$_TSPEC, $input); + } + public function write($output) { + return $this->_write('ColumnDef', self::$_TSPEC, $output); + } +} + +class cassandra_CfDef extends TBase { + static $_TSPEC; + + public $keyspace = null; + public $name = null; + public $column_type = "Standard"; + public $comparator_type = "BytesType"; + public $subcomparator_type = null; + public $comment = null; + public $row_cache_size = 0; + public $preload_row_cache = false; + public $key_cache_size = 200000; + public $read_repair_chance = 1; + public $column_metadata = null; + public $gc_grace_seconds = null; + public $default_validation_class = null; + public $id = null; + public $min_compaction_threshold = null; + public $max_compaction_threshold = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'keyspace', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'column_type', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'comparator_type', + 'type' => TType::STRING, + ), + 6 => array( + 'var' => 'subcomparator_type', + 'type' => TType::STRING, + ), + 8 => array( + 'var' => 'comment', + 'type' => TType::STRING, + ), + 9 => array( + 'var' => 'row_cache_size', + 'type' => TType::DOUBLE, + ), + 10 => array( + 'var' => 'preload_row_cache', + 'type' => TType::BOOL, + ), + 11 => array( + 'var' => 'key_cache_size', + 'type' => TType::DOUBLE, + ), + 12 => array( + 'var' => 'read_repair_chance', + 'type' => TType::DOUBLE, + ), + 13 => array( + 'var' => 'column_metadata', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'cassandra_ColumnDef', + ), + ), + 14 => array( + 'var' => 'gc_grace_seconds', + 'type' => TType::I32, + ), + 15 => array( + 'var' => 'default_validation_class', + 'type' => TType::STRING, + ), + 16 => array( + 'var' => 'id', + 'type' => TType::I32, + ), + 17 => array( + 'var' => 'min_compaction_threshold', + 'type' => TType::I32, + ), + 18 => array( + 'var' => 'max_compaction_threshold', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + parent::__construct(self::$_TSPEC, $vals); + } + } + + public function getName() { + return 'CfDef'; + } + + public function read($input) + { + return $this->_read('CfDef', self::$_TSPEC, $input); + } + public function write($output) { + return $this->_write('CfDef', self::$_TSPEC, $output); + } +} + +class cassandra_KsDef extends TBase { + static $_TSPEC; + + public $name = null; + public $strategy_class = null; + public $strategy_options = null; + public $replication_factor = null; + public $cf_defs = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'strategy_class', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'strategy_options', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'replication_factor', + 'type' => TType::I32, + ), + 5 => array( + 'var' => 'cf_defs', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'cassandra_CfDef', + ), + ), + ); + } + if (is_array($vals)) { + parent::__construct(self::$_TSPEC, $vals); + } + } + + public function getName() { + return 'KsDef'; + } + + public function read($input) + { + return $this->_read('KsDef', self::$_TSPEC, $input); + } + public function write($output) { + return $this->_write('KsDef', self::$_TSPEC, $output); + } +} + ?>