Image
Top
Navigation

分散データベース01 :とりあえず動かしてみる

さて、ここからはOrientDBによる以下の特長を持った分散データベースについて解説と検証をしていきます。

  • ゼロconfig、つまりほとんど設定不要で超簡単
  • オートディスカバリー(自動的に分散環境に組み込まれる)
  • マルチマスター(マスタースレーブではない)
  • アプリケーションがフェールオーバー対策不要
  • 垂直方向のシャーディングが可能
  • 水平方向のシャーディングが可能
  • 水平方向のオートシャーディング
  • 同期、非同期レプリケーションが細かに設定可能

何故マルチマスターなのか?

OrientDBの開発リーダである### 何故マルチマスターなのか?

OrientDBの開発リーダであるLuca Garulli(ルカさん)がこちらのスライドに書いていますが、要するに

  • orientDBもバージョン1.0より前はマスタ/スレーブだった
  • でもマスタ/スレーブは、マスタの更新性能がボトルネックになる
  • 結局スケールしないよね
  • なので、バージョン1.0にマルチマスターにしたんだ

と書いています。

とりあえず動かしてみる

さて、とりあえず2台の環境を用意して下さい。ここではcentos6.5のマシンを用意しましたが、centosとwindowsとかの組み合わせでも試してみるぶんには問題ないです。

インストールは済んでいるとします。以下を参照して下さい。

チュートリアル01 : OrientDBをinstallする(windows)
チュートリアル11 : OrientDBをinstallする(centos)

設定ファイル

ゼロconfigと書きましたが、一カ所だけ設定ファイルを修正する必要があります。

configディレクトリィにあるhazelcast.xmlを修正します。

<?xml version="1.0" encoding="UTF-8"?>
<!-- ~ Copyright (c) 2008-2012, Hazel Bilisim Ltd. All Rights Reserved. ~ 
    ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may 
    not use this file except in compliance with the License. ~ You may obtain 
    a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ 
    ~ Unless required by applicable law or agreed to in writing, software ~ distributed 
    under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES 
    OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for 
    the specific language governing permissions and ~ limitations under the License. -->

<hazelcast
    xsi:schemaLocation="http://www.hazelcast.com/schema/config hazelcast-config-3.0.xsd"
    xmlns="http://www.hazelcast.com/schema/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <group>
        <name>orientdb</name>
        <password>orientdb</password>
    </group>
    <network>
        <port auto-increment="true">2434</port>
        <join>
            <multicast enabled="true">
                <multicast-group>235.1.1.1</multicast-group>
                <multicast-port>2434</multicast-port>
            </multicast>
        </join>
    </network>
    <executor-service>
        <pool-size>16</pool-size>
    </executor-service>
</hazelcast>

え!hazelcastと思った人もいると思います。そうなんです。OrientDBの分散環境は、オープンソースのインメモリデータグリッド Hazelcast上に構築されています。

興味のある人は、hazelcastとOrientDBに関するルカさんのスライドを参照して下さい。

それはさておき、OrientDBは、マルチキャストパケットで仲間のサーバーノードをオートディスカバリー(自動的に分散環境に組み込む)します。

その設定を

    <multicast enabled="true">
        <multicast-group>235.1.1.1</multicast-group>
        <multicast-port>2434</multicast-port>
    </multicast>

部分で指定します。

マルチキャストIPアドレス

centosの場合、
ifconfig eth0
で、マルチキャストが有効になっているか確認できます。

以下でRUNNING MULTICASTと表示されているので有効ですね。


[root@london /root]$ ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:21:9B:03:FF:07
          inet addr:192.168.2.29  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::221:9bff:fe03:ff07/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:129511 errors:0 dropped:0 overruns:0 frame:0
          TX packets:90141 errors:47 dropped:0 overruns:0 carrier:47
          collisions:5396 txqueuelen:1000
          RX bytes:22796453 (21.7 MiB)  TX bytes:17105487 (16.3 MiB)
          Interrupt:20 Memory:fdfc0000-fdfe0000

マルチキャストが有効でない場合
ifconfig eth0 multicast
で有効にできます。

マルチキャストipアドレスの確認は
ip maddr show
でOKです。


[root@london /root]$ ip maddr show
1:      lo
        inet  224.0.0.1
        inet6 ff02::1
2:      eth0
        link  33:33:00:00:02:02
        link  33:33:ff:03:ff:0
        link  01:00:5e:00:00:01
        link  33:33:00:00:00:01
        inet  224.0.0.1
        inet6 ff02::202
        inet6 ff02::1:ff03:ff07
        inet6 ff02::1

ここに表示されている、’224.0.0.1’で、hazelcast.xmlのmulticast-groupを修正します。

また、ポート2434が有効であること、他のマシンと通信可能であることも確認しておいて下さい。

マルチキャスト以外の方法ももちろん可能です。また、AWS用の設定も用意されていますが、そちらはまた後日。

分散ノード(1台目)を起動する

分散環境は、’bin’ディレクトリィの’dserver.sh’(windowsでは.bat)で起動します。

もちろん
sudo /opt/orientdb/bin/orientdb.sh start
sudo /opt/orientdb/bin/orientdb.sh stop
のような起動も可能ですが、今日のところは、挙動がわかりやすいので上記の方法で起動します。

では起動してみましょう。


-bash-4.1$ ./dserver.sh
           .
          .`        `
          ,      `:.
         `,`    ,:`
         .,.   :,,
         .,,  ,,,
    .    .,.:::::  ````                                 :::::::::     :::::::::
    ,`   .::,,,,::.,,,,,,`;;                      .:    ::::::::::    :::    :::
    `,.  ::,,,,,,,:.,,.`  `                       .:    :::      :::  :::     :::
     ,,:,:,,,,,,,,::.   `        `         ``     .:    :::      :::  :::     :::
      ,,:.,,,,,,,,,: `::, ,,   ::,::`   : :,::`  ::::   :::      :::  :::    :::
       ,:,,,,,,,,,,::,:   ,,  :.    :   ::    :   .:    :::      :::  :::::::
        :,,,,,,,,,,:,::   ,,  :      :  :     :   .:    :::      :::  :::::::::
  `     :,,,,,,,,,,:,::,  ,, .::::::::  :     :   .:    :::      :::  :::     :::
  `,...,,:,,,,,,,,,: .:,. ,, ,,         :     :   .:    :::      :::  :::     :::
    .,,,,::,,,,,,,:  `: , ,,  :     `   :     :   .:    :::      :::  :::     :::
      ...,::,,,,::.. `:  .,,  :,    :   :     :   .:    :::::::::::   :::     :::
           ,::::,,,. `:   ,,   :::::    :     :   .:    :::::::::     ::::::::::
           ,,:` `,,.
          ,,,    .,`
         ,,.     `,                                          GRAPH DATABASE
       ``        `.                                          DISTRIBUTED
                 ``                                         www.orientdb.org
                 `

2014-09-19 20:08:04:590 INFO Loading configuration from: /opt/orientdb/config/orientdb-dserver-config.xml... [OServerConfigurationLoaderXml]
2014-09-19 20:08:04:795 INFO OrientDB Server v2.0-M1 (build UNKNOWN@r; 2014-09-18 16:03:59+0200) is starting up... [OServer]
2014-09-19 20:08:04:806 INFO Databases directory: /opt/orientdb/databases [OServer]
2014-09-19 20:08:04:829 INFO Listening binary connections on 0.0.0.0:2424 (protocol v.25, socket=default) [OServerNetworkListener]
2014-09-19 20:08:04:830 INFO Listening http connections on 0.0.0.0:2480 (protocol v.10, socket=default) [OServerNetworkListener]
2014-09-19 20:08:04:833 INFO Installing dynamic plugin 'studio-2.0.zip'... [OServerPluginManager]
2014-09-19 20:08:04:906 INFO Installing GREMLIN language v.2.6.0 - graph.pool.max=50 [OGraphServerHandler]
2014-09-19 20:08:05:052 WARN Generating new node name for current node: node1411124885052 [OHazelcastPlugin]
2014-09-19 20:08:05:090 INFO Starting distributed server 'node1411124885052'... [OHazelcastPlugin]
2014-09-19 20:08:05:103 INFO Configuring Hazelcast from '/opt/orientdb/config/hazelcast.xml'. [FileSystemXmlConfig]
2014-09-19 20:08:05:290 INFO [LOCAL] [orientdb] [3.3] Prefer IPv4 stack is true. [DefaultAddressPicker]
2014-09-19 20:08:05:300 INFO [LOCAL] [orientdb] [3.3] Picked Address[192.168.2.29]:2434, using socket ServerSocket[addr=/0:0:0:0:0:0:0:0,localport=2434], bind any local is true [DefaultAddressPicker]
2014-09-19 20:08:05:337 INFO [192.168.2.29]:2434 [orientdb] [3.3] Starting with 4 generic operation threads and 4 partition operation threads. [BasicOperationScheduler]
2014-09-19 20:08:05:418 INFO [192.168.2.29]:2434 [orientdb] [3.3] Hazelcast 3.3 (20140907) starting at Address[192.168.2.29]:2434 [system]
2014-09-19 20:08:05:418 INFO [192.168.2.29]:2434 [orientdb] [3.3] Copyright (C) 2008-2014 Hazelcast.com [system]
2014-09-19 20:08:05:423 INFO [192.168.2.29]:2434 [orientdb] [3.3] Creating MulticastJoiner [Node]
2014-09-19 20:08:05:427 INFO [192.168.2.29]:2434 [orientdb] [3.3] Address[192.168.2.29]:2434 is STARTING [LifecycleService]
2014-09-19 20:08:10:428 INFO [192.168.2.29]:2434 [orientdb] [3.3]


