Thursday, January 21, 2016

[NoSQL] How to install an Oracle NoSQL Database

Hi people,

After a 2 weeks break, i am here to write again :)

In this post, i will create an Oracle NoSQL database on some nodes of Oracle BigData Appliance. Also, i will talk about NoSQL structures and do installation. After setup, i will populate and query the db and show how to secure an Oracle NoSQL database.

First, lets talk about the product..

Oracle NoSQL database is an alternative to NoSQL database and it does well with Oracle Products.

As you know NoSQL databases are distributed, and desired to be highly available key/value storage that is well suited to large-volume, latency-sensitive applications. Oracle NoSQL database supports replication of data with replication-factor value which you defined on time of creation KV Store ( aka database).

For the HA issues, Oracle adds supporting functionality for "zones" , with "datacenter" . As you see at the following picture, replica data is distributed over data centers over storage nodes.  Oracle says that "Zones allow you to spread your store across physical installation locations. The different locations can be anything from different physical buildings near each other, to different racks in the same building. The basic idea is that you can guard against large scale infrastructure disruptions, such as power outages or storm damage, by placing the nodes in your store physically as far apart as is possible."

You see every node added to NoSQL cluster can be considered as Storage Nodes. Briefly, any host can be added as a SN. Oracle says that "A storage node (SN) is typically a physical machine with its own local persistent storage, either disk or solid state, a CPU with one or more cores, memory, and an IP address. A system with more storage nodes will provide greater aggregate throughput or storage capacity than one with fewer nodes, and systems with a greater degree of replication in replication groups can provide decreased request latency over installations with smaller degrees of replication."

So in short, we replicate data with respect to replica factor over storage nodes and in a storage node, we have a master process for responsible of data and replication processes for faster read operations. 

Zones

Now, lets continue with how to create a Oracle NoSQL database with 3 replica factor on 3 BDA nodes with 12 capacity, i mean 12 disk on each nodes.

To do this, we have agenda.

  1. Check clusters for firewall issues and check java installation
  2. Download the latest Oracle NoSQL database and unzip it on all nodes to be in cluster.
  3. Define KVHOME and KVROOT variables on all nodes
  4. Create directories on mounted disks on all nodes ( per capacity)
  5. Creation of bootconfig on all nodes 
  6. Starting NoSQL service on all nodes
  7. Create KVStore ( NoSQL database ) 
  8. Create Topology .. Zones, Storage Nodes, Admin Nodes, Connection Pools..
  9. Test System
  10. Lastly, Secure NoSQL database


In this example, i have node1, node2 and node3 for my cluster.

I will use Oracle NoSQL Database 12cR1.3.2.5 version and java 1.8.0.45 . You can check it like this:

[node1]/opt/oracle/kv-ce/lib$java -jar kvclient.jar 
12cR1.3.2.5 2014-12-05 01:47:33 UTC  Build id: 7ab4544136f5
[node1]/opt/oracle/kv-ce/lib$

[node1]/opt/oracle/kv-ce/lib$java -version
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

>>>>>> After this agenda steps must be done on all nodes <<<<<<<<

  • Download kv-ce-3.2.5.zip from Oracle NoSQL Download page and unzip it in a folder.
             - unzip  kv-ce-3.2.5.zip -d /opt/oracle/kv-ce
  • export KVHOME=/opt/oracle/kv-ce
  • export KVROOT=/opt/oracle/kvroot
  • Create storage directories with number of capacity setting, and spread on all mounted disk
      - mkdir /u01/kvdata /u02/kvdata /u03/kvdata /u04/kvdata /u05/kvdata /u06/kvdata 
      - mkdir /u07/kvdata /u08/kvdata /u09/kvdata /u10/kvdata /u11/kvdata /u12/kvdata

After that we create a config file to startup NoSQL instance , so there is a utility to create config file with given parameters.

$java -jar $KVHOME/lib/kvstore.jar makebootconfig -root $KVROOT -port 5000 -admin 5001 -host NODE1 -capacity 12 -harange 5010,5030 -servicerange 5035,5099 -storagedir /u01/kvdata -storagedir /u02/kvdata -storagedir /u03/kvdata -storagedir /u04/kvdata -storagedir /u05/kvdata -storagedir /u06/kvdata -storagedir /u07/kvdata -storagedir /u08/kvdata -storagedir /u09/kvdata -storagedir /u10/kvdata -storagedir /u11/kvdata -storagedir /u12/kvdata -store-security none

