tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ok...@apache.org
Subject tinkerpop git commit: we now have ActorsResult looking like ComputerResult. Not only does it have the resultant data, but also metadata about the computaiton -- e.g. runtime.
Date Tue, 24 Jan 2017 16:52:50 GMT
Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1564 d31535bda -> 12f89edb1


we now have ActorsResult looking like ComputerResult. Not only does it have the resultant
data, but also metadata about the computaiton -- e.g. runtime.


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/12f89edb
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/12f89edb
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/12f89edb

Branch: refs/heads/TINKERPOP-1564
Commit: 12f89edb1fcd8ed8f783ba5572b2aedbb41aceb2
Parents: d31535b
Author: Marko A. Rodriguez <okrammarko@gmail.com>
Authored: Tue Jan 24 09:52:47 2017 -0700
Committer: Marko A. Rodriguez <okrammarko@gmail.com>
Committed: Tue Jan 24 09:52:47 2017 -0700

----------------------------------------------------------------------
 .../akka/process/actors/AkkaConfigFactory.java  |  2 +-
 .../akka/process/actors/AkkaGraphActors.java    | 21 +++++------
 .../akka/process/actors/MasterActor.java        |  4 +--
 .../tinkerpop/gremlin/process/actors/Actor.java |  4 +--
 .../gremlin/process/actors/ActorProgram.java    |  4 +--
 .../gremlin/process/actors/ActorsResult.java    |  4 +++
 .../gremlin/process/actors/GraphActors.java     |  4 +--
 .../actors/traversal/TraversalActorProgram.java |  8 +++--
 .../traversal/TraversalMasterProgram.java       | 38 ++++++++++----------
 .../traversal/TraversalWorkerProgram.java       |  1 -
 .../step/map/TraversalActorProgramStep.java     | 12 +++----
 .../actors/util/DefaultActorsResult.java        |  9 +++++
 12 files changed, 62 insertions(+), 49 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/12f89edb/akka-gremlin/src/main/java/org/apache/tinkerpop/gremlin/akka/process/actors/AkkaConfigFactory.java
----------------------------------------------------------------------
diff --git a/akka-gremlin/src/main/java/org/apache/tinkerpop/gremlin/akka/process/actors/AkkaConfigFactory.java
b/akka-gremlin/src/main/java/org/apache/tinkerpop/gremlin/akka/process/actors/AkkaConfigFactory.java
index f764fca..58e1ace 100644
--- a/akka-gremlin/src/main/java/org/apache/tinkerpop/gremlin/akka/process/actors/AkkaConfigFactory.java
+++ b/akka-gremlin/src/main/java/org/apache/tinkerpop/gremlin/akka/process/actors/AkkaConfigFactory.java
@@ -44,7 +44,7 @@ final class AkkaConfigFactory {
         // static method class
     }
 
