我不得不使用JanusGraph从
java程序中检索并添加数据.但我不知道如何连接到db.Below的特定图形是我用于在数据库中插入数据的代码但是当我尝试从gremlin控制台看到数据时,我找不到相同的数据.
JanusGraph graph = JanusGraphFactory.open("conf/janusgraph-cassandra-es.properties");
GraphTraversalSource g = graph.traversal();
graph.addVertex("psid",psid,"firstname",firstname,"last_name",lastname, "locale", locale ,"timezone",timezone, "gender" ,gender,"channel_id",channel_id);
我正在做的Gremlin查询:
gremlin> JanusGraph graph = JanusGraphFactory.open("conf/janusgraph-cassandra-es.properties");
gremlin> GraphTraversalSource g = graph.traversal();
gremlin> g.V().count()
count query给出0作为输出,我在db中找不到任何数据.