我尝试在分布式模式下使用OrientDB。如何配置特定数据库中的节点?

时间:2016-04-02 11:42:08

标签: orientdb

例如:我在同一个集群中有三个节点(" node1"," node2"" node3")。这些节点在配置文件hazelcast.xml中是相同的。我想要数据库" DB_1"仅放在第一个节点和第二个节点上。和数据库" DB_2"仅放在第二个和第三个节点上。

我修改了文件" default-distributed-db-config.json"在第一个节点和第二个节点上:

{
  "autoDeploy": true,
  "hotAlignment": false,
  "executionMode": "undefined",
  "readQuorum": 1,
  "writeQuorum": 2,
  "failureAvailableNodesLessQuorum": false,
  "readYourWrites": true,
  "servers": {
    "*": "master"
  },
  "clusters": {
    "internal": {
    },
    "index": {
    },
    "*": {
      "servers": ["node1","node2"]
    }
  }
}

我修改了文件" default-distributed-db-config.json"在第三个节点上:

{
  "autoDeploy": true,
  "hotAlignment": false,
  "executionMode": "undefined",
  "readQuorum": 1,
  "writeQuorum": 2,
  "failureAvailableNodesLessQuorum": false,
  "readYourWrites": true,
  "servers": {
    "*": "master"
  },
  "clusters": {
    "internal": {
    },
    "index": {
    },
    "*": {
      "servers": ["node3"]
    }
  }
}

我修改了文件" distributed-config.json"在数据库目录" DB_1"在第一个和第二个节点上。 我从中删除了所有内容:

<NEW_NODE>

并且到处写了第一个和第二个节点的唯一名称:

"*":{"@type":"d","@version":0,"servers":["node1","node2"]},"orole_node2":{"@type":"d","@version":0,"servers":["node2","node1"]},"e_node2":{"@type":"d","@version":0,"servers":["node2","node1"]},"ouser_node2":{"@type":"d","@version":0,"servers":["node2","node1"]},"oschedule_node2":{"@type":"d","@version":0,"servers":["node2","node1"]},"orids_node2":{"@type":"d","@version":0,"servers":["node2","node1"]},"v_node2":{"@type":"d","@version":0,"servers":["node2","node1"]},"ofunction_node2":{"@type":"d","@version":0,"servers":["node2","node1"]}}

但是,如果启动第三个节点,那么对于数据库&#34; DB_1&#34;也将在第三个节点中运行复制。

(OrientDB v2.1.13)

1 个答案:

答案 0 :(得分:0)

我认为不可能,同一群集的每个节点都必须与其他节点同步。