Return-Path: X-Original-To: apmail-tinkerpop-commits-archive@minotaur.apache.org Delivered-To: apmail-tinkerpop-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 694E818859 for ; Tue, 29 Dec 2015 19:15:14 +0000 (UTC) Received: (qmail 76045 invoked by uid 500); 29 Dec 2015 19:15:14 -0000 Delivered-To: apmail-tinkerpop-commits-archive@tinkerpop.apache.org Received: (qmail 76020 invoked by uid 500); 29 Dec 2015 19:15:14 -0000 Mailing-List: contact commits-help@tinkerpop.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tinkerpop.incubator.apache.org Delivered-To: mailing list commits@tinkerpop.incubator.apache.org Received: (qmail 76010 invoked by uid 99); 29 Dec 2015 19:15:14 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Dec 2015 19:15:14 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id AEF48C06FF for ; Tue, 29 Dec 2015 19:15:13 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.779 X-Spam-Level: * X-Spam-Status: No, score=1.779 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id xa1QFvUOpEef for ; Tue, 29 Dec 2015 19:15:12 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with SMTP id 40AB52160F for ; Tue, 29 Dec 2015 19:15:11 +0000 (UTC) Received: (qmail 75919 invoked by uid 99); 29 Dec 2015 19:15:10 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Dec 2015 19:15:10 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 595B8E04AC; Tue, 29 Dec 2015 19:15:10 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: spmallette@apache.org To: commits@tinkerpop.incubator.apache.org Date: Tue, 29 Dec 2015 19:15:10 -0000 Message-Id: <21a3b9f5f65c45ba9916c0221164bb16@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [01/40] incubator-tinkerpop git commit: store the toString() version of vertex IDs and use it for lookups 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 Authored: Tue Dec 15 22:36:42 2015 +0100 Committer: Daniel Kuppitz 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 { 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 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, };