在不同节点上配置orientdb类级别集群

时间:2017-08-04 09:02:57

标签: orientdb2.2

我在配置orientdb分布式群集时遇到问题。基本上我在三台不同的机器上有三个orientdb服务器实例,我希望有一个类的三个集群,每个集群应该存在于两个不同的节点上。为此,我有defaut-distributed-db-config.json如下。

{
  "autoDeploy": true,
  "readQuorum": 1,
  "writeQuorum": "majority",
  "executionMode": "undefined",
  "readYourWrites": true,
  "newNodeStrategy": "static",
  "servers": {
    "*": "master"
  },
  "clusters": {
    "internal": {
    },
    "employee_0": { "servers": ["node0","node1"] },
    "employee_1": { "servers": ["node1","node2"] },
    "employee_2": { "servers": ["node2","node3"] },
    "*": { "servers": ["node1","<NEW_NODE>"  }
  }
}

所以我在这三个节点上启动服务之前没有创建任何数据库。我已经启动了所有节点,所有节点似乎都是OK。当我在node1上创建数据库时,我在其他节点上有例外情况,如下所示。

2017-08-03 18:19:04:727 INFO   [node1]->[node2] Creating backup of cluster 'global' in directory: /tmp/orientdb/backup_global_user_1.zip... [OSy
ncClusterTask]Exception `3F3E8071` in storage `global`
com.orientechnologies.orient.core.exception.OStorageException: Cluster employee_1 does not exist in database 'global'
        DB name="global"

所以我在各个节点(1,2和3)上创建了群集employee_0employee_1employee_2,如下所示。

orientdb {db=global}> create cluster employee_0

Error: com.orientechnologies.orient.server.distributed.task.ODistributedOperationException: Quorum 3 not reached for request (id=0.29 task=command_sql(create cluster employee_0)). Elapsed=15002ms. No server in conflict. Received: 
 - mum105: 33
 - hyd107: waiting-for-response
 - ban106: 33
    DB name="global"
    DB name="global"

我已在配置中将writeQuorum设置为majority,但它尝试使用3.From,它取3而不是2.但我可以看到群集employee_0已经创建在node0node1上。所以,一旦创建了所有集群,我就开始创建类。

orientdb {db=global}> create class user cluster 33

Error: com.orientechnologies.orient.server.distributed.task.ODistributedOperationException: Quorum 3 not reached for request (id=0.295 task=command_sql(create class user cluster 33)). Elapsed=15015ms. No server in conflict. Received: 
 - mum105: 12
 - hyd107: waiting-for-response
 - ban106: 12
    DB name="global"
    DB name="global"

即便如此,我也得到了相同的异常,我再次看到了课程。

|#   |NAME       |SUPER-CLASSES|CLUSTERS  

|10  |user       |             |user_0(33)  

所以我继续在课堂上插入一条记录,而不是插入。

orientdb {db=global}> insert into employee(id,name) values (1,'jhon')

Error: com.orientechnologies.orient.core.exception.ORecordNotFoundException: The record with id '#33:0' was not found
    DB name="global"
    DB name="global"

Error: java.lang.IllegalArgumentException: Cluster 33 is null

我做错了吗?任何帮助,将不胜感激。我牢记这些问题。

1.如上所述,有正确的方法来设置分布式集群。

2.当我将Quorum 3设置为majority时使用RECORD #33:0 not found为什么?

3.插入记录时,显示Hadoop-env.cmd。这有什么不对?

0 个答案:

没有答案