Members [1] {
        Member [192.168.2.29]:2434 this
}
 [MulticastJoiner]
2014-09-19 20:08:10:453 INFO [192.168.2.29]:2434 [orientdb] [3.3] Address[192.168.2.29]:2434 is STARTED [LifecycleService]
2014-09-19 20:08:10:498 INFO [192.168.2.29]:2434 [orientdb] [3.3] Initializing cluster partition table first arrangement... [InternalPartitionService]
2014-09-19 20:08:10:534 INFO [node1411124885052] found no previous messages in queue orientdb.node.node1411124885052.response [OHazelcastDistributedMessageService]
2014-09-19 20:08:10:536 WARN [node1411124885052] opening database 'GratefulDeadConcerts'... [OHazelcastPlugin]
2014-09-19 20:08:10:536 INFO [node1411124885052] loaded database configuration from disk: /opt/orientdb/config/default-distributed-db-config.json [OHazelcastPlugin]
2014-09-19 20:08:10:548 INFO [node1411124885052] updated distributed configuration for database: GratefulDeadConcerts:
----------
{
  "autoDeploy":true,
  "hotAlignment":false,
  "readQuorum":1,
  "writeQuorum":2,
  "failureAvailableNodesLessQuorum":false,
  "readYourWrites":true,"clusters":{
    "internal":{
},
    "index":{
},
    "*":{
  "servers":[""]
}
    },
  "version":0
}
---------- [OHazelcastPlugin]
2014-09-19 20:08:10:552 INFO [node1411124885052] updated distributed configuration for database: GratefulDeadConcerts:
----------
{
  "autoDeploy":true,
  "hotAlignment":false,
  "readQuorum":1,
  "writeQuorum":2,
  "failureAvailableNodesLessQuorum":false,
  "readYourWrites":true,"clusters":{
    "internal":{
},
    "index":{
},
    "*":{
  "servers":[""]
}
    },
  "version":0
}
---------- [OHazelcastPlugin]
2014-09-19 20:08:10:553 INFO [node1411124885052] Saving distributed configuration file for database 'GratefulDeadConcerts' to: /opt/orientdb/databases/GratefulDeadConcerts/distributed-config.json [OHazelcastPlugin]
2014-09-19 20:08:10:557 INFO [node1411124885052] adding node 'node1411124885052' in partition: db=GratefulDeadConcerts [*] [OHazelcastDistributedDatabase]
2014-09-19 20:08:10:559 INFO [node1411124885052] received added status node1411124885052.GratefulDeadConcerts=OFFLINE [OHazelcastPlugin]
2014-09-19 20:08:10:561 INFO [node1411124885052] updated distributed configuration for database: GratefulDeadConcerts:
----------
{
  "autoDeploy":true,
  "hotAlignment":false,
  "readQuorum":1,
  "writeQuorum":2,
  "failureAvailableNodesLessQuorum":false,
  "readYourWrites":true,"clusters":{
    "internal":{
},
    "index":{
},
    "*":{
  "servers":["node1411124885052",""]
}
    },
  "version":1
}
---------- [OHazelcastPlugin]
2014-09-19 20:08:10:561 INFO [node1411124885052] Saving distributed configuration file for database 'GratefulDeadConcerts' to: /opt/orientdb/databases/GratefulDeadConcerts/distributed-config.json [OHazelcastPlugin]
2014-09-19 20:08:10:566 INFO [node1411124885052] found no previous messages in queue orientdb.node.node1411124885052.GratefulDeadConcerts.request [OHazelcastDistributedMessageService]
2014-09-19 20:08:12:463 INFO [node1411124885052] Installing distributed storage on database 'GratefulDeadConcerts' [ODistributedStorage]
2014-09-19 20:08:12:464 INFO [node1411124885052] found no previous messages in queue orientdb.node.node1411124885052.GratefulDeadConcerts.insert.request [OHazelcastDistributedMessageService]
2014-09-19 20:08:12:467 INFO [node1411124885052] Publishing online status for database node1411124885052.GratefulDeadConcerts... [OHazelcastDistributedDatabase]
2014-09-19 20:08:12:469 INFO [node1411124885052] received updated status node1411124885052.GratefulDeadConcerts=ONLINE [OHazelcastPlugin]
2014-09-19 20:08:12:469 WARN [node1411124885052] updated node status to 'ONLINE' [OHazelcastPlugin]
2014-09-19 20:08:12:478 INFO Installing Mail plugin, loaded 1 profile(s): [default] [OMailPlugin]
2014-09-19 20:08:12:622 INFO OrientDB Server v2.0-M1 is active. [OServer]

エラー表示もなく正常にDISTRIBUTEDモードで起動できました。

いろいろ面白そうなメッセージが出ていますが、後でまとめてみましょう。

分散ノード(2台目)を起動する

もう一台を同様に起動してみましょう。


-bash-4.1$ ./dserver.sh
           .
          .`        `
          ,      `:.
         `,`    ,:`
         .,.   :,,
         .,,  ,,,
    .    .,.:::::  ````                                 :::::::::     :::::::::
    ,`   .::,,,,::.,,,,,,`;;                      .:    ::::::::::    :::    :::
    `,.  ::,,,,,,,:.,,.`  `                       .:    :::      :::  :::     :::
     ,,:,:,,,,,,,,::.   `        `         ``     .:    :::      :::  :::     :::
      ,,:.,,,,,,,,,: `::, ,,   ::,::`   : :,::`  ::::   :::      :::  :::    :::
       ,:,,,,,,,,,,::,:   ,,  :.    :   ::    :   .:    :::      :::  :::::::
        :,,,,,,,,,,:,::   ,,  :      :  :     :   .:    :::      :::  :::::::::
  `     :,,,,,,,,,,:,::,  ,, .::::::::  :     :   .:    :::      :::  :::     :::
  `,...,,:,,,,,,,,,: .:,. ,, ,,         :     :   .:    :::      :::  :::     :::
    .,,,,::,,,,,,,:  `: , ,,  :     `   :     :   .:    :::      :::  :::     :::
      ...,::,,,,::.. `:  .,,  :,    :   :     :   .:    :::::::::::   :::     :::
           ,::::,,,. `:   ,,   :::::    :     :   .:    :::::::::     ::::::::::
           ,,:` `,,.
          ,,,    .,`
         ,,.     `,                                          GRAPH DATABASE
       ``        `.                                          DISTRIBUTED
                 ``                                         www.orientdb.org
                 `

2014-09-19 20:09:14:440 INFO Loading configuration from: /opt/orientdb/config/orientdb-dserver-config.xml... [OServerConfigurationLoaderXml]
2014-09-19 20:09:14:751 INFO OrientDB Server v2.0-M1 (build UNKNOWN@r; 2014-09-18 16:03:59+0200) is starting up... [OServer]
2014-09-19 20:09:14:769 INFO Databases directory: /opt/orientdb/databases [OServer]
2014-09-19 20:09:14:820 INFO Listening binary connections on 0.0.0.0:2424 (protocol v.25, socket=default) [OServerNetworkListener]
2014-09-19 20:09:14:822 INFO Listening http connections on 0.0.0.0:2480 (protocol v.10, socket=default) [OServerNetworkListener]
2014-09-19 20:09:14:845 INFO Installing dynamic plugin 'studio-2.0.zip'... [OServerPluginManager]
2014-09-19 20:09:15:028 INFO Installing GREMLIN language v.2.6.0 - graph.pool.max=50 [OGraphServerHandler]
2014-09-19 20:09:15:264 WARN Generating new node name for current node: node1411124955263 [OHazelcastPlugin]
2014-09-19 20:09:15:333 INFO Starting distributed server 'node1411124955263'... [OHazelcastPlugin]
2014-09-19 20:09:15:362 INFO Configuring Hazelcast from '/opt/orientdb/config/hazelcast.xml'. [FileSystemXmlConfig]
2014-09-19 20:09:15:693 INFO [LOCAL] [orientdb] [3.3] Prefer IPv4 stack is true. [DefaultAddressPicker]
2014-09-19 20:09:15:704 INFO [LOCAL] [orientdb] [3.3] Picked Address[192.168.2.128]:2434, using socket ServerSocket[addr=/0:0:0:0:0:0:0:0,localport=2434], bind any local is true [DefaultAddressPicker]
2014-09-19 20:09:15:755 INFO [192.168.2.128]:2434 [orientdb] [3.3] Starting with 4 generic operation threads and 4 partition operation threads. [BasicOperationScheduler]
2014-09-19 20:09:15:883 INFO [192.168.2.128]:2434 [orientdb] [3.3] Hazelcast 3.3 (20140907) starting at Address[192.168.2.128]:2434 [system]
2014-09-19 20:09:15:883 INFO [192.168.2.128]:2434 [orientdb] [3.3] Copyright (C) 2008-2014 Hazelcast.com [system]
2014-09-19 20:09:15:890 INFO [192.168.2.128]:2434 [orientdb] [3.3] Creating MulticastJoiner [Node]
2014-09-19 20:09:15:897 INFO [192.168.2.128]:2434 [orientdb] [3.3] Address[192.168.2.128]:2434 is STARTING [LifecycleService]
2014-09-19 20:09:16:122 INFO [192.168.2.128]:2434 [orientdb] [3.3] Trying to join to discovered node: Address[192.168.2.29]:2434 [MulticastJoiner]
2014-09-19 20:09:16:131 INFO [192.168.2.128]:2434 [orientdb] [3.3] Connecting to /192.168.2.29:2434, timeout: 0, bind-any: true [SocketConnector]
2014-09-19 20:09:16:139 INFO [192.168.2.128]:2434 [orientdb] [3.3] Established socket connection between /192.168.2.128:55904 and /192.168.2.29:2434 [TcpIpConnectionManager]
2014-09-19 20:09:22:155 INFO [192.168.2.128]:2434 [orientdb] [3.3]

