You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by ok...@apache.org on 2015/12/04 13:22:34 UTC
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.
Repository: incubator-tinkerpop
Updated Branches:
refs/heads/master 19beece8f -> 04f7e248a
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/master
Commit: 04f7e248a5f1723bec935b6d29bf69871abccaf3
Parents: 19beece
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Fri Dec 4 05:22:28 2015 -0700
Committer: Marko A. Rodriguez <ok...@gmail.com>
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<Object, Object> {
@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<Object, Object> {
@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());
}