use of org.apache.tinkerpop.gremlin.process.computer.search.path.ShortestPathVertexProgram in project janusgraph by JanusGraph.
the class VertexProgramScanJob method getQueries.
@Override
public void getQueries(QueryContainer queries) {
Set<MessageScope> previousScopes = vertexMemory.getPreviousScopes();
if (vertexProgram instanceof TraversalVertexProgram || vertexProgram instanceof ShortestPathVertexProgram || vertexProgram instanceof ConnectedComponentVertexProgram || previousScopes.contains(globalScope)) {
// TraversalVertexProgram currently makes the assumption that the entire star-graph around a vertex
// is available (in-memory). Hence, this special treatment here.
// TODO: After TraversalVertexProgram is adjusted, remove this
// Special handling for ShortestPathVertexProgram necessary until TINKERPOP-2187 is resolved
// Apparently, ConnectedComponentVertexProgram also needs this special handling
queries.addQuery().direction(Direction.BOTH).edges();
}
for (MessageScope scope : previousScopes) {
if (scope instanceof MessageScope.Local) {
JanusGraphVertexStep<Vertex> startStep = FulgoraUtil.getReverseJanusGraphVertexStep((MessageScope.Local) scope, queries.getTransaction());
QueryContainer.QueryBuilder qb = queries.addQuery();
startStep.makeQuery(qb);
qb.edges();
}
}
}
Aggregations