有什么方法可以知道orientdb中是否存在集群?

时间:2015-05-04 20:16:27

标签: orientdb

是否有命令/查询来了解数据库中是否存在群集?或者知道数据库中的集群列表?

感谢。

2 个答案:

答案 0 :(得分:2)

使用文档API

graph.getRawGraph().existsCluster("V");
graph.getRawGraph().existsCluster(graph.getRawGraph().getClusterNameById(9));

使用图谱API

int main()
{
    int howMany;
    cout << "How many?";
    cin >> howMany;

    Worker * workers = new Worker[howMany];

答案 1 :(得分:0)

来自API文档:

  To view all clusters, from the console run the CLUSTERS command:

  CLUSTERS:
  -------------+------+-----------+-----------+
  NAME        | ID   | TYPE      | RECORDS   |
  -------------+------+-----------+-----------+
  account     | 11   | PHYSICAL  |      1107 |
  actor       | 91   | PHYSICAL  |         3 |
  address     | 19   | PHYSICAL  |       166 |
  animal      | 17   | PHYSICAL  |         0 |
  animalrace  | 16   | PHYSICAL  |         2 |
  ....        | .... | ....      |      .... |
  -------------+------+-----------+-----------+
  TOTAL                                23481 |
  --------------------------------------------+