Here are the explanation for ports:

port 5000 : Listening port for Oracle NoSQL Database
port 5001 : Listening port for Administration page.
port 5010-5030 : Free ports which the Replication Nodes use to communicate among themselves
port 5035-5099 : A second range of free ports that may be used by a Storage Node or a Replication Node when exporting RMI based services. This setting is optional but you can get some problems with firewall issues.

After that , 2 files created under $KVROOT. Config.xml and security.policy files

[Node1]/opt/oracle/kvroot$cat config.xml 
<config version="2">
  <component name="params" type="bootstrapParams" validate="true">
    <property name="forceBootstrapAdmin" value="false" type="BOOLEAN"/>
    <property name="servicePortRange" value="5035,5099" type="STRING"/>
    <property name="hostname" value="Node1" type="STRING"/>
    <property name="storageNodeId" value="0" type="INT"/>
    <property name="adminHttpPort" value="5001" type="INT"/>
    <property name="hostingAdmin" value="false" type="BOOLEAN"/>
    <property name="haPortRange" value="5010,5030" type="STRING"/>
    <property name="registryPort" value="5000" type="INT"/>
    <property name="softwareVersion" value="12.1.3.2.5" type="STRING"/>
    <property name="capacity" value="12" type="INT"/>
  </component>
  <component name="mountPoints" type="bootstrapParams" validate="false">
    <property name="/u05/kvdata" value="" type="STRING"/>
    <property name="/u04/kvdata" value="" type="STRING"/>
    <property name="/u06/kvdata" value="" type="STRING"/>
    <property name="/u10/kvdata" value="" type="STRING"/>
    <property name="/u11/kvdata" value="" type="STRING"/>
    <property name="/u12/kvdata" value="" type="STRING"/>
    <property name="/u01/kvdata" value="" type="STRING"/>
    <property name="/u02/kvdata" value="" type="STRING"/>
    <property name="/u07/kvdata" value="" type="STRING"/>
    <property name="/u08/kvdata" value="" type="STRING"/>
    <property name="/u09/kvdata" value="" type="STRING"/>
    <property name="/u03/kvdata" value="" type="STRING"/>
  </component>
</config>

[Node1]/opt/oracle/kvroot$cat security.policy 
grant {
 permission java.security.AllPermission;
};

Dont forget to run the last command on all nodes and these files are created on all nodes. 

After that we start NoSQL instance with this:

$nohup java -Xmx256m -Xms256m -jar $KVHOME/lib/kvstore.jar start -root $KVROOT&


Check processes with ping utility

$ jps -m
70485 kvstore.jar start -root /opt/oracle/kvroot
..
$java -jar $KVHOME/lib/kvstore.jar ping -host node1 -port 5000
SNA at hostname: node1, registry port: 5000 is not registered.
        No further information is available

$java -jar $KVHOME/lib/kvstore.jar ping -host node2 -port 5000
SNA at hostname: node2, registry port: 5000 is not registered.
        No further information is available

$java -jar $KVHOME/lib/kvstore.jar ping -host node3 -port 5000
SNA at hostname: node3, registry port: 5000 is not registered.
        No further information is available

>>>> Here it says that we succesfully started instance but no Storage Nodes defined on them. Now we can keep going with creating KV Store, the NoSQL database.

After this point, we will do all operations on one node.  Now connect to one instance to access admin console 

$ java -Xmx256m -Xms256m -jar $KVHOME/lib/kvstore.jar runadmin -port 5000 -host node1
kv->

In NoSQL database terms, a database is a store and we will create a store and build topology on our cluster. Lets start with creating store.

kv->configure -name KVSTORE

After that , i create a zone for data replication with respect to 3 copy .

kv->plan deploy-zone -name "KVZONE" -rf 3 -wait

You can check your plans , commands with following at any time.

kv-> show plans
     1 Deploy Zone (1)          SUCCEEDED

Now, i will create Storage Nodes on hosts and start an admin process on them.

