# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Help file for online commands in Yaml. banner: | Type 'help;' or '?' for help. Type 'quit;' or 'exit;' to quit. help: | Getting around: ? Display this help. help; Display this help. help ; Display command-specific help. exit; Exit this utility. quit; Exit this utility. Commands: assume Apply client side validation. connect Connect to a Cassandra node. consistencylevel Sets consisteny level for the client to use. count Count columns or super columns. create column family Add a column family to an existing keyspace. create keyspace Add a keyspace to the cluster. del Delete a column, super column or row. decr Decrements a counter column. describe ring Describe the token range information. describe cluster Describe the cluster configuration. describe Describe a keyspace and it's column families or column family in current keyspace. drop column family Remove a column family and it's data. drop keyspace Remove a keyspace and it's data. drop index Remove an existing index from specific column. get Get rows and columns. incr Increments a counter column. list List rows in a column family. set Set columns. show api version Show the server API version. show cluster name Show the cluster name. show keyspaces Show all keyspaces and their column families. show schema Show a cli script to create keyspaces and column families. truncate Drop the data in a column family. update column family Update the settings for a column family. update keyspace Update the settings for a keyspace. use Switch to a keyspace. commands: - name: NODE_HELP help: | help ; Display the general help page with a list of available commands.; - name: NODE_CONNECT help: | connect / ( '')?; Connect to the a Cassandra node on the specified port. If a username and password are supplied the login will occur when the 'use' statement is executed. If the server does not support authentication it will silently ignore credentials. For information on configuring authentication and authorisation see the conf/cassandra.yaml file or the project documentation. Required Parameters: - hostname: Machine name or IP address of the node to connect to. - port: rpc_port to connect to the node on, as defined in conf/Cassandra.yaml for the node. The default port is 9160. Optional Parameters: - password: Password for the supplied username. - username: Username to authenticate to the node as. Examples: connect localhost/9160; connect localhost/9160 user 'badpasswd'; connect 127.0.0.1/9160 user 'badpasswd'; - name: NODE_USE_TABLE help: | use ; use ''; Use the specified keyspace. If a username and password are supplied they will be used to authorize against the keyspace. Otherwise the credentials supplied to the 'connect' statement will be used to authorize the user . If the server does not support authentication it will silently ignore credentials. Required Parameters: - keyspace: Name of the keyspace to use. The keyspace must exist. Optional Parameters: - password: Password for the supplied username. - username: Username to login to the node as. Examples: use Keyspace1; use Keyspace1 user 'badpasswd'; - name: NODE_DESCRIBE help: | describe; describe ; describe ; Describes the settings for the current or named keyspace, or the settings of the column family in the current authenticated keyspace. Optional Parameters: - keyspace: Name of the keyspace to describe. - column_family: Name of the column family to describe. Examples: describe; - Describes current authenticated keyspace describe ; - Describe this keyspace describe ; - Describe the colum family in the current authenticated keyspace - name: NODE_DESCRIBE_RING help: | describe ring ; Describes the token range settings for the named keyspace. Optional Parameters: - keyspace: Name of the keyspace to describe. Examples: describe ring; - Describes the token range settings for the current authenticated keyspace describe ; - Describe the token range settings for this keyspace - name: help: | describe cluster; Describes the snitch, partitioner and schema versions for the currently connected cluster. NOTE: The cluster should only report one schema version. Multiple versions may indicate a failed schema modification, consult the project documentation. Examples: describe cluster; - name: NODE_EXIT help: | exit; quit; Exit this utility. Examples: exit; quit; - name: NODE_SHOW_CLUSTER_NAME help: | show cluster name; Displays the name of the currently connected cluster. Examples: show cluster name; - name: NODE_SHOW_VERSION help: | show api version; Displays the API version number. This version number is used by high level clients and is not the same as the server release version. Examples: show api version; - name: NODE_SHOW_KEYSPACES help: | show keyspaces; Describes the settings and the column families for all keyspaces on the currently connected cluster. Examples: show keyspaces; - name: NODE_SHOW_SCHEMA help: | show schema; show schema ; Creates a CLI script to create the current, specified or all keyspaces and their column families. Optional Parameters: - keyspace: Name of the keyspace to create the script for. If omitted the current keyspace is used, if there is no current keyspace all keyspaces are considered. Examples: show schema; show schema Keyspace1; - name: NODE_ADD_KEYSPACE help: | create keyspace ; create keyspace with =; create keyspace with = and = ...; Create a keyspace with the specified attributes. Required Parameters: - keyspace: Name of the new keyspace, "system" is reserved for Cassandra internals. Names may only contain letters, numbers and underscores. Keyspace Attributes (all are optional): - placement_strategy: Class used to determine how replicas are distributed among nodes. Defaults to NetworkTopologyStrategy with one datacenter defined with a replication factor of 1 ("[datacenter1:1]"). Supported values are: - org.apache.Cassandra.locator.SimpleStrategy - org.apache.Cassandra.locator.NetworkTopologyStrategy - org.apache.Cassandra.locator.OldNetworkTopologyStrategy SimpleStrategy merely places the first replica at the node whose token is closest to the key (as determined by the Partitioner), and additional replicas on subsequent nodes along the ring in increasing Token order. Supports a single strategy option 'replication_factor' that specifies the replication factor for the cluster. With NetworkTopologyStrategy, for each datacenter, you can specify how many replicas you want on a per-keyspace basis. Replicas are placed on different racks within each DC, if possible. Supports strategy options which specify the replication factor for each datacenter. The replication factor for the entire cluster is the sum of all per datacenter values. Note that the datacenter names must match those used in conf/cassandra-topology.properties. OldNetworkToplogyStrategy [formerly RackAwareStrategy] places one replica in each of two datacenters, and the third on a different rack in in the first. Additional datacenters are not guaranteed to get a replica. Additional replicas after three are placed in ring order after the third without regard to rack or datacenter. Supports a single strategy option 'replication_factor' that specifies the replication factor for the cluster. - strategy_options: Optional additional options for placement_strategy. Options have the form {key:value}, see the information on each strategy and the examples. - durable_writes: When set to false all RowMutations on keyspace will by-pass CommitLog. Set to true by default. Examples: create keyspace Keyspace2 with placement_strategy = 'org.apache.cassandra.locator.SimpleStrategy' and strategy_options = {replication_factor:4}; create keyspace Keyspace3 with placement_strategy = 'org.apache.cassandra.locator.NetworkTopologyStrategy' and strategy_options={DC1:2, DC2:2}; create keyspace Keyspace4 with placement_strategy = 'org.apache.cassandra.locator.OldNetworkTopologyStrategy' and strategy_options = {replication_factor:1}; - name: NODE_UPDATE_KEYSPACE help: | update keyspace ; update keyspace with =; update keyspace with = and = ...; Update a keyspace with the specified attributes. Note: updating some keyspace properties may require additional maintenance actions. Consult project documentation for more details. Required Parameters: - keyspace: Name of the keyspace to update. Keyspace Attributes (all are optional): - placement_strategy: Class used to determine how replicas are distributed among nodes. Defaults to NetworkTopologyStrategy with one datacenter defined with a replication factor of 1 ("[datacenter1:1]"). Supported values are: - org.apache.Cassandra.locator.SimpleStrategy - org.apache.Cassandra.locator.NetworkTopologyStrategy - org.apache.Cassandra.locator.OldNetworkTopologyStrategy SimpleStrategy merely places the first replica at the node whose token is closest to the key (as determined by the Partitioner), and additional replicas on subsequent nodes along the ring in increasing Token order. Supports a single strategy option 'replication_factor' that specifies the replication factor for the cluster. With NetworkTopologyStrategy, for each datacenter, you can specify how many replicas you want on a per-keyspace basis. Replicas are placed on different racks within each DC, if possible. Supports strategy options which specify the replication factor for each datacenter. The replication factor for the entire cluster is the sum of all per datacenter values. Note that the datacenter names must match those used in conf/cassandra-topology.properties. OldNetworkToplogyStrategy [formerly RackAwareStrategy] places one replica in each of two datacenters, and the third on a different rack in in the first. Additional datacenters are not guaranteed to get a replica. Additional replicas after three are placed in ring order after the third without regard to rack or datacenter. Supports a single strategy option 'replication_factor' that specifies the replication factor for the cluster. - strategy_options: Optional additional options for placement_strategy. Options have the form {key:value}, see the information on each strategy and the examples. - durable_writes: When set to false all RowMutations on keyspace will by-pass CommitLog. Set to true by default. Examples: update keyspace Keyspace2 with placement_strategy = 'org.apache.cassandra.locator.SimpleStrategy' and strategy_options = {replication_factor:4}; update keyspace Keyspace3 with placement_strategy = 'org.apache.cassandra.locator.NetworkTopologyStrategy' and strategy_options={DC1:2, DC2:2}; update keyspace Keyspace4 with placement_strategy = 'org.apache.cassandra.locator.OldNetworkTopologyStrategy' and strategy_options = {replication_factor:1}; - name: NODE_ADD_COLUMN_FAMILY help: | create column family ; create column family with =; create column family with = and =...; Create a column family in the current keyspace with the specified attributes. Required Parameters: - name: Name of the new column family. Names may only contain letters, numbers and underscores. column family Attributes (all are optional): - column_metadata: Defines the validation and indexes for known columns in this column family. Columns not listed in the column_metadata section will use the default_validator to validate their values. Column Required parameters: - name: Binds a validator (and optionally an indexer) to columns with this name in any row of the enclosing column family. - validator: Validator to use for values for this column. Supported values are: - AsciiType - BytesType - CounterColumnType (distributed counter column) - Int32Type - IntegerType (a generic variable-length integer type) - LexicalUUIDType - LongType - UTF8Type It is also valid to specify the fully-qualified class name to a class that extends org.apache.Cassandra.db.marshal.AbstractType. Column Optional parameters: - index_name: Name for the index. Both an index name and type must be specified. - index_type: The type of index to be created. Suported values are: - KEYS: a ColumnFamily backed index - CUSTOM: a user supplied index implementaion. You must supply a 'class_name' field in the index_options with the full classname of the implementation. - index_options: Optional additional options for index_type. Options have the form {key:value}. - column_type: Type of columns this column family holds, valid values are Standard and Super. Default is Standard. - comment: Human readable column family description. - comparator: Validator to use to validate and compare column names in this column family. For Standard column families it applies to columns, for Super column families applied to super columns. Also see the subcomparator attribute. Default is BytesType, which is a straight forward lexical comparison of the bytes in each column. Supported values are: - AsciiType - BytesType - CounterColumnType (distributed counter column) - Int32Type - IntegerType (a generic variable-length integer type) - LexicalUUIDType - LongType - UTF8Type It is also valid to specify the fully-qualified class name to a class that extends org.apache.Cassandra.db.marshal.AbstractType. - default_validation_class: Validator to use for values in columns which are not listed in the column_metadata. Default is BytesType which applies no validation. Supported values are: - AsciiType - BytesType - CounterColumnType (distributed counter column) - Int32Type - IntegerType (a generic variable-length integer type) - LexicalUUIDType - LongType - UTF8Type It is also valid to specify the fully-qualified class name to a class that extends org.apache.Cassandra.db.marshal.AbstractType. - key_validation_class: Validator to use for keys. Default is BytesType which applies no validation. Supported values are: - AsciiType - BytesType - Int32Type - IntegerType (a generic variable-length integer type) - LexicalUUIDType - LongType - UTF8Type It is also valid to specify the fully-qualified class name to a class that extends org.apache.Cassandra.db.marshal.AbstractType. - gc_grace: Time to wait in seconds before garbage collecting tombstone deletion markers. Default value is 864000 or 10 days. Set this to a large enough value that you are confident that the deletion markers will be propagated to all replicas by the time this many seconds has elapsed, even in the face of hardware failures. See http://wiki.apache.org/Cassandra/DistributedDeletes - keys_cached: Maximum number of keys to cache in memory. Valid values are either a double between 0 and 1 (inclusive on both ends) denoting what fraction should be cached. Or an absolute number of rows to cache. Default value is 200000. Each key cache hit saves 1 seek and each row cache hit saves 2 seeks at the minimum, sometimes more. The key cache is fairly tiny for the amount of time it saves, so it's worthwhile to use it at large numbers all the way up to 1.0 (all keys cached). The row cache saves even more time, but must store the whole values of its rows, so it is extremely space-intensive. It's best to only use the row cache if you have hot rows or static rows. - key_cache_save_period: Duration in seconds after which Cassandra should safe the keys cache. Caches are saved to saved_caches_directory as specified in conf/Cassandra.yaml. Default is 14400 or 4 hours. Saved caches greatly improve cold-start speeds, and is relatively cheap in terms of I/O for the key cache. Row cache saving is much more expensive and has limited use. - read_repair_chance: Probability (0.0-1.0) with which to perform read repairs for any read operation. Default is 0.1. Note that disabling read repair entirely means that the dynamic snitch will not have any latency information from all the replicas to recognize when one is performing worse than usual. - rows_cached: Maximum number of rows whose entire contents we cache in memory. Valid values are either a double between 0 and 1 ( inclusive on both ends) denoting what fraction should be cached. Or an absolute number of rows to cache. Default value is 0, to disable row caching. Each key cache hit saves 1 seek and each row cache hit saves 2 seeks at the minimum, sometimes more. The key cache is fairly tiny for the amount of time it saves, so it's worthwhile to use it at large numbers all the way up to 1.0 (all keys cached). The row cache saves even more time, but must store the whole values of its rows, so it is extremely space-intensive. It's best to only use the row cache if you have hot rows or static rows. - row_cache_save_period: Duration in seconds after which Cassandra should safe the row cache. Caches are saved to saved_caches_directory as specified in conf/Cassandra.yaml. Default is 0 to disable saving the row cache. Saved caches greatly improve cold-start speeds, and is relatively cheap in terms of I/O for the key cache. Row cache saving is much more expensive and has limited use. - subcomparator: Validator to use to validate and compare sub column names in this column family. Only applied to Super column families. Default is BytesType, which is a straight forward lexical comparison of the bytes in each column. Supported values are: - AsciiType - BytesType - CounterColumnType (distributed counter column) - Int32Type - IntegerType (a generic variable-length integer type) - LexicalUUIDType - LongType - UTF8Type It is also valid to specify the fully-qualified class name to a class that extends org.apache.Cassandra.db.marshal.AbstractType. - max_compaction_threshold: The maximum number of SSTables allowed before a minor compaction is forced. Default is 32, setting to 0 disables minor compactions. Decreasing this will cause minor compactions to start more frequently and be less intensive. The min_compaction_threshold and max_compaction_threshold boundaries are the number of tables Cassandra attempts to merge together at once. - min_compaction_threshold: The minimum number of SSTables needed to start a minor compaction. Default is 4, setting to 0 disables minor compactions. Increasing this will cause minor compactions to start less frequently and be more intensive. The min_compaction_threshold and max_compaction_threshold boundaries are the number of tables Cassandra attempts to merge together at once. - replicate_on_write: Replicate every counter update from the leader to the follower replicas. Accepts the values true and false. - row_cache_provider: The provider for the row cache to use for this column family. Supported values are: - ConcurrentLinkedHashCacheProvider - SerializingCacheProvider (requires JNA) It is also valid to specify the fully-qualified class name to a class that implements org.apache.cassandra.cache.IRowCacheProvider. row_cache_provider defaults to SerializingCacheProvider if you have JNA enabled, otherwise ConcurrentLinkedHashCacheProvider. SerializingCacheProvider serialises the contents of the row and stores it in native memory, i.e., off the JVM Heap. Serialized rows take significantly less memory than "live" rows in the JVM, so you can cache more rows in a given memory footprint. And storing the cache off-heap means you can use smaller heap sizes, reducing the impact of GC pauses. - compression_options: Options related to compression. Options have the form {key:value}. The main recognized options are: - sstable_compression: the algorithm to use to compress sstables for this column family. If none is provided, compression will not be enabled. Supported values are SnappyCompressor, DeflateCompressor or any custom compressor. It is also valid to specify the fully-qualified class name to a class that implements org.apache.cassandra.io.ICompressor. - chunk_length_kb: specify the size of the chunk used by sstable compression (default to 64, must be a power of 2). To disable compression just set compression_options to null like this `compression_options = null`. Examples: create column family Super4 with column_type = 'Super' and comparator = 'AsciiType' and rows_cached = 10000; create column family Standard3 with comparator = 'LongType' and rows_cached = 10000; create column family Standard4 with comparator = AsciiType and column_metadata = [{ column_name : Test, validation_class : IntegerType, index_type : 0, index_name : IdxName}, { column_name : 'other name', validation_class : LongType }]; - name: NODE_UPDATE_COLUMN_FAMILY help: | update column family ; update column family with =; update column family with = and =...; Updates the settings for a column family in the current keyspace. Required Parameters: - name: Name of the column family to update. column family Attributes (all are optional): - column_metadata: Defines the validation and indexes for known columns in this column family. Columns not listed in the column_metadata section will use the default_validator to validate their values. Column Required parameters: - name: Binds a validator (and optionally an indexer) to columns with this name in any row of the enclosing column family. - validator: Validator to use for values for this column. Supported values are: - AsciiType - BytesType - CounterColumnType (distributed counter column) - Int32Type - IntegerType (a generic variable-length integer type) - LexicalUUIDType - LongType - UTF8Type It is also valid to specify the fully-qualified class name to a class that extends org.apache.Cassandra.db.marshal.AbstractType. Column Optional parameters: - index_name: Name for the index. Both an index name and type must be specified. NOTE: After the update has completed the column family will only contain the secondary indexes listed in the update statement. Existing indexes will be dropped if they are not present in the update. - index_type: The type of index to be created. Suported values are: - KEYS: a ColumnFamily backed index - CUSTOM: a user supplied index implementaion. You must supply a 'class_name' field in the index_options with the full classname of the implementation. - index_options: Optional additional options for index_type. Options have the form {key:value}. - column_type: Type of columns this column family holds, valid values are Standard and Super. Default is Standard. - comment: Column family description. - comparator: Validator to use to validate and compare column names in this column family. For Standard column families it applies to columns, for Super column families applied to super columns. Also see the subcomparator attribute. Default is BytesType, which is a straight forward lexical comparison of the bytes in each column. Supported values are: - AsciiType - BytesType - CounterColumnType (distributed counter column) - Int32Type - IntegerType (a generic variable-length integer type) - LexicalUUIDType - LongType - UTF8Type It is also valid to specify the fully-qualified class name to a class that extends org.apache.Cassandra.db.marshal.AbstractType. - default_validation_class: Validator to use for values in columns which are not listed in the column_metadata. Default is BytesType which applies no validation. Supported values are: - AsciiType - BytesType - CounterColumnType (distributed counter column) - Int32Type - IntegerType (a generic variable-length integer type) - LexicalUUIDType - LongType - UTF8Type It is also valid to specify the fully-qualified class name to a class that extends org.apache.Cassandra.db.marshal.AbstractType. - key_valiation_class: Validator to use for keys. Default is BytesType which applies no validation. Supported values are: - AsciiType - BytesType - Int32Type - IntegerType (a generic variable-length integer type) - LexicalUUIDType - LongType - UTF8Type It is also valid to specify the fully-qualified class name to a class that extends org.apache.Cassandra.db.marshal.AbstractType. - gc_grace: Time to wait in seconds before garbage collecting tombstone deletion markers. Default value is 864000 or 10 days. Set this to a large enough value that you are confident that the deletion markers will be propagated to all replicas by the time this many seconds has elapsed, even in the face of hardware failures. See http://wiki.apache.org/Cassandra/DistributedDeletes - keys_cached: Maximum number of keys to cache in memory. Valid values are either a double between 0 and 1 (inclusive on both ends) denoting what fraction should be cached. Or an absolute number of rows to cache. Default value is 200000. Each key cache hit saves 1 seek and each row cache hit saves 2 seeks at the minimum, sometimes more. The key cache is fairly tiny for the amount of time it saves, so it's worthwhile to use it at large numbers all the way up to 1.0 (all keys cached). The row cache saves even more time, but must store the whole values of its rows, so it is extremely space-intensive. It's best to only use the row cache if you have hot rows or static rows. - key_cache_save_period: Duration in seconds after which Cassandra should safe the keys cache. Caches are saved to saved_caches_directory as specified in conf/Cassandra.yaml. Default is 14400 or 4 hours. Saved caches greatly improve cold-start speeds, and is relatively cheap in terms of I/O for the key cache. Row cache saving is much more expensive and has limited use. - read_repair_chance: Probability (0.0-1.0) with which to perform read repairs for any read operation. Default is 0.1. Note that disabling read repair entirely means that the dynamic snitch will not have any latency information from all the replicas to recognize when one is performing worse than usual. - rows_cached: Maximum number of rows whose entire contents we cache in memory. Valid values are either a double between 0 and 1 ( inclusive on both ends) denoting what fraction should be cached. Or an absolute number of rows to cache. Default value is 0, to disable row caching. Each key cache hit saves 1 seek and each row cache hit saves 2 seeks at the minimum, sometimes more. The key cache is fairly tiny for the amount of time it saves, so it's worthwhile to use it at large numbers all the way up to 1.0 (all keys cached). The row cache saves even more time, but must store the whole values of its rows, so it is extremely space-intensive. It's best to only use the row cache if you have hot rows or static rows. - row_cache_save_period: Duration in seconds after which Cassandra should safe the row cache. Caches are saved to saved_caches_directory as specified in conf/Cassandra.yaml. Default is 0 to disable saving the row cache. Saved caches greatly improve cold-start speeds, and is relatively cheap in terms of I/O for the key cache. Row cache saving is much more expensive and has limited use. - subcomparator: Validator to use to validate and compare sub column names in this column family. Only applied to Super column families. Default is BytesType, which is a straight forward lexical comparison of the bytes in each column. Supported values are: - AsciiType - BytesType - CounterColumnType (distributed counter column) - Int32Type - IntegerType (a generic variable-length integer type) - LexicalUUIDType - LongType - UTF8Type It is also valid to specify the fully-qualified class name to a class that extends org.apache.Cassandra.db.marshal.AbstractType. - max_compaction_threshold: The maximum number of SSTables allowed before a minor compaction is forced. Default is 32, setting to 0 disables minor compactions. Decreasing this will cause minor compactions to start more frequently and be less intensive. The min_compaction_threshold and max_compaction_threshold boundaries are the number of tables Cassandra attempts to merge together at once. - min_compaction_threshold: The minimum number of SSTables needed to start a minor compaction. Default is 4, setting to 0 disables minor compactions. Increasing this will cause minor compactions to start less frequently and be more intensive. The min_compaction_threshold and max_compaction_threshold boundaries are the number of tables Cassandra attempts to merge together at once. - replicate_on_write: Replicate every counter update from the leader to the follower replicas. Accepts the values true and false. - row_cache_provider: The provider for the row cache to use for this column family. Supported values are: - ConcurrentLinkedHashCacheProvider - SerializingCacheProvider (requires JNA) It is also valid to specify the fully-qualified class name to a class that implements org.apache.cassandra.cache.IRowCacheProvider. row_cache_provider defaults to ConcurrentLinkedHashCacheProvider, but if you have JNA installed you should usually use SerializingCacheProvider, which serialises the contents of the row and stores it in native memory, i.e., off the JVM Heap. Serialized rows take significantly less memory than "live" rows in the JVM, so you can cache more rows in a given memory footprint. And storing the cache off-heap means you can use smaller heap sizes, reducing the impact of GC pauses. - compression_options: Options related to compression. Options have the form {key:value}. The main recognized options are: - sstable_compression: the algorithm to use to compress sstables for this column family. If none is provided, compression will not be enabled. Supported values are SnappyCompressor, DeflateCompressor or any custom compressor. It is also valid to specify the fully-qualified class name to a class that implements org.apache.cassandra.io.ICompressor. - chunk_length_kb: specify the size of the chunk used by sstable compression (default to 64, must be a power of 2). To disable compression just set compression_options to null like this `compression_options = null`. Examples: update column family Super4 with column_type = 'Super' and rows_cached = 10000; update column family Standard3 with rows_cached = 10000; update column family Standard4 with column_metadata = [{ column_name : Test, validation_class : IntegerType, index_type : 0, index_name : IdxName}, { column_name : 'other name', validation_class : LongType }]; - name: NODE_DEL_KEYSPACE help: | drop keyspace ; Drops the specified keyspace. A snapshot of the data is created in a sub directory of the Keyspace data directory. The files must be manually deleted using either "nodetool clearsnapshot" or the command line. Required Parameters: - keyspace: Name of the keyspace to delete. Example: drop keyspace Keyspace1; - name: NODE_DEL_COLUMN_FAMILY help: | drop column family ; Drops the specified column family. A snapshot of the data is created in a sub directory of the Keyspace data directory. The files must be manually deleted using either "nodetool clearsnapshot" or the command line. Required Parameters: - cf: Name of the column family to delete. Example: drop column family Standard2; - name: NODE_DROP_INDEX help: | drop index on .; Drops index on specified column of the column family. Required Parameters: - cf: Name of the column family. - column: Name of the column to delete index on. Example: drop index on Users.name; - name: NODE_THRIFT_GET help: | get ['']; get [''][''] (as )*; get [''][''][''] (as )*; get ['']['']; get [''][]; get [function()][()][()]; get where [ and and ...] [limit ]; get where () [ and and ...] [limit ]; Gets columns or super columns for the specified column family and key. Or returns all columns from rows which meet the specified criteria when using the 'where' form. Note: The implementation of secondary indexes in Cassandra 0.7 has some restrictions, see http://www.datastax.com/dev/blog/whats-new-Cassandra-07-secondary-indexes Required Parameters: - cf: Name of the column family to read from. Optional Parameters: - col: Name of the column to read. Or in the 'where' form name of the column to test the value of. - function: Name of a function to call to parse the supplied argument to the specified type. Some functions will generate values without needing an argument. Valid options are: - ascii - bytes: if used without arguments generates a zero length byte array - int - integer - lexicaluuid: if used without arguments generates a new random uuid - long - timeuuid: if used without arguments generates a new time uuid - utf8 - key: Key for the row to read columns from. This parameter is required in all cases except when the 'where' clause is used. - limit: Number of rows to return. Default is 100. - operator: Operator to test the column value with. Supported operators are =, >, >=, <, <= . In Cassandra 0.7 at least one = operator must be present. - super: Name of the super column to read from. If super is supplied without col then all columns from the super column are returned. - type: Data type to interpret the the columns value as for display. Valid options are: - AsciiType - BytesType - CounterColumnType (distributed counter column) - Int32Type - IntegerType (a generic variable-length integer type) - LexicalUUIDType - LongType - UTF8Type - value: The value to test the column for, if a function is provided the value is parsed by the function. Otherwise the meta data for the target column is used to determine the correct type. Examples: get Standard1[ascii('testkey')]; #tell cli to convert keys from ascii to bytes assume Standard1 keys as ascii; get Standard1[testkey][test_column] as IntegerType; get Standard1[testkey][utf8(hello)]; get Indexed1 where birthdate=19750403; - name: NODE_THRIFT_SET help: | set [''][''] = ; set [''][''][''] = ; set [''][''] = (); set [''][''][''] = (); set [][()] = || ; set [()][() || ] = || with ttl = ; Sets the column value for the specified column family and key. Required Parameters: - cf: Name of the column family to set columns in. - col: Name of the column to set. - key: Key for the row to set columns in. Optional Parameters: - function: Name of a function to call to parse the supplied argument to the specified type. Some functions will generate values without needing an argument. Valid options are: - ascii - bytes: if used without arguments generates a zero length byte array - int - integer - lexicaluuid: if used without arguments generates a new random uuid - long - timeuuid: if used without arguments generates a new time uuid - utf8 - secs: Time To Live for the column in seconds. Defaults to no ttl. - super: Name of the super column to contain the column. - value: The value to set the column to. Examples: set Super1[ascii('testkey')][ascii('my super')][ascii('test col')]='this is a test'; set Standard1['testkey']['test col']='this is also a test'; set Standard1[testkey][testcol] = utf8('this is utf8 string.'); set Standard1[testkey][timeuuid()] = utf8('hello world'); set Standard1[testkey][timeuuid()] = utf8('hello world') with ttl = 30; - name: NODE_THRIFT_DEL help: | del ['']; del ['']['']; del ['']['']; del ['']['']['']; del [()][()][()]; Deletes a row, a column, or a subcolumn. Required Parameters: - cf: Name of the column family to delete from. - key: Key for the row delete from. Optional Parameters: - col: Name of the column to delete. - function: Name of a function to call to parse the supplied argument to the specified type. Some functions will generate values without needing an argument. Supported values are: - ascii - bytes: if used without arguments generates a zero length byte array - int - integer - lexicaluuid: if used without arguments generates a new random uuid - long - timeuuid: if used without arguments generates a new time uuid - utf8 - super: Name of the super column to delete from. If col is not specified the super column and all sub columns will be deleted. Examples: del Super1[ascii('testkey')][ascii('my_super')][ascii('test_col')]; del Standard1['testkey'][ascii('test col')]; del Standard1['testkey']; del Standard1[utf8('testkey')]; - name: NODE_THRIFT_COUNT help: | count ['']; count ['']['']; Count the number of columns in the row with the specified key, or subcolumns in the specified super column. Required Parameters: - cf: Name of the column family to read from.. - key: Key for the row to count. Optional Parameters: - super: Name of the super column to count subcolumns in. Examples: count Super1['testkey']['my super']; count Standard1['testkey']; - name: NODE_LIST help: | list ; list [:]; list [:]; list [:] limit ; List a range of rows, and all of their columns, in the specified column family. The order of rows returned is dependant on the Partitioner in use. Required Parameters: - cf: Name of the column family to list rows from. Optional Parameters: - endKey: Key to end the range at. The end key will be included in the result. Defaults to an empty byte array. - limit: Number of rows to return. Default is 100. - startKey: Key start the range from. The start key will be included in the result. Defaults to an empty byte array. Examples: list Standard1; list Super1[j:]; list Standard1[j:k] limit 40; - name: NODE_TRUNCATE help: | truncate ; Truncate specified column family. Note: All nodes in the cluster must be up to truncate command to execute. A snapshot of the data is created, which is deleted asyncronously during a 'graveyard' compaction. Required Parameters: - cf: Name of the column family to truncate. Examples: truncate Standard1; - name: NODE_ASSUME help: | assume comparator as ; assume sub_comparator as ; assume validator as ; assume keys as ; Assume one of the attributes (comparator, sub_comparator, validator or keys) of the given column family match specified type. The specified type will be used when displaying data returned from the column family. This statement does not change the column family definition stored in Cassandra. It only affects the cli and how it will transform values to be sent to and interprets results from Cassandra. If results from Cassandra do not validate according to the assumptions an error is displayed in the cli. Required Parameters: - cf: Name of the column family to make the assumption about. - type: Validator type to use when processing values. Supported values are: - ascii - bytes - counterColumn (distributed counter column) - int - integer (a generic variable-length integer type) - lexicalUUID - long - utf8 It is also valid to specify the fully-qualified class name to a class that extends org.apache.Cassandra.db.marshal.AbstractType. Examples: assume Standard1 comparator as lexicaluuid; assume Standard1 keys as ascii; - name: NODE_THRIFT_INCR help: | incr [''][''] [by ]; incr [''][''][''] [by ]; Increment the specified counter column by the supplied value. Note: Counter columns must be defined using a 'create column family' or 'update column family' statement in the column_metadata as using the ColumnCounterType validator. Required Parameters: - cf: Name of the column family to increment the column in. - col: Name of the counter column to increment. - key: Key for the row to increment the counter in. Optional Parameters: - super: Name of the super column that contains the counter column. - value: Signed integer value to increment the column by. If not supplied 1 is used. Examples: incr Counter1[ascii('testkey')][ascii('test col')]; incr SuperCounter1[ascii('testkey')][ascii('my super')][ascii('test col')] by 42; incr Counter1[ascii('testkey')][ascii('test col')] by -4; - name: NODE_THRIFT_DECR help: | decr [''][''] [by ]; decr [''][''][''] [by ]; Decrement the specified column by the supplied value. Note: Counter columns must be defined using a 'create column family' or 'update column family' statement in the column_metadata as using the ColumnCounterType validator. Required Parameters: - cf: Name of the column family to decrement the column in. - col: Name of the counter column to increment. - key: Key for the row to decrement the counter in. Optional Parameters: - super: Name of the super column that contains the counter column. - value: Signed integer value to decrement the column by. If not supplied 1 is used. Examples: decr Counter1[ascii('testkey')][ascii('test col')]; decr SuperCounter1[ascii('testkey')][ascii('my super')][ascii('test col')] by 42; decr Counter1[ascii('testkey')][ascii('test col')] by 10; - name: NODE_CONSISTENCY_LEVEL help: | consistencylevel as Sets the consistency level for the client to use. Defaults to One. Required Parameters: - level: Consistency level the client should use. Value is case insensitive. Supported values are: - ONE - TWO - THREE - QUORUM - ALL - LOCAL_QUORUM - EACH_QUORUM - ANY Note: Consistency level ANY can only be used for write operations.