0

我有一个看起来像下面的 ETL,除了我们从 mysql 中提取 8 个字段并且有 8 个顶点类和 7 个边缘类。

{
      "config": {
        "parallel": true
      },
      "extractor": {
        "jdbc": {
          "driver": "com.mysql.jdbc.Driver",
          "url": "jdbc:mysql://<some IP>/car_database",
          "userName": "admin",
          "userPassword": "admin",
          "query": "select uid, type, color, age from car_info;",
          "fetchSize": -2147483648
        }
      },
      "transformers": [
        {
          "vertex": {
            "class": "Car"
          }
        },
        {
          "field": {
            "fieldName": "value",
            "expression": "uid"
          }
        },
        {
          "edge": {
            "class": "HasType",
            "lookup": "Type.value",
            "joinFieldName": "type",
            "unresolvedLinkAction": "CREATE"
          }
        },
        {
          "edge": {
            "class": "HasColor",
            "lookup": "Color.value",
            "joinFieldName": "color",
            "unresolvedLinkAction": "CREATE"
          }
        },
        {
          "edge": {
            "class": "HasAge",
            "lookup": "Age.value",
            "joinFieldName": "age",
            "unresolvedLinkAction": "CREATE"
          }
        },
        {
          "field": {
            "fieldNames" : [
              "uid",
              "type",
              "color",
              "age"
            ],
            "operation": "remove"
          }
        }
      ],
      "loader": {
        "orientdb": {
          "dbURL": "remote:<some IP >/CarGraph",
          "dbType": "graph",
          "txUseLog": false,
          "wal": false,
          "tx": false,
          "batchCommit": 1000,
          "classes": [
            {
              "name": "Car",
              "extends": "V"
            },
             {
                "name": "Type",
                "extends": "V"
              },
              {
                "name": "HasType",
                "extends": "E"
              },
              {
                "name": "Color",
                "extends": "V"
              },
              {
                "name": "HasColor",
                "extends": "E"
              },
              {
                "name": "Age",
                "extends": "V"
              },
              {
                "name": "HasAge",
                "extends": "E"
              }
          ],
          "indexes": [
            {
              "class": "Car",
              "fields": [
                "value:string"
              ],
              "type": "UNIQUE"
            },
            {
              "class": "Type",
              "fields": [
                "value:string"
              ],
              "type": "UNIQUE"
            },
            {
              "class": "Color",
              "fields": [
                "value:string"
              ],
              "type": "UNIQUE"
            },
            {
              "class": "Age",
              "fields": [
                "value:string"
              ],
              "type": "UNIQUE"
            }
          ]
        }
      }
    }

这是我的默认分布式数据库配置文件:

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

我正在尝试实现一个 orient 集群,目前在不同的服务器上有 2 个节点。当我在其中一个图形框上运行导入时(我们当前的 QA 环境中只有 200 行,prod 将超过 3500 万),我看到每秒 1-3 个节点的加载时间,即使仲裁设置为 1。我已经尝试了 5-6 种不同的组合,切换并行、仲裁值、不同的服务器设置,但只要加载器指向远程数据库,它就真的很慢。

相同的 etl 在我的本地机器上以 1500-2000/s 的速度运行到 plocal 图中。

我发现使用指向 plocal 图的加载器运行导入的最快方法。然后,一旦它完成重新启动分布式服务器并允许 2 个节点同步。

是否有我遗漏的东西,或者某些可能导致导入速度如此缓慢的服务器配置?东方版本 2.1.6。

4

0 回答 0