kv->plan deploy-sn -zn 1 -host node1 -port 5000 -wait
kv->plan deploy-admin -sn sn1 -port 5001 -wait

kv->plan deploy-sn -zn 1 -host node2  -port 5000 -wait
kv->plan deploy-admin -sn sn2 -port 5001 -wait

kv->plan deploy-sn -zn 1 -host node3  -port 5000 -wait
kv->plan deploy-admin -sn sn3 -port 5001 -wait

Lets check plans

kv-> show plans
     1 Deploy Zone (1)          SUCCEEDED
     2 Deploy Storage Node (2)  SUCCEEDED
     3 Deploy Admin Service (3) SUCCEEDED
     4 Deploy Storage Node (4)  SUCCEEDED
     5 Deploy Admin Service (5) SUCCEEDED
     6 Deploy Storage Node (6)  SUCCEEDED
     7 Deploy Admin Service (7) SUCCEEDED

Now , i will create connection pool and connect all storage nodes on to it

kv->pool create -name KVPOOL
kv->pool join -name KVPOOL -sn sn1
kv->pool join -name KVPOOL -sn sn2
kv->pool join -name KVPOOL -sn sn3

Now, the last part came. We will unite all together and build the topology.

kv->topology create -name topo -pool KVPOOL -partitions 720
kv->plan deploy-topology -name topo -wait

kv-> show plans
     1 Deploy Zone (1)          SUCCEEDED
     2 Deploy Storage Node (2)  SUCCEEDED
     3 Deploy Admin Service (3) SUCCEEDED
     4 Deploy Storage Node (4)  SUCCEEDED
     5 Deploy Admin Service (5) SUCCEEDED
     6 Deploy Storage Node (6)  SUCCEEDED
     7 Deploy Admin Service (7) SUCCEEDED
     8 Deploy Topo (8)          SUCCEEDED

Ok, we finished the hard parts, and lets view topology we created and verify it for configuration errors.

