Thursday, April 10, 2014

Big Data Oracle NoSQL in No Time - From 3x1 to 3x3 Topology Part 5

Big Data Oracle NoSQL in No Time - From 3x1 to 3x3 Topology Part 5

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

With the current 3x1 setup the NoSQL store is write efficient. In order to make it read efficient the replication factor has to be increased which internally creates more copies of the data to improve performance.

In the below scenario we are going to increase the replication from 1 to 3 to the  existing topology to make it read friendly.


export KVHOME=$KVBASE/server1/oraclesoftware/kv-2.0.39
java -jar $KVHOME/lib/kvstore.jar runadmin -port 5000 -host server1
kv-> show topology
store=mystore  numPartitions=30 sequence=60
  dc=[dc1] name=datacenter1 repFactor=1

  sn=[sn1]  dc=dc1 server1:5000 capacity=1 RUNNING
    [rg1-rn1] RUNNING
          No performance info available
  sn=[sn2]  dc=dc1 server2:5100 capacity=1 RUNNING
    [rg2-rn1] RUNNING
          No performance info available
  sn=[sn3]  dc=dc1 server3:5200 capacity=1 RUNNING
    [rg3-rn1] RUNNING
          No performance info available

  shard=[rg1] num partitions=10
    [rg1-rn1] sn=sn1
  shard=[rg2] num partitions=10
    [rg2-rn1] sn=sn2
  shard=[rg3] num partitions=10
    [rg3-rn1] sn=sn3

kv-> plan change-parameters -service sn1 -wait -params capacity=3
Executed plan 8, waiting for completion...
Plan 8 ended successfully
kv-> plan change-parameters -service sn2 -wait -params capacity=3
Executed plan 9, waiting for completion...
Plan 9 ended successfully
kv-> plan change-parameters -service sn3 -wait -params capacity=3
Executed plan 10, waiting for completion...
Plan 10 ended successfully
kv-> topology clone -current -name 3x3
Created 3x3
kv-> topology change-repfactor -name 3x3 -pool AllStorageNodes -rf 3 -dc dc1
Changed replication factor in 3x3
kv-> topology preview -name 3x3
Topology transformation from current deployed topology to 3x3:
Create 6 RNs

shard rg1
  2 new RNs : rg1-rn2 rg1-rn3
shard rg2
  2 new RNs : rg2-rn2 rg2-rn3
shard rg3
  2 new RNs : rg3-rn2 rg3-rn3

kv-> plan deploy-topology -name 3x3 -wait
Executed plan 11, waiting for completion...
Plan 11 ended successfully
kv-> show topology
store=mystore  numPartitions=30 sequence=67
  dc=[dc1] name=datacenter1 repFactor=3

  sn=[sn1]  dc=dc1 server1:5000 capacity=3 RUNNING
    [rg1-rn1] RUNNING
          No performance info available
    [rg2-rn2] RUNNING
          No performance info available
    [rg3-rn2] RUNNING
          No performance info available
  sn=[sn2]  dc=dc1 server2:5100 capacity=3 RUNNING
    [rg1-rn2] RUNNING
          No performance info available
    [rg2-rn1] RUNNING
          No performance info available
    [rg3-rn3] RUNNING
          No performance info available
  sn=[sn3]  dc=dc1 server3:5200 capacity=3 RUNNING
    [rg1-rn3] RUNNING
          No performance info available
    [rg2-rn3] RUNNING
          No performance info available
    [rg3-rn1] RUNNING
          No performance info available

  shard=[rg1] num partitions=10
    [rg1-rn1] sn=sn1
    [rg1-rn2] sn=sn2
    [rg1-rn3] sn=sn3
  shard=[rg2] num partitions=10
    [rg2-rn1] sn=sn2
    [rg2-rn2] sn=sn1
    [rg2-rn3] sn=sn3
  shard=[rg3] num partitions=10
    [rg3-rn1] sn=sn3
    [rg3-rn2] sn=sn1
    [rg3-rn3] sn=sn2

kv->



So what we have done ?


plan change-parameters -service sn1 -wait -params capacity=3
plan change-parameters -service sn2 -wait -params capacity=3
plan change-parameters -service sn3 -wait -params capacity=3
We are increasing the capacity from 1 to 3 with the change-parameters command.

topology clone -current -name 3x3
We are cloning the current topology with the new name 3x3

topology change-repfactor -name 3x3 -pool AllStorageNodes -rf 3 -dc dc1
We are using the change-repfactor method to modify the replication factor to 3. The replication factor cannot be changed for this topology after executing this command.

You can use the show topology command to verify if the storage nodes are up and running. Alternatively , use the web interface to check the storage nodes 3x3 distributions.

Popular Posts