Ich verwende Dse 5.x graph
.DataStax Dse Grafik Gremlin Pipeline Unterstützung
In der Dokumentation sagt Datastax, dass es kompatibel zu "TinkerTop" API ist.
Diese unten Gremlin Abfrage perfekt laufen in Orientdb (a tinkerTop basierend Graph-Datenbank)
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;
}
aber, wenn ich dies auf Dse leite Graph es sagt:
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)
Was Ich möchte erreichen ist:
Holen Sie alle benachbarten Scheitelpunkt eines Eckpunktes in DSE-Diagramm.
Gibt es eine Möglichkeit, 'GremlinPipeline' Query in diesem Diagramm ausführen? oder eine andere Möglichkeit, es zu tun.
Danke ..!