DSE Advanced Replication command line tool
The command line tool provides commands and options for configuring and using DSE Advanced Replication.
DSE Advanced Replication commands
These DSE Advanced Replication commands are available:
-
Command options for all commands
-
Replication channel commands
-
Replication destination commands
-
Replication configuration commands
-
Replication log commands
-
Metrics commands
DSE Advanced Replication command options
Synopsis
dse advrep [--v1] [connection_options] [command] [sub_command] [sub_command_options]
To show the command line help for dse advrep
:
dse advrep help
Authentication credentials can be provided in several ways, see Connecting to authentication enabled clusters.
The optional flag, --v1
, can be used to access advanced replication commands for DSE 5.0;
advanced replication commands changed with DSE 5.1.
See DSE 5.0 Advanced Replication documentation for commands compatible with the --v1
flag.
An example of using the --v1
flag is:
$ dse advrep --v1 edge conf --edge-id "edge1" --edge-id-col-name "edge_id" --hub-ip-addresses "10.200.182.148"
Client to DSE connection commands
The default port for DSE Advanced Replication is 9042. Connection options are specified as:
dse advrep [connection_options]
Connection options | Description |
---|---|
|
Specify the field separator if |
|
If specified, data is printed as a comma delimited list. If not specified, data is printed as tabular output. |
|
DSE username, or alternatively, |
|
JMX metrics user |
|
JMX port (default: 7199) |
|
JMX metrics password |
|
DSE password, or alternatively, |
|
Read connection configuration from server YAML files ( |
|
A comma-separated list of SSL cipher suites for connection to DSE when SSL is enabled.
For example, |
|
The DSE host RPC broadcast address. The default value is localhost. |
|
The DSE native protocol RPC connection port. |
|
true | false - If true, enable Kerberos for connection to DSE.
For example, |
|
Keystore password for connection to DSE when SSL client authentication is enabled. |
|
Set path to the keystore for connection to DSE when SSL client authentication is enabled. |
|
Set keystore type for connection to DSE when SSL client authentication is enabled. JKS is the type for keys generated by the Java keytool binary, but other types are possible, depending on user environment. |
|
Set the truststore password for connection to DSE when SSL is enabled. |
|
Set path to truststore for connection to DSE when SSL is enabled. |
|
Set truststore type for connection to DSE when SSL is enabled. JKS is the type for keys generated by the Java keytool binary, but other types are possible, depending on user environment. |
|
The SASL protocol name must match the username of the Kerberos service principal used by the DSE server. |
|
Specify whether SSL is enabled for connection to DSE.
|
|
SSL protocol for connection to DSE when SSL is enabled. |
|
Delegation token which can be used to login, or alternatively, |
Connection options examples:
dse advrep --host ip-10-200-300-138.example.lan --kerberos-enabled=true conf list
and
dse advrep --use-server-config conf list
Printing option example:
dse advrep --no-pretty-print destination list-conf --separator "|"
Output:
destination|name|value
mydest|addresses|192.168.200.100
mydest|transmission-enabled|true
mydest|driver-ssl-cipher-suites|TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256,TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,TLS_DHE_DSS_WITH_AES_128_CBC_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA,TLS_ECDH_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_DSS_WITH_AES_128_CBC_SHA,TLS_ECDHE_ECDSA_WITH_RC4_128_SHA,TLS_ECDHE_RSA_WITH_RC4_128_SHA,SSL_RSA_WITH_RC4_128_SHA,TLS_ECDH_ECDSA_WITH_RC4_128_SHA,TLS_ECDH_RSA_WITH_RC4_128_SHA,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256,TLS_DHE_RSA_WITH_AES_128_GCM_SHA256,TLS_DHE_DSS_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA,TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA,SSL_RSA_WITH_3DES_EDE_CBC_SHA,TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA,TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA,SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA,SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA,SSL_RSA_WITH_RC4_128_MD5,TLS_EMPTY_RENEGOTIATION_INFO_SCSV
mydest|driver-ssl-enabled|false
mydest|driver-ssl-protocol|TLS
mydest|name|mydest
mydest|driver-connect-timeout|15000
mydest|driver-max-requests-per-connection|1024
mydest|driver-connections-max|8
mydest|driver-connections|1
mydest|driver-compression|lz4
mydest|driver-consistency-level|ONE
mydest|driver-allow-remote-dcs-for-local-cl|false
mydest|driver-used-hosts-per-remote-dc|0
mydest|driver-read-timeout|15000
If --no-pretty-print
is not used, the output is in tabular format by default.
Replication channel commands
Synopsis
dse advrep channel command [sub_command] [sub_command_options]
To show the command line help for dse advrep channel
:
dse advrep help channel
Command and command arguments for:
dse advrep channel sub_command [sub_command_options]
Sub-command | Sub-command options |
---|---|
Create a replication channel for a keyspace:
|
|
Update a replication channel for a keyspace:
|
|
|
Delete replication channel:
|
|
Pause replication channel for a keyspace:
|
|
Resume replication for a paused channel:
|
Destination commands
Synopsis
dse advrep destination [sub_command] [sub_command_options]
To show the command line help for dse advrep destination
:
dse advrep help destination
Commands and command arguments for edge configuration and replication:
dse advrep destination sub_command [sub_command_options]
Command | Command arguments |
---|---|
|
Create a channel from a keyspace source table to a destination cluster:
|
|
Update a channel from a keyspace source table to a destination cluster:
|
|
Delete destination:
|
|
List the destination configuration:
|
Remove configuration for a channel from a keyspace source table to a destination cluster:
|
|
|
List the destination - no options |
Configuration commands
Synopsis
dse advrep conf [sub_command] [sub_command_options]
To show the command line help for dse advrep conf
:
dse advrep help conf
Commands and command arguments for configuration:
dse advrep conf sub_command [sub_command_options]
Command | Command arguments |
---|---|
|
Update the configuration:
|
|
Remove configuration:
|
List the configuration - no options |
Metrics
Display metrics from the command line once JMX access is configured:
dse advrep metrics
To show the command line help for dse advrep metrics
:
dse advrep help metrics
Command options for:
dse advrep metrics list [sub_command_options]
Command | Command options |
---|---|
|
|
Replication log commands
Display replication log information from the command line.
dse advrep replog
To show the command line help for dse advrep replog
:
dse advrep help replog
Command options for:
dse advrep replog sub_command [sub_command_options]
Command | Command options |
---|---|
|
|
|
|
Replication command examples
The dse advrep channel
command line tool examples and results:
- Creating a destination
dse advrep --verbose destination create --name mydest --addresses 10.200.182.148 --transmission-enabled true
Destination mydest created
- Creating a replication source channel
dse advrep channel create --source-keyspace foo --source-table bar --source-id source1 --source-id-column source_id --destination mydest --destination-keyspace foo --destination-table bar --collection-enabled true --priority 1
Created channel dc=Cassandra keyspace=foo table=bar to mydest
- Viewing a replication source channel status
dse advrep channel status
------------------------------------------------------------------------------------------------------------------------------------------------------
|dc |keyspace|table |collecting|transmitting|replication order|priority|dest ks|dest table |src id |src id col|dest |dest enabled|
------------------------------------------------------------------------------------------------------------------------------------------------------
|Cassandra|foo |bar |true |false |FIFO |1 |foo |bar |source1|source_id |mydest|true |
------------------------------------------------------------------------------------------------------------------------------------------------------
- Removing a destination channel
dse advrep delete --name mydest
- Removing a replication source channel
dse advrep delete --source-keyspace foo --source-table bar --destination mydest
- Resuming collection from a source to a destination
dse advrep channel resume --source-keyspace foo --source-table bar --destinations mydest --collection
Channel dc=Cassandra keyspace=foo table=bar collection to mydest was resumed
- Resuming transmission from a source to a destination
dse advrep channel resume --source-keyspace foo --source-table bar --destinations mydest --transmission
Channel dc=Cassandra keyspace=foo table=bar transmission to mydest was resumed
- Pausing transmission from a source to a destination
-
The replication is stopped for the entire edge cluster. Specify the IP address of any node on the edge.
dse advrep channel pause --source-keyspace foo --source-table bar --destinations mydest --transmission Channel dc=Cassandra keyspace=foo table=bar transmission to mydest was paused
- Verifying the record count held in the replication log
dse advrep replog count --destination mydest --source-keyspace foo --source-table bar
2
Metrics command examples
The dse advrep metrics
command line tool examples and results.
- Show all metrics
dse advrep --host localhost --port 7199 metrics list
-----------------------------------------------
|Group |Type |Count|
-----------------------------------------------
|ReplicationLog|CommitLogsToConsume |1 |
-----------------------------------------------
|ReplicationLog|MessageAddErrors |0 |
-----------------------------------------------
|Tables |MessagesInReplicationLog|0 |
-----------------------------------------------
|ReplicationLog|CommitLogsDeleted |2 |
-----------------------------------------------
-----------------------------------------------------------------------------------------------------------------------------------------------------
|Group |Type |Count|RateUnit |MeanRate |FifteenMinuteRate |OneMinuteRate |FiveMinuteRate |
-----------------------------------------------------------------------------------------------------------------------------------------------------
|ReplicationLog|MessagesAdded |4 |events/second|2.640169784463287E-4 |3.5260944599250134E-10|1.5526670553919196E-107|7.437289948631685E-24|
-----------------------------------------------------------------------------------------------------------------------------------------------------
|ReplicationLog|MessagesDeleted |0 |events/second|0.0 |0.0 |0.0 |0.0 |
-----------------------------------------------------------------------------------------------------------------------------------------------------
|ReplicationLog|MessagesAcknowledged |4 |events/second|2.6401646866982826E-4|3.802761115744516E-10 |4.967788987385306E-107 |9.354595245515022E-24|
-----------------------------------------------------------------------------------------------------------------------------------------------------
|ReplicationLog|CommitLogMessagesRead|3551 |events/second|0.23438054858983395 |0.28481365017306315 |0.2547432175113809 |0.30189617888098824 |
-----------------------------------------------------------------------------------------------------------------------------------------------------
- Filter by group
dse advrep --host localhost --port 7199 metrics list --metric-group Tables
---------------------------------------
|Group |Type |Count|
---------------------------------------
|Tables|MessagesInReplicationLog|0 |
---------------------------------------
- Filter by group and type
dse advrep --host localhost --port 7199 metrics list --metric-type MessagesAdded
--------------------------------------------------------------------------------------------------------------------------------------------
|Group |Type |Count|RateUnit |MeanRate |FifteenMinuteRate |OneMinuteRate |FiveMinuteRate |
--------------------------------------------------------------------------------------------------------------------------------------------
|ReplicationLog|MessagesAdded|4 |events/second|2.6221009715537605E-4|3.1552879575422323E-10|2.932609260931711E-108|5.329051114010331E-24|
--------------------------------------------------------------------------------------------------------------------------------------------