Members [2] {
        Member [192.168.2.29]:2434
        Member [192.168.2.128]:2434 this
}
 [ClusterService]
2014-09-19 20:09:24:194 INFO [192.168.2.128]:2434 [orientdb] [3.3] Address[192.168.2.128]:2434 is STARTED [LifecycleService]
2014-09-19 20:09:24:242 INFO [node1411124955263] found no previous messages in queue orientdb.node.node1411124955263.response [OHazelcastDistributedMessageService]
2014-09-19 20:09:24:302 WARN [node1411124955263] dropping local database 'GratefulDeadConcerts' in '/opt/orientdb/databases/GratefulDeadConcerts' and get a fresh copy from a remote node... [OHazelcastPlugin]
2014-09-19 20:09:24:329 INFO [node1411124955263] loaded database configuration from active cluster [OHazelcastPlugin]
2014-09-19 20:09:24:348 INFO [node1411124955263] updated distributed configuration for database: GratefulDeadConcerts:
----------
{
  "autoDeploy":true,
  "hotAlignment":false,
  "readQuorum":1,
  "writeQuorum":2,
  "failureAvailableNodesLessQuorum":false,
  "readYourWrites":true,"clusters":{
    "internal":{
},
    "index":{
},
    "*":{
  "servers":["node1411124885052",""]
}
    },
  "version":1
}
---------- [OHazelcastPlugin]
2014-09-19 20:09:24:355 INFO [node1411124955263] adding node 'node1411124955263' in partition: db=GratefulDeadConcerts [*] [OHazelcastDistributedDatabase]
2014-09-19 20:09:24:357 INFO [node1411124955263] updated distributed configuration for database: GratefulDeadConcerts:
----------
{
  "autoDeploy":true,
  "hotAlignment":false,
  "readQuorum":1,
  "writeQuorum":2,
  "failureAvailableNodesLessQuorum":false,
  "readYourWrites":true,"clusters":{
    "internal":{
},
    "index":{
},
    "*":{
  "servers":["node1411124885052","node1411124955263",""]
}
    },
  "version":2
}
---------- [OHazelcastPlugin]
2014-09-19 20:09:24:357 INFO [node1411124955263] received added status node1411124955263.GratefulDeadConcerts=OFFLINE [OHazelcastPlugin]
2014-09-19 20:09:24:358 INFO [node1411124955263] Saving distributed configuration file for database 'GratefulDeadConcerts' to: /opt/orientdb/databases/GratefulDeadConcerts/distributed-config.json [OHazelcastPlugin]
2014-09-19 20:09:28:368 WARN [node1411124955263]->[[node1411124885052]] requesting deploy of database 'GratefulDeadConcerts' on local server... [OHazelcastPlugin]
2014-09-19 20:09:28:639 INFO [node1411124955263]<-[node1411124885052] received updated status node1411124885052.GratefulDeadConcerts=SYNCHRONIZING [OHazelcastPlugin]
2014-09-19 20:09:28:640 INFO [node1411124955263]<-[node1411124885052] received updated status node1411124955263.GratefulDeadConcerts=SYNCHRONIZING [OHazelcastPlugin]
2014-09-19 20:09:31:799 INFO [node1411124955263]<-[node1411124885052] received updated status node1411124885052.GratefulDeadConcerts=ONLINE [OHazelcastPlugin]
2014-09-19 20:09:32:119 WARN [node1411124955263]->[[node1411124885052]] deploy returned: {node1411124885052=/tmp/orientdb/backup_GratefulDeadConcerts.zip[0-307448] (last=true)} [OHazelcastPlugin]
2014-09-19 20:09:32:120 INFO [node1411124955263]<-[node1411124885052] copying remote database 'GratefulDeadConcerts' to: /tmp/orientdb/install_GratefulDeadConcerts.zip [OHazelcastPlugin]
2014-09-19 20:09:32:121 WARN [node1411124955263] - writing chunk #1 offset=0 size=300.24Kb [OHazelcastPlugin]
2014-09-19 20:09:32:122 INFO [node1411124955263] database copied correctly, size=300.24Kb [OHazelcastPlugin]
2014-09-19 20:09:32:123 WARN [node1411124955263]<-[node1411124885052] installing database 'GratefulDeadConcerts' to: /opt/orientdb/databases/GratefulDeadConcerts... [OHazelcastPlugin]
2014-09-19 20:09:32:177 INFO
- Uncompressing file ._e.pcl... [OHazelcastPlugin]
2014-09-19 20:09:32:178 INFO
- Uncompressing file ._ouser.pcl... [OHazelcastPlugin]
2014-09-19 20:09:32:178 INFO
- Uncompressing file OUser.name.sbt... [OHazelcastPlugin]
2014-09-19 20:09:32:179 INFO
- Uncompressing file OUser.name.nbt... [OHazelcastPlugin]
2014-09-19 20:09:32:181 INFO
- Uncompressing file default.cpm... [OHazelcastPlugin]
2014-09-19 20:09:32:181 INFO
- Uncompressing file ._manindex.cpm... [OHazelcastPlugin]
2014-09-19 20:09:32:181 INFO
- Uncompressing file default.pcl... [OHazelcastPlugin]
2014-09-19 20:09:32:182 INFO
- Uncompressing file database.ocf... [OHazelcastPlugin]
2014-09-19 20:09:32:183 INFO
- Uncompressing file e.cpm... [OHazelcastPlugin]
2014-09-19 20:09:32:183 INFO
- Uncompressing file ORole.name.sbt... [OHazelcastPlugin]
2014-09-19 20:09:32:184 INFO
- Uncompressing file orids.cpm... [OHazelcastPlugin]
2014-09-19 20:09:32:184 INFO
- Uncompressing file ._manindex.pcl... [OHazelcastPlugin]
2014-09-19 20:09:32:185 INFO
- Uncompressing file name_id_map.cm... [OHazelcastPlugin]
2014-09-19 20:09:32:185 INFO
- Uncompressing file followed_by.pcl... [OHazelcastPlugin]
2014-09-19 20:09:32:199 INFO
- Uncompressing file ._ofunction.pcl... [OHazelcastPlugin]
2014-09-19 20:09:32:200 INFO
- Uncompressing file v.cpm... [OHazelcastPlugin]
2014-09-19 20:09:32:201 INFO
- Uncompressing file ._name_id_map.cm... [OHazelcastPlugin]
2014-09-19 20:09:32:201 INFO
- Uncompressing file ._internal.cpm... [OHazelcastPlugin]
2014-09-19 20:09:32:201 INFO
- Uncompressing file ofunction.cpm... [OHazelcastPlugin]
2014-09-19 20:09:32:202 INFO
- Uncompressing file ._followed_by.pcl... [OHazelcastPlugin]
2014-09-19 20:09:32:202 INFO
- Uncompressing file ._oschedule.pcl... [OHazelcastPlugin]
2014-09-19 20:09:32:202 INFO
- Uncompressing file ._orole.pcl... [OHazelcastPlugin]
2014-09-19 20:09:32:203 INFO
- Uncompressing file ._default.pcl... [OHazelcastPlugin]
2014-09-19 20:09:32:203 INFO
- Uncompressing file ._orids.pcl... [OHazelcastPlugin]
2014-09-19 20:09:32:204 INFO
- Uncompressing file ._v.pcl... [OHazelcastPlugin]
2014-09-19 20:09:32:204 INFO
- Uncompressing file GratefulDeadConcerts.wmr... [OHazelcastPlugin]
2014-09-19 20:09:32:205 INFO
- Uncompressing file dirty.fl... [OHazelcastPlugin]
2014-09-19 20:09:32:205 INFO
- Uncompressing file ORole.name.nbt... [OHazelcastPlugin]
2014-09-19 20:09:32:205 INFO
- Uncompressing file e.pcl... [OHazelcastPlugin]
2014-09-19 20:09:32:206 INFO
- Uncompressing file internal.cpm... [OHazelcastPlugin]
2014-09-19 20:09:32:207 INFO
- Uncompressing file oschedule.cpm... [OHazelcastPlugin]
2014-09-19 20:09:32:208 INFO
- Uncompressing file ._followed_by.cpm... [OHazelcastPlugin]
2014-09-19 20:09:32:208 INFO
- Uncompressing file oschedule.pcl... [OHazelcastPlugin]
2014-09-19 20:09:32:209 INFO
- Uncompressing file ._collections_9.sbc... [OHazelcastPlugin]
2014-09-19 20:09:32:209 INFO
- Uncompressing file ouser.cpm... [OHazelcastPlugin]
2014-09-19 20:09:32:210 INFO
- Uncompressing file ._GratefulDeadConcerts.wmr... [OHazelcastPlugin]
2014-09-19 20:09:32:211 INFO
- Uncompressing file ouser.pcl... [OHazelcastPlugin]
2014-09-19 20:09:32:212 INFO
- Uncompressing file dictionary.nbt... [OHazelcastPlugin]
2014-09-19 20:09:32:212 INFO
- Uncompressing file v.pcl... [OHazelcastPlugin]
2014-09-19 20:09:32:223 INFO
- Uncompressing file orole.pcl... [OHazelcastPlugin]
2014-09-19 20:09:32:225 INFO
- Uncompressing file ._index.cpm... [OHazelcastPlugin]
2014-09-19 20:09:32:225 INFO
- Uncompressing file ._default.cpm... [OHazelcastPlugin]
2014-09-19 20:09:32:225 INFO
- Uncompressing file manindex.cpm... [OHazelcastPlugin]
2014-09-19 20:09:32:226 INFO
- Uncompressing file ._e.cpm... [OHazelcastPlugin]
2014-09-19 20:09:32:227 INFO
- Uncompressing file dictionary.sbt... [OHazelcastPlugin]
2014-09-19 20:09:32:228 INFO
- Uncompressing file distributed-config.json... [OHazelcastPlugin]
2014-09-19 20:09:32:228 INFO
- Uncompressing file ._index.pcl... [OHazelcastPlugin]
2014-09-19 20:09:32:228 INFO
- Uncompressing file ._internal.pcl... [OHazelcastPlugin]
2014-09-19 20:09:32:229 INFO
- Uncompressing file ._ofunction.cpm... [OHazelcastPlugin]
2014-09-19 20:09:32:229 INFO
- Uncompressing file ._oschedule.cpm... [OHazelcastPlugin]
2014-09-19 20:09:32:229 INFO
- Uncompressing file orids.pcl... [OHazelcastPlugin]
2014-09-19 20:09:32:230 INFO
- Uncompressing file ._ouser.cpm... [OHazelcastPlugin]
2014-09-19 20:09:32:231 INFO
- Uncompressing file index.pcl... [OHazelcastPlugin]
2014-09-19 20:09:32:232 INFO
- Uncompressing file ._database.ocf... [OHazelcastPlugin]
2014-09-19 20:09:32:233 INFO
- Uncompressing file index.cpm... [OHazelcastPlugin]
2014-09-19 20:09:32:233 INFO
- Uncompressing file ofunction.pcl... [OHazelcastPlugin]
2014-09-19 20:09:32:234 INFO
- Uncompressing file followed_by.cpm... [OHazelcastPlugin]
2014-09-19 20:09:32:236 INFO
- Uncompressing file orole.cpm... [OHazelcastPlugin]
2014-09-19 20:09:32:237 INFO
- Uncompressing file ._ORole.name.sbt... [OHazelcastPlugin]
2014-09-19 20:09:32:237 INFO
- Uncompressing file ._orole.cpm... [OHazelcastPlugin]
2014-09-19 20:09:32:238 INFO
- Uncompressing file ._OUser.name.sbt... [OHazelcastPlugin]
2014-09-19 20:09:32:238 INFO
- Uncompressing file ._v.cpm... [OHazelcastPlugin]
2014-09-19 20:09:32:238 INFO
- Uncompressing file ._dirty.fl... [OHazelcastPlugin]
2014-09-19 20:09:32:239 INFO
- Uncompressing file manindex.pcl... [OHazelcastPlugin]
2014-09-19 20:09:32:240 INFO
- Uncompressing file internal.pcl... [OHazelcastPlugin]
2014-09-19 20:09:32:242 INFO
- Uncompressing file ._orids.cpm... [OHazelcastPlugin]
2014-09-19 20:09:32:242 INFO
- Uncompressing file ._dictionary.sbt... [OHazelcastPlugin]
2014-09-19 20:09:32:242 INFO
- Uncompressing file collections_9.sbc... [OHazelcastPlugin]
2014-09-19 20:09:32:247 INFO [node1411124955263] installed database 'GratefulDeadConcerts' [OHazelcastPlugin]
2014-09-19 20:09:32:249 INFO [node1411124955263] found no previous messages in queue orientdb.node.node1411124955263.GratefulDeadConcerts.request [OHazelcastDistributedMessageService]
2014-09-19 20:09:34:163 INFO [node1411124955263] Installing distributed storage on database 'GratefulDeadConcerts' [ODistributedStorage]
2014-09-19 20:09:34:165 WARN class E, creation of new local cluster 'e_node1411124955263' [OHazelcastPlugin]
2014-09-19 20:09:37:042 WARN class E, set mastership of cluster 'e_node1411124955263' (id=12) to 'node1411124955263' [OHazelcastPlugin]
2014-09-19 20:09:37:043 WARN class ORole, creation of new local cluster 'orole_node1411124955263' [OHazelcastPlugin]
2014-09-19 20:09:39:787 WARN class ORole, set mastership of cluster 'orole_node1411124955263' (id=13) to 'node1411124955263' [OHazelcastPlugin]
2014-09-19 20:09:39:788 WARN class OUser, creation of new local cluster 'ouser_node1411124955263' [OHazelcastPlugin]
2014-09-19 20:09:41:086 WARN class OUser, set mastership of cluster 'ouser_node1411124955263' (id=14) to 'node1411124955263' [OHazelcastPlugin]
2014-09-19 20:09:41:087 WARN class OSchedule, creation of new local cluster 'oschedule_node1411124955263' [OHazelcastPlugin]
2014-09-19 20:09:42:319 WARN class OSchedule, set mastership of cluster 'oschedule_node1411124955263' (id=15) to 'node1411124955263' [OHazelcastPlugin]
2014-09-19 20:09:42:319 WARN class ORIDs, creation of new local cluster 'orids_node1411124955263' [OHazelcastPlugin]
2014-09-19 20:09:43:588 WARN class ORIDs, set mastership of cluster 'orids_node1411124955263' (id=16) to 'node1411124955263' [OHazelcastPlugin]
2014-09-19 20:09:43:589 WARN class OFunction, creation of new local cluster 'ofunction_node1411124955263' [OHazelcastPlugin]
2014-09-19 20:09:44:874 WARN class OFunction, set mastership of cluster 'ofunction_node1411124955263' (id=17) to 'node1411124955263' [OHazelcastPlugin]
2014-09-19 20:09:44:875 WARN class followed_by, creation of new local cluster 'followed_by_node1411124955263' [OHazelcastPlugin]
2014-09-19 20:09:46:127 WARN class followed_by, set mastership of cluster 'followed_by_node1411124955263' (id=18) to 'node1411124955263' [OHazelcastPlugin]
2014-09-19 20:09:46:127 WARN class V, creation of new local cluster 'v_node1411124955263' [OHazelcastPlugin]
2014-09-19 20:09:47:363 WARN class V, set mastership of cluster 'v_node1411124955263' (id=19) to 'node1411124955263' [OHazelcastPlugin]
2014-09-19 20:09:47:363 WARN Distributed configuration modified [OHazelcastPlugin]
2014-09-19 20:09:47:367 INFO [node1411124955263] updated distributed configuration for database: GratefulDeadConcerts:
----------
{
  "autoDeploy":true,
  "hotAlignment":false,
  "readQuorum":1,
  "writeQuorum":2,
  "failureAvailableNodesLessQuorum":false,
  "readYourWrites":true,"clusters":{
    "internal":{
},
    "index":{
},
    "*":{
  "servers":["node1411124885052","node1411124955263",""]
},
    "e_node1411124955263":{
  "servers":["node1411124955263","node1411124885052",""]
},
    "orole_node1411124955263":{
  "servers":["node1411124955263","node1411124885052",""]
},
    "ouser_node1411124955263":{
  "servers":["node1411124955263","node1411124885052",""]
},
    "oschedule_node1411124955263":{
  "servers":["node1411124955263","node1411124885052",""]
},
    "orids_node1411124955263":{
  "servers":["node1411124955263","node1411124885052",""]
},
    "ofunction_node1411124955263":{
  "servers":["node1411124955263","node1411124885052",""]
},
    "followed_by_node1411124955263":{
  "servers":["node1411124955263","node1411124885052",""]
},
    "v_node1411124955263":{
  "servers":["node1411124955263","node1411124885052",""]
}
    },
  "version":10
}
---------- [OHazelcastPlugin]
2014-09-19 20:09:47:368 INFO [node1411124955263] Saving distributed configuration file for database 'GratefulDeadConcerts' to: /opt/orientdb/databases/GratefulDeadConcerts/distributed-config.json [OHazelcastPlugin]
2014-09-19 20:09:47:385 INFO [node1411124955263] found no previous messages in queue orientdb.node.node1411124955263.GratefulDeadConcerts.insert.request [OHazelcastDistributedMessageService]
2014-09-19 20:09:47:388 INFO [node1411124955263] Publishing online status for database node1411124955263.GratefulDeadConcerts... [OHazelcastDistributedDatabase]
2014-09-19 20:09:47:393 INFO [node1411124955263] received updated status node1411124955263.GratefulDeadConcerts=ONLINE [OHazelcastPlugin]
2014-09-19 20:09:47:396 WARN [node1411124955263] updated node status to 'ONLINE' [OHazelcastPlugin]
2014-09-19 20:09:47:408 INFO Installing Mail plugin, loaded 1 profile(s): [default] [OMailPlugin]
2014-09-19 20:09:47:569 INFO OrientDB Server v2.0-M1 is active. [OServer]

