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/12/09 22:03:44 UTC
tinkerpop git commit: connected the actor system to the
StandardProcessTestSuite and things are working. definately failures,
but I'm seeing patterns in the failures -- 1. anything with local barriers
fails (aggregate, dedup). order() fails but that is b
Repository: tinkerpop
Updated Branches:
refs/heads/TINKERPOP-1564 1a265ddae -> 1a78a30da
connected the actor system to the StandardProcessTestSuite and things are working. definately failures, but I'm seeing patterns in the failures -- 1. anything with local barriers fails (aggregate, dedup). order() fails but that is because we don't have a ConcurrentLinkedHashMap to back TraverserSet. when a traversal inspects sideEffects it fails (updating side-effects works). When there are multiple barriers across traversal branches (this is because I don't have a Set<Barrier>, only a Barrier for locking... need to add that). All in all, very positive results. Now its just tweak and get all these kinks worked out and tada.
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/1a78a30d
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/1a78a30d
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/1a78a30d
Branch: refs/heads/TINKERPOP-1564
Commit: 1a78a30da498c5ded4122c11eb978dd5c4a2c830
Parents: 1a265dd
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Fri Dec 9 15:03:40 2016 -0700
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Fri Dec 9 15:03:40 2016 -0700
----------------------------------------------------------------------
.../process/akka/MasterTraversalActor.java | 8 +-
.../process/akka/TinkerActorSystem.java | 3 +-
.../process/akka/TraverserMailbox.java | 3 +-
.../process/akka/WorkerTraversalActor.java | 26 +++++--
.../akka/test/ActorProcessStandardTest.java | 33 ++++++++
.../process/akka/test/ActorProvider.java | 82 ++++++++++++++++++++
.../process/akka/traversal/PartitionerStep.java | 1 +
.../akka/traversal/PartitionerStrategy.java | 26 +++++--
8 files changed, 169 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1a78a30d/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/akka/MasterTraversalActor.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/akka/MasterTraversalActor.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/akka/MasterTraversalActor.java
index c03cbe1..c496bb2 100644
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/akka/MasterTraversalActor.java
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/akka/MasterTraversalActor.java
@@ -97,10 +97,16 @@ public final class MasterTraversalActor extends AbstractActor implements Require
while (step.hasNext()) {
this.sendTraverser(step.next());
}
+ this.barrierLock.done();
this.barrierLock = null;
+ // todo: make this a barrier complete so workers can call Barrier.done()
this.workers.get(this.leaderWorker).tell(StartMessage.instance(), self());
- } else
+ } else {
+ while (this.traversal.hasNext()) {
+ this.results.add((Traverser.Admin) this.traversal.nextTraverser());
+ }
context().system().terminate();
+ }
}).build());
}
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1a78a30d/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/akka/TinkerActorSystem.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/akka/TinkerActorSystem.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/akka/TinkerActorSystem.java
index dcca9b8..7d7de19 100644
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/akka/TinkerActorSystem.java
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/akka/TinkerActorSystem.java
@@ -44,7 +44,7 @@ public final class TinkerActorSystem<S, E> {
public TinkerActorSystem(final Traversal.Admin<S, E> traversal, final Partitioner partitioner) {
this.system = ActorSystem.create("traversal-" + traversal.hashCode());
- this.system.actorOf(Props.create(MasterTraversalActor.class, traversal, partitioner, this.results), "master");
+ this.system.actorOf(Props.create(MasterTraversalActor.class, traversal.clone(), partitioner, this.results), "master");
}
public Future<TraverserSet<E>> getResults() {
@@ -56,6 +56,7 @@ public final class TinkerActorSystem<S, E> {
});
}
+
//////////////
public static void main(String args[]) throws Exception {
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1a78a30d/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/akka/TraverserMailbox.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/akka/TraverserMailbox.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/akka/TraverserMailbox.java
index 940dfb1..3d61c2c 100644
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/akka/TraverserMailbox.java
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/akka/TraverserMailbox.java
@@ -41,9 +41,10 @@ import java.util.concurrent.ConcurrentLinkedQueue;
public final class TraverserMailbox implements MailboxType, ProducesMessageQueue<TraverserMailbox.TraverserMessageQueue> {
public static class TraverserMessageQueue implements MessageQueue, TraverserSetSemantics {
+ private final Queue<Envelope> otherMessages = new ConcurrentLinkedQueue<>();
+ // TODO: we need a concurrent linked hash map
private final TraverserSet<?> traverserMessages = new TraverserSet<>(new ConcurrentHashMap<>());
private final Queue<Envelope> haltMessages = new ConcurrentLinkedQueue<>();
- private final Queue<Envelope> otherMessages = new ConcurrentLinkedQueue<>();
private final ActorRef owner;
public TraverserMessageQueue(final ActorRef owner) {
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1a78a30d/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/akka/WorkerTraversalActor.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/akka/WorkerTraversalActor.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/akka/WorkerTraversalActor.java
index 782a2c6..b21d168 100644
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/akka/WorkerTraversalActor.java
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/akka/WorkerTraversalActor.java
@@ -30,13 +30,16 @@ import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
import org.apache.tinkerpop.gremlin.process.traversal.step.Barrier;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphStep;
import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalMatrix;
+import org.apache.tinkerpop.gremlin.structure.Edge;
import org.apache.tinkerpop.gremlin.structure.Element;
import org.apache.tinkerpop.gremlin.structure.Partition;
import org.apache.tinkerpop.gremlin.structure.Partitioner;
+import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.apache.tinkerpop.gremlin.tinkergraph.process.akka.messages.BarrierAddMessage;
import org.apache.tinkerpop.gremlin.tinkergraph.process.akka.messages.SideEffectAddMessage;
import org.apache.tinkerpop.gremlin.tinkergraph.process.akka.messages.StartMessage;
import org.apache.tinkerpop.gremlin.tinkergraph.process.akka.messages.VoteToHaltMessage;
+import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;
import java.util.HashMap;
import java.util.Map;
@@ -46,7 +49,10 @@ import java.util.Map;
*/
public final class WorkerTraversalActor extends AbstractActor implements RequiresMessageQueue<TraverserMailbox.TraverserSetSemantics> {
- public enum Terminate {MAYBE, YES, NO}
+ // terminate token is passed around worker ring to gather termination consensus (dual-ring termination algorithm)
+ public enum Terminate {
+ MAYBE, YES, NO
+ }
private final TraversalMatrix<?, ?> matrix;
private final Partition localPartition;
@@ -57,16 +63,26 @@ public final class WorkerTraversalActor extends AbstractActor implements Require
private boolean isLeader;
private Terminate terminate = null;
private boolean voteToHalt = true;
- private Barrier barrierLock = null;
+ private Barrier barrierLock = null; // TODO: make a Set<Barrier> as multiple barriers could be processed in parallel (branches)
public WorkerTraversalActor(final Traversal.Admin<?, ?> traversal, final Partition localPartition, final Partitioner partitioner) {
System.out.println("worker[created]: " + self().path());
- // set up partition and traversal information
+ // set up partition and traversal information
this.localPartition = localPartition;
this.partitioner = partitioner;
this.matrix = new TraversalMatrix<>(traversal);
this.matrix.getTraversal().setSideEffects(new WorkerTraversalSideEffects(this.matrix.getTraversal().getSideEffects(), context()));
- ((GraphStep) traversal.getStartStep()).setIteratorSupplier(this.localPartition::vertices);
+ final GraphStep graphStep = (GraphStep) traversal.getStartStep();
+ if (0 == graphStep.getIds().length)
+ ((GraphStep) traversal.getStartStep()).setIteratorSupplier(graphStep.returnsVertex() ? this.localPartition::vertices : this.localPartition::edges);
+ else {
+ if (graphStep.returnsVertex())
+ ((GraphStep<Vertex, Vertex>) traversal.getStartStep()).setIteratorSupplier(
+ () -> IteratorUtils.filter(this.localPartition.vertices(graphStep.getIds()), this.localPartition::contains));
+ else
+ ((GraphStep<Edge, Edge>) traversal.getStartStep()).setIteratorSupplier(
+ () -> IteratorUtils.filter(this.localPartition.edges(graphStep.getIds()), this.localPartition::contains));
+ }
// create termination ring topology
final int i = this.partitioner.getPartitions().indexOf(this.localPartition);
this.neighborWorker = "../worker-" + this.partitioner.getPartitions().get(i == this.partitioner.getPartitions().size() - 1 ? 0 : i + 1).hashCode();
@@ -87,7 +103,6 @@ public final class WorkerTraversalActor extends AbstractActor implements Require
}
}).
match(Traverser.Admin.class, traverser -> {
- this.voteToHalt = false;
this.processTraverser(traverser);
}).
match(SideEffectAddMessage.class, sideEffect -> {
@@ -137,6 +152,7 @@ public final class WorkerTraversalActor extends AbstractActor implements Require
}
private void sendTraverser(final Traverser.Admin traverser) {
+ this.voteToHalt = false;
if (traverser.isHalted())
master().tell(traverser, self());
else if (traverser.get() instanceof Element && !this.localPartition.contains((Element) traverser.get())) {
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1a78a30d/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/akka/test/ActorProcessStandardTest.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/akka/test/ActorProcessStandardTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/akka/test/ActorProcessStandardTest.java
new file mode 100644
index 0000000..8aca03d
--- /dev/null
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/akka/test/ActorProcessStandardTest.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tinkerpop.gremlin.tinkergraph.process.akka.test;
+
+import org.apache.tinkerpop.gremlin.GraphProviderClass;
+import org.apache.tinkerpop.gremlin.process.ProcessStandardSuite;
+import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;
+import org.junit.runner.RunWith;
+
+/**
+ * @author Marko A. Rodriguez (http://markorodriguez.com)
+ */
+@RunWith(ProcessStandardSuite.class)
+@GraphProviderClass(provider = ActorProvider.class, graph = TinkerGraph.class)
+public class ActorProcessStandardTest {
+}
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1a78a30d/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/akka/test/ActorProvider.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/akka/test/ActorProvider.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/akka/test/ActorProvider.java
new file mode 100644
index 0000000..ca1d370
--- /dev/null
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/akka/test/ActorProvider.java
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tinkerpop.gremlin.tinkergraph.process.akka.test;
+
+import org.apache.tinkerpop.gremlin.LoadGraphWith;
+import org.apache.tinkerpop.gremlin.process.traversal.TraversalInterruptionTest;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.ProfileTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.ProgramTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SideEffectTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.ElementIdStrategyProcessTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.EventStrategyProcessTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.PartitionStrategy;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.PartitionStrategyProcessTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SubgraphStrategy;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SubgraphStrategyProcessTest;
+import org.apache.tinkerpop.gremlin.structure.Graph;
+import org.apache.tinkerpop.gremlin.structure.util.HashPartitioner;
+import org.apache.tinkerpop.gremlin.tinkergraph.TinkerGraphProvider;
+import org.apache.tinkerpop.gremlin.tinkergraph.process.akka.traversal.PartitionerStrategy;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @author Marko A. Rodriguez (http://markorodriguez.com)
+ */
+public class ActorProvider extends TinkerGraphProvider {
+
+ private static Set<String> SKIP_TESTS = new HashSet<>(Arrays.asList(
+ "g_V_repeatXoutX_timesX5X_asXaX_outXwrittenByX_asXbX_selectXa_bX_count",
+ "g_V_repeatXoutX_timesX8X_count",
+ "g_V_outXfollowedByX_group_byXsongTypeX_byXbothE_group_byXlabelX_byXweight_sumXX",
+ SideEffectTest.Traversals.class.getCanonicalName(),
+ SubgraphStrategyProcessTest.class.getCanonicalName(),
+ ProfileTest.Traversals.class.getCanonicalName(),
+ PartitionStrategyProcessTest.class.getCanonicalName(),
+ EventStrategyProcessTest.class.getCanonicalName(),
+ ElementIdStrategyProcessTest.class.getCanonicalName(),
+ TraversalInterruptionTest.class.getCanonicalName(),
+ ProgramTest.Traversals.class.getCanonicalName()));
+
+
+ @Override
+ public Map<String, Object> getBaseConfiguration(final String graphName, final Class<?> test, final String testMethodName,
+ final LoadGraphWith.GraphData loadGraphWith) {
+
+ final Map<String, Object> config = super.getBaseConfiguration(graphName, test, testMethodName, loadGraphWith);
+ config.put("skipTest", SKIP_TESTS.contains(testMethodName) || SKIP_TESTS.contains(test.getCanonicalName()));
+ return config;
+ }
+
+ @Override
+ public GraphTraversalSource traversal(final Graph graph) {
+ if ((Boolean) graph.configuration().getProperty("skipTest"))
+ return graph.traversal();
+ //throw new VerificationException("This test current does not work with Gremlin-Python", EmptyTraversal.instance());
+ else {
+ final GraphTraversalSource g = graph.traversal();
+ return g.withStrategies(new PartitionerStrategy(new HashPartitioner(graph.partitioner(), 3)));
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1a78a30d/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/akka/traversal/PartitionerStep.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/akka/traversal/PartitionerStep.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/akka/traversal/PartitionerStep.java
index c9d8736..5dd0e60 100644
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/akka/traversal/PartitionerStep.java
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/akka/traversal/PartitionerStep.java
@@ -24,6 +24,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategies;
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.strategy.verification.ReadOnlyStrategy;
import org.apache.tinkerpop.gremlin.structure.Partitioner;
import org.apache.tinkerpop.gremlin.structure.util.StringFactory;
import org.apache.tinkerpop.gremlin.tinkergraph.process.akka.TinkerActorSystem;
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1a78a30d/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/akka/traversal/PartitionerStrategy.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/akka/traversal/PartitionerStrategy.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/akka/traversal/PartitionerStrategy.java
index 4eba078..f3b8c4e 100644
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/akka/traversal/PartitionerStrategy.java
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/akka/traversal/PartitionerStrategy.java
@@ -20,10 +20,15 @@
package org.apache.tinkerpop.gremlin.tinkergraph.process.akka.traversal;
import org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy;
+import org.apache.tinkerpop.gremlin.process.remote.traversal.strategy.decoration.RemoteStrategy;
import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy;
+import org.apache.tinkerpop.gremlin.process.traversal.step.Mutating;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.InjectStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.util.EmptyStep;
import org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.ReadOnlyStrategy;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.VerificationException;
import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper;
import org.apache.tinkerpop.gremlin.structure.Partitioner;
@@ -37,7 +42,9 @@ public final class PartitionerStrategy extends AbstractTraversalStrategy<Travers
implements TraversalStrategy.DecorationStrategy {
+ private static final Set<Class<? extends DecorationStrategy>> PRIORS = Collections.singleton(RemoteStrategy.class);
private static final Set<Class<? extends DecorationStrategy>> POSTS = Collections.singleton(VertexProgramStrategy.class);
+
private final Partitioner partitioner;
public PartitionerStrategy(final Partitioner partitioner) {
@@ -45,12 +52,11 @@ public final class PartitionerStrategy extends AbstractTraversalStrategy<Travers
}
@Override
- public Set<Class<? extends DecorationStrategy>> applyPost() {
- return POSTS;
- }
-
- @Override
public void apply(final Traversal.Admin<?, ?> traversal) {
+ ReadOnlyStrategy.instance().apply(traversal);
+ if (!TraversalHelper.getStepsOfAssignableClass(InjectStep.class, traversal).isEmpty())
+ throw new VerificationException("Inject traversal currently not supported", traversal);
+
if (!(traversal.getParent() instanceof EmptyStep))
return;
@@ -63,4 +69,14 @@ public final class PartitionerStrategy extends AbstractTraversalStrategy<Travers
assert traversal.getSteps().size() == 1;
assert traversal.getEndStep() == partitionerStep;
}
+
+ @Override
+ public Set<Class<? extends DecorationStrategy>> applyPost() {
+ return POSTS;
+ }
+
+ @Override
+ public Set<Class<? extends DecorationStrategy>> applyPrior() {
+ return PRIORS;
+ }
}