dse client-tool  

The dse client-tool application connects an external client to a DSE node and performs common utility tasks.

The dse client-tool application connects an external client to a DSE node and performs common utility tasks.

Synopsis

dse client-tool [connection_options]  
cassandra subcommand |
configuration byos-export options file |
configuration import file connection_options |
spark subcommand

Syntax

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.

RPCs over the Cassandra native protocol leverage Cassandra authentication and role-based access abilities.

Different sources of configuration properties are used to connect to a DSE node: DSE configuration in YAML files (dse.yaml and cassandra.yaml) or Hadoop configuration files (resources/hadoop/conf/*.xml), which are the default source of configuration properties. You can override connection settings with the dse client-tool command options.

The dse client-tool subcommands use Cassandra authentication, like the Java and other language drivers, and not JMX authentication like the dsetool command. You can provide authentication credentials in several ways, see Credentials for authentication.

Kerberos authentication with dse client-tool is supported.

To configure external client access to DataStax Enterprise commands, see RPCs over Cassandra native protocol.

To show the command line help for dse client-tool:
$ dse client-tool --help
To show the command line help for a dse client-tool subcommand:
$ dse client-tool help subcommand

Syntax 

$ dse client-tool [connection_options] subcommand

External client connection options 

Options for the $ dse client-tool [connection_options] command.

Connection options Description
--use-server-config Read connection configuration from server YAML files (dse.yaml and cassandra.yaml) instead of reading them from Hadoop configuration files. Use only when the DSE installation against which the command run is a running node.
--host address The Cassandra host RPC broadcast address.
--port port The Cassandra native protocol RPC connection port.
--ssl-enabled true|false If true, enable SSL for connection to Cassandra. For example, --ssl-enabled true.
--ssl-protocol ssl_protocol The SSL protocol for connection to Cassandra when SSL is enabled. For example, --ssl-protocol=ssl4.
--cipher-suites ssl_cipher_suites A comma-separated list of SSL cipher suites for connection to Cassandra when SSL is enabled.
--kerberos-enabled true|false true|false - If true, enable Kerberos for connection to Cassandra. For example, --kerberos-enabled true.
-t token The delegation token to use for login. Can use environment variable DSE_TOKEN.
--keystore-password ssl_keystore_password The keystore password for connection to Cassandra when SSL client authentication is enabled.
--keystore-path ssl_keystore_path The path to the keystore for connection to Cassandra when SSL client authentication is enabled.
--keystore-type ssl_keystore_type The keystore type for connection to Cassandra when SSL client authentication is enabled.
--truststore-password ssl_truststore_password The truststore password for connection to Cassandra when SSL is enabled.
--truststore-path ssl_truststore_path The path to the truststore for connection to Cassandra when SSL is enabled.
--truststore-type ssl_truststore_type The truststore type for connection to Cassandra when SSL is enabled.

Cassandra subcommands for dse client-tool 

Options for the $ dse client-tool cassandra command for general operations.

Cassandra command options Description
[generate-token] Generate digest authentication token with the current user as the token renewer. The renewer is not specified and only DSE processes can renew a token. Use to access Kerberos DSE from non-Kerberos clusters. Requires Kerberos authentication mode.
[generate-token --token-renewer username] Generate digest authentication token with the specified user as the token renewer. The specified user can renew and cancel the token. Requires Kerberos authentication mode.
[partitioner] Return the partitioner that is being used by the node.
[renew-token token] Renew the specified token
[cancel-token token] Cancel digest authentication token; requires Kerberos authentication mode.

Configuration subcommands for dse client-tool 

Use the $ dse client-tool configuration command to manage external configurations on DSE client nodes:See Running Spark commands against a remote cluster.

Options and command arguments for dse client-tool configuration subcommand:
Configuration arguments and options Description
[--] Use -- to separate the command line options from the command arguments. This syntax is useful when arguments might be mistaken for command line options.
export file On the remote node, export the node configuration to a JAR file. The configuration settings are retrieved from the running DSE node.
import file The configuration settings that were exported can be imported on an external, unconfigured node to allow DSE client applications to access the running DSE cluster remotely.

This import will setup DSE installation for integrated client applications to connect to an external running DSE cluster. The command generates Hadoop configuration files and a cqlshrc file with the settings from the imported file.

The --set-* options override or set connection settings that were not exported. Keystore options must be explicitly provided when SSL client authentication is enabled.

On the client node, import the node configuration from the specified JAR file with these [options]:

  • [--set-truststore-type type] to set the truststore type. If not specified, the default is JKS.
  • [--set-truststore-path path] to set the path to the truststore.
  • [--set-truststore-password password] to set the truststore password.
  • [--set-keystore-type type] to set the keystore type when SSL client authentication is enabled. If not specified, the default is JKS. Keystore options must be explicitly provided when SSL client authentication is enabled.
  • [--set-keystore-path path] to set the path to the SSL keystore when SSL client authentication is enabled. Keystore options must be explicitly provided when SSL client authentication is enabled.
  • [--set-keystore-password password] to specify keystore password for connection to Cassandra when SSL client authentication is enabled. Keystore options must be explicitly provided when SSL client authentication is enabled.
  • [--cqlshrc file] to set the path to the cqlshrc file and generate a cqlshrc file for the DSE client node. When a file is not specified, the default file is the ~/.cassandra/cqlshrc file.
  • [--force] to force an overwrite of existing configuration files. By default, the import command fails if the configuration files already exist.
byos-export [options] file Retrieve DSE cluster configuration and export it to a Spark properties file. The --set-* options override or set connection settings that are not exported, including the SSL keystore options that must be explicitly provided when SSL client authentication is enabled. Store the configuration with these [options]:
  • [--default-properties path_to_existing_properties_file] to merge the default Spark properties with the DataStax Enterprise Spark properties. For example:
    $ dse client-tool configuration byos-export --default-properties \
    /usr/lib/spark/conf/spark-defaults.conf /home/user1/.dse/byos.conf
  • [--set-truststore-path path] to set the path to truststore on Spark nodes. Truststore location must be the same on all nodes. See the Spark documentation for automatic files distribution options.
  • [--set-truststore-type type] to set the truststore type. If not specified, the default is JKS.
  • [--set-truststore-password password] to set the truststore password.
  • [--set-keystore-path path] to set the path to the SSL keystore when SSL client authentication is enabled on the Spark nodes. All nodes must store the keystore in the same location. See the Spark documentation for automatic files distribution options.
  • [--set-keystore-type type] to set the keystore type when SSL client authentication is enabled. If not specified, the default is JKS.
  • [--set-keystore-password password] to specify keystore password for connection to Cassandra when SSL client authentication is enabled.
  • [--export-credentials] to store current DataStax Enterprise user and password in the config file.
  • [--generate-token] - Generate digest authentication token with the current user as the token renewer. The renewer is not specified and only DSE processes can renew a token. Use to access Kerberos DSE from non-Kerberos clusters. Requires Kerberos authentication mode.
  • [--token-renewer username] - Generate digest authentication token with the specified user as the token renewer. The specified user can renew and cancel the token. Requires Kerberos authentication mode.

Spark subcommands for dse client-tool 

Sub-commands for the $ dse client-tool spark command for integrated Spark operations.
Spark arguments and options Description
master-address Returns the current address of the Spark Master in the datacenter that you are connecting to as determined by the host address. The Spark Master address is returned as URI: spark://ip:port

Replaces the dsetool sparkmaster command.

version Returns the Spark version that is bundled with DataStax Enterprise.
sql-schema option Exports the SQL table creation query with the following options:.

With -exclude option, excluded tables
With -keyspace option, keyspaces
With -table option, tables
With -decimal option, hive 0.13+ decimal type parameters in form precision,scale
With -all option, all keyspaces

Hadoop subcommands for dse client-tool 

Subcommands for the $ dse client-tool hadoop command for Hadoop-related operations.
Command arguments Description
job-tracker-address Returns the address of the DSE Hadoop Job Tracker in the datacenter that you are connecting to as determined by the host address.
version Returns the DSE Hadoop version, when Hadoop is bundled with DataStax Enterprise.
sql-schema option Exports the SQL table creation query with the following options:

With -exclude option, excluded tables
With -keyspace option, keyspaces
With -table option, tables
With -decimal option, hive 0.13+ decimal type parameters in form precision,scale
With -all option, all keyspaces

The location of the cassandra.yaml file depends on the type of installation:
Installer-Services /etc/dse/cassandra/cassandra.yaml
Package installations /etc/dse/cassandra/cassandra.yaml
Installer-No Services install_location/resources/cassandra/conf/cassandra.yaml
Tarball installations install_location/resources/cassandra/conf/cassandra.yaml
The location of the dse.yaml file depends on the type of installation:
Installer-Services /etc/dse/dse.yaml
Package installations /etc/dse/dse.yaml
Installer-No Services install_location/resources/dse/conf/dse.yaml
Tarball installations install_location/resources/dse/conf/dse.yaml
The default location of the Hadoop configuration files depends on the type of installation:
Installer-Services and Package installations /etc/dse/hadoop/conf

/etc/dse/resources/hadoop2-client/conf

Installer-No Services and Tarball installations install_location/resources/hadoop/conf/

install_location/resources/hadoop2-client/conf