dse commands

The dse commands provide additional controls for starting and using DataStax Enterprise.

The dse commands provide additional controls for starting and using DataStax Enterprise.

dse commands 

Synopsis
$ dse [-f config_file] [-u username -p password] [-a jmx_username -b jmx_password]  subcommand [command-arguments]
Legend
Syntax conventions Description
Italics Variable value. Replace with a user-defined value.
[ ] Optional. Square brackets ( [ ] ) surround optional command arguments. Do not type the square brackets.
( ) Group. Parentheses ( ( ) ) identify a group to choose from. Do not type the parentheses.
| Or. A vertical bar ( | ) separates alternative elements. Type any one of the elements. Do not type the vertical bar.
[ -- ] Separate the command line options from the command arguments with two hyphens ( -- ). This syntax is useful when arguments might be mistaken for command line options.

You can provide user credentials in several ways, see Providing credentials for authentication.

This table describes the authentication command arguments that can be used with all subcommands.
Command arguments Description
-f Path to configuration file that stores credentials. If not specified, then use ~/.dserc if it exists.
-u User name to authenticate against the configured Cassandra authentication schema.
-p Password to authenticate against the configured Cassandra authentication schema.
-a User name to authenticate with secure JMX.
-b Password to authenticate with secure JMX.

This table describes the dse version command that can be used without authentication:

Command argument Description
-v Send the DSE version number to standard output.
dse subcommands
Note: When multiple flags are used, list them separately on the command line. For example, ensure there is a space between -k and -s in dse cassandra -k -s.
This table describes the dse subcommands that use authentication.
Subcommand Command arguments Description
beeline   Start the Beeline shell.
cassandra   Start up a real-time Cassandra node in the background. See Starting DataStax Enterprise.
cassandra -c Enable the Cassandra File System (CFS) but not the integrated DSE Job Trackers and Task Trackers. Use to start nodes for running an external Hadoop system.
cassandra -f Start up a real-time Cassandra node in the foreground. Can be used with -k, -t, or -s options.
cassandra -k Start up an analytics node in Spark mode in the background. See Starting Spark.
cassandra -k -t Start up an analytics node in Spark and DSE Hadoop mode. See Starting Spark.
cassandra -s Start up a DSE Search node in the background. See Starting DataStax Enterprise.
cassandra -t Start up an analytics node in DSE Hadoop mode in the background. See Starting DataStax Enterprise.
cassandra-stop -p pid Stop the DataStax Enterprise process number pid. See Stopping a node.
cassandra -s -Ddse.solr.data.dir=path  
cassandra -Dstart_option All -D options in Cassandra are supported for starting a DSE node.
client-tool subcommand See dse client-tool.
esri-import ESRI import tool options The DataStax Enterprise custom ESRI import tool supports the Enclosed JSON format. See Spatial analytics support.
hadoop version Sends the version of the Hadoop component to standard output.
hadoop fs options Invoke the Hadoop FileSystem shell. See the Hadoop tutorial.
hadoop fs -help Send Apache Hadoop fs command descriptions to standard output. See the Hadoop tutorial.
hive   Start a Hive client.
hive --service name Start a Hive server by connecting through the JDBC driver.
hive-schema   Create a hive schema representing the Cassandra table when Using Hive with BYOH.
hive-metastore-migrate Hive-metastore-migrate tool options Map custom external tables to the new release format after upgrading. See dse hive-metastore-migrate -to dest_release_num.
mahout mahout_command options Run Mahout commands.
mahout hadoop hadoop_command options Add Mahout classes to classpath and execute the hadoop command. See Mahout commands.
pig   Start Pig.
pyspark   PySpark.
spark   Accessing Cassandra from the Spark shell.
spark-history-server start Start Spark history server.
spark-history-server stop Stop Spark history server.
spark-sql-thriftserver start Start Spark SQL Thrift server.
spark-sql-thriftserver stop Stop Spark SQL Thrift server.
spark-jobserver start submit options Launch applications on a cluster and use Spark Jobserver.
spark-jobserver stop Stop the Spark Jobserver.
spark-sql   Spark SQL command line
spark-submit options Launch applications on a cluster and use Spark cluster managers. See dse spark-submit.
spark-beeline   Use the Beeline client with Spark SQL Thrift Server.
sqoop -help Send Apache Sqoop command line help to standard output. See the Sqoop reference and the Sqoop demo.
Note: The directory in which you run the dse Spark commands must be writable by the current user.

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

The default location of the dse tool depends on the type of installation:
Package installations /usr/bin/dse
Installer-Services installations /usr/bin/dse
Installer-No Services and Tarball installations install_location/bin/dse

dse client-tool 

The dse client-tool subcommands use Cassandra authentication, not JMX authentication like the dsetool command.

Note: To show the command line help for dse client-tool
$ dse client-tool --help
For the dse client-tool subcommands, provide the optional user authentication, optional port and host arguments, and subcommand:
$ dse [-f config_file] [-u username -p password] [-a jmx_username -b jmx_password]  client-tool [--port port] [--host address] subcommand

Kerberos authentication with dse client-tool is supported with the kinit tool.

client-tool subcommand Command arguments Description
  [--port port] [--host address] The general arguments for dse client-tool apply to all subcommands:
  • --port port is the Cassandra RPC connection port (Thrift)
  • --host address is the Cassandra host RPC broadcast address
hadoop [job-tracker-address] [version] Run the dse client-tool hadoop command for Hadoop-related operations. The arguments are:
  • job-tracker-address Returns the address of the Hadoop Job Tracker in the datacenter that you are connecting to as determined by the host address.
  • version Returns the Hadoop version that is bundled with DataStax Enterprise.
help   Send client-tool command descriptions to standard output.
spark [master-address] [version] Runs the dse client-tool spark command for Spark-related operations. The arguments are:
  • master-address Returns the current address of the Spark Master in the datacenter that you are connecting to as determined by the host address. Replaces the dsetool sparkmaster command.
  • version Returns the Spark version that is bundled with DataStax Enterprise.

Cassandra start parameters

List of Cassandra start parameters for DSE.

Cassandra start parameters can be run from the command line or specified in the cassandra-env.sh file.

The location of the cassandra.yaml file depends on the type of installation:
Package installations /etc/dse/cassandra/cassandra.yaml
Tarball installations install_location/resources/cassandra/conf/cassandra.yaml
The location of the cassandra-env.sh file depends on the type of installation:
Package installations /etc/dse/cassandra/cassandra-env.sh
Tarball installations install_location/resources/cassandra/conf/cassandra-env.sh

Usage 

Specify the start option on the command line:
dse cassandra option
For example:
bin/dse cassandra -Dcassandra.prepared_statements_cache_size_in_bytes=345678912
You can set start options and set options to the JVM instead of setting them in the environment. Add an entry for each option to the cassandra-env.sh file:
JVM_OPTS="$JVM_OPTS -Doption"
For example:
JVM_OPTS="$JVM_OPTS -Dcassandra.prepared_statements_cache_size_in_bytes=345678912"

Start parameters 

All of the Cassandra start parameters are supported for starting a DSE node and for use in the cassandra-env.sh for DSE. The following start parameter is supported only for DSE:

Option Description
dse.solr.data.dir=path Use path to store DSE Search data. See Moving solr.data.