こちらも正常にDISTRIBUTEDモードで起動できました。

ここまで来て、最初の1台のコンソールを見ると、追加でいろいろメッセージが出ています。

分散ノード(1台目)のコンソールに追加でメッセージが表示された


2014-09-19 20:09:16:132 INFO [192.168.2.29]:2434 [orientdb] [3.3] Accepting socket connection from /192.168.2.128:55904 [SocketAcceptor]
2014-09-19 20:09:16:138 INFO [192.168.2.29]:2434 [orientdb] [3.3] Established socket connection between /192.168.2.29:2434 and /192.168.2.128:55904 [TcpIpConnectionManager]
2014-09-19 20:09:22:139 INFO [192.168.2.29]:2434 [orientdb] [3.3]

Members [2] {
        Member [192.168.2.29]:2434 this
        Member [192.168.2.128]:2434
}
 [ClusterService]
2014-09-19 20:09:22:140 WARN [node1411124885052] added new node id=Member [192.168.2.128]:2434 name=ext:a8fd1316-c728-4d86-a807-77b8ad7ef03d [OHazelcastPlugin]
2014-09-19 20:09:22:441 INFO [192.168.2.29]:2434 [orientdb] [3.3] Re-partitioning cluster data... Migration queue size: 135 [InternalPartitionService]
2014-09-19 20:09:24:228 INFO [node1411124885052]<-[node1411124955263] added node configuration id=Member [192.168.2.128]:2434 name=node1411124955263, now 2 nodes are configured [OHazelcastPlugin]
2014-09-19 20:09:24:352 INFO [node1411124885052]<-[node1411124955263] received added status node1411124955263.GratefulDeadConcerts=OFFLINE [OHazelcastPlugin]
2014-09-19 20:09:24:363 INFO [node1411124885052]--[node1411124955263] update configuration db=GratefulDeadConcerts [OHazelcastPlugin]
2014-09-19 20:09:24:904 INFO [node1411124885052] updated distributed configuration for database: GratefulDeadConcerts:
----------
{
  "autoDeploy":true,
  "hotAlignment":false,
  "readQuorum":1,
  "writeQuorum":2,
  "failureAvailableNodesLessQuorum":false,
  "readYourWrites":true,"clusters":{
    "internal":{
},
    "index":{
},
    "*":{
  "servers":["node1411124885052","node1411124955263",""]
}
    },
  "version":2
}
---------- [OHazelcastPlugin]
2014-09-19 20:09:24:905 INFO [node1411124885052] Saving distributed configuration file for database 'GratefulDeadConcerts' to: /opt/orientdb/databases/GratefulDeadConcerts/distributed-config.json [OHazelcastPlugin]
2014-09-19 20:09:26:315 INFO [192.168.2.29]:2434 [orientdb] [3.3] All migration tasks have been completed, queues are empty. [InternalPartitionService]
2014-09-19 20:09:28:430 WARN [node1411124885052]->[node1411124955263] deploying database GratefulDeadConcerts... [ODeployDatabaseTask]
2014-09-19 20:09:28:431 INFO [node1411124885052]->[node1411124955263] creating backup of database 'GratefulDeadConcerts' in directory: /tmp/orientdb/backup_GratefulDeadConcerts.zip... [ODeployDatabaseTask]
2014-09-19 20:09:28:432 INFO [node1411124885052] received updated status node1411124955263.GratefulDeadConcerts=SYNCHRONIZING [OHazelcastPlugin]
2014-09-19 20:09:28:432 INFO [node1411124885052] received updated status node1411124885052.GratefulDeadConcerts=SYNCHRONIZING [OHazelcastPlugin]
2014-09-19 20:09:30:508 INFO - Compressing file ._e.pcl... [ODeployDatabaseTask]
2014-09-19 20:09:30:509 INFO ok size=187b compressedSize=110 ratio=42% elapsed=1ms [ODeployDatabaseTask]
2014-09-19 20:09:30:509 INFO - Compressing file ._ouser.pcl... [ODeployDatabaseTask]
2014-09-19 20:09:30:509 INFO ok size=187b compressedSize=110 ratio=42% elapsed=0ms [ODeployDatabaseTask]
2014-09-19 20:09:30:509 INFO - Compressing file OUser.name.sbt... [ODeployDatabaseTask]
2014-09-19 20:09:30:510 INFO ok size=65.00Kb compressedSize=181 ratio=100% elapsed=1ms [ODeployDatabaseTask]
2014-09-19 20:09:30:510 INFO - Compressing file OUser.name.nbt... [ODeployDatabaseTask]
2014-09-19 20:09:30:511 INFO ok size=1024b compressedSize=18 ratio=99% elapsed=1ms [ODeployDatabaseTask]
2014-09-19 20:09:30:511 INFO - Compressing file default.cpm... [ODeployDatabaseTask]
2014-09-19 20:09:30:511 INFO ok size=1024b compressedSize=18 ratio=99% elapsed=0ms [ODeployDatabaseTask]
2014-09-19 20:09:30:511 INFO - Compressing file ._manindex.cpm... [ODeployDatabaseTask]
2014-09-19 20:09:30:512 INFO ok size=187b compressedSize=110 ratio=42% elapsed=0ms [ODeployDatabaseTask]
2014-09-19 20:09:30:512 INFO - Compressing file default.pcl... [ODeployDatabaseTask]
2014-09-19 20:09:30:513 INFO ok size=65.00Kb compressedSize=125 ratio=100% elapsed=1ms [ODeployDatabaseTask]
2014-09-19 20:09:30:513 INFO - Compressing file database.ocf... [ODeployDatabaseTask]
2014-09-19 20:09:30:513 INFO ok size=1.64Kb compressedSize=288 ratio=83% elapsed=0ms [ODeployDatabaseTask]
2014-09-19 20:09:30:513 INFO - Compressing file e.cpm... [ODeployDatabaseTask]
2014-09-19 20:09:30:514 INFO ok size=1024b compressedSize=18 ratio=99% elapsed=0ms [ODeployDatabaseTask]
2014-09-19 20:09:30:514 INFO - Compressing file ORole.name.sbt... [ODeployDatabaseTask]
2014-09-19 20:09:30:515 INFO ok size=65.00Kb compressedSize=180 ratio=100% elapsed=0ms [ODeployDatabaseTask]
2014-09-19 20:09:30:515 INFO - Compressing file orids.cpm... [ODeployDatabaseTask]
2014-09-19 20:09:30:515 INFO ok size=1024b compressedSize=18 ratio=99% elapsed=0ms [ODeployDatabaseTask]
2014-09-19 20:09:30:515 INFO - Compressing file ._manindex.pcl... [ODeployDatabaseTask]
2014-09-19 20:09:30:515 INFO ok size=187b compressedSize=110 ratio=42% elapsed=0ms [ODeployDatabaseTask]
2014-09-19 20:09:30:516 INFO - Compressing file name_id_map.cm... [ODeployDatabaseTask]
2014-09-19 20:09:30:516 INFO ok size=1.16Kb compressedSize=318 ratio=74% elapsed=0ms [ODeployDatabaseTask]
2014-09-19 20:09:30:516 INFO - Compressing file followed_by.pcl... [ODeployDatabaseTask]
2014-09-19 20:09:30:596 INFO ok size=1.19Mb compressedSize=121499 ratio=91% elapsed=80ms [ODeployDatabaseTask]
2014-09-19 20:09:30:597 INFO - Compressing file ._ofunction.pcl... [ODeployDatabaseTask]
2014-09-19 20:09:30:597 INFO ok size=187b compressedSize=110 ratio=42% elapsed=0ms [ODeployDatabaseTask]
2014-09-19 20:09:30:597 INFO - Compressing file v.cpm... [ODeployDatabaseTask]
2014-09-19 20:09:30:600 INFO ok size=65.00Kb compressedSize=1809 ratio=98% elapsed=3ms [ODeployDatabaseTask]
2014-09-19 20:09:30:600 INFO - Compressing file ._name_id_map.cm... [ODeployDatabaseTask]
2014-09-19 20:09:30:600 INFO ok size=187b compressedSize=110 ratio=42% elapsed=0ms [ODeployDatabaseTask]
2014-09-19 20:09:30:601 INFO - Compressing file ._internal.cpm... [ODeployDatabaseTask]
2014-09-19 20:09:30:601 INFO ok size=187b compressedSize=110 ratio=42% elapsed=0ms [ODeployDatabaseTask]
2014-09-19 20:09:30:601 INFO - Compressing file ofunction.cpm... [ODeployDatabaseTask]
2014-09-19 20:09:30:602 INFO ok size=1024b compressedSize=18 ratio=99% elapsed=0ms [ODeployDatabaseTask]
2014-09-19 20:09:30:602 INFO - Compressing file ._followed_by.pcl... [ODeployDatabaseTask]
2014-09-19 20:09:30:602 INFO ok size=187b compressedSize=110 ratio=42% elapsed=0ms [ODeployDatabaseTask]
2014-09-19 20:09:30:602 INFO - Compressing file ._oschedule.pcl... [ODeployDatabaseTask]
2014-09-19 20:09:30:603 INFO ok size=187b compressedSize=110 ratio=42% elapsed=1ms [ODeployDatabaseTask]
2014-09-19 20:09:30:603 INFO - Compressing file ._orole.pcl... [ODeployDatabaseTask]
2014-09-19 20:09:30:603 INFO ok size=187b compressedSize=110 ratio=42% elapsed=0ms [ODeployDatabaseTask]
2014-09-19 20:09:30:604 INFO - Compressing file ._default.pcl... [ODeployDatabaseTask]
2014-09-19 20:09:30:604 INFO ok size=187b compressedSize=110 ratio=42% elapsed=0ms [ODeployDatabaseTask]
2014-09-19 20:09:30:604 INFO - Compressing file ._orids.pcl... [ODeployDatabaseTask]
2014-09-19 20:09:30:605 INFO ok size=187b compressedSize=110 ratio=42% elapsed=1ms [ODeployDatabaseTask]
2014-09-19 20:09:30:605 INFO - Compressing file ._v.pcl... [ODeployDatabaseTask]
2014-09-19 20:09:30:605 INFO ok size=187b compressedSize=110 ratio=42% elapsed=0ms [ODeployDatabaseTask]
2014-09-19 20:09:30:606 INFO - Compressing file GratefulDeadConcerts.wmr... [ODeployDatabaseTask]
2014-09-19 20:09:30:606 INFO ok size=40b compressedSize=21 ratio=48% elapsed=1ms [ODeployDatabaseTask]
2014-09-19 20:09:30:606 INFO - Compressing file dirty.fl... [ODeployDatabaseTask]
2014-09-19 20:09:30:606 INFO ok size=1b compressedSize=3 ratio=-200% elapsed=0ms [ODeployDatabaseTask]
2014-09-19 20:09:30:607 INFO - Compressing file ORole.name.nbt... [ODeployDatabaseTask]
2014-09-19 20:09:30:607 INFO ok size=1024b compressedSize=18 ratio=99% elapsed=0ms [ODeployDatabaseTask]
2014-09-19 20:09:30:607 INFO - Compressing file e.pcl... [ODeployDatabaseTask]
2014-09-19 20:09:30:609 INFO ok size=65.00Kb compressedSize=127 ratio=100% elapsed=2ms [ODeployDatabaseTask]
2014-09-19 20:09:30:609 INFO - Compressing file internal.cpm... [ODeployDatabaseTask]
2014-09-19 20:09:30:611 INFO ok size=65.00Kb compressedSize=133 ratio=100% elapsed=1ms [ODeployDatabaseTask]
2014-09-19 20:09:30:611 INFO - Compressing file oschedule.cpm... [ODeployDatabaseTask]
2014-09-19 20:09:30:611 INFO ok size=1024b compressedSize=18 ratio=99% elapsed=0ms [ODeployDatabaseTask]
2014-09-19 20:09:30:611 INFO - Compressing file ._followed_by.cpm... [ODeployDatabaseTask]
2014-09-19 20:09:30:612 INFO ok size=187b compressedSize=110 ratio=42% elapsed=1ms [ODeployDatabaseTask]
2014-09-19 20:09:30:612 INFO - Compressing file oschedule.pcl... [ODeployDatabaseTask]
2014-09-19 20:09:30:613 INFO ok size=65.00Kb compressedSize=126 ratio=100% elapsed=1ms [ODeployDatabaseTask]
2014-09-19 20:09:30:614 INFO - Compressing file ._collections_9.sbc... [ODeployDatabaseTask]
2014-09-19 20:09:30:614 INFO ok size=187b compressedSize=110 ratio=42% elapsed=0ms [ODeployDatabaseTask]
2014-09-19 20:09:30:614 INFO - Compressing file ouser.cpm... [ODeployDatabaseTask]
2014-09-19 20:09:30:616 INFO ok size=65.00Kb compressedSize=131 ratio=100% elapsed=2ms [ODeployDatabaseTask]
2014-09-19 20:09:30:616 INFO - Compressing file ._GratefulDeadConcerts.wmr... [ODeployDatabaseTask]
2014-09-19 20:09:30:616 INFO ok size=187b compressedSize=110 ratio=42% elapsed=0ms [ODeployDatabaseTask]
2014-09-19 20:09:30:617 INFO - Compressing file ouser.pcl... [ODeployDatabaseTask]
2014-09-19 20:09:30:619 INFO ok size=129.00Kb compressedSize=547 ratio=100% elapsed=3ms [ODeployDatabaseTask]
2014-09-19 20:09:30:619 INFO - Compressing file dictionary.nbt... [ODeployDatabaseTask]
2014-09-19 20:09:30:620 INFO ok size=1024b compressedSize=18 ratio=99% elapsed=1ms [ODeployDatabaseTask]
2014-09-19 20:09:30:620 INFO - Compressing file v.pcl... [ODeployDatabaseTask]
2014-09-19 20:09:30:682 INFO ok size=705.00Kb compressedSize=122344 ratio=84% elapsed=61ms [ODeployDatabaseTask]
2014-09-19 20:09:30:682 INFO - Compressing file orole.pcl... [ODeployDatabaseTask]
2014-09-19 20:09:30:684 INFO ok size=129.00Kb compressedSize=607 ratio=100% elapsed=2ms [ODeployDatabaseTask]
2014-09-19 20:09:30:685 INFO - Compressing file ._index.cpm... [ODeployDatabaseTask]
2014-09-19 20:09:30:685 INFO ok size=187b compressedSize=110 ratio=42% elapsed=0ms [ODeployDatabaseTask]
2014-09-19 20:09:30:685 INFO - Compressing file ._default.cpm... [ODeployDatabaseTask]
2014-09-19 20:09:30:686 INFO ok size=187b compressedSize=110 ratio=42% elapsed=0ms [ODeployDatabaseTask]
2014-09-19 20:09:30:686 INFO - Compressing file manindex.cpm... [ODeployDatabaseTask]
2014-09-19 20:09:30:687 INFO ok size=65.00Kb compressedSize=125 ratio=100% elapsed=1ms [ODeployDatabaseTask]
2014-09-19 20:09:30:687 INFO - Compressing file ._e.cpm... [ODeployDatabaseTask]
2014-09-19 20:09:30:688 INFO ok size=187b compressedSize=110 ratio=42% elapsed=1ms [ODeployDatabaseTask]
2014-09-19 20:09:30:688 INFO - Compressing file dictionary.sbt... [ODeployDatabaseTask]
2014-09-19 20:09:30:689 INFO ok size=65.00Kb compressedSize=123 ratio=100% elapsed=1ms [ODeployDatabaseTask]
2014-09-19 20:09:30:690 INFO - Compressing file distributed-config.json... [ODeployDatabaseTask]
2014-09-19 20:09:30:690 INFO ok size=377b compressedSize=200 ratio=47% elapsed=0ms [ODeployDatabaseTask]
2014-09-19 20:09:30:690 INFO - Compressing file ._index.pcl... [ODeployDatabaseTask]
2014-09-19 20:09:30:691 INFO ok size=187b compressedSize=110 ratio=42% elapsed=0ms [ODeployDatabaseTask]
2014-09-19 20:09:30:691 INFO - Compressing file ._internal.pcl... [ODeployDatabaseTask]
2014-09-19 20:09:30:691 INFO ok size=187b compressedSize=110 ratio=42% elapsed=0ms [ODeployDatabaseTask]
2014-09-19 20:09:30:691 INFO - Compressing file ._ofunction.cpm... [ODeployDatabaseTask]
2014-09-19 20:09:30:692 INFO ok size=187b compressedSize=110 ratio=42% elapsed=1ms [ODeployDatabaseTask]
2014-09-19 20:09:30:692 INFO - Compressing file ._oschedule.cpm... [ODeployDatabaseTask]
2014-09-19 20:09:30:692 INFO ok size=187b compressedSize=110 ratio=42% elapsed=0ms [ODeployDatabaseTask]
2014-09-19 20:09:30:693 INFO - Compressing file orids.pcl... [ODeployDatabaseTask]
2014-09-19 20:09:30:694 INFO ok size=65.00Kb compressedSize=117 ratio=100% elapsed=1ms [ODeployDatabaseTask]
2014-09-19 20:09:30:694 INFO - Compressing file ._ouser.cpm... [ODeployDatabaseTask]
2014-09-19 20:09:30:695 INFO ok size=187b compressedSize=110 ratio=42% elapsed=1ms [ODeployDatabaseTask]
2014-09-19 20:09:30:695 INFO - Compressing file index.pcl... [ODeployDatabaseTask]
2014-09-19 20:09:30:697 INFO ok size=129.00Kb compressedSize=254 ratio=100% elapsed=2ms [ODeployDatabaseTask]
2014-09-19 20:09:30:698 INFO - Compressing file ._database.ocf... [ODeployDatabaseTask]
2014-09-19 20:09:30:698 INFO ok size=187b compressedSize=110 ratio=42% elapsed=0ms [ODeployDatabaseTask]
2014-09-19 20:09:30:698 INFO - Compressing file index.cpm... [ODeployDatabaseTask]
2014-09-19 20:09:30:700 INFO ok size=65.00Kb compressedSize=126 ratio=100% elapsed=1ms [ODeployDatabaseTask]
2014-09-19 20:09:30:700 INFO - Compressing file ofunction.pcl... [ODeployDatabaseTask]
2014-09-19 20:09:30:701 INFO ok size=65.00Kb compressedSize=127 ratio=100% elapsed=1ms [ODeployDatabaseTask]
2014-09-19 20:09:30:701 INFO - Compressing file followed_by.cpm... [ODeployDatabaseTask]
2014-09-19 20:09:30:713 INFO ok size=129.00Kb compressedSize=12924 ratio=91% elapsed=12ms [ODeployDatabaseTask]
2014-09-19 20:09:30:714 INFO - Compressing file orole.cpm... [ODeployDatabaseTask]
2014-09-19 20:09:30:715 INFO ok size=65.00Kb compressedSize=133 ratio=100% elapsed=1ms [ODeployDatabaseTask]
2014-09-19 20:09:30:715 INFO - Compressing file ._ORole.name.sbt... [ODeployDatabaseTask]
2014-09-19 20:09:30:716 INFO ok size=187b compressedSize=110 ratio=42% elapsed=1ms [ODeployDatabaseTask]
2014-09-19 20:09:30:716 INFO - Compressing file ._orole.cpm... [ODeployDatabaseTask]
2014-09-19 20:09:30:716 INFO ok size=187b compressedSize=110 ratio=42% elapsed=0ms [ODeployDatabaseTask]
2014-09-19 20:09:30:717 INFO - Compressing file ._OUser.name.sbt... [ODeployDatabaseTask]
2014-09-19 20:09:30:717 INFO ok size=187b compressedSize=110 ratio=42% elapsed=1ms [ODeployDatabaseTask]
2014-09-19 20:09:30:717 INFO - Compressing file ._v.cpm... [ODeployDatabaseTask]
2014-09-19 20:09:30:718 INFO ok size=187b compressedSize=110 ratio=42% elapsed=0ms [ODeployDatabaseTask]
2014-09-19 20:09:30:718 INFO - Compressing file ._dirty.fl... [ODeployDatabaseTask]
2014-09-19 20:09:30:718 INFO ok size=187b compressedSize=110 ratio=42% elapsed=0ms [ODeployDatabaseTask]
2014-09-19 20:09:30:718 INFO - Compressing file manindex.pcl... [ODeployDatabaseTask]
2014-09-19 20:09:30:721 INFO ok size=129.00Kb compressedSize=244 ratio=100% elapsed=3ms [ODeployDatabaseTask]
2014-09-19 20:09:30:721 INFO - Compressing file internal.pcl... [ODeployDatabaseTask]
2014-09-19 20:09:30:724 INFO ok size=129.00Kb compressedSize=3036 ratio=98% elapsed=3ms [ODeployDatabaseTask]
2014-09-19 20:09:30:724 INFO - Compressing file ._orids.cpm... [ODeployDatabaseTask]
2014-09-19 20:09:30:725 INFO ok size=187b compressedSize=110 ratio=42% elapsed=0ms [ODeployDatabaseTask]
2014-09-19 20:09:30:725 INFO - Compressing file ._dictionary.sbt... [ODeployDatabaseTask]
2014-09-19 20:09:30:725 INFO ok size=187b compressedSize=110 ratio=42% elapsed=0ms [ODeployDatabaseTask]
2014-09-19 20:09:30:725 INFO - Compressing file collections_9.sbc... [ODeployDatabaseTask]
2014-09-19 20:09:30:738 INFO ok size=321.00Kb compressedSize=29900 ratio=91% elapsed=13ms [ODeployDatabaseTask]
2014-09-19 20:09:31:792 INFO [node1411124885052]->[node1411124955263] sending the compressed database 'GratefulDeadConcerts' over the NETWORK to node 'node1411124955263', size=300.24Kb, lastOperationId=0... [ODeployDatabaseTask]
2014-09-19 20:09:31:794 INFO [node1411124885052]->[node1411124955263] - transferring chunk #1 offset=0 size=307448... [ODeployDatabaseTask]
2014-09-19 20:09:31:797 INFO [node1411124885052] received updated status node1411124885052.GratefulDeadConcerts=ONLINE [OHazelcastPlugin]
2014-09-19 20:09:31:799 INFO [node1411124885052]->[node1411124955263] deploy database task completed [ODeployDatabaseTask]
2014-09-19 20:09:47:380 INFO [node1411124885052]--[node1411124955263] update configuration db=GratefulDeadConcerts [OHazelcastPlugin]
2014-09-19 20:09:47:388 INFO [node1411124885052]<-[node1411124955263] received updated status node1411124955263.GratefulDeadConcerts=ONLINE [OHazelcastPlugin]
2014-09-19 20:09:47:404 INFO [node1411124885052] updated distributed configuration for database: GratefulDeadConcerts:
----------
{
  "autoDeploy":true,
  "hotAlignment":false,
  "readQuorum":1,
  "writeQuorum":2,
  "failureAvailableNodesLessQuorum":false,
  "readYourWrites":true,"clusters":{
    "internal":{
},
    "index":{
},
    "*":{
  "servers":["node1411124885052","node1411124955263",""]
},
    "e_node1411124955263":{
  "servers":["node1411124955263","node1411124885052",""]
},
    "orole_node1411124955263":{
  "servers":["node1411124955263","node1411124885052",""]
},
    "ouser_node1411124955263":{
  "servers":["node1411124955263","node1411124885052",""]
},
    "oschedule_node1411124955263":{
  "servers":["node1411124955263","node1411124885052",""]
},
    "orids_node1411124955263":{
  "servers":["node1411124955263","node1411124885052",""]
},
    "ofunction_node1411124955263":{
  "servers":["node1411124955263","node1411124885052",""]
},
    "followed_by_node1411124955263":{
  "servers":["node1411124955263","node1411124885052",""]
},
    "v_node1411124955263":{
  "servers":["node1411124955263","node1411124885052",""]
}
    },
  "version":10
}
---------- [OHazelcastPlugin]
2014-09-19 20:09:47:404 INFO [node1411124885052] Saving distributed configuration file for database 'GratefulDeadConcerts' to: /opt/orientdb/databases/GratefulDeadConcerts/distributed-config.json [OHazelcastPlugin]

