DataStax Enterprise 3.0 Documentation

dse commands and dsetool

This documentation corresponds to an earlier product version. Make sure this document corresponds to your version.

Latest DSE documentation | Earlier DSE documentation

The table of dse commands describes each command, which include dse versions of Hadoop File System Shell commands. You also use dse commands to start Hive, Mahout, and Pig.

A dsetool utility for CassandraFS- and Hadoop-related tasks is also available for checking the CassandraFS and listing subranges in addition to managing the job tracker, discussed earlier.

Using dse commands

Use the dse commands from the bin directory of the DataStax Enterprise Linux installation or from the command line of a packaged or AMI distribution.

Synopsis

dse [-v] | cassandra [options] | hadoop [options] | hive [options]
    | mahout [options] | pig [options] | sqoop [options]

This table describes the key dse commands:

Command Option Description Example
dse -v Send the DSE version number to standard output. none
dse cassandra   Start up a real-time Cassandra node in the background. link to example
dse cassandra -s Start up a DSE Search/Solr node in the background. link to example
dse cassandra -t Start up an analytics node in the background. link to example
dse cassandra -t -j Start up an analytics node as the job tracker. link to example
dse cassandra -f Start up a real-time Cassandra node in the foreground. none
dse cassandra -f -t Start up an analytics node in the foreground. none
dse cassandra -f -s Start up a DSE Search/Solr node in the foreground. none
dse cassandra-stop -p <pid> Stop the DataStax Enterprise process number pid. link to example
dse hadoop version Sends the version of the Hadoop component to standard output.  
dse hadoop fs <options> Invoke the Hadoop FileSystem shell. link to example
dse hadoop fs -help Send Apache Hadoop fs command descriptions to standard output.  
dse hive   Start the Hive client. link to example
dse hive --service <name> Start Hive by connecting through the JDBC driver. link to example
dse mahout   Describe Mahout commands. link to example
dse mahout <mahout command> <options> Run the Mahout command. link to example
dse mahout hadoop <hadoop command> <options> Add Mahout classes to classpath and execute the hadoop command. link to example
dse pig   Start Pig. link to example
dse sqoop -help Send Apache Sqoop command line help to standard output. link to example

Hadoop, hive, mahout, and pig commands must be issued from an analytics node. The hadoop fs options, which DSE Analytics supports with one exception (-moveToLocal), are described in the HDFS File System Shell Guide on the Apache Hadoop web site. DSE Analytics has not yet implemented the -moveToLocal option, but you can use the -copyToLocal.

Checking the CassandraFS using dsetool

Use the dsetool commands from the bin directory of the DataStax Enterprise Linux installation or from the command line in a packaged or AMI distribution. Use the dsetool checkcfs command to scan the CassandraFS for corrupted files. For example:

dsetool checkcfs cfs:///

Use the dsetool to get details about a particular file that has been corrupted. For example:

dsetool checkcfs /tmp/hadoop/mapred/system/jobtracker.info

Listing sub-ranges using dsetool

The dsetool command syntax for listing subranges of data in a keyspace is:

dsetool [-h] [hostname] list_subranges <keyspace> <table> <rows per subrange> <start token> <end token>

<rows per subrange> is the approximate number of rows per subrange.

<start partition range> is the start range of the node.

<end partition range> is the end range of the node.

Note

You run nodetool repair on a single node using the output of list_subranges. The output must be partition ranges used on that node.

Example

dsetool list_subranges Keyspace1 Standard1 10000 113427455640312821154458202477256070485 0

Output

The output lists the subranges to use as input to the nodetool repair command. For example:

Start Token                             End Token                               Estimated Size
------------------------------------------------------------------------------------------------
113427455640312821154458202477256070485 132425442795624521227151664615147681247 11264
132425442795624521227151664615147681247 151409576048389227347257997936583470460 11136
151409576048389227347257997936583470460 0                                       11264

Nodetool repair command options

You need to use the nodetool utility when working with sub-ranges. The start partition range (-st) and end partition range (-et) options specify the portion of the node needing repair. You get values for the start and end tokens from the output of dsetool list_subranges command. The new nodetool repair syntax for using these options is:

nodetool repair <keyspace> <table> -st <start_token> -et <end_token>

Example

nodetool repair Keyspace1 Standard1 -st 113427455640312821154458202477256070485 -et 132425442795624521227151664615147681247
nodetool repair Keyspace1 Standard1 -st 132425442795624521227151664615147681247 -et 151409576048389227347257997936583470460
nodetool repair Keyspace1 Standard1 -st 151409576048389227347257997936583470460 -et 0

These commands begins an anti-entropy node repair from the start partition range to the end partition range.