This is an automated email from the ASF dual-hosted git repository.
jin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-hugegraph.git
The following commit(s) were added to refs/heads/master by this push:
new 6be756919 fix(server): avoid overriding backend config in gremlin
example script (#2519)
6be756919 is described below
commit 6be756919bc60335a75c8c6d83e2e3c2e8c39532
Author: V_Galaxy <[email protected]>
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()