Deploy the data store
In each region in the Multi-Region NoSQL Database setup, you must
deploy its own data store independently.
Steps:
To deploy the data store:
- Follow the instructions given in Configuring your data store installation.
- After deploying the data store of your desired topology, you can
check the health of the data store by executing the
ping
command from the command line interface.[~]$ java -jar $KVHOME/lib/kvstore.jar ping -port <port number> -host <host name>
- You can also verify the topology of the data store by executing the
show topology
command from thekv
prompt. See show topology.kv-> show topology
Example:
For the use case under discussion, you must set up data stores for the two regions proposed.
# Connect to the data stores deployed at host1, host2, and host3 from the kv prompt
[~]$java -jar $KVHOME/lib/kvstore.jar runadmin \
-helper-hosts host1:5000,host2:5000,host3:5000
# View the topology of the data store
kv-> show topology
store=mrtstore numPartitions=1000 sequence=1008
zn: id=zn1 name=zn1 repFactor=3 type=PRIMARY allowArbiters=false masterAffinity=false
sn=[sn1] zn:[id=zn1 name=zn1] host1:5000 capacity=1 RUNNING
[rg1-rn1] RUNNING
single-op avg latency=0.8630216 ms multi-op avg latency=1.7694647 ms
sn=[sn2] zn:[id=zn1 name=zn1] host2:5000 capacity=1 RUNNING
[rg1-rn2] RUNNING
single-op avg latency=0.0 ms multi-op avg latency=2.0211697 ms
sn=[sn3] zn:[id=zn1 name=zn1] host3:5000 capacity=1 RUNNING
[rg1-rn3] RUNNING
single-op avg latency=0.0 ms multi-op avg latency=1.8524266 ms
numShards=1
shard=[rg1] num partitions=1000
[rg1-rn1] sn=sn1
[rg1-rn2] sn=sn2
[rg1-rn3] sn=sn3
# Connect to the data store deployed at host4, host5, and host6 from the kv prompt
[~]$java -jar $KVHOME/lib/kvstore.jar runadmin \
-helper-hosts host4:5000,host5:5000,host6:5000
# View the topology of the data store
kv-> show topology
store=mrtstore numPartitions=1000 sequence=1008
zn: id=zn1 name=zn1 repFactor=3 type=PRIMARY allowArbiters=false masterAffinity=false
sn=[sn1] zn:[id=zn1 name=zn1] host4:5000 capacity=1 RUNNING
[rg1-rn1] RUNNING
single-op avg latency=0.7519707 ms multi-op avg latency=2.000658 ms
sn=[sn2] zn:[id=zn1 name=zn1] host5:5000 capacity=1 RUNNING
[rg1-rn2] RUNNING
single-op avg latency=0.0 ms multi-op avg latency=3.2067895 ms
sn=[sn3] zn:[id=zn1 name=zn1] host6:5000 capacity=1 RUNNING
[rg1-rn3] RUNNING
single-op avg latency=0.0 ms multi-op avg latency=1.9516457 ms
numShards=1
shard=[rg1] num partitions=1000
[rg1-rn1] sn=sn1
[rg1-rn2] sn=sn2
[rg1-rn3] sn=sn3