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 9BAC2182F4 for ; Fri, 4 Dec 2015 14:21:19 +0000 (UTC) Received: (qmail 35832 invoked by uid 500); 4 Dec 2015 14:21:19 -0000 Delivered-To: apmail-tinkerpop-commits-archive@tinkerpop.apache.org Received: (qmail 35807 invoked by uid 500); 4 Dec 2015 14:21:19 -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 35798 invoked by uid 99); 4 Dec 2015 14:21:19 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Dec 2015 14:21:19 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 1747418028B for ; Fri, 4 Dec 2015 14:21:19 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.227 X-Spam-Level: * X-Spam-Status: No, score=1.227 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.554, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id uX932TT-yeDX for ; Fri, 4 Dec 2015 14:21:12 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with SMTP id CC87231AB7 for ; Fri, 4 Dec 2015 14:21:07 +0000 (UTC) Received: (qmail 35146 invoked by uid 99); 4 Dec 2015 14:21:07 -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; Fri, 04 Dec 2015 14:21:07 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 7D83DE07D9; Fri, 4 Dec 2015 14:21:07 +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: Fri, 04 Dec 2015 14:21:31 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [27/31] incubator-tinkerpop git commit: I merged the Hadoop PR and then the Column PR. Column PR had a conflict in integration testing in Spark cause of unregistered classes. Simple fix. CTR. I merged the Hadoop PR and then the Column PR. Column PR had a conflict in integration testing in Spark cause of unregistered classes. Simple fix. CTR. Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/04f7e248 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/04f7e248 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/04f7e248 Branch: refs/heads/TINKERPOP3-860 Commit: 04f7e248a5f1723bec935b6d29bf69871abccaf3 Parents: 19beece Author: Marko A. Rodriguez Authored: Fri Dec 4 05:22:28 2015 -0700 Committer: Marko A. Rodriguez Committed: Fri Dec 4 05:22:28 2015 -0700 ---------------------------------------------------------------------- CHANGELOG.asciidoc | 2 +- .../org/apache/tinkerpop/gremlin/structure/Column.java | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/04f7e248/CHANGELOG.asciidoc ---------------------------------------------------------------------- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 717aa71..1b2e1d9 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -26,7 +26,7 @@ image::https://raw.githubusercontent.com/apache/incubator-tinkerpop/master/docs/ TinkerPop 3.1.1 (NOT OFFICIALLY RELEASED YET) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -* `Column` now implements `Function` and now `by(valueDecr)` can be replaced with `by(values,decr)` and thus, projection and order are now separated. +* `Column` now implements `Function`. The modulator `by(valueDecr)` can be replaced by `by(values,decr)` and thus, projection and order are separated. * Added `InputRDDFormat` which wraps an `InputRDD` to make it accessible to Hadoop and not just Spark. * Added `AbstractSparkTest` which handles closing `SparkContext` instances between tests now that we support persisted contexts. * Fixed a serialization bug in `GryoSerializer` that made it difficult for graph providers to yield `InputRDDs` for `SparkGraphComputer`. http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/04f7e248/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Column.java ---------------------------------------------------------------------- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Column.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Column.java index 38921c1..a20d7e7 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Column.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Column.java @@ -21,6 +21,9 @@ package org.apache.tinkerpop.gremlin.structure; import org.apache.tinkerpop.gremlin.process.traversal.Path; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashSet; import java.util.Map; import java.util.function.Function; @@ -38,11 +41,11 @@ public enum Column implements Function { @Override public Object apply(final Object object) { if (object instanceof Map) - return ((Map) object).keySet(); + return new LinkedHashSet<>(((Map) object).keySet()); else if (object instanceof Map.Entry) return ((Map.Entry) object).getKey(); else if (object instanceof Path) - return ((Path) object).labels(); + return new ArrayList<>(((Path) object).labels()); else throw new IllegalArgumentException("The provided object does not have accessible keys: " + object.getClass()); } @@ -54,11 +57,11 @@ public enum Column implements Function { @Override public Object apply(final Object object) { if (object instanceof Map) - return ((Map) object).values(); + return new ArrayList<>(((Map) object).values()); else if (object instanceof Map.Entry) return ((Map.Entry) object).getValue(); else if (object instanceof Path) - return ((Path) object).objects(); + return new ArrayList<>(((Path) object).objects()); else throw new IllegalArgumentException("The provided object does not have accessible keys: " + object.getClass()); }