kv-> show topology
store=KVSTORE  numPartitions=720 sequence=772
  zn: id=zn1 name=KVZONE repFactor=3 type=PRIMARY

  sn=[sn1] zn:[id=zn1 name=KVZONE] node1:5000 capacity=12 RUNNING
    [rg1-rn1] RUNNING
          No performance info available
    [rg2-rn1] RUNNING
             single-op avg latency=0.0 ms   multi-op avg latency=0.0 ms
    [rg3-rn1] RUNNING
          No performance info available
    [rg4-rn1] RUNNING
          No performance info available
    [rg5-rn1] RUNNING
          No performance info available
    [rg6-rn1] RUNNING
          No performance info available
    [rg7-rn1] RUNNING
          No performance info available
    [rg8-rn1] RUNNING
          No performance info available
    [rg9-rn1] RUNNING
          No performance info available
    [rg10-rn1] RUNNING
          No performance info available
    [rg11-rn1] RUNNING
          No performance info available
    [rg12-rn1] RUNNING
          No performance info available
  sn=[sn2] zn:[id=zn1 name=KVZONE] node2:5000 capacity=12 RUNNING
    [rg1-rn2] RUNNING
             single-op avg latency=0.0 ms   multi-op avg latency=0.0 ms
    [rg2-rn2] RUNNING
             single-op avg latency=1.4116896 ms   multi-op avg latency=0.0 ms
    [rg3-rn2] RUNNING
             single-op avg latency=0.0 ms   multi-op avg latency=0.0 ms
    [rg4-rn2] RUNNING
             single-op avg latency=0.0 ms   multi-op avg latency=0.0 ms
    [rg5-rn2] RUNNING
             single-op avg latency=0.0 ms   multi-op avg latency=0.0 ms
    [rg6-rn2] RUNNING
             single-op avg latency=0.0 ms   multi-op avg latency=0.0 ms
    [rg7-rn2] RUNNING
             single-op avg latency=0.0 ms   multi-op avg latency=0.0 ms
    [rg8-rn2] RUNNING
             single-op avg latency=0.0 ms   multi-op avg latency=0.0 ms
    [rg9-rn2] RUNNING
             single-op avg latency=0.0 ms   multi-op avg latency=0.0 ms
    [rg10-rn2] RUNNING
             single-op avg latency=0.0 ms   multi-op avg latency=0.0 ms
    [rg11-rn2] RUNNING
             single-op avg latency=0.0 ms   multi-op avg latency=0.0 ms
    [rg12-rn2] RUNNING
             single-op avg latency=0.0 ms   multi-op avg latency=0.0 ms
  sn=[sn3] zn:[id=zn1 name=KVZONE] node3:5000 capacity=12 RUNNING
    [rg1-rn3] RUNNING
             single-op avg latency=0.0 ms   multi-op avg latency=0.0 ms
    [rg2-rn3] RUNNING
             single-op avg latency=0.0 ms   multi-op avg latency=0.0 ms
    [rg3-rn3] RUNNING
             single-op avg latency=0.0 ms   multi-op avg latency=0.0 ms
    [rg4-rn3] RUNNING
             single-op avg latency=0.0 ms   multi-op avg latency=0.0 ms
    [rg5-rn3] RUNNING
             single-op avg latency=0.0 ms   multi-op avg latency=0.0 ms
    [rg6-rn3] RUNNING
             single-op avg latency=0.0 ms   multi-op avg latency=0.0 ms
    [rg7-rn3] RUNNING
             single-op avg latency=0.0 ms   multi-op avg latency=0.0 ms
    [rg8-rn3] RUNNING
             single-op avg latency=0.0 ms   multi-op avg latency=0.0 ms
    [rg9-rn3] RUNNING
             single-op avg latency=0.0 ms   multi-op avg latency=0.0 ms
    [rg10-rn3] RUNNING
             single-op avg latency=0.0 ms   multi-op avg latency=0.0 ms
    [rg11-rn3] RUNNING
             single-op avg latency=0.0 ms   multi-op avg latency=0.0 ms
    [rg12-rn3] RUNNING
             single-op avg latency=0.0 ms   multi-op avg latency=0.0 ms

  shard=[rg1] num partitions=60
    [rg1-rn1] sn=sn1
    [rg1-rn2] sn=sn2
    [rg1-rn3] sn=sn3
  shard=[rg2] num partitions=60
    [rg2-rn1] sn=sn1
    [rg2-rn2] sn=sn2
    [rg2-rn3] sn=sn3
  shard=[rg3] num partitions=60
    [rg3-rn1] sn=sn1
    [rg3-rn2] sn=sn2
    [rg3-rn3] sn=sn3
  shard=[rg4] num partitions=60
    [rg4-rn1] sn=sn1
    [rg4-rn2] sn=sn2
    [rg4-rn3] sn=sn3
  shard=[rg5] num partitions=60
    [rg5-rn1] sn=sn1
    [rg5-rn2] sn=sn2
    [rg5-rn3] sn=sn3
  shard=[rg6] num partitions=60
    [rg6-rn1] sn=sn1
    [rg6-rn2] sn=sn2
    [rg6-rn3] sn=sn3
  shard=[rg7] num partitions=60
    [rg7-rn1] sn=sn1
    [rg7-rn2] sn=sn2
    [rg7-rn3] sn=sn3
  shard=[rg8] num partitions=60
    [rg8-rn1] sn=sn1
    [rg8-rn2] sn=sn2
    [rg8-rn3] sn=sn3
  shard=[rg9] num partitions=60
    [rg9-rn1] sn=sn1
    [rg9-rn2] sn=sn2
    [rg9-rn3] sn=sn3
  shard=[rg10] num partitions=60
    [rg10-rn1] sn=sn1
    [rg10-rn2] sn=sn2
    [rg10-rn3] sn=sn3
  shard=[rg11] num partitions=60
    [rg11-rn1] sn=sn1
    [rg11-rn2] sn=sn2
    [rg11-rn3] sn=sn3
  shard=[rg12] num partitions=60
    [rg12-rn1] sn=sn1
    [rg12-rn2] sn=sn2
    [rg12-rn3] sn=sn3

kv-> 
kv-> verify
The command:

        verify [-silent]

is deprecated and has been replaced by: 

        verify configuration [-silent]

