0
我正在使用Dse 5.x graph
。DataStax Dse图Gremlin流水线支持
在文档中,Datastax表示它与'TinkerTop'API兼容。
这低于小鬼查询在Orientdb(基于tinkerTop图形数据库)完美运行
public static List<Vertex> getAllNeighbour(Vertex vertex) {
List<Vertex> list = new ArrayList<Vertex>();
GremlinPipeline<Vertex, Vertex> vPipe = new GremlinPipeline<Vertex, Vertex>();
vPipe.start(vertex).out();
// Add all neighbors to array list
for(Object oo : vPipe) {
Vertex v = (Vertex) oo;
list.add(v);
}
return list;
}
但是,当我在Dse的运行这个图,它说:
Exception in thread "main" java.lang.ClassCastException: com.datastax.driver.dse.graph.DefaultVertex cannot be cast to com.tinkerpop.blueprints.Vertex
at com.tinkerpop.pipes.transform.VertexQueryPipe.processNextStart(VertexQueryPipe.java:85)
at com.tinkerpop.pipes.transform.VertexQueryPipe.processNextStart(VertexQueryPipe.java:19)
at com.tinkerpop.pipes.AbstractPipe.hasNext(AbstractPipe.java:98)
at com.tinkerpop.pipes.util.Pipeline.hasNext(Pipeline.java:105)
什么我想实现的是:
获取顶点的所有相邻顶点DSE图。
有什么办法可以在Dse图中运行'GremlinPipeline'查询吗?或任何其他方式来做到这一点。
谢谢..!