tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ok...@apache.org
Subject incubator-tinkerpop git commit: Got rid of Traverser.addLabels(). It was a total hack and now if you want to add labels to a path, you traverser.setPath(traverser.path().extend(labels)). We are very close to having NO TraverserRequirements and just Defau
Date Thu, 03 Dec 2015 21:53:56 GMT
Repository: incubator-tinkerpop
Updated Branches:
  refs/heads/TINKERPOP3-1014 ffd8ab0d2 -> e934d30e9


Got rid of Traverser.addLabels(). It was a total hack and now if you want to add labels to
a path, you traverser.setPath(traverser.path().extend(labels)). We are very close to having
NO TraverserRequirements and just DefaultTraverser.


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

Branch: refs/heads/TINKERPOP3-1014
Commit: e934d30e9b743fbada06cb2ac7dbcf1d0a0e887e
Parents: ffd8ab0
Author: Marko A. Rodriguez <okrammarko@gmail.com>
Authored: Thu Dec 3 14:53:42 2015 -0700
Committer: Marko A. Rodriguez <okrammarko@gmail.com>
Committed: Thu Dec 3 14:53:42 2015 -0700

----------------------------------------------------------------------
 .../gremlin/process/traversal/Traverser.java    |  2 +-
 .../traversal/step/branch/RepeatStep.java       |  4 +--
 .../process/traversal/step/map/MatchStep.java   |  9 +++---
 .../traversal/step/util/AbstractStep.java       |  2 +-
 .../traversal/step/util/MutablePath.java        | 33 ++++++++++++++++++--
 .../traversal/traverser/DefaultTraverser.java   | 30 ++++--------------
 .../traverser/DefaultTraverserGenerator.java    |  7 +++--
 .../traversal/traverser/EmptyTraverser.java     |  2 +-
 .../traversal/step/map/MatchStepTest.java       | 14 ++++-----
 .../structure/TinkerGraphPlayTest.java          |  7 +----
 10 files changed, 57 insertions(+), 53 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/e934d30e/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Traverser.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Traverser.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Traverser.java
index da43fdf..dba5202 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Traverser.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Traverser.java
@@ -181,7 +181,7 @@ public interface Traverser<T> extends Serializable, Comparable<Traverser<T>>,
Cl
          */
         public Admin<T> split();
 