Verify: starting verification of KVSTORE based upon topology sequence #772
720 partitions and 3 storage nodes. Version: 12.1.3.2.5 Time: 2016-01-20 14:34:03 UTC
See node1:/opt/oracle/kvroot/KVSTORE/log/KVSTORE_{0..N}.log for progress messages
Verify: == checking storage node sn1 ==
Verify: Storage Node [sn1] on node1:5000    Zone: [name=KVZONE id=zn1 type=PRIMARY]    Status: RUNNING   Ver: 12cR1.3.2.5 2014-12-05 01:47:33 UTC  Build id: 7ab4544136f5
Verify:         Admin [admin1]          Status: RUNNING
Verify:         Rep Node [rg2-rn1]      Status: RUNNING,REPLICA at sequence number: 151 haPort: 5012
Verify:         Rep Node [rg1-rn1]      Status: RUNNING,REPLICA at sequence number: 151 haPort: 5011
Verify:         Rep Node [rg12-rn1]     Status: RUNNING,MASTER at sequence number: 147 haPort: 5022
Verify:         Rep Node [rg11-rn1]     Status: RUNNING,REPLICA at sequence number: 151 haPort: 5021
Verify:         Rep Node [rg10-rn1]     Status: RUNNING,REPLICA at sequence number: 151 haPort: 5020
Verify:         Rep Node [rg9-rn1]      Status: RUNNING,MASTER at sequence number: 147 haPort: 5019
Verify:         Rep Node [rg8-rn1]      Status: RUNNING,REPLICA at sequence number: 151 haPort: 5018
Verify:         Rep Node [rg7-rn1]      Status: RUNNING,REPLICA at sequence number: 151 haPort: 5017
Verify:         Rep Node [rg6-rn1]      Status: RUNNING,MASTER at sequence number: 147 haPort: 5016
Verify:         Rep Node [rg5-rn1]      Status: RUNNING,REPLICA at sequence number: 151 haPort: 5015
Verify:         Rep Node [rg4-rn1]      Status: RUNNING,REPLICA at sequence number: 151 haPort: 5014
Verify:         Rep Node [rg3-rn1]      Status: RUNNING,MASTER at sequence number: 147 haPort: 5013
Verify: == checking storage node sn2 ==
Verify: Storage Node [sn2] on node2:5000    Zone: [name=KVZONE id=zn1 type=PRIMARY]    Status: RUNNING   Ver: 12cR1.3.2.5 2014-12-05 01:47:33 UTC  Build id: 7ab4544136f5
Verify:         Admin [admin2]          Status: RUNNING
Verify:         Rep Node [rg3-rn2]      Status: RUNNING,REPLICA at sequence number: 147 haPort: 5013
Verify:         Rep Node [rg2-rn2]      Status: RUNNING,MASTER at sequence number: 151 haPort: 5012
Verify:         Rep Node [rg1-rn2]      Status: RUNNING,REPLICA at sequence number: 151 haPort: 5011
Verify:         Rep Node [rg12-rn2]     Status: RUNNING,REPLICA at sequence number: 147 haPort: 5022
Verify:         Rep Node [rg11-rn2]     Status: RUNNING,REPLICA at sequence number: 151 haPort: 5021
Verify:         Rep Node [rg10-rn2]     Status: RUNNING,MASTER at sequence number: 151 haPort: 5020
Verify:         Rep Node [rg9-rn2]      Status: RUNNING,REPLICA at sequence number: 147 haPort: 5019
Verify:         Rep Node [rg8-rn2]      Status: RUNNING,REPLICA at sequence number: 151 haPort: 5018
Verify:         Rep Node [rg7-rn2]      Status: RUNNING,MASTER at sequence number: 151 haPort: 5017
Verify:         Rep Node [rg6-rn2]      Status: RUNNING,REPLICA at sequence number: 147 haPort: 5016
Verify:         Rep Node [rg5-rn2]      Status: RUNNING,REPLICA at sequence number: 151 haPort: 5015
Verify:         Rep Node [rg4-rn2]      Status: RUNNING,MASTER at sequence number: 151 haPort: 5014
Verify: == checking storage node sn3 ==
Verify: Storage Node [sn3] on node3:5000    Zone: [name=KVZONE id=zn1 type=PRIMARY]    Status: RUNNING   Ver: 12cR1.3.2.5 2014-12-05 01:47:33 UTC  Build id: 7ab4544136f5
Verify:         Admin [admin3]          Status: RUNNING
Verify:         Rep Node [rg4-rn3]      Status: RUNNING,REPLICA at sequence number: 151 haPort: 5014
Verify:         Rep Node [rg3-rn3]      Status: RUNNING,REPLICA at sequence number: 147 haPort: 5013
Verify:         Rep Node [rg2-rn3]      Status: RUNNING,REPLICA at sequence number: 151 haPort: 5012
Verify:         Rep Node [rg1-rn3]      Status: RUNNING,MASTER at sequence number: 151 haPort: 5011
Verify:         Rep Node [rg12-rn3]     Status: RUNNING,REPLICA at sequence number: 147 haPort: 5022
Verify:         Rep Node [rg11-rn3]     Status: RUNNING,MASTER at sequence number: 151 haPort: 5021
Verify:         Rep Node [rg10-rn3]     Status: RUNNING,REPLICA at sequence number: 151 haPort: 5020
Verify:         Rep Node [rg9-rn3]      Status: RUNNING,REPLICA at sequence number: 147 haPort: 5019
Verify:         Rep Node [rg8-rn3]      Status: RUNNING,MASTER at sequence number: 151 haPort: 5018
Verify:         Rep Node [rg7-rn3]      Status: RUNNING,REPLICA at sequence number: 151 haPort: 5017
Verify:         Rep Node [rg6-rn3]      Status: RUNNING,REPLICA at sequence number: 147 haPort: 5016
Verify:         Rep Node [rg5-rn3]      Status: RUNNING,MASTER at sequence number: 151 haPort: 5015

