OrientDB分布式模式:数据不会分布在各个节点上

OrientDB分布式模式:数据不会分布在各个节点上,orientdb,graph-databases,orientdb2.2,Orientdb,Graph Databases,Orientdb2.2,我已经启动了一个带有两个节点的OrientDB Enterprise 2.7。下面是我的设置的外观 CONFIGURED SERVERS +----+------+------+-----------+-------------------+---------------+---------------+-----------------+-----------------+---------+ |# |Name |Status|Connections|StartedOn

我已经启动了一个带有两个节点的OrientDB Enterprise 2.7。下面是我的设置的外观

CONFIGURED SERVERS
+----+------+------+-----------+-------------------+---------------+---------------+-----------------+-----------------+---------+
|#   |Name  |Status|Connections|StartedOn          |Binary         |HTTP           |UsedMemory       |FreeMemory       |MaxMemory|
+----+------+------+-----------+-------------------+---------------+---------------+-----------------+-----------------+---------+
|0   |Batman|ONLINE|3          |2016-08-16 15:28:23|10.0.0.195:2424|10.0.0.195:2480|480.98MB (94.49%)|28.02MB (5.51%)  |509.00MB |
|1   |Robin |ONLINE|3          |2016-08-16 15:29:40|10.0.0.37:2424 |10.0.0.37:2480 |403.50MB (79.35%)|105.00MB (20.65%)|508.50MB |
+----+------+------+-----------+-------------------+---------------+---------------+-----------------+-----------------+---------+
orientdb {db=SocialPosts3}> clusters
现在我有两个顶点类User和Notes。贴上一个边缘类型。所有顶点和边都有属性。两个顶点类上都有唯一索引

我开始使用Java API推送数据:

while (retry++ != MAX_RETRY) {
        try {
            properties.put(uniqueIndexname, uniqueIndexValue);
            Iterable<Vertex> resultset = graph.getVertices(className, new String[] { uniqueIndexname },
                    new Object[] { uniqueIndexValue });
            if (resultset != null) {
                vertex = resultset.iterator().hasNext() ? resultset.iterator().next() : null;
            }
            if (vertex == null) {
                vertex = graph.addVertex("class:" + className, properties);
                graph.commit();
                return vertex;
            } else {
                for (String key : properties.keySet()) {
                    vertex.setProperty(key, properties.get(key));
                }
            }
            logger.info("Completed upserting vertex " + uniqueIndexValue);
            graph.commit();
            break;
        } catch (ONeedRetryException ex) {
            logger.warn("Retry for exception - " + uniqueIndexValue);
        } catch (Exception e) {
            logger.error("Can not create vertex - " + e.getMessage());
            graph.rollback();
            break;
        }
    }

