fix(server): avoid overriding backend config in gremlin example script (#2519)

This commit is contained in:
V_Galaxy 2024-04-14 23:57:07 +08:00 committed by GitHub
parent 3783247c74
commit 6be756919b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 4 deletions

View File

@ -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

View File

@ -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()