Skip to content

Commit

Permalink
fix(server): 'serverStarted' error when execute gremlin example (#2473)
Browse files Browse the repository at this point in the history
  • Loading branch information
VGalaxies authored Mar 5, 2024
1 parent 6861ed5 commit eb6570c
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit eb6570c

Please sign in to comment.