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/05/27 02:19:53 UTC
incubator-tinkerpop git commit: removed unneeded typecasts.
Repository: incubator-tinkerpop
Updated Branches:
refs/heads/master 7833dcfb3 -> 3b48b8412
removed unneeded typecasts.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/3b48b841
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/3b48b841
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/3b48b841
Branch: refs/heads/master
Commit: 3b48b84120e2613fefb65f9c03401004ff3f7254
Parents: 7833dcf
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Tue May 26 18:20:00 2015 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Tue May 26 18:20:00 2015 -0600
----------------------------------------------------------------------
.../hadoop/process/computer/spark/SparkExecutor.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/3b48b841/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/process/computer/spark/SparkExecutor.java
----------------------------------------------------------------------
diff --git a/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/process/computer/spark/SparkExecutor.java b/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/process/computer/spark/SparkExecutor.java
index da69790..d0297b5 100644
--- a/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/process/computer/spark/SparkExecutor.java
+++ b/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/process/computer/spark/SparkExecutor.java
@@ -90,10 +90,10 @@ public final class SparkExecutor {
final SparkMessenger<M> messenger = new SparkMessenger<>();
workerVertexProgram.workerIterationStart(memory.asImmutable()); // start the worker
return () -> IteratorUtils.map(partitionIterator, vertexViewIncoming -> {
- final Vertex vertex = vertexViewIncoming._2()._1().get(); // get the vertex from the vertex writable
+ final StarGraph.StarVertex vertex = vertexViewIncoming._2()._1().get(); // get the vertex from the vertex writable
// drop any compute properties that are cached in memory
if (elementComputeKeysArray.length > 0)
- ((StarGraph.StarVertex) vertex).dropVertexProperties(elementComputeKeysArray);
+ vertex.dropVertexProperties(elementComputeKeysArray);
final boolean hasViewAndMessages = vertexViewIncoming._2()._2().isPresent(); // if this is the first iteration, then there are no views or messages
final List<DetachedVertexProperty<Object>> previousView = hasViewAndMessages ? vertexViewIncoming._2()._2().get().getView() : Collections.emptyList();
final List<M> incomingMessages = hasViewAndMessages ? vertexViewIncoming._2()._2().get().getIncomingMessages() : Collections.emptyList();
@@ -157,9 +157,9 @@ public final class SparkExecutor {
}) :
graphRDD.leftOuterJoin(viewIncomingRDD)
.mapValues(tuple -> {
- final Vertex vertex = tuple._1().get();
- ((StarGraph.StarVertex) vertex).dropEdges();
- ((StarGraph.StarVertex) vertex).dropVertexProperties(elementComputeKeys);
+ final StarGraph.StarVertex vertex = tuple._1().get();
+ vertex.dropEdges();
+ vertex.dropVertexProperties(elementComputeKeys);
final List<DetachedVertexProperty<Object>> view = tuple._2().isPresent() ? tuple._2().get().getView() : Collections.emptyList();
view.forEach(property -> property.attach(Attachable.Method.create(vertex)));
return tuple._1();