分散サーバーの動き

1台目と2台目を順に起動した時の動きのイメージは以下のようになります。

javaversion

順にログメッセージを読みながら、OrientDBの分散データベースが、(設定をいじらない)デフォルトではどのように動作しているのかを見ていきましょう。

1台目のサーバーの起動までのログをピックアップしながら追ってみる


2014-09-19 20:08:05:090 INFO Starting distributed server 'node1411124885052'... [OHazelcastPlugin]
2014-09-19 20:08:05:103 INFO Configuring Hazelcast from '/opt/orientdb/config/hazelcast.xml'. [FileSystemXmlConfig]
  • 分散サーバーが起動したよ(ノード番号は’node1411124885052’)
  • 設定ファイルは’/opt/orientdb/config/hazelcast.xml’だよ

2014-09-19 20:08:05:290 INFO [LOCAL] [orientdb] [3.3] Prefer IPv4 stack is true. [DefaultAddressPicker]
2014-09-19 20:08:05:300 INFO [LOCAL] [orientdb] [3.3] Picked Address[192.168.2.29]:2434, using socket ServerSocket[addr=/0:0:0:0:0:0:0:0,localport=2434], bind any local is true [DefaultAddressPicker]
2014-09-19 20:08:05:337 INFO [192.168.2.29]:2434 [orientdb] [3.3] Starting with 4 generic operation threads and 4 partition operation threads. [BasicOperationScheduler]
2014-09-19 20:08:05:418 INFO [192.168.2.29]:2434 [orientdb] [3.3] Hazelcast 3.3 (20140907) starting at Address[192.168.2.29]:2434 [system]
2014-09-19 20:08:05:418 INFO [192.168.2.29]:2434 [orientdb] [3.3] Copyright (C) 2008-2014 Hazelcast.com [system]
2014-09-19 20:08:05:423 INFO [192.168.2.29]:2434 [orientdb] [3.3] Creating MulticastJoiner [Node]
2014-09-19 20:08:05:427 INFO [192.168.2.29]:2434 [orientdb] [3.3] Address[192.168.2.29]:2434 is STARTING [LifecycleService]
2014-09-19 20:08:10:428 INFO [192.168.2.29]:2434 [orientdb] [3.3]
  • Hazelcastが起動したよ
  • マルチキャストを始めたよ

