From 9affa6ecd222130dc779407863b57f37b44ce276 Mon Sep 17 00:00:00 2001 From: V_Galaxy Date: Sun, 14 Apr 2024 23:57:07 +0800 Subject: [PATCH] fix(server): avoid overriding backend config in gremlin example script (#2519) --- .../hugegraph-dist/src/assembly/static/bin/start-hugegraph.sh | 2 +- .../hugegraph-dist/src/assembly/static/scripts/example.groovy | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/hugegraph-server/hugegraph-dist/src/assembly/static/bin/start-hugegraph.sh b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/start-hugegraph.sh index 9cb5d0e099..5e14397f7e 100644 --- a/hugegraph-server/hugegraph-dist/src/assembly/static/bin/start-hugegraph.sh +++ b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/start-hugegraph.sh @@ -91,7 +91,7 @@ if [[ $PRELOAD == "true" ]]; then cp "${CONF}"/gremlin-server.yaml "${CONF}/${GREMLIN_SERVER_CONF}" cp "${SCRIPTS}"/example.groovy "${SCRIPTS}/${EXAMPLE_SCRIPT}" sed -i -e "s/empty-sample.groovy/$EXAMPLE_SCRIPT/g" "${CONF}/${GREMLIN_SERVER_CONF}" - sed -i -e '/registerRocksDB/d; /serverStarted/d' "${SCRIPTS}/${EXAMPLE_SCRIPT}" + sed -i -e '/registerBackends/d; /serverStarted/d' "${SCRIPTS}/${EXAMPLE_SCRIPT}" fi # TODO: show the output message in hugegraph-server.sh when start the server diff --git a/hugegraph-server/hugegraph-dist/src/assembly/static/scripts/example.groovy b/hugegraph-server/hugegraph-dist/src/assembly/static/scripts/example.groovy index 426b0b1cfd..266206845b 100644 --- a/hugegraph-server/hugegraph-dist/src/assembly/static/scripts/example.groovy +++ b/hugegraph-server/hugegraph-dist/src/assembly/static/scripts/example.groovy @@ -21,9 +21,7 @@ import org.apache.tinkerpop.gremlin.structure.T RegisterUtil.registerBackends() -conf = HugeFactory.getLocalConfig("conf/graphs/hugegraph.properties") -conf.setProperty("backend", "memory") -conf.setProperty("serializer", "text") +conf = "conf/graphs/hugegraph.properties" graph = HugeFactory.open(conf) graph.serverStarted(GlobalMasterInfo.master("server-tinkerpop")) schema = graph.schema()