Verification complete, no violations.


As you see there is no violations. Now, lets ping NoSQL instances and see Storage Nodes response.

$java -jar $KVHOME/lib/kvstore.jar ping -host node1 -port 5000
Pinging components of store KVSTORE based upon topology sequence #772
Time: 2016-01-20 14:37:53 UTC
KVSTORE comprises 720 partitions and 3 Storage Nodes
Storage Node [sn1] on node1:5000    Zone: [name=KVZONE id=zn1 type=PRIMARY]    Status: RUNNING   Ver: 12cR1.3.2.5 2014-12-05 01:47:33 UTC  Build id: 7ab4544136f5
        Rep Node [rg8-rn1]      Status: RUNNING,REPLICA at sequence number: 151 haPort: 5018
        Rep Node [rg1-rn1]      Status: RUNNING,REPLICA at sequence number: 151 haPort: 5011
        Rep Node [rg5-rn1]      Status: RUNNING,REPLICA at sequence number: 151 haPort: 5015
        Rep Node [rg12-rn1]     Status: RUNNING,MASTER at sequence number: 147 haPort: 5022
        Rep Node [rg10-rn1]     Status: RUNNING,REPLICA at sequence number: 151 haPort: 5020
        Rep Node [rg3-rn1]      Status: RUNNING,MASTER at sequence number: 147 haPort: 5013
        Rep Node [rg9-rn1]      Status: RUNNING,MASTER at sequence number: 147 haPort: 5019
        Rep Node [rg7-rn1]      Status: RUNNING,REPLICA at sequence number: 151 haPort: 5017
        Rep Node [rg6-rn1]      Status: RUNNING,MASTER at sequence number: 147 haPort: 5016
        Rep Node [rg2-rn1]      Status: RUNNING,REPLICA at sequence number: 151 haPort: 5012
        Rep Node [rg4-rn1]      Status: RUNNING,REPLICA at sequence number: 151 haPort: 5014
        Rep Node [rg11-rn1]     Status: RUNNING,REPLICA at sequence number: 151 haPort: 5021
