Skip to content

Instantly share code, notes, and snippets.

@nsabharwal
Last active October 1, 2016 22:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nsabharwal/4f0fa60ee25dfdf56756708f4b09dc3b to your computer and use it in GitHub Desktop.
Save nsabharwal/4f0fa60ee25dfdf56756708f4b09dc3b to your computer and use it in GitHub Desktop.
cassandra advrep
##Start cluster
/Users/neeraj/dse/bin/dse cassandra
## - Stop cluster
/Users/neeraj/dse/bin/dse cassandra-stop
## enable advanced replication
vi /Users/neeraj/dse/resources/dse/conf/dse.yaml
./nodetool status
export CQLSH_HOST=192.168.1.185
./cqlsh
# run this in edge and hub cluster
create keyspace foo with replication = {'class': 'SimpleStrategy', 'replication_factor':1};
create table foo.bar (name text, val text, scalar int, primary key (name));
DESCRIBE keyspaces;
##
./dse advrep --host 192.168.1.185 edge conf --edge-id "edge1" --edge-id-col-name "edge_id" --hub-ip-addresses "52.x.x.x"
./dse advrep --host 192.168.1.185 edge list-conf
##Create replication channel : A replication channel is a defined channel of change data
##between edge clusters and hub clusters.
dse advrep --host 192.168.1.185 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
./dse advrep --host 192.168.1.185 edge channel status
dse advrep --host 192.168.1.185 edge channel status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment