You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hugegraph.apache.org by vg...@apache.org on 2024/04/20 08:14:50 UTC

(incubator-hugegraph) 03/06: fix(server): avoid overriding backend config in gremlin example script (#2519)

This is an automated email from the ASF dual-hosted git repository.

vgalaxies pushed a commit to branch pd-store
in repository https://gitbox.apache.org/repos/asf/incubator-hugegraph.git

commit 9affa6ecd222130dc779407863b57f37b44ce276
Author: V_Galaxy <vg...@apache.org>
AuthorDate: Sun Apr 14 23:57:07 2024 +0800

    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 9cb5d0e09..5e14397f7 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 426b0b1cf..266206845 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()