incubator-hugegraph icon indicating copy to clipboard operation
incubator-hugegraph copied to clipboard

hugegraph升级到0.10.4说明

Open Linary opened this issue 7 years ago • 2 comments

由于hugegraph在0.10.4版本中将适配的tinkerpop升级到了3.4.3,GremlinServer的配置文件格式有些变化,所以将以前版本的gremlin-server.yaml文件直接拷贝是不能用的,需要做一些修改。

主要变化点是plugins和scriptEngines。

以前版本

plugins:
  - com.baidu.hugegraph
scriptEngines: {
  gremlin-groovy: {
    imports: [java.lang.Math],
    staticImports: [java.lang.Math.PI],
    scripts: [/conf/empty-sample.groovy]
  }
}

v0.10.4

scriptEngines: {
  gremlin-groovy: {
    plugins: {
      com.baidu.hugegraph.plugin.HugeGraphGremlinPlugin: {},
      org.apache.tinkerpop.gremlin.server.jsr223.GremlinServerGremlinPlugin: {},
      org.apache.tinkerpop.gremlin.jsr223.ImportGremlinPlugin: {
        classImports: [
          java.lang.Math,
          com.baidu.hugegraph.util.DateUtil,
          com.baidu.hugegraph.traversal.optimize.Text
        ],
        methodImports: [java.lang.Math#*]
      },
      org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin: {
        files: [scripts/empty-sample.groovy]
      }
    }
  }
}

Linary avatar Sep 23 '19 07:09 Linary

顺便补充一下, 如果是Windows环境还需要做一些相对的路径格式调整

具体可以参考这里笔记配置参考的3,4,5点

imbajin avatar Sep 23 '19 11:09 imbajin

Due to the lack of activity, the current issue is marked as stale and will be closed after 20 days, any update will remove the stale label

github-actions[bot] avatar Jan 01 '22 21:01 github-actions[bot]