我看到一个节点的CPU是99%,另一个是,当数据库在两个节点上传播时,你能附加两个服务器的日志吗?在帖子中添加了日志。我可以看到Robin向Batman请求数据库,Batman将其发回
2016-08-18 19:28:49:769 WARNI[Robin]->[[Batman]]正在请求在本地服务器上部署数据库“SocialPosts3”。。。[OHazelcastPlugin]
,但在最后一个表中,SocialPosts3不在蝙蝠侠服务器上,所以它怎么可能发送数据库?你需要多少数据库?我建议你删除你不需要的东西,这样就很容易理解哪里出了问题。谢谢你的回复。这就是我要做的,删除所有未使用的表。最后,我删除了所有表并创建了一个全新的表。向群集添加了一个以上的节点。但是数据分布是一样的,CPU也是一样的,只有一个节点是100%的,其余两个是空闲的。当数据库在两个节点上传播时,请附加两个服务器的日志好吗?在帖子中添加了日志。我可以看到Robin正在向Batman请求数据库,Batman将其发回
2016-08-18 19:28:49:769 WARNI[Robin]->[[Batman]]正在请求在本地服务器上部署数据库“SocialPosts3”。。。[OHazelcastPlugin]
,但在最后一个表中,SocialPosts3不在蝙蝠侠服务器上,所以它怎么可能发送数据库?你需要多少数据库?我建议你删除你不需要的东西,这样就很容易理解哪里出了问题。谢谢你的回复。这就是我要做的,删除所有未使用的表。最后,我删除了所有表并创建了一个全新的表。向群集添加了一个以上的节点。然而,数据分布是相同的,CPU也是一样的,只有一个节点是100%,其余两个是空闲的。
|22  |note       |  26|Note     |                 |     75|   Robin    |  [Batman]   |        true        |
|23  |note_1     |  27|Note     |                 |1750902|   Batman   |   [Robin]   |        true        |
|24  |note_2     |  28|Note     |                 |1750789|   Batman   |   [Robin]   |        true        |
|25  |note_3     |  29|Note     |                 |     75|   Robin    |  [Batman]   |        true        |
|26  |posted     |  34|Posted   |                 |      0|   Robin    |  [Batman]   |        true        |
|27  |posted_1   |  35|Posted   |                 |      1|   Robin    |  [Batman]   |        true        |
|28  |posted_2   |  36|Posted   |                 |1739823|   Batman   |   [Robin]   |        true        |
|29  |posted_3   |  37|Posted   |                 |1749250|   Batman   |   [Robin]   |        true        |
|30  |user       |  30|User     |                 | 102059|   Batman   |   [Robin]   |        true        |
|31  |user_1     |  31|User     |                 |      1|   Robin    |  [Batman]   |        true        |
|32  |user_2     |  32|User     |                 |      0|   Robin    |  [Batman]   |        true        |
|33  |user_3     |  33|User     |                 | 102127|   Batman   |   [Robin]   |        true        |
2016-08-18 19:28:49:668 INFO  [Robin]<-[Batman] Received new status Batman.SocialPosts3=SYNCHRONIZING [OHazelcastPlugin]
2016-08-18 19:28:49:670 INFO  [Robin] Current node started as MASTER for database 'SocialPosts3' [OHazelcastPlugin]
2016-08-18 19:28:49:671 INFO  [Robin] New distributed configuration for database: SocialPosts3 (version=2)

CLUSTER CONFIGURATION (LEGEND: X = Owner, o = Copy)
+--------+-----------+----------+-------------+
|        |           |          |   MASTER    |
|        |           |          |SYNCHRONIZING|
+--------+-----------+----------+-------------+
|CLUSTER |writeQuorum|readQuorum|   Batman    |
+--------+-----------+----------+-------------+
|*       |     1     |    1     |      X      |
|internal|     1     |    1     |             |
+--------+-----------+----------+-------------+

 [OHazelcastPlugin]
2016-08-18 19:28:49:671 INFO  [Robin] Saving distributed configuration file for database 'SocialPosts3' to: /mnt/ebs/orientdb/orientdb-enterprise-2.2.7/databases/SocialPosts3/distributed-config.json [OHazelcastPlugin]
2016-08-18 19:28:49:766 INFO  [Robin] Adding node 'Robin' in partition: SocialPosts3 db=[*] v=3 [ODistributedDatabaseImpl$1]
2016-08-18 19:28:49:767 INFO  [Robin] New distributed configuration for database: SocialPosts3 (version=3)

CLUSTER CONFIGURATION (LEGEND: X = Owner, o = Copy)
+--------+-----------+----------+-------------+-------------+
|        |           |          |   MASTER    |   MASTER    |
|        |           |          |SYNCHRONIZING|SYNCHRONIZING|
+--------+-----------+----------+-------------+-------------+
|CLUSTER |writeQuorum|readQuorum|   Batman    |    Robin    |
+--------+-----------+----------+-------------+-------------+
|*       |     2     |    1     |      X      |      o      |
|internal|     2     |    1     |             |             |
+--------+-----------+----------+-------------+-------------+

 [OHazelcastPlugin]
