dse advrep command line tool
Options and command arguments for the DSE Advanced Replication command line tool.
The command line tool provides commands and options for configuring and using DSE Advanced Replication.
Prerequisites
- Cassandra Python driver
- click package
sudo apt-get install g++ python-dev -y $ sudo pip install cassandra-driverOn Red Hat and CentOS:
sudo yum install gcc-c++ -y $ sudo yum install python-devel # might not be needed $ sudo pip install cassandra-driver
DSE Advanced Replication commands
- Command options for all commands
- Client to Cassandra connection commands
- Replication channel commands
- Edge configuration and replication commands
- Metrics commands
DSE Advanced Replication command options
$ dse [connection_options] edge [command_arguments]
dse
advrep
:dse advrep --help
dse advrep
:dse advrep -qYou can provide authentication credentials in several ways, see Credentials for authentication.
Client to Cassandra connection commands
dse advrep [connection_options]
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. The default value is localhost. |
--port port |
The Cassandra native protocol RPC connection port. |
--ssl-enabled
true|false |
Specify whether SSL is enabled for connection to Cassandra. |
--ssl-protocol ssl_protocol |
SSL protocol for connection to Cassandra when SSL is enabled. |
--cipher-suites ssl_cipher_suites |
A comma-separated list of SSL cipher suites for connection to Cassandra when SSL is
enabled. For example, --cipher-suites=c1,c2,c3 . |
--kerberos-enabled
true|false |
true|false - If true, enable Kerberos for
connection to Cassandra. For example, --kerberos-enabled true . |
--keystore-password ssl_keystore_password |
Keystore password for connection to Cassandra when SSL client authentication is enabled. |
--keystore-path ssl_keystore_path |
Set path to the keystore for connection to Cassandra when SSL client authentication is enabled. |
--keystore-type ssl_keystore_type |
Set keystore type for connection to Cassandra when SSL client authentication is enabled. |
--truststore-password
ssl_truststore_password |
Set the truststore password for connection to Cassandra when SSL is enabled. |
--truststore-path ssl_truststore_path |
Set path to truststore for connection to Cassandra when SSL is enabled. |
--truststore-type ssl_truststore_type |
Set truststore type for connection to Cassandra when SSL is enabled. |
--sasl-protocol-name
dse_service_principal |
The SASL protocol name must match the username of the Kerberos service principal used by the DSE server. |
--ssl |
Enable SSL encryption. |
dse advrep --host ip-10-200-300-138.example.lan --kerberos-enabled=true edge list-conf
dse advrep --ssl edge list-conf
dse advrep --use-server-config edge list-conf
Edge-to-hub replication channel commands
dse advrep edge channel command [command_arguments]
dse advrep edge
channel
:dse advrep edge channel --help
dse advrep edge channel command [command_arguments]
Command | Command arguments |
---|---|
create |
Create a replication channel for a
keyspace:
--hub-keyspace
hub_keyspace_name
(required)
|
conf |
Update a replication channel for a
keyspace:
|
pause |
Pause replication channel for a
keyspace:
|
resume |
Resume replication channel for a
keyspace.
|
status |
Verify status of replication channel. |
delete |
Delete replication channel. |
Edge configuration and replication commands
dse advrep edge conf [command_arguments]
dse advrep edge
conf
:dse advrep edge conf --help
dse advrep edge command [command_arguments]
Command | Command arguments |
---|---|
conf |
Configure the edge to point to its hub. The edge conf command
requires a restart of the edge node. For details, see dse advrep edge conf
configuration key
descriptions.
|
list-conf |
List all configuration values for this edge. |
start |
Start edge replication to hub. |
stop |
Stop edge replication to hub. |
rl-count |
Verify how many records are held in the replication log. |
status |
Verify status of edge replication to hub. |
Metrics
dse advrep edge metricsTo show the command line help for
dse advrep
edge metrics
:dse advrep edge metrics --help
dse advrep edge metrics
Command | Command options |
---|---|
metrics |
[--no-pretty-print] Output data as a comma-separated list. Default:
tabular output. |
[--separator field_separator] Text. Specify only
with the --no-pretty-print option to specify a separator other than the
default comma (,) separator. |
|
[--metric-type filter_by_type] |
|
[--metric-group filter_by_group] |
|
[--timeout seconds] Timeout in seconds to wait
for a connection. Default: 5 |
|
[--jmx-user JMX_username] |
|
[--jmx-pwd JMX_password] |
|
[--help] |
Replication command examples
dse advrep edge replication channel
command line tool examples and results:- Creating an edge replication channel
-
dse advrep edge channel create --keyspace foo --table bar --hub-keyspace foo --hub-table bar --priority 1 --edge-id edge1 --edge-id-col-name edge_id --enabled Created Replication Channel foo:bar $ dse advrep edge channel status keyspace_name | table_name | edge_id | edge_id_col_name | enabled | hub_keyspace_name | hub_table_name | ... ---------------------------------------------------------------------------------------------------------... foo | bar | edge1 | edge_id | True | foo | bar | ...
- Configuring an edge replication channel
-
dse advrep edge conf --edge-id "edge1" --edge-id-col-name "edge_id" --hub-ip-addresses "10.200.177.184" Set replication config edge_id_col_name from None to edge_id Set replication config hub_ip_addresses from None to 10.200.177.184 Set replication config edge_id from None to edge1
- Viewing an edge replication channel configuration
-
dse advrep edge list-conf field | value -------------------------------- edge_id | edge1 hub_ip_addresses | 10.200.181.55 edge_id_col_name | edge_id
- Removing an edge replication channel configuration
dse advrep edge remove-conf config_to_remove
Specify one or more channel configuration properties to remove.For example, to remove the driver configuration:dse advrep edge remove-conf --driver_user Removed replication config driver_user value was my_hub_user
- Starting replication from edge to hub and verifying status
-
dse advrep edge start edge replication started $ dse advrep edge status edge replication is running
- Stopping replication from edge to hub
- The replication is stopped for the entire edge cluster. Specify the IP address of any node
on the edge.
dse advrep -q --host 192.168.3.10 edge stop edge replication stopped
- Verifying the record count held in the replication log
-
dse advrep edge rl-count
Metrics command examples
dse advrep edge metrics
command line tool examples and results. - Show all metrics
-
dse advrep --host localhost --port 7199 -q edge metrics Group | Type | Count ------------------------------------------------- ReplicationLogConsumer | Errors | 0 ReplicationChannel | ReloadErrors | 1 ReplicationChannel | DeliveryErrors | 0 ReplicationLog | MessageAddErrors | 0 Group | Type | Count | RateUnit | MeanRate | FifteenMinuteRate | Count | OneMinuteRate | ...
- Filter by group
-
dse advrep --host localhost --port 7199 -q edge metrics --metric-group ReplicationChannel
- Filter by group and type
-
dse advrep --host localhost --port 7199 -q edge metrics --metric-group ReplicationChannel --metric-type ReloadErrors Group | Type | Count ----------------------------------------- ReplicationChannel | ReloadErrors | 1