Members [1] {
        Member [192.168.2.29]:2434 this
}
  • 分散環境に参加しているメンバー(でもまだ一台)

2014-09-19 20:08:10:536 WARN [node1411124885052] opening database 'GratefulDeadConcerts'... [OHazelcastPlugin]
2014-09-19 20:08:10:536 INFO [node1411124885052] loaded database configuration from disk: /opt/orientdb/config/default-distributed-db-config.json [OHazelcastPlugin]
・・・
2014-09-19 20:08:10:552 INFO [node1411124885052] updated distributed configuration for database: GratefulDeadConcerts:
----------
{
  "autoDeploy":true,
  "hotAlignment":false,
  "readQuorum":1,
  "writeQuorum":2,
  "failureAvailableNodesLessQuorum":false,
  "readYourWrites":true,"clusters":{
    "internal":{
},
    "index":{
},
    "*":{
  "servers":[""]
}
    },
  "version":0
}

2014-09-19 20:08:10:553 INFO [node1411124885052] Saving distributed configuration file for database 'GratefulDeadConcerts' to: /opt/orientdb/databases/GratefulDeadConcerts/distributed-config.json [OHazelcastPlugin]


  • データベース’GratefulDeadConcerts’(サンプルデータベースです)をオープンしたよ。
  • 分散データベースの初期設定を’/opt/orientdb/config/default-distributed-db-config.json’からロードしたよ(これは今後詳しく見ていきます)
  • その設定を/opt/orientdb/databases/GratefulDeadConcerts/に保存したよ

