tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spmalle...@apache.org
Subject [01/40] incubator-tinkerpop git commit: store the toString() version of vertex IDs and use it for lookups
Date Tue, 29 Dec 2015 19:15:10 GMT
Repository: incubator-tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1035 bc1fc5e89 -> 0e2700508


store the toString() version of vertex IDs and use it for lookups


Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/8cc12c0b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/8cc12c0b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/8cc12c0b

Branch: refs/heads/TINKERPOP-1035
Commit: 8cc12c0bdd9ac96eb0e4e4f7642c81e8055dad8c
Parents: e32a418
Author: Daniel Kuppitz <daniel_kuppitz@hotmail.com>
Authored: Tue Dec 15 22:36:42 2015 +0100
Committer: Daniel Kuppitz <daniel_kuppitz@hotmail.com>
Committed: Tue Dec 15 22:36:42 2015 +0100

----------------------------------------------------------------------
 .../gremlin/process/computer/bulkloading/BulkLoader.java         | 2 +-
 .../process/computer/bulkloading/BulkLoaderVertexProgram.java    | 2 +-
 .../process/computer/bulkloading/IncrementalBulkLoader.java      | 4 +---
 .../tinkerpop/gremlin/process/GroovyProcessComputerSuite.java    | 4 ++--
 4 files changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/8cc12c0b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/bulkloading/BulkLoader.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/bulkloading/BulkLoader.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/bulkloading/BulkLoader.java
index 2640d2e..dffe11e 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/bulkloading/BulkLoader.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/bulkloading/BulkLoader.java
@@ -117,7 +117,7 @@ public interface BulkLoader {
      * @return The vertex with the given ID.
      */
     public default Vertex getVertexById(final Object id, final Graph graph, final GraphTraversalSource
g) {
-        return graph.vertices(id).next();
+        return g.V().hasId(id).next();
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/8cc12c0b/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 02e6054..2f3a0d0 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
@@ -217,7 +217,7 @@ public class BulkLoaderVertexProgram implements VertexProgram<Tuple>
{
             this.commit(false);
             if (!bulkLoader.useUserSuppliedIds()) {
                 // create an id pair and send it to all the vertex's incoming adjacent vertices
-                sourceVertex.property(bulkLoader.getVertexIdProperty(), targetVertex.id());
+                sourceVertex.property(bulkLoader.getVertexIdProperty(), targetVertex.id().toString());
                 messenger.sendMessage(messageScope, Pair.with(sourceVertex.id(), targetVertex.id()));
             }
         } else if (memory.getIteration() == 1) {

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/8cc12c0b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/bulkloading/IncrementalBulkLoader.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/bulkloading/IncrementalBulkLoader.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/bulkloading/IncrementalBulkLoader.java
index 8219515..187f72e 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/bulkloading/IncrementalBulkLoader.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/bulkloading/IncrementalBulkLoader.java
@@ -46,15 +46,13 @@ public class IncrementalBulkLoader implements BulkLoader {
     @Override
     public Vertex getOrCreateVertex(final Vertex vertex, final Graph graph, final GraphTraversalSource
g) {
         final Iterator<Vertex> iterator = useUserSuppliedIds()
-                ? graph.vertices(vertex.id())
+                ? g.V().hasId(vertex.id())
                 : g.V().has(vertex.label(), getVertexIdProperty(), vertex.id());
         return iterator.hasNext()
                 ? iterator.next()
                 : useUserSuppliedIds()
                 ? g.addV(vertex.label()).property(T.id, vertex.id()).next()
                 : g.addV(vertex.label()).property(getVertexIdProperty(), vertex.id()).next();
-        //? graph.addVertex(T.id, vertex.id(), T.label, vertex.label())
-        //: graph.addVertex(T.label, vertex.label(), getVertexIdProperty(), vertex.id());
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/8cc12c0b/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/process/GroovyProcessComputerSuite.java
----------------------------------------------------------------------
diff --git a/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/process/GroovyProcessComputerSuite.java
b/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/process/GroovyProcessComputerSuite.java
index 7187062..6264fbc 100644
--- a/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/process/GroovyProcessComputerSuite.java
+++ b/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/process/GroovyProcessComputerSuite.java
@@ -104,7 +104,7 @@ public class GroovyProcessComputerSuite extends ProcessComputerSuite {
      * as needed to enforce tests upon implementations.
      */
     private static final Class<?>[] allTests = new Class<?>[]{
-
+/*
             //branch
             GroovyBranchTest.Traversals.class,
             GroovyChooseTest.Traversals.class,
@@ -170,7 +170,7 @@ public class GroovyProcessComputerSuite extends ProcessComputerSuite {
 
             // algorithms
             PageRankVertexProgramTest.class,
-            PeerPressureVertexProgramTest.class,
+            PeerPressureVertexProgramTest.class,*/
             BulkLoaderVertexProgramTest.class,
     };
 


Mime
View raw message