TINKERPOP3-1012 generalize BLVP vertex id types
Change the type of two vertex ID variable declarations from Long to
Object. Supports graphs that don't use Long vertex IDs or
user-supplied IDs.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/e2fb9b4c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/e2fb9b4c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/e2fb9b4c
Branch: refs/heads/TINKERPOP3-1011
Commit: e2fb9b4c24a02289f629d4dd69d01a9a40ab4233
Parents: 322668b
Author: Dan LaRocque <dalaro@hopcount.org>
Authored: Tue Dec 1 08:29:22 2015 -0500
Committer: Dan LaRocque <dalaro@hopcount.org>
Committed: Tue Dec 1 08:29:22 2015 -0500
----------------------------------------------------------------------
.../process/computer/bulkloading/BulkLoaderVertexProgram.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/e2fb9b4c/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/bulkloading/BulkLoaderVertexProgram.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/bulkloading/BulkLoaderVertexProgram.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/bulkloading/BulkLoaderVertexProgram.java
index cb36cf4..4d507d1 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/bulkloading/BulkLoaderVertexProgram.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/bulkloading/BulkLoaderVertexProgram.java
@@ -243,7 +243,7 @@ public class BulkLoaderVertexProgram implements VertexProgram<Tuple>
{
idPairs.put(idPair.getValue(0), idPair.getValue(1));
}
// get the vertex with given the dummy id property
- final Long outVId = sourceVertex.value(bulkLoader.getVertexIdProperty());
+ final Object outVId = sourceVertex.value(bulkLoader.getVertexIdProperty());
final Vertex outV = bulkLoader.getVertexById(outVId, graph, g);
// for all the incoming edges of the vertex, get the incoming adjacent vertex
and write the edge and its properties
sourceVertex.edges(Direction.OUT).forEachRemaining(edge -> {
@@ -254,7 +254,7 @@ public class BulkLoaderVertexProgram implements VertexProgram<Tuple>
{
});
}
} else if (memory.getIteration() == 2) {
- final Long vertexId = sourceVertex.value(bulkLoader.getVertexIdProperty());
+ final Object vertexId = sourceVertex.value(bulkLoader.getVertexIdProperty());
bulkLoader.getVertexById(vertexId, graph, g)
.property(bulkLoader.getVertexIdProperty()).remove();
this.commit(false);
|