Big Data Oracle NoSQL in No Time - Smoke Testing Part 6
Index
Big Data Oracle NoSQL in No Time - Getting Started Part 1
Big Data Oracle NoSQL in No Time - Startup & Shutdown Part 2
Big Data Oracle NoSQL in No Time - Setting up 1x1 Topology Part 3
Big Data Oracle NoSQL in No Time - Expanding 1x1 to 3x1 Topology Part 4
Big Data Oracle NoSQL in No Time - From 3x1 to 3x3 Topology Part 5
Big Data Oracle NoSQL in No Time - Smoke Testing Part 6
Big Data Oracle NoSQL in No Time - Increasing Throughput Read/Write Part 7
Big Data Oracle NoSQL in No Time - It is time to Upgrade
Big Data Oracle NoSQL in No Time - It is time to Load Data for a Simple Use Case
Oracle NoSQL can be smoke tested in different ways but the most common one is the ping command and a simple java program.
Customers can design their own somke testing program as needed.
Let us compile what is in the documentation
$ export KVBASE=/oraclenosql/lab
$ export KVHOME=$KVBASE/server1/oraclesoftware/kv-2.0.39
$ cd $KVHOME
$ javac -cp lib/kvclient.jar:examples examples/hello/*.java
$ java -cp $KVHOME/lib/kvclient.jar:$KVHOME/examples hello.HelloBigDataWorld -port 5000 -host server1 -store mystore
Hello Big Data World!
$
With all the three storage nodes up and running the below is the output of ping command and the java program
$ export KVHOME=$KVBASE/server1/oraclesoftware/kv-2.0.39
$ java -jar $KVHOME/lib/kvstore.jar ping -port 5000 -host server1
Pinging components of store mystore based upon topology sequence #67
mystore comprises 30 partitions and 3 Storage Nodes
Storage Node [sn1] on server1:5000 Datacenter: datacenter1 [dc1] Status: RUNNING Ver: 11gR2.2.0.39 2013-04-23 08:30:07 UTC Build id: b205fb13eb4e
Rep Node [rg1-rn1] Status: RUNNING,MASTER at sequence number: 255 haPort: 5011
Rep Node [rg3-rn2] Status: RUNNING,REPLICA at sequence number: 135 haPort: 5013
Rep Node [rg2-rn2] Status: RUNNING,REPLICA at sequence number: 135 haPort: 5012
Storage Node [sn2] on server2:5100 Datacenter: datacenter1 [dc1] Status: RUNNING Ver: 11gR2.2.0.39 2013-04-23 08:30:07 UTC Build id: b205fb13eb4e
Rep Node [rg3-rn3] Status: RUNNING,REPLICA at sequence number: 135 haPort: 5112
Rep Node [rg1-rn2] Status: RUNNING,REPLICA at sequence number: 255 haPort: 5111
Rep Node [rg2-rn1] Status: RUNNING,MASTER at sequence number: 135 haPort: 5110
Storage Node [sn3] on server3:5200 Datacenter: datacenter1 [dc1] Status: RUNNING Ver: 11gR2.2.0.39 2013-04-23 08:30:07 UTC Build id: b205fb13eb4e
Rep Node [rg3-rn1] Status: RUNNING,MASTER at sequence number: 135 haPort: 5210
Rep Node [rg2-rn3] Status: RUNNING,REPLICA at sequence number: 135 haPort: 5212
Rep Node [rg1-rn3] Status: RUNNING,REPLICA at sequence number: 255 haPort: 5211
$
$ java -cp $KVHOME/lib/kvclient.jar:$KVHOME/examples hello.HelloBigDataWorld -port 5000 -host server1 -store mystore
Hello Big Data World!
$
Let us take down the third storage node. You will see the ping confirming that the third storage node is unreachable and the java program works fine with the storage nodes.
$ export KVHOME=$KVBASE//server3/oraclesoftware/kv-2.0.39
$ java -jar $KVHOME/lib/kvstore.jar stop -root $KVBASE//server3/storage
$
$ export KVHOME=$KVBASE//server1/oraclesoftware/kv-2.0.39
$ java -jar $KVHOME/lib/kvstore.jar ping -port 5000 -host server1
Pinging components of store mystore based upon topology sequence #67
mystore comprises 30 partitions and 3 Storage Nodes
Storage Node [sn1] on server1:5000 Datacenter: datacenter1 [dc1] Status: RUNNING Ver: 11gR2.2.0.39 2013-04-23 08:30:07 UTC Build id: b205fb13eb4e
Rep Node [rg1-rn1] Status: RUNNING,MASTER at sequence number: 255 haPort: 5011
Rep Node [rg3-rn2] Status: RUNNING,REPLICA at sequence number: 137 haPort: 5013
Rep Node [rg2-rn2] Status: RUNNING,REPLICA at sequence number: 135 haPort: 5012
Storage Node [sn2] on server2:5100 Datacenter: datacenter1 [dc1] Status: RUNNING Ver: 11gR2.2.0.39 2013-04-23 08:30:07 UTC Build id: b205fb13eb4e
Rep Node [rg3-rn3] Status: RUNNING,MASTER at sequence number: 137 haPort: 5112
Rep Node [rg1-rn2] Status: RUNNING,REPLICA at sequence number: 255 haPort: 5111
Rep Node [rg2-rn1] Status: RUNNING,MASTER at sequence number: 135 haPort: 5110
Storage Node [sn3] on server3:5200 Datacenter: datacenter1 [dc1] UNREACHABLE
Rep Node [rg3-rn1] Status: UNREACHABLE
Rep Node [rg2-rn3] Status: UNREACHABLE
Rep Node [rg1-rn3] Status: UNREACHABLE
$
$ java -cp $KVHOME/lib/kvclient.jar:$KVHOME/examples hello.HelloBigDataWorld -port 5000 -host server1 -store mystore
Hello Big Data World!
$
Let us take down the second storage node. With this we are up and running with one storage node and two are down.
It is very clear from the java program that the nosql store is not functional because the default commit policy is simple majority which requires two replicas.
$ export KVHOME=$KVBASE//server2/oraclesoftware/kv-2.0.39
$ java -jar $KVHOME/lib/kvstore.jar stop -root $KVBASE//server2/storage
$
$ export KVHOME=$KVBASE//server1/oraclesoftware/kv-2.0.39
$ java -jar $KVHOME/lib/kvstore.jar ping -port 5000 -host server1
Pinging components of store mystore based upon topology sequence #67
mystore comprises 30 partitions and 3 Storage Nodes
Storage Node [sn1] on server1:5000 Datacenter: datacenter1 [dc1] Status: RUNNING Ver: 11gR2.2.0.39 2013-04-23 08:30:07 UTC Build id: b205fb13eb4e
Rep Node [rg1-rn1] Status: RUNNING,MASTER at sequence number: 257 haPort: 5011
Rep Node [rg3-rn2] Status: RUNNING,UNKNOWN at sequence number: 137 haPort: 5013
Rep Node [rg2-rn2] Status: RUNNING,UNKNOWN at sequence number: 135 haPort: 5012
Storage Node [sn2] on server2:5100 Datacenter: datacenter1 [dc1] UNREACHABLE
Rep Node [rg3-rn3] Status: UNREACHABLE
Rep Node [rg1-rn2] Status: UNREACHABLE
Rep Node [rg2-rn1] Status: UNREACHABLE
Storage Node [sn3] on server3:5200 Datacenter: datacenter1 [dc1] UNREACHABLE
Rep Node [rg3-rn1] Status: UNREACHABLE
Rep Node [rg2-rn3] Status: UNREACHABLE
Rep Node [rg1-rn3] Status: UNREACHABLE
$
$ java -cp $KVHOME/lib/kvclient.jar:$KVHOME/examples hello.HelloBigDataWorld -port 5000 -host server1 -store mystore
oracle.kv.DurabilityException: (JE 5.0.74) Commit policy: SIMPLE_MAJORITY required 2 replicas. But none were active with this master. (11.2.2.0.39)
Fault class name: com.sleepycat.je.rep.InsufficientReplicasException
Remote stack trace: com.sleepycat.je.rep.InsufficientReplicasException: (JE 5.0.74) Commit policy: SIMPLE_MAJORITY required 2 replicas. But none were active with this master.
$
By bring up storage nodes 2 & 3 our store is operational.
$ export KVHOME=$KVBASE//server3/oraclesoftware/kv-2.0.39
$ nohup java -jar $KVHOME/lib/kvstore.jar start -root $KVBASE//server3/storage &
$ export KVHOME=$KVBASE//server2/oraclesoftware/kv-2.0.39
$ nohup java -jar $KVHOME/lib/kvstore.jar start -root $KVBASE//server2/storage &
$ java -jar $KVHOME/lib/kvstore.jar ping -port 5000 -host server1
Pinging components of store mystore based upon topology sequence #67
mystore comprises 30 partitions and 3 Storage Nodes
Storage Node [sn1] on server1:5000 Datacenter: datacenter1 [dc1] Status: RUNNING Ver: 11gR2.2.0.39 2013-04-23 08:30:07 UTC Build id: b205fb13eb4e
Rep Node [rg1-rn1] Status: RUNNING,REPLICA at sequence number: 265 haPort: 5011
Rep Node [rg3-rn2] Status: RUNNING,MASTER at sequence number: 141 haPort: 5013
Rep Node [rg2-rn2] Status: RUNNING,REPLICA at sequence number: 141 haPort: 5012
Storage Node [sn2] on server2:5100 Datacenter: datacenter1 [dc1] Status: RUNNING Ver: 11gR2.2.0.39 2013-04-23 08:30:07 UTC Build id: b205fb13eb4e
Rep Node [rg3-rn3] Status: RUNNING,REPLICA at sequence number: 141 haPort: 5112
Rep Node [rg1-rn2] Status: RUNNING,REPLICA at sequence number: 265 haPort: 5111
Rep Node [rg2-rn1] Status: RUNNING,REPLICA at sequence number: 141 haPort: 5110
Storage Node [sn3] on server3:5200 Datacenter: datacenter1 [dc1] Status: RUNNING Ver: 11gR2.2.0.39 2013-04-23 08:30:07 UTC Build id: b205fb13eb4e
Rep Node [rg3-rn1] Status: RUNNING,REPLICA at sequence number: 141 haPort: 5210
Rep Node [rg2-rn3] Status: RUNNING,MASTER at sequence number: 141 haPort: 5212
Rep Node [rg1-rn3] Status: RUNNING,MASTER at sequence number: 265 haPort: 5211
$
$ export KVHOME=$KVBASE//server1/oraclesoftware/kv-2.0.39
$ java -cp $KVHOME/lib/kvclient.jar:$KVHOME/examples hello.HelloBigDataWorld -port 5000 -host server1 -store mystore
Hello Big Data World!
$
Index
Big Data Oracle NoSQL in No Time - Getting Started Part 1
Big Data Oracle NoSQL in No Time - Startup & Shutdown Part 2
Big Data Oracle NoSQL in No Time - Setting up 1x1 Topology Part 3
Big Data Oracle NoSQL in No Time - Expanding 1x1 to 3x1 Topology Part 4
Big Data Oracle NoSQL in No Time - From 3x1 to 3x3 Topology Part 5
Big Data Oracle NoSQL in No Time - Smoke Testing Part 6
Big Data Oracle NoSQL in No Time - Increasing Throughput Read/Write Part 7
Big Data Oracle NoSQL in No Time - It is time to Upgrade
Big Data Oracle NoSQL in No Time - It is time to Load Data for a Simple Use Case
Oracle NoSQL can be smoke tested in different ways but the most common one is the ping command and a simple java program.
Customers can design their own somke testing program as needed.
Let us compile what is in the documentation
$ export KVBASE=/oraclenosql/lab
$ export KVHOME=$KVBASE/server1/oraclesoftware/kv-2.0.39
$ cd $KVHOME
$ javac -cp lib/kvclient.jar:examples examples/hello/*.java
$ java -cp $KVHOME/lib/kvclient.jar:$KVHOME/examples hello.HelloBigDataWorld -port 5000 -host server1 -store mystore
Hello Big Data World!
$
With all the three storage nodes up and running the below is the output of ping command and the java program
$ export KVHOME=$KVBASE/server1/oraclesoftware/kv-2.0.39
$ java -jar $KVHOME/lib/kvstore.jar ping -port 5000 -host server1
Pinging components of store mystore based upon topology sequence #67
mystore comprises 30 partitions and 3 Storage Nodes
Storage Node [sn1] on server1:5000 Datacenter: datacenter1 [dc1] Status: RUNNING Ver: 11gR2.2.0.39 2013-04-23 08:30:07 UTC Build id: b205fb13eb4e
Rep Node [rg1-rn1] Status: RUNNING,MASTER at sequence number: 255 haPort: 5011
Rep Node [rg3-rn2] Status: RUNNING,REPLICA at sequence number: 135 haPort: 5013
Rep Node [rg2-rn2] Status: RUNNING,REPLICA at sequence number: 135 haPort: 5012
Storage Node [sn2] on server2:5100 Datacenter: datacenter1 [dc1] Status: RUNNING Ver: 11gR2.2.0.39 2013-04-23 08:30:07 UTC Build id: b205fb13eb4e
Rep Node [rg3-rn3] Status: RUNNING,REPLICA at sequence number: 135 haPort: 5112
Rep Node [rg1-rn2] Status: RUNNING,REPLICA at sequence number: 255 haPort: 5111
Rep Node [rg2-rn1] Status: RUNNING,MASTER at sequence number: 135 haPort: 5110
Storage Node [sn3] on server3:5200 Datacenter: datacenter1 [dc1] Status: RUNNING Ver: 11gR2.2.0.39 2013-04-23 08:30:07 UTC Build id: b205fb13eb4e
Rep Node [rg3-rn1] Status: RUNNING,MASTER at sequence number: 135 haPort: 5210
Rep Node [rg2-rn3] Status: RUNNING,REPLICA at sequence number: 135 haPort: 5212
Rep Node [rg1-rn3] Status: RUNNING,REPLICA at sequence number: 255 haPort: 5211
$
$ java -cp $KVHOME/lib/kvclient.jar:$KVHOME/examples hello.HelloBigDataWorld -port 5000 -host server1 -store mystore
Hello Big Data World!
$
Let us take down the third storage node. You will see the ping confirming that the third storage node is unreachable and the java program works fine with the storage nodes.
$ export KVHOME=$KVBASE//server3/oraclesoftware/kv-2.0.39
$ java -jar $KVHOME/lib/kvstore.jar stop -root $KVBASE//server3/storage
$
$ export KVHOME=$KVBASE//server1/oraclesoftware/kv-2.0.39
$ java -jar $KVHOME/lib/kvstore.jar ping -port 5000 -host server1
Pinging components of store mystore based upon topology sequence #67
mystore comprises 30 partitions and 3 Storage Nodes
Storage Node [sn1] on server1:5000 Datacenter: datacenter1 [dc1] Status: RUNNING Ver: 11gR2.2.0.39 2013-04-23 08:30:07 UTC Build id: b205fb13eb4e
Rep Node [rg1-rn1] Status: RUNNING,MASTER at sequence number: 255 haPort: 5011
Rep Node [rg3-rn2] Status: RUNNING,REPLICA at sequence number: 137 haPort: 5013
Rep Node [rg2-rn2] Status: RUNNING,REPLICA at sequence number: 135 haPort: 5012
Storage Node [sn2] on server2:5100 Datacenter: datacenter1 [dc1] Status: RUNNING Ver: 11gR2.2.0.39 2013-04-23 08:30:07 UTC Build id: b205fb13eb4e
Rep Node [rg3-rn3] Status: RUNNING,MASTER at sequence number: 137 haPort: 5112
Rep Node [rg1-rn2] Status: RUNNING,REPLICA at sequence number: 255 haPort: 5111
Rep Node [rg2-rn1] Status: RUNNING,MASTER at sequence number: 135 haPort: 5110
Storage Node [sn3] on server3:5200 Datacenter: datacenter1 [dc1] UNREACHABLE
Rep Node [rg3-rn1] Status: UNREACHABLE
Rep Node [rg2-rn3] Status: UNREACHABLE
Rep Node [rg1-rn3] Status: UNREACHABLE
$
$ java -cp $KVHOME/lib/kvclient.jar:$KVHOME/examples hello.HelloBigDataWorld -port 5000 -host server1 -store mystore
Hello Big Data World!
$
Let us take down the second storage node. With this we are up and running with one storage node and two are down.
It is very clear from the java program that the nosql store is not functional because the default commit policy is simple majority which requires two replicas.
$ export KVHOME=$KVBASE//server2/oraclesoftware/kv-2.0.39
$ java -jar $KVHOME/lib/kvstore.jar stop -root $KVBASE//server2/storage
$
$ export KVHOME=$KVBASE//server1/oraclesoftware/kv-2.0.39
$ java -jar $KVHOME/lib/kvstore.jar ping -port 5000 -host server1
Pinging components of store mystore based upon topology sequence #67
mystore comprises 30 partitions and 3 Storage Nodes
Storage Node [sn1] on server1:5000 Datacenter: datacenter1 [dc1] Status: RUNNING Ver: 11gR2.2.0.39 2013-04-23 08:30:07 UTC Build id: b205fb13eb4e
Rep Node [rg1-rn1] Status: RUNNING,MASTER at sequence number: 257 haPort: 5011
Rep Node [rg3-rn2] Status: RUNNING,UNKNOWN at sequence number: 137 haPort: 5013
Rep Node [rg2-rn2] Status: RUNNING,UNKNOWN at sequence number: 135 haPort: 5012
Storage Node [sn2] on server2:5100 Datacenter: datacenter1 [dc1] UNREACHABLE
Rep Node [rg3-rn3] Status: UNREACHABLE
Rep Node [rg1-rn2] Status: UNREACHABLE
Rep Node [rg2-rn1] Status: UNREACHABLE
Storage Node [sn3] on server3:5200 Datacenter: datacenter1 [dc1] UNREACHABLE
Rep Node [rg3-rn1] Status: UNREACHABLE
Rep Node [rg2-rn3] Status: UNREACHABLE
Rep Node [rg1-rn3] Status: UNREACHABLE
$
$ java -cp $KVHOME/lib/kvclient.jar:$KVHOME/examples hello.HelloBigDataWorld -port 5000 -host server1 -store mystore
oracle.kv.DurabilityException: (JE 5.0.74) Commit policy: SIMPLE_MAJORITY required 2 replicas. But none were active with this master. (11.2.2.0.39)
Fault class name: com.sleepycat.je.rep.InsufficientReplicasException
Remote stack trace: com.sleepycat.je.rep.InsufficientReplicasException: (JE 5.0.74) Commit policy: SIMPLE_MAJORITY required 2 replicas. But none were active with this master.
$
By bring up storage nodes 2 & 3 our store is operational.
$ export KVHOME=$KVBASE//server3/oraclesoftware/kv-2.0.39
$ nohup java -jar $KVHOME/lib/kvstore.jar start -root $KVBASE//server3/storage &
$ export KVHOME=$KVBASE//server2/oraclesoftware/kv-2.0.39
$ nohup java -jar $KVHOME/lib/kvstore.jar start -root $KVBASE//server2/storage &
$ java -jar $KVHOME/lib/kvstore.jar ping -port 5000 -host server1
Pinging components of store mystore based upon topology sequence #67
mystore comprises 30 partitions and 3 Storage Nodes
Storage Node [sn1] on server1:5000 Datacenter: datacenter1 [dc1] Status: RUNNING Ver: 11gR2.2.0.39 2013-04-23 08:30:07 UTC Build id: b205fb13eb4e
Rep Node [rg1-rn1] Status: RUNNING,REPLICA at sequence number: 265 haPort: 5011
Rep Node [rg3-rn2] Status: RUNNING,MASTER at sequence number: 141 haPort: 5013
Rep Node [rg2-rn2] Status: RUNNING,REPLICA at sequence number: 141 haPort: 5012
Storage Node [sn2] on server2:5100 Datacenter: datacenter1 [dc1] Status: RUNNING Ver: 11gR2.2.0.39 2013-04-23 08:30:07 UTC Build id: b205fb13eb4e
Rep Node [rg3-rn3] Status: RUNNING,REPLICA at sequence number: 141 haPort: 5112
Rep Node [rg1-rn2] Status: RUNNING,REPLICA at sequence number: 265 haPort: 5111
Rep Node [rg2-rn1] Status: RUNNING,REPLICA at sequence number: 141 haPort: 5110
Storage Node [sn3] on server3:5200 Datacenter: datacenter1 [dc1] Status: RUNNING Ver: 11gR2.2.0.39 2013-04-23 08:30:07 UTC Build id: b205fb13eb4e
Rep Node [rg3-rn1] Status: RUNNING,REPLICA at sequence number: 141 haPort: 5210
Rep Node [rg2-rn3] Status: RUNNING,MASTER at sequence number: 141 haPort: 5212
Rep Node [rg1-rn3] Status: RUNNING,MASTER at sequence number: 265 haPort: 5211
$
$ export KVHOME=$KVBASE//server1/oraclesoftware/kv-2.0.39
$ java -cp $KVHOME/lib/kvclient.jar:$KVHOME/examples hello.HelloBigDataWorld -port 5000 -host server1 -store mystore
Hello Big Data World!
$