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 2016/03/14 16:29:53 UTC

incubator-tinkerpop git commit: changed toIterator() to collect().iterator() as recommended by Russel Spitzer so we don't get the Spark UI overload. Simple change. CTR.

Repository: incubator-tinkerpop
Updated Branches:
  refs/heads/tp31 769ed9839 -> 75eeda073


changed toIterator() to collect().iterator() as recommended by Russel Spitzer so we don't get the Spark UI overload. Simple change. 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/75eeda07
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/75eeda07
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/75eeda07

Branch: refs/heads/tp31
Commit: 75eeda073c292697bf06f633c56935c5b315cef4
Parents: 769ed98
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Mon Mar 14 09:30:22 2016 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Mon Mar 14 09:30:22 2016 -0600

----------------------------------------------------------------------
 .../tinkerpop/gremlin/spark/structure/io/PersistedOutputRDD.java   | 2 +-
 .../tinkerpop/gremlin/spark/structure/io/ExampleOutputRDD.java     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/75eeda07/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/structure/io/PersistedOutputRDD.java
----------------------------------------------------------------------
diff --git a/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/structure/io/PersistedOutputRDD.java b/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/structure/io/PersistedOutputRDD.java
index 4ae6248..3cc27b7 100644
--- a/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/structure/io/PersistedOutputRDD.java
+++ b/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/structure/io/PersistedOutputRDD.java
@@ -68,6 +68,6 @@ public final class PersistedOutputRDD implements OutputRDD {
         Spark.removeRDD(memoryRDDName);
         memoryRDD.setName(memoryRDDName).persist(StorageLevel.fromString(configuration.getString(Constants.GREMLIN_SPARK_PERSIST_STORAGE_LEVEL, "MEMORY_ONLY")));
         Spark.refresh(); // necessary to do really fast so the Spark GC doesn't clear out the RDD
-        return IteratorUtils.map(memoryRDD.toLocalIterator(), tuple -> new KeyValue<>(tuple._1(), tuple._2()));
+        return IteratorUtils.map(memoryRDD.collect().iterator(), tuple -> new KeyValue<>(tuple._1(), tuple._2()));
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/75eeda07/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/structure/io/ExampleOutputRDD.java
----------------------------------------------------------------------
diff --git a/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/structure/io/ExampleOutputRDD.java b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/structure/io/ExampleOutputRDD.java
index 103ec20..ed36886 100644
--- a/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/structure/io/ExampleOutputRDD.java
+++ b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/structure/io/ExampleOutputRDD.java
@@ -39,7 +39,7 @@ public final class ExampleOutputRDD implements OutputRDD {
     @Override
     public void writeGraphRDD(final Configuration configuration, final JavaPairRDD<Object, VertexWritable> graphRDD) {
         int totalAge = 0;
-        final Iterator<VertexWritable> iterator = graphRDD.values().toLocalIterator();
+        final Iterator<VertexWritable> iterator = graphRDD.values().collect().iterator();
         while (iterator.hasNext()) {
             final Vertex vertex = iterator.next().get();
             if (vertex.label().equals("person"))