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
The following commit(s) were added to refs/heads/pd-store by this push:
new bdb64767c fix(server): 'serverStarted' error when execute gremlin
example (#2473)
bdb64767c is described below
commit bdb64767ca54aeccdd2a53df26cfede6067ec5f5
Author: V_Galaxy <[email protected]>
AuthorDate: Tue Mar 5 15:21:42 2024 +0800
fix(server): 'serverStarted' error when execute gremlin example (#2473)
---
.../hugegraph-dist/src/assembly/static/scripts/example.groovy | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
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 9c98f0014..12893b754 100644
--- a/hugegraph-server/hugegraph-dist/src/assembly/static/scripts/example.groovy
+++ b/hugegraph-server/hugegraph-dist/src/assembly/static/scripts/example.groovy
@@ -15,16 +15,15 @@
* limitations under the License.
*/
import org.apache.hugegraph.HugeFactory
-import org.apache.hugegraph.backend.id.IdGenerator
import org.apache.hugegraph.dist.RegisterUtil
-import org.apache.hugegraph.type.define.NodeRole
+import org.apache.hugegraph.masterelection.GlobalMasterInfo
import org.apache.tinkerpop.gremlin.structure.T
RegisterUtil.registerRocksDB()
conf = "conf/graphs/hugegraph.properties"
graph = HugeFactory.open(conf)
-graph.serverStarted(IdGenerator.of("server-tinkerpop"), NodeRole.MASTER)
+graph.serverStarted(GlobalMasterInfo.master("server-tinkerpop"))
schema = graph.schema()
schema.propertyKey("name").asText().ifNotExist().create()