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)
1 Reply
Sorry, @ZEE I haven't seen this message. Did you figure it out?
In case check this:
/**
* Manual test against a Gremlin Server.
*/
public class ConnectRemoteGremlinServer {
@Disabled
@Test
public void getAllVertices() {
final GraphTraversalSource g = traversal();
g.addV().property("myProp", "some value").next(); // creates the vertex
final List<Map<Object, Object>> vertices = g.V().valueMap().with(WithOptions.tokens).toList(); // verifies that the vertex created with properties is returned
Assertions.assertFalse(vertices.isEmpty());
}
private Cluster createCluster() {
final GraphBinaryMessageSerializerV1 serializer = new GraphBinaryMessageSerializerV1(
new TypeSerializerRegistry.Builder().addRegistry(new ArcadeIoRegistry()));
return Cluster.build().enableSsl(false).addContactPoint("localhost").port(8182).credentials("root", BaseGraphServerTest.DEFAULT_PASSWORD_FOR_TESTS).serializer(serializer)
.create();
}
private GraphTraversalSource traversal() {
return AnonymousTraversalSource.traversal().withRemote(DriverRemoteConnection.using(createCluster(), "graph"));
}
}
/**
* Manual test against a Gremlin Server.
*/
public class ConnectRemoteGremlinServer {
@Disabled
@Test
public void getAllVertices() {
final GraphTraversalSource g = traversal();
g.addV().property("myProp", "some value").next(); // creates the vertex
final List<Map<Object, Object>> vertices = g.V().valueMap().with(WithOptions.tokens).toList(); // verifies that the vertex created with properties is returned
Assertions.assertFalse(vertices.isEmpty());
}
private Cluster createCluster() {
final GraphBinaryMessageSerializerV1 serializer = new GraphBinaryMessageSerializerV1(
new TypeSerializerRegistry.Builder().addRegistry(new ArcadeIoRegistry()));
return Cluster.build().enableSsl(false).addContactPoint("localhost").port(8182).credentials("root", BaseGraphServerTest.DEFAULT_PASSWORD_FOR_TESTS).serializer(serializer)
.create();
}
private GraphTraversalSource traversal() {
return AnonymousTraversalSource.traversal().withRemote(DriverRemoteConnection.using(createCluster(), "graph"));
}
}