という感じですね。

2台目のサーバーのログをピックアップしながら追ってみる


2014-09-19 20:09:16:122 INFO [192.168.2.128]:2434 [orientdb] [3.3] Trying to join to discovered node: Address[192.168.2.29]:2434 [MulticastJoiner]
2014-09-19 20:09:16:131 INFO [192.168.2.128]:2434 [orientdb] [3.3] Connecting to /192.168.2.29:2434, timeout: 0, bind-any: true [SocketConnector]
2014-09-19 20:09:16:139 INFO [192.168.2.128]:2434 [orientdb] [3.3] Established socket connection between /192.168.2.128:55904 and /192.168.2.29:2434 [TcpIpConnectionManager]
  • マルチキャストで相手が見つかったよ
  • socket接続を確立したよ

Members [2] {
        Member [192.168.2.29]:2434
        Member [192.168.2.128]:2434 this
}
  • 構成メンバーが2台に増えた!
  • thisってなっているのがこの自分自身

2014-09-19 20:09:24:302 WARN [node1411124955263] dropping local database 'GratefulDeadConcerts' in '/opt/orientdb/databases/GratefulDeadConcerts' and get a fresh copy from a remote node... [OHazelcastPlugin]
  • 2台目にも、サンプルデータベース(’GratefulDeadConcerts’)があったのですが、それをdropして、1台目のノードから最新のデータをコピーするよと宣言