2016-08-18 19:28:49:767 INFO  [Robin] Saving distributed configuration file for database 'SocialPosts3' to: /mnt/ebs/orientdb/orientdb-enterprise-2.2.7/databases/SocialPosts3/distributed-config.json [OHazelcastPlugin]
2016-08-18 19:28:49:769 WARNI [Robin]->[[Batman]] Requesting deploy of database 'SocialPosts3' on local server... [OHazelcastPlugin]
2016-08-18 19:28:52:192 INFO  [Robin]<-[Batman] Copying remote database 'SocialPosts3' to: /tmp/orientdb/install_SocialPosts3.zip [OHazelcastPlugin]
2016-08-18 19:28:52:193 INFO  [Robin]<-[Batman] Installing database 'SocialPosts3' to: /mnt/ebs/orientdb/orientdb-enterprise-2.2.7/databases/SocialPosts3... [OHazelcastPlugin]
2016-08-18 19:28:52:193 INFO  [Robin] - writing chunk #1 offset=0 size=43.38KB [OHazelcastPlugin]
2016-08-18 19:28:52:194 INFO  [Robin] Database copied correctly, size=43.38KB [ODistributedAbstractPlugin$3]
2016-08-18 19:28:52:279 WARNI {db=SocialPosts3} Storage 'SocialPosts3' was not closed properly. Will try to recover from write ahead log [OEnterpriseLocalPaginatedStorage]
2016-08-18 19:28:52:279 SEVER {db=SocialPosts3} Restore is not possible because write ahead log is empty. [OEnterpriseLocalPaginatedStorage]
2016-08-18 19:28:52:279 INFO  {db=SocialPosts3} Storage data recover was completed [OEnterpriseLocalPaginatedStorage]
2016-08-18 19:28:52:294 INFO  {db=SocialPosts3} [Robin] Installed database 'SocialPosts3' (LSN=OLogSequenceNumber{segment=0, position=24}) [OHazelcastPlugin]
2016-08-18 19:28:52:304 INFO  [Robin] Reassigning cluster ownership for database SocialPosts3 [OHazelcastPlugin]
2016-08-18 19:28:52:305 INFO  [Robin] New distributed configuration for database: SocialPosts3 (version=3)

CLUSTER CONFIGURATION (LEGEND: X = Owner, o = Copy)
+--------+----+-----------+----------+-------------+-------------+
|        |    |           |          |   MASTER    |   MASTER    |
|        |    |           |          |SYNCHRONIZING|SYNCHRONIZING|
+--------+----+-----------+----------+-------------+-------------+
|CLUSTER |  id|writeQuorum|readQuorum|   Batman    |    Robin    |
+--------+----+-----------+----------+-------------+-------------+
|*       |    |     2     |    1     |      X      |      o      |
|internal|   0|     2     |    1     |             |             |
+--------+----+-----------+----------+-------------+-------------+

 [OHazelcastPlugin]
2016-08-18 19:28:52:305 INFO  [Robin] Distributed servers status:

+------+------+------------------------------------+-----+-------------------+---------------+---------------+--------------------------+
|Name  |Status|Databases                           |Conns|StartedOn          |Binary         |HTTP           |UsedMemory                |
+------+------+------------------------------------+-----+-------------------+---------------+---------------+--------------------------+
|Batman|ONLINE|GoodBoys=ONLINE (MASTER)            |5    |2016-08-16 15:28:23|10.0.0.195:2424|10.0.0.195:2480|426.47MB/509.00MB (83.79%)|
|      |      |SocialPosts=ONLINE (MASTER)         |     |                   |               |               |                          |
|      |      |GratefulDeadConcerts=ONLINE (MASTER)|     |                   |               |               |                          |
|Robin*|ONLINE|GoodBoys=ONLINE (MASTER)            |3    |2016-08-16 15:29:40|10.0.0.37:2424 |10.0.0.37:2480 |353.77MB/507.50MB (69.71%)|
|      |      |SocialPosts=ONLINE (MASTER)         |     |                   |               |               |                          |
|      |      |GratefulDeadConcerts=ONLINE (MASTER)|     |                   |               |               |                          |
|      |      |SocialPosts3=SYNCHRONIZING (MASTER) |     |                   |               |               |                          |
|      |      |SocialPosts2=ONLINE (MASTER)        |     |                   |               |               |                          |
+------+------+------------------------------------+-----+-------------------+---------------+---------------+--------------------------+