-        public void addLabels(final Set<String> labels);
+        public void setPath(final Path path);
 
         /**
          * Set the current object location of the traverser.

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/e934d30e/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/RepeatStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/RepeatStep.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/RepeatStep.java
index 1d0b4b9..8263dd1 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/RepeatStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/RepeatStep.java
@@ -183,7 +183,7 @@ public final class RepeatStep<S> extends ComputerAwareStep<S,
S> implements Trav
         if (doUntil(start, true)) {
             start.resetLoops();
             start.setStepId(this.getNextStep().getId());
-            start.addLabels(this.labels);
+            start.setPath(start.path().extend(this.labels));
             return IteratorUtils.of(start);
         } else {
             start.setStepId(this.repeatTraversal.getStartStep().getId());
@@ -275,7 +275,7 @@ public final class RepeatStep<S> extends ComputerAwareStep<S,
S> implements Trav
             if (repeatStep.doUntil(start, false)) {
                 start.resetLoops();
                 start.setStepId(repeatStep.getNextStep().getId());
-                start.addLabels(repeatStep.labels);
+                start.setPath(start.path().extend(repeatStep.labels));
                 return IteratorUtils.of(start);
             } else {
                 start.setStepId(repeatStep.getId());

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/e934d30e/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchStep.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchStep.java
index 5452c17..75d2127 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchStep.java
@@ -319,7 +319,7 @@ public final class MatchStep<S, E> extends ComputerAwareStep<S,
Map<String, E>>
             if (null == traverser) {
                 traverser = this.starts.next();
                 if (!this.hasPathLabel(traverser.path(), this.matchStartLabels))
-                    traverser.addLabels(Collections.singleton(this.computedStartLabel));
// if the traverser doesn't have a legal start, then provide it the pre-computed one
+                    traverser.setPath(traverser.path().extend(Collections.singleton(this.computedStartLabel)));
// if the traverser doesn't have a legal start, then provide it the pre-computed one
                 traverser.getTags().add(this.getId()); // so the traverser never returns
to this branch ever again
             }
             ///
@@ -351,13 +351,13 @@ public final class MatchStep<S, E> extends ComputerAwareStep<S,
Map<String, E>>
             }
             final Traverser.Admin traverser = this.starts.next();
             if (!this.hasPathLabel(traverser.path(), this.matchStartLabels))
-                traverser.addLabels(Collections.singleton(this.computedStartLabel)); // if
the traverser doesn't have a legal start, then provide it the pre-computed one
+                traverser.setPath(traverser.path().extend(Collections.singleton(this.computedStartLabel)));
// if the traverser doesn't have a legal start, then provide it the pre-computed one
             traverser.getTags().add(this.getId()); // so the traverser never returns to this
branch ever again
             ///
             if (!this.isDuplicate(traverser)) {
                 if (hasMatched(this.connective, traverser)) {
                     traverser.setStepId(this.getNextStep().getId());
-                    traverser.addLabels(this.labels);
+                    traverser.setPath(traverser.path().extend(this.labels));
                     return IteratorUtils.of(traverser.split(this.getBindings(traverser),
this));
                 }
                 if (this.connective == ConnectiveStep.Connective.AND) {
@@ -408,7 +408,6 @@ public final class MatchStep<S, E> extends ComputerAwareStep<S,
Map<String, E>>
         @Override
         protected Traverser<Object> processNextStart() throws NoSuchElementException
{
             final Traverser.Admin<Object> traverser = this.starts.next();
-            traverser.addLabels(Collections.singleton(this.getId()));
             ((MatchStep<?, ?>) this.getTraversal().getParent()).getMatchAlgorithm().recordStart(traverser,
this.getTraversal());
             // TODO: sideEffect check?
             return null == this.selectKey ? traverser : traverser.split(traverser.path().get(Pop.last,
this.selectKey), this);
@@ -471,7 +470,7 @@ public final class MatchStep<S, E> extends ComputerAwareStep<S,
Map<String, E>>
                 if (!path.hasLabel(this.matchKey) || traverser.get().equals(path.get(Pop.last,
this.matchKey))) {
                     if (this.traverserStepIdAndLabelsSetByChild)
                         traverser.setStepId(((MatchStep<?, ?>) this.getTraversal().getParent()).getId());
-                    traverser.addLabels(Collections.singleton(this.matchKey));
+                    traverser.setPath(traverser.path().extend(Collections.singleton(this.matchKey)));
                     ((MatchStep<?, ?>) this.getTraversal().getParent()).getMatchAlgorithm().recordEnd(traverser,
this.getTraversal());
                     return traverser;
                 }

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/e934d30e/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/AbstractStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/AbstractStep.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/AbstractStep.java
index 4d9b7d2..bbd51e2 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/AbstractStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/AbstractStep.java
@@ -200,7 +200,7 @@ public abstract class AbstractStep<S, E> implements Step<S, E>
{
     private final Traverser.Admin<E> prepareTraversalForNextStep(final Traverser.Admin<E>
traverser) {
         if (!this.traverserStepIdAndLabelsSetByChild) {
             traverser.setStepId(this.nextStep.getId());
-            traverser.addLabels(this.labels);
+            traverser.setPath(traverser.path().extend(this.labels));
         }
         return traverser;
     }

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/e934d30e/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/MutablePath.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/MutablePath.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/MutablePath.java
index 0a35f90..82511ab 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/MutablePath.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/MutablePath.java
@@ -24,6 +24,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.Pop;
 import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.Collections;
+import java.util.HashSet;
 import java.util.Iterator;
 import java.util.LinkedHashSet;
 import java.util.List;
@@ -36,6 +37,8 @@ public class MutablePath implements Path, Serializable {
 
     protected final List<Object> objects;
     protected final List<Set<String>> labels;
+    protected boolean fullPath = true;
+    public Object currentObject;
 
     protected MutablePath() {
         this(10);
@@ -50,6 +53,12 @@ public class MutablePath implements Path, Serializable {
         return new MutablePath();
     }
 
+    public static Path make(final boolean fullPath) {
+        final MutablePath path = new MutablePath();
+        path.fullPath = fullPath;
+        return path;
+    }
+
     @Override
     @SuppressWarnings("CloneDoesntCallSuperClone,CloneDoesntDeclareCloneNotSupportedException")
     public MutablePath clone() {
@@ -62,6 +71,8 @@ public class MutablePath implements Path, Serializable {
         for (final Set<String> labels : this.labels) {
             clone.labels.add(new LinkedHashSet<>(labels));
         }
+        clone.fullPath = this.fullPath;
+        clone.currentObject = this.currentObject;
         return clone;
     }
 
@@ -73,14 +84,30 @@ public class MutablePath implements Path, Serializable {
 
     @Override
     public Path extend(final Object object, final Set<String> labels) {
-        this.objects.add(object);
-        this.labels.add(new LinkedHashSet<>(labels));
+        if (this.fullPath || (!labels.isEmpty() && !object.equals(this.currentObject)))
{
+            this.objects.add(object);
+            this.labels.add(new LinkedHashSet<>(labels));
+        }
+        this.currentObject = object;
         return this;
     }
 
     @Override
     public Path extend(final Set<String> labels) {
-        this.labels.get(this.labels.size() - 1).addAll(labels);
+        if (this.fullPath)
+            this.labels.get(this.labels.size() - 1).addAll(labels);
+        else if (!labels.isEmpty()) {
+            if (this.labels.isEmpty()) {
+                this.objects.add(this.currentObject);
+                this.labels.add(new HashSet<>(labels));
+            } else if (!this.objects.get(this.objects.size() - 1).equals(this.currentObject))
{
+                this.objects.add(this.currentObject);
+                this.labels.add(new HashSet<>(labels));
+            } else {
+                this.labels.get(this.labels.size() - 1).addAll(labels);
+            }
+
+        }
         return this;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/e934d30e/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/traverser/DefaultTraverser.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/traverser/DefaultTraverser.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/traverser/DefaultTraverser.java
index 80db85a..ad8f2fc 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/traverser/DefaultTraverser.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/traverser/DefaultTraverser.java
@@ -44,9 +44,6 @@ public final class DefaultTraverser<T> implements Traverser.Admin<T>
{
     private Object sack;
     private Path path;
     private transient TraversalSideEffects sideEffects;
-    ///
-    private boolean onlyLabeledPaths; // we need to get rid of this
-
 
     /**
      * A no-args constructor  is necessary for Kryo serialization.
@@ -55,29 +52,19 @@ public final class DefaultTraverser<T> implements Traverser.Admin<T>
{
 
     }
 
-    public DefaultTraverser(final T t, final Step<T, ?> step, final long initialBulk,
final Path path, boolean onlyLabeledPaths) {
+    public DefaultTraverser(final T t, final Step<T, ?> step, final long initialBulk,
final Path path) {
         this.t = t;
         this.stepId = step.getId();
         this.bulk = initialBulk;
-        this.path = path instanceof EmptyPath ? null : path;
+        this.path = path instanceof EmptyPath ? null : path.extend(this.t, step.getLabels());
         this.sideEffects = step.getTraversal().getSideEffects();
-        this.onlyLabeledPaths = onlyLabeledPaths;
         if (null != this.sideEffects.getSackInitialValue())
             this.sack = this.sideEffects.getSackInitialValue().get();
     }
 
-
     @Override
-    public void addLabels(final Set<String> labels) {  // we need to get rid of this
too
-        if (null != this.path) {
-            if (this.onlyLabeledPaths) {
-                if (!labels.isEmpty())
-                    this.path = this.path.size() == 0 || !this.path.get(this.path.size()
- 1).equals(this.t) ?
-                            this.path.extend(this.t, labels) :
-                            this.path.extend(labels);
-            } else
-                this.path = this.path.extend(labels);
-        }
+    public void setPath(final Path path) {
+        this.path = path instanceof EmptyPath ? null : path.clone();
     }
 
     @Override
@@ -145,13 +132,8 @@ public final class DefaultTraverser<T> implements Traverser.Admin<T>
{
     public <R> Admin<R> split(final R r, final Step<T, R> step) {
         final DefaultTraverser<R> clone = (DefaultTraverser<R>) this.clone();
         clone.t = r;
-        if (null != this.path) {
-            if (this.onlyLabeledPaths) {
-                if (!step.getLabels().isEmpty())
-                    clone.path = clone.path.extend(r, step.getLabels());
-            } else
-                clone.path = clone.path.extend(r, step.getLabels());
-        }
+        if (null != this.path)
+            clone.path = clone.path.extend(r, step.getLabels());
         return clone;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/e934d30e/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/traverser/DefaultTraverserGenerator.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/traverser/DefaultTraverserGenerator.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/traverser/DefaultTraverserGenerator.java
index a248b6c..7f199d9 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/traverser/DefaultTraverserGenerator.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/traverser/DefaultTraverserGenerator.java
@@ -24,6 +24,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
 import org.apache.tinkerpop.gremlin.process.traversal.TraverserGenerator;
 import org.apache.tinkerpop.gremlin.process.traversal.step.util.EmptyPath;
 import org.apache.tinkerpop.gremlin.process.traversal.step.util.ImmutablePath;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.MutablePath;
 import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper;
 
 import java.util.Collections;
@@ -43,11 +44,11 @@ public final class DefaultTraverserGenerator implements TraverserGenerator
{
     public <S> Traverser.Admin<S> generate(final S start, final Step<S, ?>
startStep, final long initialBulk) {
         final Set<TraverserRequirement> requirements = TraversalHelper.getRootTraversal(startStep.getTraversal()).getTraverserRequirements();
         if (requirements.contains(TraverserRequirement.PATH))
-            return new DefaultTraverser<>(start, startStep, requirements.contains(TraverserRequirement.ONE_BULK)
? Long.MIN_VALUE : initialBulk, ImmutablePath.make().extend(start, startStep.getLabels()),
false);
+            return new DefaultTraverser<>(start, startStep, requirements.contains(TraverserRequirement.ONE_BULK)
? Long.MIN_VALUE : initialBulk, MutablePath.make(true));
         else if (requirements.contains(TraverserRequirement.LABELED_PATH))
-            return new DefaultTraverser<>(start, startStep, requirements.contains(TraverserRequirement.ONE_BULK)
? Long.MIN_VALUE : initialBulk, ImmutablePath.make().extend(start, startStep.getLabels()),
true);
+            return new DefaultTraverser<>(start, startStep, requirements.contains(TraverserRequirement.ONE_BULK)
? Long.MIN_VALUE : initialBulk, MutablePath.make(false));
         else
-            return new DefaultTraverser<>(start, startStep, requirements.contains(TraverserRequirement.ONE_BULK)
? Long.MIN_VALUE : initialBulk, EmptyPath.instance(), true);
+            return new DefaultTraverser<>(start, startStep, requirements.contains(TraverserRequirement.ONE_BULK)
? Long.MIN_VALUE : initialBulk, EmptyPath.instance());
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/e934d30e/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/traverser/EmptyTraverser.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/traverser/EmptyTraverser.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/traverser/EmptyTraverser.java
index 0ed2d48..92191c5 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/traverser/EmptyTraverser.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/traverser/EmptyTraverser.java
@@ -45,7 +45,7 @@ public final class EmptyTraverser<T> implements Traverser<T>,
Traverser.Admin<T>
     }
 
     @Override
-    public void addLabels(final Set<String> labels) {
+    public void setPath(final Path path) {
 
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/e934d30e/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchStepTest.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchStepTest.java
b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchStepTest.java
index 71dcd99..8f0317a 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchStepTest.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchStepTest.java
@@ -362,32 +362,32 @@ public class MatchStepTest extends StepTest {
         countMatchAlgorithm.recordEnd(EmptyTraverser.instance(), forthPattern);
         countMatchAlgorithm.recordEnd(EmptyTraverser.instance(), forthPattern);
         //
-        Traverser.Admin traverser = new DefaultTraverser<>(1, EmptyStep.instance(),
1l, ImmutablePath.make().extend(1, Collections.emptySet()), false); // TODO: SHOULD WORK WITH
ONLY LABELED PATHS
-        traverser.addLabels(Collections.singleton("a"));
+        Traverser.Admin traverser = new DefaultTraverser<>(1, EmptyStep.instance(),
1l, ImmutablePath.make().extend(1, Collections.emptySet())); // TODO: SHOULD WORK WITH ONLY
LABELED PATHS
+        traverser.setPath(traverser.path().extend(Collections.singleton("a")));
         assertEquals(firstPattern, countMatchAlgorithm.apply(traverser));
         traverser = traverser.split(1, EmptyStep.instance());
         traverser.getTags().add(firstPattern.getStartStep().getId());
-        traverser.addLabels(Collections.singleton("b"));
+        traverser.setPath(traverser.path().extend(Collections.singleton("b")));
         //
         assertEquals(secondPattern, countMatchAlgorithm.apply(traverser));
         traverser = traverser.split(1, EmptyStep.instance());
         traverser.getTags().add(secondPattern.getStartStep().getId());
-        traverser.addLabels(Collections.singleton("c"));
+        traverser.setPath(traverser.path().extend(Collections.singleton("c")));
         //
         assertEquals(fifthPattern, countMatchAlgorithm.apply(traverser));
         traverser = traverser.split(1, EmptyStep.instance());
         traverser.getTags().add(fifthPattern.getStartStep().getId());
-        traverser.addLabels(Collections.singleton("f"));
+        traverser.setPath(traverser.path().extend(Collections.singleton("f")));
         //
         assertEquals(forthPattern, countMatchAlgorithm.apply(traverser));
         traverser = traverser.split(1, EmptyStep.instance());
         traverser.getTags().add(forthPattern.getStartStep().getId());
-        traverser.addLabels(Collections.singleton("e"));
+        traverser.setPath(traverser.path().extend(Collections.singleton("e")));
         //
         assertEquals(thirdPattern, countMatchAlgorithm.apply(traverser));
         traverser = traverser.split(1, EmptyStep.instance());
         traverser.getTags().add(thirdPattern.getStartStep().getId());
-        traverser.addLabels(Collections.singleton("d"));
+        traverser.setPath(traverser.path().extend(Collections.singleton("d")));
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/e934d30e/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphPlayTest.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphPlayTest.java
b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphPlayTest.java
index 64c2e84..8410d95 100644
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphPlayTest.java
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphPlayTest.java
@@ -20,14 +20,12 @@ package org.apache.tinkerpop.gremlin.tinkergraph.structure;
 
 import org.apache.tinkerpop.gremlin.process.computer.bulkloading.BulkLoaderVertexProgram;
 import org.apache.tinkerpop.gremlin.process.traversal.Operator;
-import org.apache.tinkerpop.gremlin.process.traversal.Order;
 import org.apache.tinkerpop.gremlin.process.traversal.P;
 import org.apache.tinkerpop.gremlin.process.traversal.Scope;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
-import org.apache.tinkerpop.gremlin.structure.Column;
 import org.apache.tinkerpop.gremlin.structure.Graph;
 import org.apache.tinkerpop.gremlin.structure.T;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
@@ -40,7 +38,6 @@ import org.junit.Test;
 import java.io.File;
 import java.util.Arrays;
 import java.util.List;
-import java.util.function.Function;
 import java.util.function.Supplier;
 
 import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.*;
@@ -55,9 +52,7 @@ public class TinkerGraphPlayTest {
     public void testPlay8() throws Exception {
         Graph graph = TinkerFactory.createModern();
         GraphTraversalSource g = graph.traversal(); //GraphTraversalSource.computer());
-        //System.out.println(g.V().outE("knows").identity().inV().count().is(P.eq(5)).explain());
-        System.out.println(g.V().both().both().groupCount().order(Scope.local).by(Column.values,
Order.incr).toList());
-
+        g.V().repeat(both()).times(10).as("a").out().as("b").select("a","b").sideEffect(t
-> System.out.println(t.path().labels())).iterate();
     }
 
     @Test


Mime
View raw message