ZEE
ZEE
ATApache TinkerPop
Created by ZEE on 5/24/2023 in #questions
What's ArcadeDB's graph initialize call?
I'm working on confirming that the ArcadeDB-server is up and running with Gremlin. What's ArcadeDB's graph supposed to be for graph.traversal()?
graph = JanusGraphFactory.build().set("storage.backend", "cql").set("storage.hostname", "127.0.0.1").open()
g = graph.traversal()
g.V().limit(1)
graph = JanusGraphFactory.build().set("storage.backend", "cql").set("storage.hostname", "127.0.0.1").open()
g = graph.traversal()
g.V().limit(1)
3 replies
ATApache TinkerPop
Created by ZEE on 5/24/2023 in #questions
Don't know how to return count-value in Java
Basic question, why does next() not seem to give me the results back about the count of Entities?
2023-05-24 09:21:44,641 [INFO] [j.Test35_2_1.main] :: [GraphStep(vertex,[]), HasStep([~label.eq(Entity)]), CountGlobalStep]
...
Exception in thread "main" java.lang.IllegalStateException: org.apache.tinkerpop.gremlin.process.remote.RemoteConnectionException: org.apache.tinkerpop.gremlin.driver.exception.NoHostAvailableException: java.util.concurrent.CompletionException: Could not initialize 2 (minPoolSize) connections in pool. Successful connections=0. Closing the connection pool.
at org.apache.tinkerpop.gremlin.process.remote.traversal.step.map.RemoteStep.promise(RemoteStep.java:97)
...
Caused by: org.apache.tinkerpop.gremlin.process.remote.RemoteConnectionException: org.apache.tinkerpop.gremlin.driver.exception.NoHostAvailableException: java.util.concurrent.CompletionException: Could not initialize 2 (minPoolSize) connections in pool. Successful connections=0. Closing the connection pool.
at org.apache.tinkerpop.gremlin.driver.remote.DriverRemoteConnection.submitAsync(DriverRemoteConnection.java:231)
2023-05-24 09:21:44,641 [INFO] [j.Test35_2_1.main] :: [GraphStep(vertex,[]), HasStep([~label.eq(Entity)]), CountGlobalStep]
...
Exception in thread "main" java.lang.IllegalStateException: org.apache.tinkerpop.gremlin.process.remote.RemoteConnectionException: org.apache.tinkerpop.gremlin.driver.exception.NoHostAvailableException: java.util.concurrent.CompletionException: Could not initialize 2 (minPoolSize) connections in pool. Successful connections=0. Closing the connection pool.
at org.apache.tinkerpop.gremlin.process.remote.traversal.step.map.RemoteStep.promise(RemoteStep.java:97)
...
Caused by: org.apache.tinkerpop.gremlin.process.remote.RemoteConnectionException: org.apache.tinkerpop.gremlin.driver.exception.NoHostAvailableException: java.util.concurrent.CompletionException: Could not initialize 2 (minPoolSize) connections in pool. Successful connections=0. Closing the connection pool.
at org.apache.tinkerpop.gremlin.driver.remote.DriverRemoteConnection.submitAsync(DriverRemoteConnection.java:231)
logger.info(g.V().hasLabel("Entity").count());
logger.info(g.V().hasLabel("Entity").count().next().toString());
logger.info(g.V().hasLabel("Entity").count());
logger.info(g.V().hasLabel("Entity").count().next().toString());
45 replies
ATApache TinkerPop
Created by ZEE on 5/15/2023 in #questions
Creating Indexes In JanusGraph
How do you create indices in JanusGraph and/or Gremlin with Java? JanusGraph still isn't using the index provided.
2023-05-15 14:35:59,723 [INFO] [o.j.g.d.m.ManagementSystem.Thread-25] :: Index update job successful for [_id]
2023-05-15 14:35:59,724 [WARN] [o.j.g.t.StandardJanusGraphTx.main] :: Query requires iterating over all vertices [[~label = entity]]. For better performance, use indexes
2023-05-15 14:35:59,726 [INFO] [Main.main] :: REINDEX g.V().hasLabel("entity").count().next(): 1
2023-05-15 14:35:59,737 [WARN] [o.j.g.t.StandardJanusGraphTx.main] :: Query requires iterating over all vertices [[_id <> null]]. For better performance, use indexes
2023-05-15 14:35:59,738 [INFO] [Main.main] :: REINDEX g.V().hasLabel("entity").count().next(): 1
2023-05-15 14:35:59,739 [WARN] [o.j.g.t.StandardJanusGraphTx.main] :: Query requires iterating over all vertices [[~label = entity, _id <> null]]. For better performance, use indexes
2023-05-15 14:35:59,740 [INFO] [Main.main] :: REINDEX g.V().hasLabel("entity").count().next(): 1
2023-05-15 14:35:59,723 [INFO] [o.j.g.d.m.ManagementSystem.Thread-25] :: Index update job successful for [_id]
2023-05-15 14:35:59,724 [WARN] [o.j.g.t.StandardJanusGraphTx.main] :: Query requires iterating over all vertices [[~label = entity]]. For better performance, use indexes
2023-05-15 14:35:59,726 [INFO] [Main.main] :: REINDEX g.V().hasLabel("entity").count().next(): 1
2023-05-15 14:35:59,737 [WARN] [o.j.g.t.StandardJanusGraphTx.main] :: Query requires iterating over all vertices [[_id <> null]]. For better performance, use indexes
2023-05-15 14:35:59,738 [INFO] [Main.main] :: REINDEX g.V().hasLabel("entity").count().next(): 1
2023-05-15 14:35:59,739 [WARN] [o.j.g.t.StandardJanusGraphTx.main] :: Query requires iterating over all vertices [[~label = entity, _id <> null]]. For better performance, use indexes
2023-05-15 14:35:59,740 [INFO] [Main.main] :: REINDEX g.V().hasLabel("entity").count().next(): 1
JanusGraph janusGraph = JanusGraphFactory.build().set("storage.backend", "inmemory").open();
GraphTraversalSource g = janusGraph.traversal();
... janusGraphManagement.updateIndex(janusGraphManagement.getGraphIndex("_id"), SchemaAction.REINDEX).get();
janusGraphManagement.commit();
logger.info("REINDEX g.V().hasLabel(\"entity\").count().next():\t" + g.V().hasLabel("entity").count().next());
logger.info("REINDEX g.V().hasLabel(\"entity\").count().next():\t" + g.V().has("_id").count().next());
logger.info("REINDEX g.V().hasLabel(\"entity\").count().next():\t" + g.V().hasLabel("entity").has("_id").count().next());
JanusGraph janusGraph = JanusGraphFactory.build().set("storage.backend", "inmemory").open();
GraphTraversalSource g = janusGraph.traversal();
... janusGraphManagement.updateIndex(janusGraphManagement.getGraphIndex("_id"), SchemaAction.REINDEX).get();
janusGraphManagement.commit();
logger.info("REINDEX g.V().hasLabel(\"entity\").count().next():\t" + g.V().hasLabel("entity").count().next());
logger.info("REINDEX g.V().hasLabel(\"entity\").count().next():\t" + g.V().has("_id").count().next());
logger.info("REINDEX g.V().hasLabel(\"entity\").count().next():\t" + g.V().hasLabel("entity").has("_id").count().next());
14 replies