dse client-tool alwayson-sql

Connect an external client to a DataStax Enterprise node and perform operations related to AlwaysOn SQL.

spark-alwayson-sql.conf

For use with AlwaysOn SQL, the default location of the spark-alwayson-sql.conf file is:
Package installations /etc/dse/spark/spark-alwayson-sql.conf
Tarball installations installation_location/resources/spark/conf/spark-alwayson-sql.conf

dse.yaml

The location of the dse.yaml file depends on the type of installation:
Package installations /etc/dse/dse.yaml
Tarball installations installation_location/resources/dse/conf/dse.yaml

Perform operations related to AlwaysOn SQL.

Synopsis

dse client-tool connection_options alwayson-sql
(status | stop | start | restart | reconfig)
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.
status
Get the AlwaysOn SQL service status of the datacenter. With the --dc datacenter name option, get the status of the specified datacenter.

The returned status is one of:

  • RUNNING: the server is running and ready to accept client requests.
  • STOPPED_AUTO_RESTART: the server is being started but is not yet ready to accept client requests.
  • STOPPED_MANUAL_RESTART: the server was stopped with either a stop or restart command. If the server was issued a restart command, the status will be changed to STOPPED_AUTO_RESTART as the server starts again.
  • STARTING: the server is actively starting up but is not yet ready to accept client requests.
stop
Manually stop the AlwaysOn SQL service. With the --dc datacenter name option, manually stop the service on the specified datacenter.
start
Manually start the AlwaysOn SQL service. With the --dc datacenter name option, manually start the service on the specified datacenter. The service will start automatically if its been enabled.
restart
Manually restart a running AlwaysOn SQL service. With the --dc datacenter name option, manually restart the service on the specified datacenter.
reconfig
Manually reconfigure the AlwaysOn SQL service. With the --dc datacenter name option, manually reconfigure the service on specified datacenter. Running this command will tell the service to re-read the configuration options.

The alwayson_sql_options section in dse.yaml, described in detail at AlwaysOn SQL, has options for setting the ports, timeout values, log location, and other Spark or Hive configuration settings. Additional configuration options are located in spark-alwayson-sql.conf.

Examples

Stop a running service:

dse client-tool alwayson-sql stop

Start the service on a particular datacenter:

dse client-tool alwayson-sql --dc dc-west start

Force the service to stop:

dse client-tool alwayson-sql stop

Reread the configuration options for a running service:

dse client-tool alwayson-sql reconfig