2014-09-19 20:09:24:329 INFO [node1411124955263] loaded database configuration from active cluster [OHazelcastPlugin]
---------- [OHazelcastPlugin]
2014-09-19 20:09:24:355 INFO [node1411124955263] adding node 'node1411124955263' in partition: db=GratefulDeadConcerts [*] [OHazelcastDistributedDatabase]
2014-09-19 20:09:24:357 INFO [node1411124955263] updated distributed configuration for database: GratefulDeadConcerts:
----------
{
  "autoDeploy":true,
  "hotAlignment":false,
  "readQuorum":1,
  "writeQuorum":2,
  "failureAvailableNodesLessQuorum":false,
  "readYourWrites":true,"clusters":{
    "internal":{
},
    "index":{
},
    "*":{
  "servers":["node1411124885052","node1411124955263",""]
}
    },
  "version":2
}

2014-09-19 20:09:24:357 INFO [node1411124955263] received added status node1411124955263.GratefulDeadConcerts=OFFLINE [OHazelcastPlugin] 2014-09-19 20:09:24:358 INFO [node1411124955263] Saving distributed configuration file for database ‘GratefulDeadConcerts’ to: /opt/orientdb/databases/GratefulDeadConcerts/distributed-config.json [OHazelcastPlugin]

  • 1台目とは違って分散データベースの初期設定を’/opt/orientdb/config/default-distributed-db-config.json’からではなく、アクティブなノードからロードするよ
  • このデータベースを扱うノードが2台”servers”:[“node1411124885052″,”node1411124955263″,”“]に増えている

2014-09-19 20:09:28:368 WARN [node1411124955263]->[[node1411124885052]] requesting deploy of database 'GratefulDeadConcerts' on local server... [OHazelcastPlugin]
2014-09-19 20:09:28:639 INFO [node1411124955263]<-[node1411124885052] received updated status node1411124885052.GratefulDeadConcerts=SYNCHRONIZING [OHazelcastPlugin]
2014-09-19 20:09:28:640 INFO [node1411124955263]<-[node1411124885052] received updated status node1411124955263.GratefulDeadConcerts=SYNCHRONIZING [OHazelcastPlugin]
2014-09-19 20:09:31:799 INFO [node1411124955263]<-[node1411124885052] received updated status node1411124885052.GratefulDeadConcerts=ONLINE [OHazelcastPlugin]
2014-09-19 20:09:32:119 WARN [node1411124955263]->[[node1411124885052]] deploy returned: {node1411124885052=/tmp/orientdb/backup_GratefulDeadConcerts.zip[0-307448] (last=true)} [OHazelcastPlugin]
2014-09-19 20:09:32:120 INFO [node1411124955263]<-[node1411124885052] copying remote database 'GratefulDeadConcerts' to: /tmp/orientdb/install_GratefulDeadConcerts.zip [OHazelcastPlugin]
2014-09-19 20:09:32:121 WARN [node1411124955263] - writing chunk #1 offset=0 size=300.24Kb [OHazelcastPlugin]
2014-09-19 20:09:32:122 INFO [node1411124955263] database copied correctly, size=300.24Kb [OHazelcastPlugin]
2014-09-19 20:09:32:123 WARN [node1411124955263]<-[node1411124885052] installing database 'GratefulDeadConcerts' to: /opt/orientdb/databases/GratefulDeadConcerts... [OHazelcastPlugin]
  • サンプルデータベース('GratefulDeadConcerts')を自分自身(ローカル)にデプロイし始める
  • 以降はその進行状況

2014-09-19 20:09:32:177 INFO
- Uncompressing file ._e.pcl... [OHazelcastPlugin]
2014-09-19 20:09:32:178 INFO
- Uncompressing file ._ouser.pcl... [OHazelcastPlugin]

・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・

2014-09-19 20:09:32:242 INFO
- Uncompressing file ._dictionary.sbt... [OHazelcastPlugin]
2014-09-19 20:09:32:242 INFO
- Uncompressing file collections_9.sbc... [OHazelcastPlugin]

3台目のサーバーの追加ログ

ほとんど同じ内容ですね。相互に通信しあっている状況です。

ここまでで、OrientDBの分散サーバー環境が出来上がりました。

  • ゼロconfig、つまりほとんど設定不要で超簡単
  • オートディスカバリー(自動的に分散環境に組み込まれる)

が本当であることが確認出来ましたね。

ノード名の指定

前述のログの中で、

1台目にはnode1411124955263
2台目にはnode1411124885052

という文字が良く表示されました。これはOrientDBが自動で採番したノード名です。

このノード名は、configディレクトリィにあるorientdb-dserver-config.xmlで指定することもできます。

初期状態では以下のようにコメントになっています。

    <!-- <parameter name="nodeName" value="europe1" /> -->

一度でも起動すると、OrientDBが自動で採番したノード名が付いています。

    <parameter value="node1411124885052" name="nodeName"/>

valueを書き変えてやれば任意のノード名をつけることができます。
これもわかりやすくなるので設定しておいたほうが良いでしょう。

次回は

  • マルチマスター(マスタースレーブではない)

の動作を確認してみましょう。