ストアの検証

検証は、次のことに使用できるツールです。

CLIのverifyコマンドを使用してストアの検証を実行します。パラメータは不要で、デフォルトでは冗長モードで実行されます。次に例を示します。

> java -Xmx256m -Xms256m \
-jar KVHOME/lib/kvstore.jar runadmin -port <registry port>> \
-host <hostname>
kv-> verify configuration
Verify: starting verification of store mystore based upon
    topology sequence #1008
1000 partitions and 3 storage nodes
Time: 2015-03-04 21:16:02 UTC   Version: 12.1.3.2.15
See <nodeHostname>:/KVRT1/mystore/log/mystore_{0..N}.log for
    progress messages
Verify: Shard Status: total:1 healthy:1 degraded:0 noQuorum:0 offline:0
Verify: Zone [name=baskin id=zn1 type=PRIMARY]
    RN Status: total:3 online:3 maxDelayMillis:0 maxCatchupTimeSecs:0
Verify: == checking storage node sn1 ==
Verify: Storage Node [sn1] on <nodeHostname>:5000
    Zone: [name=baskin id=zn1 type=PRIMARY]    Status: RUNNING
    Ver: 12cR1.3.2.15 2015-03-04 06:35:02 UTC  Build id: 8e70b50c0b0e
Verify:         Admin [admin1]          Status: RUNNING,MASTER
Verify:         Rep Node [rg1-rn1]      Status: RUNNING,REPLICA
    sequenceNumber:2,025 haPort:5011 delayMillis:0 catchupTimeSecs:0
Verify: == checking storage node sn2 ==
Verify: Storage Node [sn2] on <nodeHostname>:5100
    Zone: [name=baskin id=zn1 type=PRIMARY]    Status: RUNNING
    Ver: 12cR1.3.2.15 2015-03-04 06:35:02 UTC  Build id: 8e70b50c0b0e
Verify:         Rep Node [rg1-rn2]      Status: RUNNING,REPLICA
    sequenceNumber:2,025 haPort:5110 delayMillis:0 catchupTimeSecs:0
Verify: == checking storage node sn3 ==
Verify: Storage Node [sn3] on <nodeHostname>:5200
    Zone: [name=baskin id=zn1 type=PRIMARY]    Status: RUNNING
    Ver: 12cR1.3.2.15 2015-03-04 06:35:02 UTC  Build id: 8e70b50c0b0e
Verify:         Rep Node [rg1-rn3]      Status: RUNNING,MASTER
    sequenceNumber:2,025 haPort:5210

Verification complete, no violations.

問題のみを表示するサイレント・モードを使用できます。

kv-> verify configuration -silent
Verify: starting verification of store mystore based upon
    topology sequence #1008
1000 partitions and 3 storage nodes
Time: 2015-03-04 21:16:02 UTC   Version: 12.1.3.2.15
See <nodeHostname>:/KVRT1/mystore/log/mystore_{0..N}.log for
    progress messages
Verification complete, no violations.

ストアの問題が明確にレポートされます。たとえば、ストレージ・ノードが使用不能な場合、サイレント・モードでは、問題が次のように表示されます。

kv-> verify configuration -silent
Verify: starting verification of store mystore based upon
    topology sequence #1008
1000 partitions and 3 storage nodes
Time: 2015-03-04 21:16:02 UTC   Version: 12.1.3.2.15
See <nodeHostname>:/KVRT1/mystore/log/mystore_{0..N}.log for
    progress messages
Verification complete, 2 violations, 0 notes found.
Verification violation: [sn2]   ping() failed for sn2 :
    Connection refused to host: <nodeHostname>; nested exception is:
        java.net.ConnectException: Connection refused
Verification violation: [rg1-rn2]       ping() failed for rg1-rn2 :
    Connection refused to host: <nodeHostname>; nested exception is:
        java.net.ConnectException: Connection refused

冗長モードでは、前述の問題が次のように表示されます。

kv-> verify configuration
Verify: starting verification of store mystore based upon
    topology sequence #1008
1000 partitions and 3 storage nodes
Time: 2015-03-04 21:16:02 UTC   Version: 12.1.3.2.15
See <nodeHostname>:/KVRT1/mystore/log/mystore_{0..N}.log for
    progress messages
Verify: Shard Status: total:1 healthy:0 degraded:1 noQuorum:0 offline:0
Verify: Zone [name=baskin id=zn1 type=PRIMARY]
    RN Status: total:3 online:2 maxDelayMillis:0 maxCatchupTimeSecs:0
Verify: == checking storage node sn1 ==
Verify: Storage Node [sn1] on <nodeHostname>:5000
    Zone: [name=baskin id=zn1 type=PRIMARY]    Status: RUNNING
    Ver: 12cR1.3.2.15 2015-03-04 06:35:02 UTC  Build id: 8e70b50c0b0e
Verify:         Admin [admin1]          Status: RUNNING,MASTER
Verify:         Rep Node [rg1-rn1]      Status: RUNNING,REPLICA
    sequenceNumber:2,025 haPort:5011 delayMillis:0 catchupTimeSecs:0
Verify: == checking storage node sn2 ==
Verify:         sn2: ping() failed for sn2 : Connection refused to host:
    <nodeHostname>; nested exception is:
        java.net.ConnectException: Connection refused
Verify: Storage Node [sn2] on <nodeHostname>:5100
    Zone: [name=baskin id=zn1 type=PRIMARY] UNREACHABLE
Verify:         rg1-rn2: ping() failed for rg1-rn2 : Connection refused to
    host: <nodeHostname>; nested exception is:
        java.net.ConnectException: Connection refused
Verify:         Rep Node [rg1-rn2]      Status: UNREACHABLE
Verify: == checking storage node sn3 ==
Verify: Storage Node [sn3] on <nodeHostname>:5200
    Zone: [name=baskin id=zn1 type=PRIMARY]    Status: RUNNING
    Ver: 12cR1.3.2.15 2015-03-04 06:35:02 UTC  Build id: 8e70b50c0b0e
Verify:         Rep Node [rg1-rn3]      Status: RUNNING,MASTER
    sequenceNumber:2,025 haPort:5210
Verification complete, 2 violations, 0 notes found.
Verification violation: [sn2]   ping() failed for sn2 : Connection
    refused to host: <nodeHostname>; nested exception is:
        java.net.ConnectException: Connection refused
Verification violation: [rg1-rn2]       ping() failed for rg1-rn2 :
    Connection refused to host: <nodeHostname>; nested exception is:
        java.net.ConnectException: Connection refused 

注意

検証の出力は、コマンドの終了時にのみシェルに表示されます。検証の進捗を確認するには、Oracle NoSQL Databaseのログ・ファイルに対してtailまたはgrepを使用します。文字列Verifyを検索します。次に例を示します。

grep Verify /KVRT1/mystore/log/mystore_0.log