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

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

commit c47e0fad80b5ec72f230ba3bae79c397f6b2ec36
Author: VGalaxies <[email protected]>
AuthorDate: Tue Mar 5 14:29:11 2024 +0800

    fix
---
 .../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()

Reply via email to