Storage Node [sn2] on node2:5000    Zone: [name=KVZONE id=zn1 type=PRIMARY]    Status: RUNNING   Ver: 12cR1.3.2.5 2014-12-05 01:47:33 UTC  Build id: 7ab4544136f5
        Rep Node [rg9-rn2]      Status: RUNNING,REPLICA at sequence number: 147 haPort: 5019
        Rep Node [rg7-rn2]      Status: RUNNING,MASTER at sequence number: 151 haPort: 5017
        Rep Node [rg6-rn2]      Status: RUNNING,REPLICA at sequence number: 147 haPort: 5016
        Rep Node [rg2-rn2]      Status: RUNNING,MASTER at sequence number: 151 haPort: 5012
        Rep Node [rg11-rn2]     Status: RUNNING,REPLICA at sequence number: 151 haPort: 5021
        Rep Node [rg4-rn2]      Status: RUNNING,MASTER at sequence number: 151 haPort: 5014
        Rep Node [rg8-rn2]      Status: RUNNING,REPLICA at sequence number: 151 haPort: 5018
        Rep Node [rg12-rn2]     Status: RUNNING,REPLICA at sequence number: 147 haPort: 5022
        Rep Node [rg1-rn2]      Status: RUNNING,REPLICA at sequence number: 151 haPort: 5011
        Rep Node [rg5-rn2]      Status: RUNNING,REPLICA at sequence number: 151 haPort: 5015
        Rep Node [rg10-rn2]     Status: RUNNING,MASTER at sequence number: 151 haPort: 5020
        Rep Node [rg3-rn2]      Status: RUNNING,REPLICA at sequence number: 147 haPort: 5013
Storage Node [sn3] on node3:5000    Zone: [name=KVZONE id=zn1 type=PRIMARY]    Status: RUNNING   Ver: 12cR1.3.2.5 2014-12-05 01:47:33 UTC  Build id: 7ab4544136f5
        Rep Node [rg8-rn3]      Status: RUNNING,MASTER at sequence number: 151 haPort: 5018
        Rep Node [rg12-rn3]     Status: RUNNING,REPLICA at sequence number: 147 haPort: 5022
        Rep Node [rg1-rn3]      Status: RUNNING,MASTER at sequence number: 151 haPort: 5011
        Rep Node [rg5-rn3]      Status: RUNNING,MASTER at sequence number: 151 haPort: 5015
        Rep Node [rg10-rn3]     Status: RUNNING,REPLICA at sequence number: 151 haPort: 5020
        Rep Node [rg3-rn3]      Status: RUNNING,REPLICA at sequence number: 147 haPort: 5013
        Rep Node [rg9-rn3]      Status: RUNNING,REPLICA at sequence number: 147 haPort: 5019
        Rep Node [rg7-rn3]      Status: RUNNING,REPLICA at sequence number: 151 haPort: 5017
        Rep Node [rg6-rn3]      Status: RUNNING,REPLICA at sequence number: 147 haPort: 5016
        Rep Node [rg2-rn3]      Status: RUNNING,REPLICA at sequence number: 151 haPort: 5012
        Rep Node [rg11-rn3]     Status: RUNNING,MASTER at sequence number: 151 haPort: 5021
        Rep Node [rg4-rn3]      Status: RUNNING,REPLICA at sequence number: 151 haPort: 5014
$

As you see all SNs are accessible from one instance, you can run this command using other nodes.

Lets make a insert on our NoSQL database and see if it is work, you can use built-in examples in NoSQL zip file.

$java -cp .:kv-3.2.5/lib/kvclient.jar hello.HelloBigDataWorld -host node1 -port 5000 -store KVSTORE
Hello Big Data World!
$java -cp .:kv-3.2.5/lib/kvclient.jar hello.HelloBigDataWorld -host node2 -port 5000 -store KVSTORE
Hello Big Data World!
$java -cp .:kv-3.2.5/lib/kvclient.jar hello.HelloBigDataWorld -host node3 -port 5000 -store KVSTORE
Hello Big Data World!

As you see all of them, works. :)

Great, now lets look at administration page. You can access web page by node1:5001 , remember we set 5001 port for administrative purposes.



Ok, everything seems ok . For the security part you can follow my previous post .

That's all.

Thanks for reading.

Enjoy & share.

Source:

http://kamudba.blogspot.com.tr/2015/11/nosql-how-to-secure-oracle-nosql.html

http://www.oracle.com/technetwork/database/nosqldb/overview/businessconti-2705663.html

http://www.oracle.com/technetwork/database/database-technologies/nosqldb/learnmore/nosql-database-498041.pdf?ssSourceSiteId=ocomen

http://www.oracle.com/technetwork/database/database-technologies/nosqldb/documentation/datasheet-oracle-nosql-db-ce-1876735.pdf?ssSourceSiteId=ocomen

No comments :

Post a Comment