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).

Synopsis

Package and Installer-Services installations:
dse connection_options subcommand [command_arguments]
Tarball and Installer-No Services installations: /bin/ dse spark
installation_location/bin/dse connection_options subcommand [command_arguments]
Table 1. Legend
Syntax conventions Description
UPPERCASE Literal keyword.
Lowercase Not literal.
Italics Variable value. Replace with a valid option or 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.
... Repeatable. An ellipsis ( ... ) indicates that you can repeat the syntax element as often as required.
'Literal string' Single quotation ( ' ) marks must surround literal strings in CQL statements. Use single quotation marks to preserve upper case.
{ key:value } Map collection. Braces ( { } ) enclose map collections or key value pairs. A colon separates the key and the value.
<datatype1,datatype2> Set, list, map, or tuple. Angle brackets ( < > ) enclose data types in a set, list, map, or tuple. Separate the data types with a comma.
cql_statement; End CQL statement. A semicolon ( ; ) terminates all CQL statements.
[ -- ] 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.
' <schema> ... </schema> ' Search CQL only: Single quotation marks ( ' ) surround an entire XML schema declaration.
@xml_entity='xml_entity_type' Search CQL only: Identify the entity and literal value to overwrite the XML element in the schema and solrconfig files.

Connection options

Through authentication, the database establishes the identity of the person or system that is attempting an operation. Authentication credentials can be provided in several ways; see Connecting to authentication enabled clusters..

Connection options are authentication command arguments that can be used with all dse subcommands:
dse connection_options subcommand [command_arguments]
Table 2. Connection options to authenticate dse command
Command arguments Description
-f Path to configuration file that stores credentials. If not specified, then use ~/.dserc if it exists.
-u Role to authenticate against the configured authentication schema.
-p Password to authenticate against the configured authentication schema.
-a User name to authenticate with secure JMX.
-b Password to authenticate with secure JMX.
-f Path to configuration file that stores credentials. The credentials in this configuration file override the ~/.dserc credentials.
-v Send the DataStax Enterprise version number to standard output. Does not require authentication.

dse subcommands

Specify one dse subcommand and none or more optional command arguments.
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.
Subcommand and command arguments Description
advrep command_options Options for configuring and using DSE Advanced Replication.
beeline Start the Beeline shell.
cassandra Start a real-time transactional node in the background. See Starting DataStax Enterprise.
cassandra -f Start a real-time transactional node in the foreground.
cassandra -g Start a node in graph mode. See Starting DataStax Enterprise. Can be used with -s and -k options.
cassandra -k Start up an analytics node in Spark mode in the background. See Starting Spark.
cassandra-stop -p pid Stop the DataStax Enterprise process number pid. See Stopping a node.
cassandra -s Start a DSE Search node in the background. See Starting DataStax Enterprise.
cassandra -s -Ddse.solr.data.dir=path Use path to store DSE Search data. See Managing the location of DSE Search data.
cassandra -Doption All -D options in DataStax Enterprise start-up parameters commands are supported.
client-tool subcommand subcommand See dse client-tool.
dse-nodeID subcommand Run standard dse commands for nodes on a DSE Multi-Instance host machine.
exec command Sets the environment variables required to configure DSE Spark before executing the given command. This command is typically used for third-party tools that integrate with Spark. When you run dse exec it sets SPARK_HOME to point to the DSE Spark directory, sets HADOOP_CONF_DIR to point to the Hadoop configuration directory within DSE, sets other environment variables required by DSE Spark to enable custom DSE, and executes the given shell command.
fs Run DSEFS shell. See dsefs command line tool.
pyspark PySpark.
spark Accessing database data from Spark.
-framework dse|spark-2.0 Use with dse spark commands to specify a different classpath to accommodate applications originally written for open source Apache Spark™. Omit the --framework option for the default (dse) behavior present in earlier versions of DSE.
  • dse

    Default. Sets all of the spark classpath to the same classpath that is used by the DSE server.

  • spark-2.0
    Sets a classpath that is used by the open source Spark (OSS) 2.0 release. Uses a bring BYOS (Bring Your Own Spark) jar with shaded references to internal dependencies to eliminate complexity when porting an app from OSS Spark.
    Note: If the code works on DSE, applications do not require this framework. Full support in the spark-2.0 framework might require specifying additional dependencies. For example: hadoop-aws is included on the dse server path but is not present on the OSS Spark-2.0 classpath. In this example, applications that use S3 or other AWS APIs must include their own aws-sdk on the runtime classpath. This additional runtime classpath is required only for applications that cannot run on the DSE classpath.
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 submission_arguments Launch applications on a cluster and use Spark Jobserver. See Spark submit options.
spark-jobserver stop Stop the Spark Jobserver.
spark-sql Spark SQL command line
spark-submit submission_arguments Launch applications on a cluster and use Spark cluster managers. See dse spark-submit.
sparkR Starts the R shell configured with DSE Spark. See Using SparkR with DataStax Enterprise.
spark-sql-metastore-migrate Map custom external tables to the new release format of the Hive metastore used by Spark SQL after upgrading. For example:
dse spark-sql-metastore-migrate --to 5.1.0 --from 5.0.4

DSE Multi-Instance commands

To run standard DataStax Enterprise commands for nodes on a DSE Multi-Instance host machine, specify the node name using this syntax:
sudo dse dse-nodeId subcommand [command_arguments]

For details, see DSE Multi-Instance commands.

DataStax Enterprise start parameters

List of DataStax Enterprise start parameters.

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

cassandra.yaml

The location of the cassandra.yaml file depends on the type of installation:

Package installations
Installer-Services installations

/etc/dse/cassandra/cassandra.yaml

Tarball installations
Installer-No Services installations

installation_location/resources/cassandra/conf/cassandra.yaml

cassandra-env.sh

The location of the cassandra-env.sh file depends on the type of installation:

Package installations
Installer-Services installations

/etc/dse/cassandra/cassandra-env.sh

Tarball installations
Installer-No Services installations

installation_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 start parameters are supported for starting a DSE node and for use in the cassandra-env.sh for DSE. The following start parameters are supported for DSE only:

Option Description
dse.solr.data.dir=path The path to store DSE Search data. See Set the location of search indexes.