-    static Config generateAkkaConfig(final ActorProgram actorProgram, final Configuration
configuration) {
+    static Config generateAkkaConfig(final ActorProgram<?> actorProgram, final Configuration
configuration) {
         Config config = ConfigFactory.defaultApplication().
                 withValue("akka.actor.serialization-bindings", ConfigValueFactory.fromMap(GryoSerializer.getSerializerBindings(configuration))).
                 withValue("custom-dispatcher.mailbox-requirement", ConfigValueFactory.fromAnyRef(ActorMailbox.class.getCanonicalName()
+ "$" + ActorMailbox.ActorSemantics.class.getSimpleName())).

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/12f89edb/akka-gremlin/src/main/java/org/apache/tinkerpop/gremlin/akka/process/actors/AkkaGraphActors.java
----------------------------------------------------------------------
diff --git a/akka-gremlin/src/main/java/org/apache/tinkerpop/gremlin/akka/process/actors/AkkaGraphActors.java
b/akka-gremlin/src/main/java/org/apache/tinkerpop/gremlin/akka/process/actors/AkkaGraphActors.java
index 3c5caff..26f27c1 100644
--- a/akka-gremlin/src/main/java/org/apache/tinkerpop/gremlin/akka/process/actors/AkkaGraphActors.java
+++ b/akka-gremlin/src/main/java/org/apache/tinkerpop/gremlin/akka/process/actors/AkkaGraphActors.java
@@ -29,6 +29,7 @@ import org.apache.commons.configuration.BaseConfiguration;
 import org.apache.commons.configuration.Configuration;
 import org.apache.commons.configuration.ConfigurationUtils;
 import org.apache.tinkerpop.gremlin.process.actors.ActorProgram;
+import org.apache.tinkerpop.gremlin.process.actors.ActorsResult;
 import org.apache.tinkerpop.gremlin.process.actors.GraphActors;
 import org.apache.tinkerpop.gremlin.process.actors.util.DefaultActorsResult;
 import org.apache.tinkerpop.gremlin.structure.Graph;
@@ -59,7 +60,7 @@ public final class AkkaGraphActors<R> implements GraphActors<R>
{
     }
 
     @Override
-    public GraphActors<R> program(final ActorProgram actorProgram) {
+    public GraphActors<R> program(final ActorProgram<R> actorProgram) {
         this.actorProgram = actorProgram;
         actorProgram.storeState(this.configuration);
         return this;
@@ -78,11 +79,12 @@ public final class AkkaGraphActors<R> implements GraphActors<R>
{
     }
 
     @Override
-    public Future<R> submit(final Graph graph) {
+    public Future<ActorsResult<R>> submit(final Graph graph) {
         if (this.executed)
             throw new IllegalStateException("Can not execute twice");
         this.executed = true;
         ///////
+        final long startTime = System.currentTimeMillis();
         final Configuration finalConfiguration = new SerializableConfiguration(graph.configuration());
         ConfigurationUtils.copy(this.configuration, finalConfiguration);
         final String systemName = "tinkerpop-" + UUID.randomUUID();
@@ -92,16 +94,11 @@ public final class AkkaGraphActors<R> implements GraphActors<R>
{
         final ActorRef master = system.actorOf(Props.create(MasterActor.class, finalConfiguration).
                 withDeploy(new Deploy(new RemoteScope(AkkaConfigFactory.getMasterActorDeployment(finalConfiguration)))),
"master");
 
-
-        return (Future) FutureConverters.toJava(Patterns.ask(master, new DefaultActorsResult<>(),
10000000)).toCompletableFuture();
-
-
-        /*return CompletableFuture.supplyAsync(() -> {
-            while (!system.isTerminated()) {
-
-            }
-            return result.getResult();
-        });*/
+        return FutureConverters.<ActorsResult<R>>toJava((scala.concurrent.Future)
Patterns.ask(master, new DefaultActorsResult<>(), 10000000)).
+                thenApply(x -> {
+                    ((ActorsResult) x).setRuntime(System.currentTimeMillis() - startTime);
+                    return x;
+                }).toCompletableFuture();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/12f89edb/akka-gremlin/src/main/java/org/apache/tinkerpop/gremlin/akka/process/actors/MasterActor.java
----------------------------------------------------------------------
diff --git a/akka-gremlin/src/main/java/org/apache/tinkerpop/gremlin/akka/process/actors/MasterActor.java
b/akka-gremlin/src/main/java/org/apache/tinkerpop/gremlin/akka/process/actors/MasterActor.java
index 6b1b538..98ad98f 100644
--- a/akka-gremlin/src/main/java/org/apache/tinkerpop/gremlin/akka/process/actors/MasterActor.java
+++ b/akka-gremlin/src/main/java/org/apache/tinkerpop/gremlin/akka/process/actors/MasterActor.java
@@ -49,7 +49,7 @@ import java.util.Map;
 /**
  * @author Marko A. Rodriguez (http://markorodriguez.com)
  */
-public final class MasterActor extends AbstractActor implements RequiresMessageQueue<ActorMailbox.ActorSemantics>,
Actor.Master {
+public final class MasterActor<R> extends AbstractActor implements RequiresMessageQueue<ActorMailbox.ActorSemantics>,
Actor.Master<R> {
 
     private final ActorProgram.Master masterProgram;
     private final Address.Master master;
@@ -124,7 +124,7 @@ public final class MasterActor extends AbstractActor implements RequiresMessageQ
     }
 
     @Override
-    public <R> void setResult(final R object) {
+    public void setResult(final R object) {
        final ActorsResult<R> result = new DefaultActorsResult<>();
         result.setResult(object);
         self().tell(result,self());

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/12f89edb/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/Actor.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/Actor.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/Actor.java
index d48c4d6..0f75e20 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/Actor.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/Actor.java
@@ -64,7 +64,7 @@ public interface Actor {
      */
     public void close();
 
-    public interface Master extends Actor {
+    public interface Master<R> extends Actor {
 
         /**
          * Get the master actors address.
@@ -81,7 +81,7 @@ public interface Actor {
          */
         public Partitioner partitioner();
 
-        public <R> void setResult(final R result);
+        public void setResult(final R result);
 
     }
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/12f89edb/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/ActorProgram.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/ActorProgram.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/ActorProgram.java
index e3713ad..4063090 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/ActorProgram.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/ActorProgram.java
@@ -29,7 +29,7 @@ import java.util.Optional;
 /**
  * @author Marko A. Rodriguez (http://markorodriguez.com)
  */
-public interface ActorProgram extends Cloneable {
+public interface ActorProgram<R> extends Cloneable {
 
     public static final String ACTOR_PROGRAM = "gremlin.actorProgram";
 
@@ -74,7 +74,7 @@ public interface ActorProgram extends Cloneable {
      * @param master the master actors creating the master program
      * @return the master program
      */
-    public ActorProgram.Master createMasterProgram(final Actor.Master master);
+    public ActorProgram.Master createMasterProgram(final Actor.Master<R> master);
 
     /**
      * Get the ordered list of message classes where order determines the priority

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/12f89edb/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/ActorsResult.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/ActorsResult.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/ActorsResult.java
index beb7ab9..525cc1e 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/ActorsResult.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/ActorsResult.java
@@ -27,4 +27,8 @@ public interface ActorsResult<R> {
     public R getResult();
 
     public void setResult(final R result);
+
+    public long getRuntime();
+
+    public void setRuntime(final long runtime);
 }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/12f89edb/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/GraphActors.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/GraphActors.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/GraphActors.java
index 9b8fe38..347b97d 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/GraphActors.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/GraphActors.java
@@ -46,7 +46,7 @@ public interface GraphActors<R> extends Processor {
      * @param program the program to execute
      * @return the updated GraphActors with newly defined program
      */
-    public GraphActors<R> program(final ActorProgram program);
+    public GraphActors<R> program(final ActorProgram<R> program);
 
     /**
      * Specify the number of workers per {@link Graph} {@link org.apache.tinkerpop.gremlin.structure.Partition}.
@@ -72,7 +72,7 @@ public interface GraphActors<R> extends Processor {
      * @return a {@link Future} denoting a reference to the asynchronous computation's result
      */
     @Override
-    public Future<R> submit(final Graph graph);
+    public Future<ActorsResult<R>> submit(final Graph graph);
 
     /**
      * Returns an {@link ActorProgramStrategy} which enables a {@link Traversal} to execute
on {@link GraphActors}.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/12f89edb/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/traversal/TraversalActorProgram.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/traversal/TraversalActorProgram.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/traversal/TraversalActorProgram.java
index 96afea8..637c9a0 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/traversal/TraversalActorProgram.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/traversal/TraversalActorProgram.java
@@ -47,16 +47,18 @@ import org.apache.tinkerpop.gremlin.structure.Graph;
 import org.apache.tinkerpop.gremlin.structure.Partition;
 import org.apache.tinkerpop.gremlin.structure.util.Attachable;
 import org.apache.tinkerpop.gremlin.structure.util.Host;
+import org.javatuples.Pair;
 
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
+import java.util.Map;
 import java.util.Optional;
 
 /**
  * @author Marko A. Rodriguez (http://markorodriguez.com)
  */
-public final class TraversalActorProgram<R> implements ActorProgram {
+public final class TraversalActorProgram<R> implements ActorProgram<Pair<TraverserSet<R>,
Map<String, Object>>> {
 
     public static boolean DETACH = true;
 
@@ -131,8 +133,8 @@ public final class TraversalActorProgram<R> implements ActorProgram
{
     }
 
     @Override
-    public TraversalActorProgram.Master createMasterProgram(final Actor.Master master) {
-        return new TraversalMasterProgram(master, this.traversal.clone());
+    public TraversalActorProgram.Master createMasterProgram(final Actor.Master<Pair<TraverserSet<R>,
Map<String, Object>>> master) {
+        return new TraversalMasterProgram<>(master, this.traversal.clone());
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/12f89edb/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/traversal/TraversalMasterProgram.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/traversal/TraversalMasterProgram.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/traversal/TraversalMasterProgram.java
index 6ba0cd0..cbefcb4 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/traversal/TraversalMasterProgram.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/traversal/TraversalMasterProgram.java
@@ -55,25 +55,23 @@ import java.util.Set;
 /**
  * @author Marko A. Rodriguez (http://markorodriguez.com)
  */
-final class TraversalMasterProgram implements ActorProgram.Master<Object> {
+final class TraversalMasterProgram<R> implements ActorProgram.Master<Object>
{
 
-    private final Actor.Master master;
-    private final Traversal.Admin<?, ?> traversal;
-    private final TraversalMatrix<?, ?> matrix;
+    private final Actor.Master<Pair<TraverserSet<R>, Map<String, Object>>>
master;
+    private final Traversal.Admin<?, R> traversal;
+    private final TraversalMatrix<?, R> matrix;
     private Map<String, Barrier> barriers = new HashMap<>();
     private Set<String> sideEffects = new HashSet<>();
-    private final TraverserSet<?> results;
+    private final TraverserSet<R> traverserResults;
     private Address.Worker neighborAddress;
     private int orderCounter = -1;
     private final Map<Partition, Address.Worker> partitionToWorkerMap = new HashMap<>();
     private boolean voteToHalt = true;
 
-    public TraversalMasterProgram(final Actor.Master master, final Traversal.Admin<?,
?> traversal) {
+    public TraversalMasterProgram(final Actor.Master<Pair<TraverserSet<R>, Map<String,
Object>>> master, final Traversal.Admin<?, R> traversal) {
         this.traversal = traversal;
-        // System.out.println("master[created]: " + master.address().getId());
-        // System.out.println(this.traversal);
         this.matrix = new TraversalMatrix<>(this.traversal);
-        this.results = new TraverserSet<>();
+        this.traverserResults = new TraverserSet<>();
         this.master = master;
         Distributing.configure(this.traversal, true, true);
         Pushing.configure(this.traversal, true, false);
@@ -146,14 +144,22 @@ final class TraversalMasterProgram implements ActorProgram.Master<Object>
{
                 this.voteToHalt = true;
                 this.master.send(this.neighborAddress, Terminate.YES);
             } else {
+                // get any dangling local results
                 while (this.traversal.hasNext()) {
                     final Traverser.Admin traverser = this.traversal.nextTraverser();
-                    this.results.add(-1 == this.orderCounter ? traverser : new OrderedTraverser(traverser,
this.orderCounter++));
+                    this.traverserResults.add(-1 == this.orderCounter ? traverser : new OrderedTraverser(traverser,
this.orderCounter++));
                 }
                 if (this.orderCounter != -1)
-                    this.results.sort((a, b) -> Integer.compare(((OrderedTraverser<?>)
a).order(), ((OrderedTraverser<?>) b).order()));
+                    this.traverserResults.sort((a, b) -> Integer.compare(((OrderedTraverser<?>)
a).order(), ((OrderedTraverser<?>) b).order()));
 
-                TraversalActorProgram.attach(this.results, this.master.partitioner().getGraph());
+                TraversalActorProgram.attach(this.traverserResults, this.master.partitioner().getGraph());
+                // generate the final result to send back to the GraphActors program
+                final Map<String, Object> sideEffects = new HashMap<>();
+                for (final String key : this.traversal.getSideEffects().keys()) {
+                    sideEffects.put(key, this.traversal.getSideEffects().get(key));
+                }
+                this.master.setResult(Pair.with(this.traverserResults, sideEffects));
+                // close master
                 this.master.close();
             }
         } else {
@@ -163,11 +169,7 @@ final class TraversalMasterProgram implements ActorProgram.Master<Object>
{
 
     @Override
     public void terminate() {
-        final Map<String, Object> sideEffects = new HashMap<>();
-        for (final String key : this.traversal.getSideEffects().keys()) {
-            sideEffects.put(key, this.traversal.getSideEffects().get(key));
-        }
-        this.master.setResult(Pair.with(this.results, sideEffects));
+
     }
 
     private void broadcast(final Object message) {
@@ -195,7 +197,7 @@ final class TraversalMasterProgram implements ActorProgram.Master<Object>
{
 
     private void sendTraverser(final Traverser.Admin traverser) {
         if (traverser.isHalted()) {
-            this.results.add(traverser);
+            this.traverserResults.add(traverser);
             return;
         }
         this.voteToHalt = false;

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/12f89edb/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/traversal/TraversalWorkerProgram.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/traversal/TraversalWorkerProgram.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/traversal/TraversalWorkerProgram.java
index 9f0a3df..fad956e 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/traversal/TraversalWorkerProgram.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/traversal/TraversalWorkerProgram.java
@@ -94,7 +94,6 @@ final class TraversalWorkerProgram implements ActorProgram.Worker<Object>
{
 
     @Override
     public void execute(final Object message) {
-        //System.out.println(message + "::" + this.isLeader);
         if (message instanceof StartMessage) {
             // initial message from master that says: "start processing"
             final GraphStep<?, ?> step = (GraphStep) this.matrix.getTraversal().getStartStep();

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/12f89edb/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/traversal/step/map/TraversalActorProgramStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/traversal/step/map/TraversalActorProgramStep.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/traversal/step/map/TraversalActorProgramStep.java
index 50cf554..e77f8b2 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/traversal/step/map/TraversalActorProgramStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/traversal/step/map/TraversalActorProgramStep.java
@@ -25,7 +25,6 @@ import org.apache.tinkerpop.gremlin.process.actors.ActorsResult;
 import org.apache.tinkerpop.gremlin.process.actors.GraphActors;
 import org.apache.tinkerpop.gremlin.process.actors.traversal.TraversalActorProgram;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
-import org.apache.tinkerpop.gremlin.process.traversal.TraversalSideEffects;
 import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
 import org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep;
 import org.apache.tinkerpop.gremlin.process.traversal.step.util.EmptyStep;
@@ -58,12 +57,13 @@ public final class TraversalActorProgramStep<S, E> extends AbstractStep<E,
E> {
         if (this.first) {
             this.first = false;
             try {
-                final GraphActors graphActors = GraphActors.open(this.graphActorsConfiguration);
-                final ActorProgram actorProgram = new TraversalActorProgram<>(this.actorsTraversal);
-                final Pair<TraverserSet<E>, Map<String,Object>> pair =
(Pair)((ActorsResult)graphActors.program(actorProgram).submit(this.getTraversal().getGraph().get()).get()).getResult();
+                final GraphActors<Pair<TraverserSet<E>, Map<String, Object>>>
graphActors = GraphActors.open(this.graphActorsConfiguration);
+                final ActorProgram<Pair<TraverserSet<E>, Map<String, Object>>>
actorProgram = new TraversalActorProgram<>(this.actorsTraversal);
+                final ActorsResult<Pair<TraverserSet<E>, Map<String, Object>>>
result = graphActors.program(actorProgram).submit(this.getTraversal().getGraph().get()).get();
+                final Pair<TraverserSet<E>, Map<String, Object>> pair =
result.getResult();
                 pair.getValue0().forEach(this.starts::add);
-                for(final Map.Entry<String,Object> entry : pair.getValue1().entrySet())
{
-                    this.getTraversal().getSideEffects().set(entry.getKey(),entry.getValue());
+                for (final Map.Entry<String, Object> entry : pair.getValue1().entrySet())
{
+                    this.getTraversal().getSideEffects().set(entry.getKey(), entry.getValue());
                 }
             } catch (final Exception e) {
                 throw new IllegalStateException(e.getMessage(), e);

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/12f89edb/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/util/DefaultActorsResult.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/util/DefaultActorsResult.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/util/DefaultActorsResult.java
index 208a9a1..a88e293 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/util/DefaultActorsResult.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/util/DefaultActorsResult.java
@@ -27,6 +27,7 @@ import org.apache.tinkerpop.gremlin.process.actors.ActorsResult;
 public final class DefaultActorsResult<R> implements ActorsResult<R> {
 
     private R result;
+    private long runtime;
 
     public DefaultActorsResult() {
 
@@ -39,4 +40,12 @@ public final class DefaultActorsResult<R> implements ActorsResult<R>
{
     public void setResult(final R result) {
         this.result = result;
     }
+
+    public void setRuntime(final long runtime) {
+        this.runtime = runtime;
+    }
+
+    public long getRuntime() {
+        return this.runtime;
+    }
 }


Mime
View raw message