You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by dk...@apache.org on 2018/03/09 15:35:12 UTC

[01/50] tinkerpop git commit: Added correct setting of future exceptions, pursuant to TINKERPOP-1883 [Forced Update!]

Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1447 6c0b14c00 -> 605c06907 (forced update)


Added correct setting of future exceptions, pursuant to TINKERPOP-1883

https://issues.apache.org/jira/browse/TINKERPOP-1883

Conflicts:
	gremlin-python/src/main/jython/gremlin_python/driver/driver_remote_connection.py


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

Branch: refs/heads/TINKERPOP-1447
Commit: 545f3bf895a10f5ec76b466f71b93fc1304f88d3
Parents: bcffaad
Author: dancollins34 <da...@gmail.com>
Authored: Sat Feb 3 17:24:44 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Feb 20 13:28:54 2018 -0500

----------------------------------------------------------------------
 .../jython/gremlin_python/driver/driver_remote_connection.py    | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/545f3bf8/gremlin-python/src/main/jython/gremlin_python/driver/driver_remote_connection.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/gremlin_python/driver/driver_remote_connection.py b/gremlin-python/src/main/jython/gremlin_python/driver/driver_remote_connection.py
index 1f08e2b..d447cbd 100644
--- a/gremlin-python/src/main/jython/gremlin_python/driver/driver_remote_connection.py
+++ b/gremlin-python/src/main/jython/gremlin_python/driver/driver_remote_connection.py
@@ -63,13 +63,12 @@ class DriverRemoteConnection(RemoteConnection):
         def cb(f):
             try:
                 result_set = f.result()
-            except Exception as e:
-                future.set_exception(e)
-            else:
                 results = result_set.all().result()
                 side_effects = RemoteTraversalSideEffects(result_set.request_id,
                                                           self._client)
                 future.set_result(RemoteTraversal(iter(results), side_effects))
+            except Exception as e:
+                future.set_exception(e)
 
         future_result_set.add_done_callback(cb)
         return future


[10/50] tinkerpop git commit: Additional check. Tests still fail - but I think this is a problem with the implementations, not the test.

Posted by dk...@apache.org.
Additional check. Tests still fail - but I think this is a problem with the implementations, not the test.


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

Branch: refs/heads/TINKERPOP-1447
Commit: 153238b2a8a3fc5e051251662ef6ab80f72c659f
Parents: 750677c
Author: Graff, Philip B <Ph...@jhuapl.edu>
Authored: Sun Jan 14 01:01:17 2018 -0500
Committer: Graff, Philip B <Ph...@jhuapl.edu>
Committed: Sun Feb 25 10:44:40 2018 -0500

----------------------------------------------------------------------
 .../tinkerpop/gremlin/process/computer/GraphComputerTest.java    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/153238b2/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
index 0e8d06a..785f03d 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
@@ -2785,9 +2785,11 @@ public class GraphComputerTest extends AbstractGremlinProcessTest {
                 case OUT:
                     this.messageScope = this.outMessageScope;
                     break;
-                default:
+                case BOTH:
                     this.messageScope = this.bothMessageScope;
                     break;
+                default:
+                    throw new IllegalStateException("Should not reach this point!");
             }
         }
 


[33/50] tinkerpop git commit: TINKERPOP-1862 Fix Messenger implementations for Spark/Giraph handling BOTH

Posted by dk...@apache.org.
TINKERPOP-1862 Fix Messenger implementations for Spark/Giraph handling BOTH

These now behave like TinkerMessenger and in the case of BOTH pass the message to the opposite vertex in the StarGraph


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

Branch: refs/heads/TINKERPOP-1447
Commit: 26a5770efb288d60150cf9db60a5dd67568179f2
Parents: 027ae27
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Mar 2 11:29:57 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Mar 2 11:29:57 2018 -0500

----------------------------------------------------------------------
 .../process/computer/GiraphMessenger.java       |  14 +-
 .../gremlin/process/ProcessComputerSuite.java   | 168 +++++++++----------
 .../process/computer/GraphComputerTest.java     |  41 +++--
 .../computer/util/ComputerSubmissionHelper.java |   2 +-
 .../spark/process/computer/SparkMessenger.java  |  12 +-
 .../spark/structure/io/ToyGraphInputRDD.java    |   2 +
 6 files changed, 136 insertions(+), 103 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/26a5770e/giraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/giraph/process/computer/GiraphMessenger.java
----------------------------------------------------------------------
diff --git a/giraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/giraph/process/computer/GiraphMessenger.java b/giraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/giraph/process/computer/GiraphMessenger.java
index 03818b2..36e641e 100644
--- a/giraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/giraph/process/computer/GiraphMessenger.java
+++ b/giraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/giraph/process/computer/GiraphMessenger.java
@@ -27,6 +27,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper;
 import org.apache.tinkerpop.gremlin.structure.Direction;
 import org.apache.tinkerpop.gremlin.structure.Edge;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.tinkerpop.gremlin.structure.util.star.StarGraph;
 import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;
 
 import java.util.Iterator;
@@ -57,10 +58,19 @@ public final class GiraphMessenger<M> implements Messenger<M> {
             final MessageScope.Local<M> localMessageScope = (MessageScope.Local) messageScope;
             final Traversal.Admin<Vertex, Edge> incidentTraversal = GiraphMessenger.setVertexStart(localMessageScope.getIncidentTraversal().get().asAdmin(), this.giraphVertex.getValue().get());
             final Direction direction = GiraphMessenger.getOppositeDirection(incidentTraversal);
-            incidentTraversal.forEachRemaining(edge ->
+
+            // handle processing for BOTH given TINKERPOP-1862 where the target of the message is the one opposite
+            // the current vertex
+            incidentTraversal.forEachRemaining(edge -> {
+                if (direction.equals(Direction.IN) || direction.equals(Direction.OUT))
                     this.giraphComputation.sendMessage(
                             new ObjectWritable<>(edge.vertices(direction).next().id()),
-                            new ObjectWritable<>(localMessageScope.getEdgeFunction().apply(message, edge))));
+                            new ObjectWritable<>(localMessageScope.getEdgeFunction().apply(message, edge)));
+                else
+                    this.giraphComputation.sendMessage(
+                            new ObjectWritable<>(edge instanceof StarGraph.StarOutEdge ? edge.inVertex().id() : edge.outVertex().id()),
+                            new ObjectWritable<>(localMessageScope.getEdgeFunction().apply(message, edge)));
+            });
         } else {
             final MessageScope.Global globalMessageScope = (MessageScope.Global) messageScope;
             globalMessageScope.vertices().forEach(vertex ->

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/26a5770e/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessComputerSuite.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessComputerSuite.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessComputerSuite.java
index 1d69a76..e1c97df 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessComputerSuite.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessComputerSuite.java
@@ -117,90 +117,90 @@ public class ProcessComputerSuite extends AbstractGremlinSuite {
             GraphComputerTest.class,
 
             // branch
-            BranchTest.Traversals.class,
-            ChooseTest.Traversals.class,
-            OptionalTest.Traversals.class,
-            LocalTest.Traversals.class,
-            RepeatTest.Traversals.class,
-            UnionTest.Traversals.class,
-
-            // filter
-            AndTest.Traversals.class,
-            CoinTest.Traversals.class,
-            CyclicPathTest.Traversals.class,
-            DedupTest.Traversals.class,
-            FilterTest.Traversals.class,
-            HasTest.Traversals.class,
-            IsTest.Traversals.class,
-            OrTest.Traversals.class,
-            RangeTest.Traversals.class,
-            SampleTest.Traversals.class,
-            SimplePathTest.Traversals.class,
-            TailTest.Traversals.class,
-            WhereTest.Traversals.class,
-
-            // map
-            CoalesceTest.Traversals.class,
-            ConstantTest.Traversals.class,
-            CountTest.Traversals.class,
-            FlatMapTest.Traversals.class,
-            FoldTest.Traversals.class,
-            GraphTest.Traversals.class,
-            LoopsTest.Traversals.class,
-            MapTest.Traversals.class,
-            MapKeysTest.Traversals.class,
-            MapValuesTest.Traversals.class,
-            MatchTest.CountMatchTraversals.class,
-            MatchTest.GreedyMatchTraversals.class,
-            MaxTest.Traversals.class,
-            MeanTest.Traversals.class,
-            MinTest.Traversals.class,
-            SumTest.Traversals.class,
-            OrderTest.Traversals.class,
-            PageRankTest.Traversals.class,
-            PathTest.Traversals.class,
-            PeerPressureTest.Traversals.class,
-            ProfileTest.Traversals.class,
-            ProjectTest.Traversals.class,
-            ProgramTest.Traversals.class,
-            PropertiesTest.Traversals.class,
-            SelectTest.Traversals.class,
-            UnfoldTest.Traversals.class,
-            ValueMapTest.Traversals.class,
-            VertexTest.Traversals.class,
-
-            // sideEffect
-            AddEdgeTest.Traversals.class,
-            AggregateTest.Traversals.class,
-            ExplainTest.Traversals.class,
-            GroupTest.Traversals.class,
-            GroupTestV3d0.Traversals.class,
-            GroupCountTest.Traversals.class,
-            InjectTest.Traversals.class,
-            ProfileTest.Traversals.class,
-            SackTest.Traversals.class,
-            SideEffectCapTest.Traversals.class,
-            SideEffectTest.Traversals.class,
-            StoreTest.Traversals.class,
-            SubgraphTest.Traversals.class,
-            TreeTest.Traversals.class,
-
-            // compliance
-            ComplexTest.Traversals.class,
-            TraversalInterruptionComputerTest.class,
-
-            // algorithms
-            PageRankVertexProgramTest.class,
-            PeerPressureVertexProgramTest.class,
-            BulkLoaderVertexProgramTest.class,
-            BulkDumperVertexProgramTest.class,
-
-            // creations
-            TranslationStrategyProcessTest.class,
-
-            // decorations
-            ReadOnlyStrategyProcessTest.class,
-            SubgraphStrategyProcessTest.class
+//            BranchTest.Traversals.class,
+//            ChooseTest.Traversals.class,
+//            OptionalTest.Traversals.class,
+//            LocalTest.Traversals.class,
+//            RepeatTest.Traversals.class,
+//            UnionTest.Traversals.class,
+//
+//            // filter
+//            AndTest.Traversals.class,
+//            CoinTest.Traversals.class,
+//            CyclicPathTest.Traversals.class,
+//            DedupTest.Traversals.class,
+//            FilterTest.Traversals.class,
+//            HasTest.Traversals.class,
+//            IsTest.Traversals.class,
+//            OrTest.Traversals.class,
+//            RangeTest.Traversals.class,
+//            SampleTest.Traversals.class,
+//            SimplePathTest.Traversals.class,
+//            TailTest.Traversals.class,
+//            WhereTest.Traversals.class,
+//
+//            // map
+//            CoalesceTest.Traversals.class,
+//            ConstantTest.Traversals.class,
+//            CountTest.Traversals.class,
+//            FlatMapTest.Traversals.class,
+//            FoldTest.Traversals.class,
+//            GraphTest.Traversals.class,
+//            LoopsTest.Traversals.class,
+//            MapTest.Traversals.class,
+//            MapKeysTest.Traversals.class,
+//            MapValuesTest.Traversals.class,
+//            MatchTest.CountMatchTraversals.class,
+//            MatchTest.GreedyMatchTraversals.class,
+//            MaxTest.Traversals.class,
+//            MeanTest.Traversals.class,
+//            MinTest.Traversals.class,
+//            SumTest.Traversals.class,
+//            OrderTest.Traversals.class,
+//            PageRankTest.Traversals.class,
+//            PathTest.Traversals.class,
+//            PeerPressureTest.Traversals.class,
+//            ProfileTest.Traversals.class,
+//            ProjectTest.Traversals.class,
+//            ProgramTest.Traversals.class,
+//            PropertiesTest.Traversals.class,
+//            SelectTest.Traversals.class,
+//            UnfoldTest.Traversals.class,
+//            ValueMapTest.Traversals.class,
+//            VertexTest.Traversals.class,
+//
+//            // sideEffect
+//            AddEdgeTest.Traversals.class,
+//            AggregateTest.Traversals.class,
+//            ExplainTest.Traversals.class,
+//            GroupTest.Traversals.class,
+//            GroupTestV3d0.Traversals.class,
+//            GroupCountTest.Traversals.class,
+//            InjectTest.Traversals.class,
+//            ProfileTest.Traversals.class,
+//            SackTest.Traversals.class,
+//            SideEffectCapTest.Traversals.class,
+//            SideEffectTest.Traversals.class,
+//            StoreTest.Traversals.class,
+//            SubgraphTest.Traversals.class,
+//            TreeTest.Traversals.class,
+//
+//            // compliance
+//            ComplexTest.Traversals.class,
+//            TraversalInterruptionComputerTest.class,
+//
+//            // algorithms
+//            PageRankVertexProgramTest.class,
+//            PeerPressureVertexProgramTest.class,
+//            BulkLoaderVertexProgramTest.class,
+//            BulkDumperVertexProgramTest.class,
+//
+//            // creations
+//            TranslationStrategyProcessTest.class,
+//
+//            // decorations
+//            ReadOnlyStrategyProcessTest.class,
+//            SubgraphStrategyProcessTest.class
     };
 
     /**

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/26a5770e/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
index 9157571..f9e79ae 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
@@ -2726,23 +2726,27 @@ public class GraphComputerTest extends AbstractGremlinProcessTest {
         runMPTest(Direction.BOTH).forEachRemaining(v -> {
             vertexPropertyChecks(v);
             final String in = v.value(VertexProgramR.PROPERTY_IN);
-            if (in.equals("a"))
-                assertEquals("aab", v.value(VertexProgramR.PROPERTY_OUT).toString());
-            else if (in.equals("b"))
-                assertEquals("a", v.value(VertexProgramR.PROPERTY_OUT).toString());
-            else
-                throw new IllegalStateException("This vertex should not exist: " + VertexProgramR.PROPERTY_IN
-                        + "=" + String.valueOf(in));
+            switch (in) {
+                case "a":
+                    assertEquals("aab", v.value(VertexProgramR.PROPERTY_OUT).toString());
+                    break;
+                case "b":
+                    assertEquals("a", v.value(VertexProgramR.PROPERTY_OUT).toString());
+                    break;
+                default:
+                    throw new IllegalStateException("This vertex should not exist: " + VertexProgramR.PROPERTY_IN
+                            + "=" + String.valueOf(in));
+            }
         });
     }
 
-    private GraphTraversal<Vertex, Vertex> runMPTest(Direction direction) throws Exception {
+    private GraphTraversal<Vertex, Vertex> runMPTest(final Direction direction) throws Exception {
         final VertexProgramR svp = VertexProgramR.build().direction(direction).create();
         final ComputerResult result = graphProvider.getGraphComputer(graph).program(svp).vertices(__.hasLabel(VertexProgramR.VERTEX_LABEL)).submit().get();
         return result.graph().traversal().V().hasLabel(VertexProgramR.VERTEX_LABEL);
     }
 
-    private static void vertexPropertyChecks(Vertex v) {
+    private static void vertexPropertyChecks(final Vertex v) {
         assertEquals(2, v.keys().size());
         assertTrue(v.keys().contains(VertexProgramR.PROPERTY_IN));
         assertTrue(v.keys().contains(VertexProgramR.PROPERTY_OUT));
@@ -2757,6 +2761,7 @@ public class GraphComputerTest extends AbstractGremlinProcessTest {
         private static final String VERTEX_LABEL = "message_passing_test";
         private static final String DIRECTION_CFG_KEY = SIMPLE_VERTEX_PROGRAM_CFG_PREFIX + ".direction";
 
+        private Direction direction;
         private final MessageScope.Local<String> inMessageScope = MessageScope.Local.of(__::inE);
         private final MessageScope.Local<String> outMessageScope = MessageScope.Local.of(__::outE);
         private final MessageScope.Local<String> bothMessageScope = MessageScope.Local.of(__::bothE);
@@ -2774,7 +2779,7 @@ public class GraphComputerTest extends AbstractGremlinProcessTest {
 
         @Override
         public void loadState(final Graph graph, final Configuration configuration) {
-            Direction direction = Direction.valueOf(configuration.getString(DIRECTION_CFG_KEY));
+            direction = Direction.valueOf(configuration.getString(DIRECTION_CFG_KEY));
             switch (direction) {
                 case IN:
                     this.messageScope = this.inMessageScope;
@@ -2791,27 +2796,33 @@ public class GraphComputerTest extends AbstractGremlinProcessTest {
         }
 
         @Override
-        public void setup(Memory memory) {
+        public void storeState(final Configuration configuration) {
+            VertexProgram.super.storeState(configuration);
+            configuration.setProperty(DIRECTION_CFG_KEY, direction.name());
+        }
+
+        @Override
+        public void setup(final Memory memory) {
         }
 
         @Override
-        public void execute(Vertex vertex, Messenger<String> messenger, Memory memory) {
+        public void execute(final Vertex vertex, final Messenger<String> messenger, final Memory memory) {
             if (memory.isInitialIteration()) {
                 messenger.sendMessage(this.messageScope, vertex.value(PROPERTY_IN).toString());
             } else {
-                char[] composite = IteratorUtils.reduce(messenger.receiveMessages(), "", (a, b) -> a + b).toCharArray();
+                final char[] composite = IteratorUtils.reduce(messenger.receiveMessages(), "", (a, b) -> a + b).toCharArray();
                 Arrays.sort(composite);
                 vertex.property(PROPERTY_OUT, new String(composite));
             }
         }
 
         @Override
-        public boolean terminate(Memory memory) {
+        public boolean terminate(final Memory memory) {
             return !memory.isInitialIteration();
         }
 
         @Override
-        public Set<MessageScope> getMessageScopes(Memory memory) {
+        public Set<MessageScope> getMessageScopes(final Memory memory) {
             return Collections.singleton(this.messageScope);
         }
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/26a5770e/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/process/computer/util/ComputerSubmissionHelper.java
----------------------------------------------------------------------
diff --git a/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/process/computer/util/ComputerSubmissionHelper.java b/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/process/computer/util/ComputerSubmissionHelper.java
index 1229440..e010bee 100644
--- a/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/process/computer/util/ComputerSubmissionHelper.java
+++ b/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/process/computer/util/ComputerSubmissionHelper.java
@@ -66,7 +66,7 @@ public final class ComputerSubmissionHelper {
 
         try {
             submissionExecutor = Executors.newSingleThreadExecutor(runnable -> {
-                Thread t = new Thread(threadGroup, runnable, threadName + "-TP-" + threadNameSuffix);
+                final Thread t = new Thread(threadGroup, runnable, threadName + "-TP-" + threadNameSuffix);
                 t.setContextClassLoader(classLoader);
                 return t;
             });

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/26a5770e/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkMessenger.java
----------------------------------------------------------------------
diff --git a/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkMessenger.java b/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkMessenger.java
index 53a755c..77df48b 100644
--- a/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkMessenger.java
+++ b/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkMessenger.java
@@ -26,6 +26,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper;
 import org.apache.tinkerpop.gremlin.structure.Direction;
 import org.apache.tinkerpop.gremlin.structure.Edge;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.tinkerpop.gremlin.structure.util.star.StarGraph;
 import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;
 import scala.Tuple2;
 
@@ -63,7 +64,16 @@ public final class SparkMessenger<M> implements Messenger<M> {
             final MessageScope.Local<M> localMessageScope = (MessageScope.Local) messageScope;
             final Traversal.Admin<Vertex, Edge> incidentTraversal = SparkMessenger.setVertexStart(localMessageScope.getIncidentTraversal().get().asAdmin(), this.vertex);
             final Direction direction = SparkMessenger.getOppositeDirection(incidentTraversal);
-            incidentTraversal.forEachRemaining(edge -> this.outgoingMessages.add(new Tuple2<>(edge.vertices(direction).next().id(), localMessageScope.getEdgeFunction().apply(message, edge))));
+
+            // handle processing for BOTH given TINKERPOP-1862 where the target of the message is the one opposite
+            // the current vertex
+            incidentTraversal.forEachRemaining(edge -> {
+                if (direction.equals(Direction.IN) || direction.equals(Direction.OUT))
+                    this.outgoingMessages.add(new Tuple2<>(edge.vertices(direction).next().id(), localMessageScope.getEdgeFunction().apply(message, edge)));
+                else
+                    this.outgoingMessages.add(new Tuple2<>(edge instanceof StarGraph.StarOutEdge ? edge.inVertex().id() : edge.outVertex().id(), localMessageScope.getEdgeFunction().apply(message, edge)));
+
+            });
         } else {
             ((MessageScope.Global) messageScope).vertices().forEach(v -> this.outgoingMessages.add(new Tuple2<>(v.id(), message)));
         }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/26a5770e/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/structure/io/ToyGraphInputRDD.java
----------------------------------------------------------------------
diff --git a/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/structure/io/ToyGraphInputRDD.java b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/structure/io/ToyGraphInputRDD.java
index 4cd8cea..72b5b9a 100644
--- a/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/structure/io/ToyGraphInputRDD.java
+++ b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/structure/io/ToyGraphInputRDD.java
@@ -55,6 +55,8 @@ public final class ToyGraphInputRDD implements InputRDD {
             vertices = IteratorUtils.list(IteratorUtils.map(TinkerFactory.createClassic().vertices(), VertexWritable::new));
         else if (configuration.getString(Constants.GREMLIN_HADOOP_INPUT_LOCATION).contains("crew"))
             vertices = IteratorUtils.list(IteratorUtils.map(TinkerFactory.createTheCrew().vertices(), VertexWritable::new));
+        else if (configuration.getString(Constants.GREMLIN_HADOOP_INPUT_LOCATION).contains("sink"))
+            vertices = IteratorUtils.list(IteratorUtils.map(TinkerFactory.createKitchenSink().vertices(), VertexWritable::new));
         else if (configuration.getString(Constants.GREMLIN_HADOOP_INPUT_LOCATION).contains("grateful")) {
             try {
                 final Graph graph = TinkerGraph.open();


[41/50] tinkerpop git commit: TINKERPOP-1885 Fix Gremlin.Net Description for NuGet package CTR

Posted by dk...@apache.org.
TINKERPOP-1885 Fix Gremlin.Net Description for NuGet package CTR

This mainly removes unnecessary line breaks.


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

Branch: refs/heads/TINKERPOP-1447
Commit: eeeb4eedf5cc2e65d558d214884a1de053fdbff4
Parents: c2940e1
Author: Florian Hockmann <fh...@florian-hockmann.de>
Authored: Tue Mar 6 20:14:54 2018 +0100
Committer: Florian Hockmann <fh...@florian-hockmann.de>
Committed: Tue Mar 6 20:14:54 2018 +0100

----------------------------------------------------------------------
 gremlin-dotnet/glv/Gremlin.Net.csproj.template    | 12 +++---------
 gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj | 12 +++---------
 2 files changed, 6 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/eeeb4eed/gremlin-dotnet/glv/Gremlin.Net.csproj.template
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/glv/Gremlin.Net.csproj.template b/gremlin-dotnet/glv/Gremlin.Net.csproj.template
index c116f0e..48b9b3c 100644
--- a/gremlin-dotnet/glv/Gremlin.Net.csproj.template
+++ b/gremlin-dotnet/glv/Gremlin.Net.csproj.template
@@ -32,19 +32,13 @@ limitations under the License.
     <Authors>Apache TinkerPop</Authors>
     <Description>Gremlin.Net for Apache TinkerPop™ is a language variant and driver for .NET.
 
-Apache TinkerPop™ is a graph computing framework for both graph databases (OLTP) and graph analytic systems (OLAP).
-Gremlin is the graph traversal language of TinkerPop. It can be described as a functional, data-flow language
-that enables users to succinctly express complex traversals on (or queries of) their application’s property graph.
+Apache TinkerPop™ is a graph computing framework for both graph databases (OLTP) and graph analytic systems (OLAP). Gremlin is the graph traversal language of TinkerPop. It can be described as a functional, data-flow language that enables users to succinctly express complex traversals on (or queries of) their application’s property graph.
 
-Gremlin.Net implements Gremlin within .NET. C# syntax has the same constructs as Java including “dot notation”
-for function chaining (a.b.c), round bracket function arguments (a(b,c))`, and support for global namespaces
-(a(b()) vs a(__.b()))`. As such, anyone familiar with Gremlin-Java will immediately be able to work with
-Gremlin.Net. Moreover, there are a few added constructs to Gremlin.Net that make traversals a bit more succinct.
+Gremlin.Net implements Gremlin within .NET. C# syntax has the same constructs as Java including “dot notation” for function chaining (a.b.c), round bracket function arguments (a(b,c)), and support for global namespaces (a(b()) vs a(__.b())). As such, anyone familiar with Gremlin-Java will immediately be able to work with Gremlin.Net. Moreover, there are a few added constructs to Gremlin.Net that make traversals a bit more succinct.
 
 Please see the reference documentation at Apache TinkerPop for more information on usage.
 
-NOTE: Gremlin.Net is an extension of the Gremlin.Net driver by Florian Hockmann (versions: 0.y.z) and is now
-included as part of the Apache TinkerPop project.</Description>
+NOTE: Gremlin.Net is an extension of the Gremlin.Net driver by Florian Hockmann (versions: 0.y.z) and is now included as part of the Apache TinkerPop project.</Description>
     <AssemblyOriginatorKeyFile>../../build/tinkerpop.snk</AssemblyOriginatorKeyFile>
     <SignAssembly>true</SignAssembly>
     <PublicSign Condition="'\$(OS)' != 'Windows_NT'">true</PublicSign>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/eeeb4eed/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj b/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj
index a538b8b..25787ec 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj
+++ b/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj
@@ -32,19 +32,13 @@ limitations under the License.
     <Authors>Apache TinkerPop</Authors>
     <Description>Gremlin.Net for Apache TinkerPop™ is a language variant and driver for .NET.
 
-Apache TinkerPop™ is a graph computing framework for both graph databases (OLTP) and graph analytic systems (OLAP).
-Gremlin is the graph traversal language of TinkerPop. It can be described as a functional, data-flow language
-that enables users to succinctly express complex traversals on (or queries of) their application’s property graph.
+Apache TinkerPop™ is a graph computing framework for both graph databases (OLTP) and graph analytic systems (OLAP). Gremlin is the graph traversal language of TinkerPop. It can be described as a functional, data-flow language that enables users to succinctly express complex traversals on (or queries of) their application’s property graph.
 
-Gremlin.Net implements Gremlin within .NET. C# syntax has the same constructs as Java including “dot notation”
-for function chaining (a.b.c), round bracket function arguments (a(b,c))`, and support for global namespaces
-(a(b()) vs a(__.b()))`. As such, anyone familiar with Gremlin-Java will immediately be able to work with
-Gremlin.Net. Moreover, there are a few added constructs to Gremlin.Net that make traversals a bit more succinct.
+Gremlin.Net implements Gremlin within .NET. C# syntax has the same constructs as Java including “dot notation” for function chaining (a.b.c), round bracket function arguments (a(b,c)), and support for global namespaces (a(b()) vs a(__.b())). As such, anyone familiar with Gremlin-Java will immediately be able to work with Gremlin.Net. Moreover, there are a few added constructs to Gremlin.Net that make traversals a bit more succinct.
 
 Please see the reference documentation at Apache TinkerPop for more information on usage.
 
-NOTE: Gremlin.Net is an extension of the Gremlin.Net driver by Florian Hockmann (versions: 0.y.z) and is now
-included as part of the Apache TinkerPop project.</Description>
+NOTE: Gremlin.Net is an extension of the Gremlin.Net driver by Florian Hockmann (versions: 0.y.z) and is now included as part of the Apache TinkerPop project.</Description>
     <AssemblyOriginatorKeyFile>../../build/tinkerpop.snk</AssemblyOriginatorKeyFile>
     <SignAssembly>true</SignAssembly>
     <PublicSign Condition="'$(OS)' != 'Windows_NT'">true</PublicSign>


[23/50] tinkerpop git commit: Fixed typing in GLV tests that were failing for .NET CTR

Posted by dk...@apache.org.
Fixed typing in GLV tests that were failing for .NET CTR


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

Branch: refs/heads/TINKERPOP-1447
Commit: eab4bce69d113adc766f141eb5adcba006ee6398
Parents: 85b7338
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Mar 1 09:32:34 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Mar 1 09:32:34 2018 -0500

----------------------------------------------------------------------
 .../test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs  | 2 --
 gremlin-test/features/sideEffect/Sack.feature                      | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/eab4bce6/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
index 7fa9716..0685d89 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
@@ -40,9 +40,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
         private static readonly IDictionary<string, IgnoreReason> IgnoredScenarios = new Dictionary<string, IgnoreReason> {
             { "g_V_hasLabelXpersonX_hasXage_notXlteX10X_andXnotXbetweenX11_20XXXX_andXltX29X_orXeqX35XXXX_name", IgnoreReason.NeedsFurtherInvestigation }, // TINKERPOP-1859??
             { "g_VX1X_out_aggregateXxX_out_whereXnotXwithinXaXXX", IgnoreReason.NeedsFurtherInvestigation }, // TINKERPOP-1859??
-            { "g_withBulkXfalseX_withSackX1_sumX_VX1X_localXoutEXknowsX_barrierXnormSackX_inVX_inXknowsX_barrier_sack", IgnoreReason.NeedsFurtherInvestigation },
             { "g_withBulkXfalseX_withSackX1_sumX_V_out_barrier_sack", IgnoreReason.NeedsFurtherInvestigation },
-            { "g_withSackX1_sumX_VX1X_localXoutXknowsX_barrierXnormSackXX_inXknowsX_barrier_sack", IgnoreReason.NeedsFurtherInvestigation },
             { "g_V_hasXname_markoX_propertyXfriendWeight_outEXknowsX_weight_sum__acl_privateX", IgnoreReason.NeedsFurtherInvestigation },
             { "g_V_outE_weight_groupCount_unfold_selectXkeysX_unfold", IgnoreReason.NeedsFurtherInvestigation },
             { "g_V_outE_weight_groupCount_selectXkeysX_unfold", IgnoreReason.NeedsFurtherInvestigation },

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/eab4bce6/gremlin-test/features/sideEffect/Sack.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/sideEffect/Sack.feature b/gremlin-test/features/sideEffect/Sack.feature
index f5baf64..89e3946 100644
--- a/gremlin-test/features/sideEffect/Sack.feature
+++ b/gremlin-test/features/sideEffect/Sack.feature
@@ -80,7 +80,7 @@ Feature: Step - sack()
     When iterated to list
     Then the result should be unordered
       | result |
-      | d[1.0].d |
+      | d[1.0].m |
 
   Scenario: g_withBulkXfalseX_withSackX1_sumX_V_out_barrier_sack
     Given the modern graph


[28/50] tinkerpop git commit: Created issue for ignored GLV test in .NET CTR

Posted by dk...@apache.org.
Created issue for ignored GLV test in .NET CTR


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

Branch: refs/heads/TINKERPOP-1447
Commit: 8ef717f6c0e04161e43c87a83f67ada0f5e60349
Parents: 153f852
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Mar 1 10:31:56 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Mar 1 10:31:56 2018 -0500

----------------------------------------------------------------------
 .../test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8ef717f6/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
index c2a8850..f3e823a 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
@@ -40,7 +40,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
         private static readonly IDictionary<string, IgnoreReason> IgnoredScenarios = new Dictionary<string, IgnoreReason> {
             { "g_V_hasLabelXpersonX_hasXage_notXlteX10X_andXnotXbetweenX11_20XXXX_andXltX29X_orXeqX35XXXX_name", IgnoreReason.NeedsFurtherInvestigation }, // TINKERPOP-1859??
             { "g_VX1X_out_aggregateXxX_out_whereXnotXwithinXaXXX", IgnoreReason.NeedsFurtherInvestigation }, // TINKERPOP-1859??
-            { "g_withBulkXfalseX_withSackX1_sumX_V_out_barrier_sack", IgnoreReason.NeedsFurtherInvestigation }
+            { "g_withBulkXfalseX_withSackX1_sumX_V_out_barrier_sack", IgnoreReason.NeedsFurtherInvestigation } // TINKERPOP-1907
         };
         
         private static class Keywords


[38/50] tinkerpop git commit: Merge branch 'TINKERPOP-1862' into tp32

Posted by dk...@apache.org.
Merge branch 'TINKERPOP-1862' into tp32


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

Branch: refs/heads/TINKERPOP-1447
Commit: 6fbf13047db83cb77292386cce4c1f5bee66101e
Parents: 81e6ba6 8db0730
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Mar 5 08:39:46 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Mar 5 08:39:46 2018 -0500

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |   1 +
 data/tinkerpop-sink-typed.json                  |   4 +-
 data/tinkerpop-sink-v2d0-typed.json             |   4 +-
 data/tinkerpop-sink-v2d0.json                   |   4 +-
 data/tinkerpop-sink.json                        |   4 +-
 data/tinkerpop-sink.kryo                        | Bin 76 -> 288 bytes
 .../process/computer/GiraphMessenger.java       |  14 +-
 .../process/computer/GraphComputerTest.java     | 192 +++++++++++++++++++
 .../io/graphson/tinkerpop-sink-typed.json       |   4 +-
 .../io/graphson/tinkerpop-sink-v2d0-typed.json  |   4 +-
 .../io/graphson/tinkerpop-sink-v2d0.json        |   4 +-
 .../structure/io/graphson/tinkerpop-sink.json   |   4 +-
 .../structure/io/gryo/tinkerpop-sink.kryo       | Bin 76 -> 288 bytes
 .../computer/util/ComputerSubmissionHelper.java |   2 +-
 .../spark/process/computer/SparkMessenger.java  |  12 +-
 .../process/computer/TinkerMessenger.java       |  11 +-
 .../tinkergraph/structure/TinkerFactory.java    |   7 +
 17 files changed, 258 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6fbf1304/CHANGELOG.asciidoc
----------------------------------------------------------------------


[18/50] tinkerpop git commit: Added Gremlin's Anatomy tutorial

Posted by dk...@apache.org.
Added Gremlin's Anatomy tutorial

I might add more to this, but wanted the basic component parts of Gremlin documented. Seemed best to make this part of a standalone document as it didn't quite fit that well in the reference documentation, as it already has a way of introducing those topics and I didn't want to disturb that too much. CTR


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

Branch: refs/heads/TINKERPOP-1447
Commit: 3aa9e70ef7e50d81886954e398b4355524f7b576
Parents: 1a857da
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Feb 28 14:14:01 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 28 14:14:01 2018 -0500

----------------------------------------------------------------------
 docs/src/index.asciidoc                         |   3 +
 .../tutorials/gremlins-anatomy/index.asciidoc   | 189 +++++++++++++++++++
 docs/static/images/gremlin-anatomy-filter.png   | Bin 0 -> 168854 bytes
 docs/static/images/gremlin-anatomy-group.png    | Bin 0 -> 62410 bytes
 docs/static/images/gremlin-anatomy-navigate.png | Bin 0 -> 60514 bytes
 docs/static/images/gremlin-anatomy.png          | Bin 0 -> 87212 bytes
 pom.xml                                         |  23 +++
 7 files changed, 215 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3aa9e70e/docs/src/index.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/index.asciidoc b/docs/src/index.asciidoc
index 40fbb8c..5cc3dd5 100644
--- a/docs/src/index.asciidoc
+++ b/docs/src/index.asciidoc
@@ -57,6 +57,8 @@ Note the "+" following the link in each table entry - it forces an asciidoc line
 A gentle introduction to TinkerPop and the Gremlin traversal language that is divided into five, ten and fifteen minute tutorial blocks.
 |image:gremlin-dashboard.png[] |link:http://tinkerpop.apache.org/docs/x.y.z/tutorials/the-gremlin-console/[The Gremlin Console] +
 Provides a detailed look at The Gremlin Console and how it can be used when working with TinkerPop.
+^|image:gremlin-anatomy.png[width=125] |link:http://tinkerpop.apache.org/docs/x.y.z/gremlins-anatomy/[Gremlin's Anatomy]
+Identifies and explains the component parts of a Gremlin traversal.
 ^|image:gremlin-chef.png[width=125] |link:http://tinkerpop.apache.org/docs/x.y.z/recipes/[Gremlin Recipes]
 A collection of best practices and common traversal patterns for Gremlin.
 ^|image:gremlin-house-of-mirrors-cropped.png[width=200] |link:http://tinkerpop.apache.org/docs/x.y.z/tutorials/gremlin-language-variants/[Gremlin Language Variants]
@@ -77,6 +79,7 @@ A getting started guide for users of graph databases and the Gremlin query langu
 
 Unless otherwise noted, all "publications" are externally managed:
 
+* Mallette, S.P., link:https://www.slideshare.net/StephenMallette/gremlins-anatomy-88713465["Gremlin's Anatomy,"] DataStax User Group, February 2018.
 * Rodriguez, M.A., link:https://www.slideshare.net/slidarko/gremlin-1013-on-your-fm-dial["Gremlin 101.3 On Your FM Dial,"] DataStax Support and Engineering Summits, Carmel California and Las Vegas Nevada, May 2017.
 * Rodriguez, M.A., link:https://www.datastax.com/2017/03/graphoendodonticology["Graphoendodonticology,"] DataStax Engineering Blog, March 2017
 * Rodriguez, M.A., link:http://www.datastax.com/dev/blog/gremlins-time-machine["Gremlin's Time Machine,"] DataStax Engineering Blog, September 2016.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3aa9e70e/docs/src/tutorials/gremlins-anatomy/index.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/tutorials/gremlins-anatomy/index.asciidoc b/docs/src/tutorials/gremlins-anatomy/index.asciidoc
new file mode 100644
index 0000000..b36d881
--- /dev/null
+++ b/docs/src/tutorials/gremlins-anatomy/index.asciidoc
@@ -0,0 +1,189 @@
+////
+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.
+////
+
+image::apache-tinkerpop-logo.png[width=500,link="http://tinkerpop.apache.org"]
+
+*x.y.z*
+
+== Gremlin's Anatomy
+
+image:gremlin-anatomy.png[width=160,float=left]The Gremlin language is typically described by the individual
+link:http://tinkerpop.apache.org/docs/x.y.z/reference/#graph-traversal-steps[steps] that make up the language, but it
+is worth taking a look at the component parts of Gremlin that make a traversal work. Understanding these component
+parts make it possible to discuss and understand more advanced Gremlin topics, such as
+link:http://tinkerpop.apache.org/docs/x.y.z/reference/#dsl[Gremlin DSL] development and Gremlin debugging techniques.
+Ultimately, Gremlin's Anatomy provides a foundational understanding for helping to read and follow Gremlin of arbitrary
+complexity, which will lead you to more easily identify traversal patterns and thus enable you to craft better
+traversals of your own.
+
+NOTE: This tutorial is based on Stephen Mallette's presentation on Gremlin's Anatomy - the slides for that presentation
+can be found link:https://www.slideshare.net/StephenMallette/gremlins-anatomy-88713465[here].
+
+The component parts of a Gremlin traversal can be all be identified from the following code:
+
+[gremlin-groovy,modern]
+----
+g.V().
+  has('person', 'name', within('marko', 'josh')).
+  outE().
+  groupCount().
+    by(label()).next()
+----
+
+In plain English, this traversal requests an out-edge label distribution for "marko" and "josh". The following
+sections, will pick this traversal apart to show each component part and discuss it in some detail.
+
+=== GraphTraversalSource
+
+_`g.V()`_ - You are likely well acquainted with this bit of Gremlin. It is in virtually every traversal you read in
+documentation, blog posts, or examples and is likely the start of most every traversal you will write in your own
+applications.
+
+[gremlin-groovy,modern]
+----
+g.V()
+----
+
+While it is well known that `g.V()` returns a list of all the vertices in the graph, the technical underpinnings of
+this ubiquitous statement may be less so well established. First of all, the `g` is a variable. It could have been
+`x`, `y` or anything else, but by convention, you will normally see `g`. This `g` is a `GraphTraversalSource`
+and it spawns `GraphTraversal` instances with start steps. `V()` is one such start step, but there are others like
+`E` for getting all the edges in the graph. The important part is that these start steps begin the traversal.
+
+In addition to exposing the available start steps, the `GraphTraversalSource` also holds configuration options (perhaps
+think of them as pre-instructions for Gremlin) to be used for the traversal execution. The methods that allow you to
+set these configurations are prefixed by the word "with". Here are a few examples to consider:
+
+[source,groovy]
+----
+g.withStrategies(SubgraphStrategy.build().vertices(hasLabel('person')).create()).  <1>
+  V().has('name','marko').out().values('name')
+g.withSack(1.0f).V().sack()                                                        <2>
+g.withComputer().V().pageRank()                                                    <3>
+----
+
+<1> Define a link:http://tinkerpop.apache.org/docs/x.y.z/reference/#traversalstrategy[strategy] for the traversal
+<2> Define an initial link:http://tinkerpop.apache.org/docs/x.y.z/reference/#sack-step[sack] value
+<3> Define a link:http://tinkerpop.apache.org/docs/x.y.z/reference/#graphcomputer[GraphComputer] to use in conjunction
+with a `VertexProgram` for OLAP based traversals - for example, see
+link:http://tinkerpop.apache.org/docs/x.y.z/reference/#sparkgraphcomputer[Spark]
+
+IMPORTANT: How you instantiate the `GraphTraversalSource` is highly depending on the graph database implementation that
+you are using. Typically, they are instantiated from a `Graph` instance with the `traversal()` method, but some graph
+databases, ones that are managed or "server-oriented", will simply give you a `g` to work with. Consult the
+documentation of your graph database to determine how the `GraphTraversalSource` is constructed.
+
+=== GraphTraversal
+
+As you now know, a `GraphTraversal` is spawned from the start steps of a `GraphTraversalSource`. The `GraphTraversal`
+contain the steps that make up the Gremlin language. Each step returns a `GraphTraversal` so that the steps can be
+chained together in a fluent fashion. Revisiting the example from above:
+
+[gremlin-groovy,modern]
+----
+g.V().
+  has('person', 'name', within('marko', 'josh')).
+  outE().
+  groupCount().
+    by(label()).next()
+----
+
+the `GraphTraversal` components are represented by the `has()`, `outE()` and `groupCount()` steps. The key to reading
+this Gremlin is to realize that the output of one step becomes the input to the next. Therefore, if you consider the
+start step of `V()` and realize that it returns vertices in the graph, the input to `has()` is going to be a `Vertex`.
+The `has()` step is a filtering step and will take the vertices that are passed into it and block any that do not
+meet the criteria it has specified. In this case, that means that the output of the `has()` step is vertices that have
+the label of "person" and the "name" property value of "josh" or "marko". 
+
+image::gremlin-anatomy-filter.png[width=600]
+
+Given that you know the output of `has()`, you then also know the input to `outE()`. Recall that `outE()` is a
+navigational step in that it enables movement about the graph. In this case, `outE()` tells Gremlin to take the
+incoming "marko" and "josh" vertices and traverse their outgoing edges as the output.
+
+image::gremlin-anatomy-navigate.png[width=600]
+
+Now that it is clear that the output of `outE()` is an edge, you are aware of the input to `groupCount()` - edges.
+The `groupCount()` step requires a bit more discussion of other Gremlin components and will thus be examined in the
+following sections. At this point, it is simply worth noting that the output of `groupCount()` is a `Map` and if a
+Gremlin step followed it, the input to that step would therefore be a `Map`.
+
+The previous paragraph ended with an interesting point, in that it implied that there were no "steps" following
+`groupCount()`. Clearly, `groupCount()` is not the last function to be called in that Gremlin statement so you might
+wonder what the remaining bits are, specifically: `by(label()).next()`. The following sections will discuss those
+remaining pieces.
+
+=== Step Modulators
+
+It's been explained in several ways now that the output of one step becomes the input to the next, so surely the `Map`
+produced by `groupCount()` will feed the `by()` step. As alluded to at the end of the previous section, that
+expectation is not correct. Technically, `by()` is not a step. It is a step modulator. A step modulator modifies the
+behavior of the previous step. In this case, it is telling Gremlin how the key for the `groupCount()` should be
+determined. Or said another way in the context of the example, it answers this question: What do you want the "marko"
+and "josh" edges to be grouped by?
+
+=== Anonymous Traversals
+
+In this case, the answer to that question is provided by the anonymous traversal `label()` as the argument to the step
+modulator `by()`. An anonymous traversal is a traversal that is not bound to a `GraphTraversalSource`. It is
+constructed from the double underscore class (i.e. `__`), which exposes static functions to spawn the anonymous
+traversals. Typically, the double underscore is not visible in examples and code as by convention, TinkerPop typically
+recommends that the functions of that class be exposed in a standalone fashion. In Java, that would mean
+link:https://docs.oracle.com/javase/7/docs/technotes/guides/language/static-import.html[statically importing] the
+methods, thus allowing `__.label()` to be referred to simply as `label()`.
+
+NOTE: In Java, the full package name for the `__` is `org.apache.tinkerpop.gremlin.process.traversal.dsl.graph`.
+
+In the context of the example traversal, you can imagine Gremlin getting to the `groupCount()` step with a "marko" or
+"josh" outgoing edge, checking the `by()` modulator to see "what to group by", and then putting edges into buckets
+by their `label()` and incrementing a counter on each bucket.
+
+image::gremlin-anatomy-group.png[width=600]
+
+The output is thus an edge label distribution for the outgoing edges of the "marko" and "josh" vertices.
+
+=== Terminal Step
+
+Terminal steps are different from the `GraphTraversal` steps in that terminal steps do not return a `GraphTraversal`
+instance, but instead return the result of the `GraphTraversal`. In the case of the example, `next()` is the terminal
+step and it returns the `Map` constructed in the `groupCount()` step. Other examples of terminal steps include:
+`hasNext()`, `toList()`, and `iterate()`. Without terminal steps, you don't have a result. You only have a
+`GraphTraversal`
+
+NOTE: You can read more about traversal iteration in the
+link:http://tinkerpop.apache.org/docs/x.y.z/tutorials/the-gremlin-console/#result-iteration[Gremlin Console Tutorial].
+
+=== Expressions
+
+It is worth backing up a moment to re-examine the `has()` step. Now that you have come to understand anonymous
+traversals, it would be reasonable to make the assumption that the `within()` argument to `has()` falls into that
+category. It does not. The `within()` option is not a step either, but instead, something called an expression. An
+expression typically refers to anything not mentioned in the previously described Gremlin component categories that
+can make Gremlin easier to read, write and maintain. Common examples of expressions would be string tokens, enum
+values, and classes with static methods that might spawn certain required values.
+
+A concrete example would be the class from which `within()` is called - `P`. The `P` class spawns `Predicate` values
+that can be used as arguments for certain traversals teps. Another example would be the `T` enum which provides a type
+safe way to reference `id` and `label` keys in a traversal. Like anonymous traversals, these classes are usually
+statically imported so that instead of having to write `P.within()`, you can simply write `within()`, as shown in the
+example.
+
+== Conclusion
+
+There's much more to a traversal than just a bunch of steps. Gremlin's Anatomy puts names to each of these component
+parts of a traversal and explains how they connect together. Understanding these components part should help provide
+more insight into how Gremlin works and help you grow in your Gremlin abilities.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3aa9e70e/docs/static/images/gremlin-anatomy-filter.png
----------------------------------------------------------------------
diff --git a/docs/static/images/gremlin-anatomy-filter.png b/docs/static/images/gremlin-anatomy-filter.png
new file mode 100755
index 0000000..317bb8c
Binary files /dev/null and b/docs/static/images/gremlin-anatomy-filter.png differ

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3aa9e70e/docs/static/images/gremlin-anatomy-group.png
----------------------------------------------------------------------
diff --git a/docs/static/images/gremlin-anatomy-group.png b/docs/static/images/gremlin-anatomy-group.png
new file mode 100755
index 0000000..0039c02
Binary files /dev/null and b/docs/static/images/gremlin-anatomy-group.png differ

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3aa9e70e/docs/static/images/gremlin-anatomy-navigate.png
----------------------------------------------------------------------
diff --git a/docs/static/images/gremlin-anatomy-navigate.png b/docs/static/images/gremlin-anatomy-navigate.png
new file mode 100755
index 0000000..152e40e
Binary files /dev/null and b/docs/static/images/gremlin-anatomy-navigate.png differ

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3aa9e70e/docs/static/images/gremlin-anatomy.png
----------------------------------------------------------------------
diff --git a/docs/static/images/gremlin-anatomy.png b/docs/static/images/gremlin-anatomy.png
new file mode 100755
index 0000000..d83ebf7
Binary files /dev/null and b/docs/static/images/gremlin-anatomy.png differ

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3aa9e70e/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 259f16a..f6ff536 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1036,6 +1036,29 @@ limitations under the License.
                                     </attributes>
                                 </configuration>
                             </execution>
+                            <execution>
+                                <id>tutorial-gremlins-anatomy</id>
+                                <phase>generate-resources</phase>
+                                <goals>
+                                    <goal>process-asciidoc</goal>
+                                </goals>
+                                <configuration>
+                                    <sourceDirectory>${asciidoc.input.dir}/tutorials/gremlins-anatomy</sourceDirectory>
+                                    <sourceDocumentName>index.asciidoc</sourceDocumentName>
+                                    <outputDirectory>${htmlsingle.output.dir}/tutorials/gremlins-anatomy
+                                    </outputDirectory>
+                                    <backend>html5</backend>
+                                    <doctype>article</doctype>
+                                    <attributes>
+                                        <imagesdir>../../images</imagesdir>
+                                        <encoding>UTF-8</encoding>
+                                        <stylesdir>${asciidoctor.style.dir}</stylesdir>
+                                        <stylesheet>tinkerpop.css</stylesheet>
+                                        <source-highlighter>coderay</source-highlighter>
+                                        <basedir>${project.basedir}</basedir>
+                                    </attributes>
+                                </configuration>
+                            </execution>
                         </executions>
                     </plugin>
                 </plugins>


[35/50] tinkerpop git commit: TINKERPOP-1862 Added back computer tests accidentally commented out

Posted by dk...@apache.org.
TINKERPOP-1862 Added back computer tests accidentally commented out


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

Branch: refs/heads/TINKERPOP-1447
Commit: 8db0730a70fc693ce458603010abc831ce871f46
Parents: 7956b48
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Mar 2 12:28:18 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Mar 2 12:28:18 2018 -0500

----------------------------------------------------------------------
 .../gremlin/process/ProcessComputerSuite.java   | 168 +++++++++----------
 1 file changed, 84 insertions(+), 84 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8db0730a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessComputerSuite.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessComputerSuite.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessComputerSuite.java
index e1c97df..1d69a76 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessComputerSuite.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessComputerSuite.java
@@ -117,90 +117,90 @@ public class ProcessComputerSuite extends AbstractGremlinSuite {
             GraphComputerTest.class,
 
             // branch
-//            BranchTest.Traversals.class,
-//            ChooseTest.Traversals.class,
-//            OptionalTest.Traversals.class,
-//            LocalTest.Traversals.class,
-//            RepeatTest.Traversals.class,
-//            UnionTest.Traversals.class,
-//
-//            // filter
-//            AndTest.Traversals.class,
-//            CoinTest.Traversals.class,
-//            CyclicPathTest.Traversals.class,
-//            DedupTest.Traversals.class,
-//            FilterTest.Traversals.class,
-//            HasTest.Traversals.class,
-//            IsTest.Traversals.class,
-//            OrTest.Traversals.class,
-//            RangeTest.Traversals.class,
-//            SampleTest.Traversals.class,
-//            SimplePathTest.Traversals.class,
-//            TailTest.Traversals.class,
-//            WhereTest.Traversals.class,
-//
-//            // map
-//            CoalesceTest.Traversals.class,
-//            ConstantTest.Traversals.class,
-//            CountTest.Traversals.class,
-//            FlatMapTest.Traversals.class,
-//            FoldTest.Traversals.class,
-//            GraphTest.Traversals.class,
-//            LoopsTest.Traversals.class,
-//            MapTest.Traversals.class,
-//            MapKeysTest.Traversals.class,
-//            MapValuesTest.Traversals.class,
-//            MatchTest.CountMatchTraversals.class,
-//            MatchTest.GreedyMatchTraversals.class,
-//            MaxTest.Traversals.class,
-//            MeanTest.Traversals.class,
-//            MinTest.Traversals.class,
-//            SumTest.Traversals.class,
-//            OrderTest.Traversals.class,
-//            PageRankTest.Traversals.class,
-//            PathTest.Traversals.class,
-//            PeerPressureTest.Traversals.class,
-//            ProfileTest.Traversals.class,
-//            ProjectTest.Traversals.class,
-//            ProgramTest.Traversals.class,
-//            PropertiesTest.Traversals.class,
-//            SelectTest.Traversals.class,
-//            UnfoldTest.Traversals.class,
-//            ValueMapTest.Traversals.class,
-//            VertexTest.Traversals.class,
-//
-//            // sideEffect
-//            AddEdgeTest.Traversals.class,
-//            AggregateTest.Traversals.class,
-//            ExplainTest.Traversals.class,
-//            GroupTest.Traversals.class,
-//            GroupTestV3d0.Traversals.class,
-//            GroupCountTest.Traversals.class,
-//            InjectTest.Traversals.class,
-//            ProfileTest.Traversals.class,
-//            SackTest.Traversals.class,
-//            SideEffectCapTest.Traversals.class,
-//            SideEffectTest.Traversals.class,
-//            StoreTest.Traversals.class,
-//            SubgraphTest.Traversals.class,
-//            TreeTest.Traversals.class,
-//
-//            // compliance
-//            ComplexTest.Traversals.class,
-//            TraversalInterruptionComputerTest.class,
-//
-//            // algorithms
-//            PageRankVertexProgramTest.class,
-//            PeerPressureVertexProgramTest.class,
-//            BulkLoaderVertexProgramTest.class,
-//            BulkDumperVertexProgramTest.class,
-//
-//            // creations
-//            TranslationStrategyProcessTest.class,
-//
-//            // decorations
-//            ReadOnlyStrategyProcessTest.class,
-//            SubgraphStrategyProcessTest.class
+            BranchTest.Traversals.class,
+            ChooseTest.Traversals.class,
+            OptionalTest.Traversals.class,
+            LocalTest.Traversals.class,
+            RepeatTest.Traversals.class,
+            UnionTest.Traversals.class,
+
+            // filter
+            AndTest.Traversals.class,
+            CoinTest.Traversals.class,
+            CyclicPathTest.Traversals.class,
+            DedupTest.Traversals.class,
+            FilterTest.Traversals.class,
+            HasTest.Traversals.class,
+            IsTest.Traversals.class,
+            OrTest.Traversals.class,
+            RangeTest.Traversals.class,
+            SampleTest.Traversals.class,
+            SimplePathTest.Traversals.class,
+            TailTest.Traversals.class,
+            WhereTest.Traversals.class,
+
+            // map
+            CoalesceTest.Traversals.class,
+            ConstantTest.Traversals.class,
+            CountTest.Traversals.class,
+            FlatMapTest.Traversals.class,
+            FoldTest.Traversals.class,
+            GraphTest.Traversals.class,
+            LoopsTest.Traversals.class,
+            MapTest.Traversals.class,
+            MapKeysTest.Traversals.class,
+            MapValuesTest.Traversals.class,
+            MatchTest.CountMatchTraversals.class,
+            MatchTest.GreedyMatchTraversals.class,
+            MaxTest.Traversals.class,
+            MeanTest.Traversals.class,
+            MinTest.Traversals.class,
+            SumTest.Traversals.class,
+            OrderTest.Traversals.class,
+            PageRankTest.Traversals.class,
+            PathTest.Traversals.class,
+            PeerPressureTest.Traversals.class,
+            ProfileTest.Traversals.class,
+            ProjectTest.Traversals.class,
+            ProgramTest.Traversals.class,
+            PropertiesTest.Traversals.class,
+            SelectTest.Traversals.class,
+            UnfoldTest.Traversals.class,
+            ValueMapTest.Traversals.class,
+            VertexTest.Traversals.class,
+
+            // sideEffect
+            AddEdgeTest.Traversals.class,
+            AggregateTest.Traversals.class,
+            ExplainTest.Traversals.class,
+            GroupTest.Traversals.class,
+            GroupTestV3d0.Traversals.class,
+            GroupCountTest.Traversals.class,
+            InjectTest.Traversals.class,
+            ProfileTest.Traversals.class,
+            SackTest.Traversals.class,
+            SideEffectCapTest.Traversals.class,
+            SideEffectTest.Traversals.class,
+            StoreTest.Traversals.class,
+            SubgraphTest.Traversals.class,
+            TreeTest.Traversals.class,
+
+            // compliance
+            ComplexTest.Traversals.class,
+            TraversalInterruptionComputerTest.class,
+
+            // algorithms
+            PageRankVertexProgramTest.class,
+            PeerPressureVertexProgramTest.class,
+            BulkLoaderVertexProgramTest.class,
+            BulkDumperVertexProgramTest.class,
+
+            // creations
+            TranslationStrategyProcessTest.class,
+
+            // decorations
+            ReadOnlyStrategyProcessTest.class,
+            SubgraphStrategyProcessTest.class
     };
 
     /**


[08/50] tinkerpop git commit: Adding simple graph computer test of proper message passing in all 3 directions

Posted by dk...@apache.org.
Adding simple graph computer test of proper message passing in all 3 directions


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

Branch: refs/heads/TINKERPOP-1447
Commit: 80c0b8465fe9bb6ddbe4522a36304c7ba054e909
Parents: f02ea33
Author: Graff, Philip B <Ph...@jhuapl.edu>
Authored: Sat Jan 13 21:32:29 2018 -0500
Committer: Graff, Philip B <Ph...@jhuapl.edu>
Committed: Sun Feb 25 10:44:15 2018 -0500

----------------------------------------------------------------------
 .../process/computer/GraphComputerTest.java     | 175 +++++++++++++++++++
 1 file changed, 175 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/80c0b846/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
index 8c846d5..c34c2dc 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
@@ -34,6 +34,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.Operator;
 import org.apache.tinkerpop.gremlin.process.traversal.P;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
 import org.apache.tinkerpop.gremlin.process.traversal.step.util.EmptyPath;
 import org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.VerificationException;
@@ -2683,4 +2684,178 @@ public class GraphComputerTest extends AbstractGremlinProcessTest {
             };
         }
     }
+
+    ///////////////////////////////////
+
+    @Test
+    public void testMessagePassingIn() throws Exception {
+        runTest(Direction.IN).forEachRemaining(v -> {
+            String in = v.value("propin").toString();
+            if (in.equals("a")) {
+                assertEquals("ab", v.value("propout").toString());
+            } else {
+                assertEquals("", v.value("propout").toString());
+            }
+        });
+    }
+
+    @Test
+    public void testMessagePassingOut() throws Exception {
+        runTest(Direction.OUT).forEachRemaining(v -> {
+            String in = v.value("propin").toString();
+            if (in.equals("a")) {
+                assertEquals("a", v.value("propout").toString());
+            } else {
+                assertEquals("a", v.value("propout").toString());
+            }
+        });
+    }
+
+    @Test
+    public void testMessagePassingBoth() throws Exception {
+        runTest(Direction.BOTH).forEachRemaining(v -> {
+            String in = v.value("propin").toString();
+            if (in.equals("a")) {
+                assertEquals("aab", v.value("propout").toString());
+            } else {
+                assertEquals("a", v.value("propout").toString());
+            }
+        });
+    }
+
+    private GraphTraversal<Vertex, Vertex> runTest(Direction direction) throws Exception {
+        g.addV().property("propin", "a").as("a")
+                .addV().property("propin", "b").as("b")
+                .addE("edge").from("a").to("b").addE("edge").from("a").to("a").iterate();
+        final VertexProgramR svp = VertexProgramR.build().propertyIn("propin")
+                .propertyOut("propout").direction(direction).create();
+        final ComputerResult result = graphProvider.getGraphComputer(graph).program(svp).submit().get();
+        return result.graph().traversal().V();
+    }
+
+    private static class VertexProgramR implements VertexProgram<String> {
+        private static final String SIMPLE_VERTEX_PROGRAM_CFG_PREFIX = "gremlin.simpleVertexProgram";
+        private static final String PROPERTY_OUT_CFG_KEY = SIMPLE_VERTEX_PROGRAM_CFG_PREFIX + ".propertyout";
+        private static final String PROPERTY_IN_CFG_KEY = SIMPLE_VERTEX_PROGRAM_CFG_PREFIX + ".propertyin";
+        private static final String DIRECTION_CFG_KEY = SIMPLE_VERTEX_PROGRAM_CFG_PREFIX + ".direction";
+
+        private final MessageScope.Local<String> inMessageScope = MessageScope.Local.of(__::inE);
+        private final MessageScope.Local<String> outMessageScope = MessageScope.Local.of(__::outE);
+        private final MessageScope.Local<String> bothMessageScope = MessageScope.Local.of(__::bothE);
+        private MessageScope.Local<String> messageScope;
+        private Set<VertexComputeKey> vertexComputeKeys;
+
+        private String propertyout, propertyin;
+
+        /**
+         * Clones this vertex program.
+         *
+         * @return a clone of this vertex program
+         */
+        public VertexProgramR clone() { return this; }
+
+        @Override
+        public void loadState(final Graph graph, final Configuration configuration) {
+            this.propertyout = configuration.getString(PROPERTY_OUT_CFG_KEY);
+            this.propertyin = configuration.getString(PROPERTY_IN_CFG_KEY);
+            Direction direction = Direction.valueOf(configuration.getString(DIRECTION_CFG_KEY));
+            switch (direction) {
+                case IN:
+                    this.messageScope = this.inMessageScope;
+                    break;
+                case OUT:
+                    this.messageScope = this.outMessageScope;
+                    break;
+                default:
+                    this.messageScope = this.bothMessageScope;
+                    break;
+            }
+            this.vertexComputeKeys = new HashSet<>(Arrays.asList(VertexComputeKey.of(this.propertyout, false),
+                    VertexComputeKey.of(this.propertyin, false)));
+        }
+
+        @Override
+        public void setup(Memory memory) {
+        }
+
+        @Override
+        public void execute(Vertex vertex, Messenger<String> messenger, Memory memory) {
+            if (memory.isInitialIteration()) {
+                messenger.sendMessage(this.messageScope, vertex.value(this.propertyin).toString());
+            } else {
+                char[] composite = IteratorUtils.reduce(messenger.receiveMessages(), "", (a, b) -> a + b).toCharArray();
+                Arrays.sort(composite);
+                vertex.property(this.propertyout, new String(composite));
+            }
+        }
+
+        @Override
+        public boolean terminate(Memory memory) {
+            return !memory.isInitialIteration();
+        }
+
+        @Override
+        public Set<MessageScope> getMessageScopes(Memory memory) {
+            return Collections.singleton(this.messageScope);
+        }
+
+        @Override
+        public GraphComputer.ResultGraph getPreferredResultGraph() {
+            return GraphComputer.ResultGraph.NEW;
+        }
+
+        @Override
+        public GraphComputer.Persist getPreferredPersist() {
+            return GraphComputer.Persist.VERTEX_PROPERTIES;
+        }
+
+        @Override
+        public Set<VertexComputeKey> getVertexComputeKeys() {
+            return this.vertexComputeKeys;
+        }
+
+        @Override
+        public Set<MemoryComputeKey> getMemoryComputeKeys() {
+            return Collections.emptySet();
+        }
+
+        public static Builder build() {
+            return new Builder();
+        }
+
+        static class Builder extends AbstractVertexProgramBuilder<Builder> {
+
+            private Builder() {
+                super(VertexProgramR.class);
+            }
+
+            @SuppressWarnings("unchecked")
+            @Override
+            public VertexProgramR create(final Graph graph) {
+                if (graph != null) {
+                    ConfigurationUtils.append(graph.configuration().subset(SIMPLE_VERTEX_PROGRAM_CFG_PREFIX), configuration);
+                }
+                return (VertexProgramR) VertexProgram.createVertexProgram(graph, configuration);
+            }
+
+            public VertexProgramR create() {
+                return create(null);
+            }
+
+            public Builder propertyOut(final String name) {
+                configuration.setProperty(PROPERTY_OUT_CFG_KEY, name);
+                return this;
+            }
+
+            public Builder propertyIn(final String name) {
+                configuration.setProperty(PROPERTY_IN_CFG_KEY, name);
+                return this;
+            }
+
+            public Builder direction(final Direction direction) {
+                configuration.setProperty(DIRECTION_CFG_KEY, direction.toString());
+                return this;
+            }
+        }
+    }
 }


[15/50] tinkerpop git commit: Proper update of kitchen sink through TinkerFactory

Posted by dk...@apache.org.
Proper update of kitchen sink through TinkerFactory


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

Branch: refs/heads/TINKERPOP-1447
Commit: 0490a082d9b533cb7ef4a1a25bd25500844821a6
Parents: b0b124b
Author: Graff, Philip B <Ph...@jhuapl.edu>
Authored: Sun Feb 25 16:27:28 2018 -0500
Committer: Graff, Philip B <Ph...@jhuapl.edu>
Committed: Sun Feb 25 16:27:28 2018 -0500

----------------------------------------------------------------------
 data/tinkerpop-sink-typed.json                      |   4 +++-
 data/tinkerpop-sink-v2d0-typed.json                 |   4 +++-
 data/tinkerpop-sink-v2d0.json                       |   4 +++-
 data/tinkerpop-sink.json                            |   4 +++-
 data/tinkerpop-sink.kryo                            | Bin 76 -> 300 bytes
 .../structure/io/graphson/tinkerpop-sink-typed.json |   4 +++-
 .../io/graphson/tinkerpop-sink-v2d0-typed.json      |   4 +++-
 .../structure/io/graphson/tinkerpop-sink-v2d0.json  |   4 +++-
 .../structure/io/graphson/tinkerpop-sink.json       |   4 +++-
 .../gremlin/structure/io/gryo/tinkerpop-sink.kryo   | Bin 76 -> 300 bytes
 .../tinkergraph/structure/TinkerFactory.java        |   7 +++++++
 11 files changed, 31 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0490a082/data/tinkerpop-sink-typed.json
----------------------------------------------------------------------
diff --git a/data/tinkerpop-sink-typed.json b/data/tinkerpop-sink-typed.json
index f62a717..aae410e 100644
--- a/data/tinkerpop-sink-typed.json
+++ b/data/tinkerpop-sink-typed.json
@@ -1 +1,3 @@
-{"@class":"java.util.HashMap","id":["java.lang.Long",0],"label":"loops","inE":{"@class":"java.util.HashMap","self":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",2],"outV":["java.lang.Long",0]}]]},"outE":{"@class":"java.util.HashMap","self":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",2],"inV":["java.lang.Long",0]}]]},"properties":{"@class":"java.util.HashMap","name":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",1],"value":"loop"}]]}}
+{"@class":"java.util.HashMap","id":2000,"label":"message_passing_test","inE":{"@class":"java.util.HashMap","msg_pass_test_edge":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":5,"outV":2000}]]},"outE":{"@class":"java.util.HashMap","msg_pass_test_edge":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":4,"inV":2001},{"@class":"java.util.HashMap","id":5,"inV":2000}]]},"properties":{"@class":"java.util.HashMap","propertyin":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",2],"value":"a"}]]}}
+{"@class":"java.util.HashMap","id":2001,"label":"message_passing_test","inE":{"@class":"java.util.HashMap","msg_pass_test_edge":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":4,"outV":2000}]]},"properties":{"@class":"java.util.HashMap","propertyin":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",3],"value":"b"}]]}}
+{"@class":"java.util.HashMap","id":1000,"label":"loops","inE":{"@class":"java.util.HashMap","self":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":1,"outV":1000}]]},"outE":{"@class":"java.util.HashMap","self":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":1,"inV":1000}]]},"properties":{"@class":"java.util.HashMap","name":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",0],"value":"loop"}]]}}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0490a082/data/tinkerpop-sink-v2d0-typed.json
----------------------------------------------------------------------
diff --git a/data/tinkerpop-sink-v2d0-typed.json b/data/tinkerpop-sink-v2d0-typed.json
index df22167..e90b677 100644
--- a/data/tinkerpop-sink-v2d0-typed.json
+++ b/data/tinkerpop-sink-v2d0-typed.json
@@ -1 +1,3 @@
-{"id":{"@type":"g:Int64","@value":0},"label":"loops","inE":{"self":[{"id":{"@type":"g:Int64","@value":2},"outV":{"@type":"g:Int64","@value":0}}]},"outE":{"self":[{"id":{"@type":"g:Int64","@value":2},"inV":{"@type":"g:Int64","@value":0}}]},"properties":{"name":[{"id":{"@type":"g:Int64","@value":1},"value":"loop"}]}}
+{"id":{"@type":"g:Int32","@value":2000},"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":{"@type":"g:Int32","@value":5},"outV":{"@type":"g:Int32","@value":2000}}]},"outE":{"msg_pass_test_edge":[{"id":{"@type":"g:Int32","@value":4},"inV":{"@type":"g:Int32","@value":2001}},{"id":{"@type":"g:Int32","@value":5},"inV":{"@type":"g:Int32","@value":2000}}]},"properties":{"propertyin":[{"id":{"@type":"g:Int64","@value":2},"value":"a"}]}}
+{"id":{"@type":"g:Int32","@value":2001},"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":{"@type":"g:Int32","@value":4},"outV":{"@type":"g:Int32","@value":2000}}]},"properties":{"propertyin":[{"id":{"@type":"g:Int64","@value":3},"value":"b"}]}}
+{"id":{"@type":"g:Int32","@value":1000},"label":"loops","inE":{"self":[{"id":{"@type":"g:Int32","@value":1},"outV":{"@type":"g:Int32","@value":1000}}]},"outE":{"self":[{"id":{"@type":"g:Int32","@value":1},"inV":{"@type":"g:Int32","@value":1000}}]},"properties":{"name":[{"id":{"@type":"g:Int64","@value":0},"value":"loop"}]}}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0490a082/data/tinkerpop-sink-v2d0.json
----------------------------------------------------------------------
diff --git a/data/tinkerpop-sink-v2d0.json b/data/tinkerpop-sink-v2d0.json
index 39496ba..e6c284e 100644
--- a/data/tinkerpop-sink-v2d0.json
+++ b/data/tinkerpop-sink-v2d0.json
@@ -1 +1,3 @@
-{"id":0,"label":"loops","inE":{"self":[{"id":2,"outV":0}]},"outE":{"self":[{"id":2,"inV":0}]},"properties":{"name":[{"id":1,"value":"loop"}]}}
+{"id":2000,"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":5,"outV":2000}]},"outE":{"msg_pass_test_edge":[{"id":4,"inV":2001},{"id":5,"inV":2000}]},"properties":{"propertyin":[{"id":2,"value":"a"}]}}
+{"id":2001,"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":4,"outV":2000}]},"properties":{"propertyin":[{"id":3,"value":"b"}]}}
+{"id":1000,"label":"loops","inE":{"self":[{"id":1,"outV":1000}]},"outE":{"self":[{"id":1,"inV":1000}]},"properties":{"name":[{"id":0,"value":"loop"}]}}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0490a082/data/tinkerpop-sink.json
----------------------------------------------------------------------
diff --git a/data/tinkerpop-sink.json b/data/tinkerpop-sink.json
index 39496ba..e6c284e 100644
--- a/data/tinkerpop-sink.json
+++ b/data/tinkerpop-sink.json
@@ -1 +1,3 @@
-{"id":0,"label":"loops","inE":{"self":[{"id":2,"outV":0}]},"outE":{"self":[{"id":2,"inV":0}]},"properties":{"name":[{"id":1,"value":"loop"}]}}
+{"id":2000,"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":5,"outV":2000}]},"outE":{"msg_pass_test_edge":[{"id":4,"inV":2001},{"id":5,"inV":2000}]},"properties":{"propertyin":[{"id":2,"value":"a"}]}}
+{"id":2001,"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":4,"outV":2000}]},"properties":{"propertyin":[{"id":3,"value":"b"}]}}
+{"id":1000,"label":"loops","inE":{"self":[{"id":1,"outV":1000}]},"outE":{"self":[{"id":1,"inV":1000}]},"properties":{"name":[{"id":0,"value":"loop"}]}}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0490a082/data/tinkerpop-sink.kryo
----------------------------------------------------------------------
diff --git a/data/tinkerpop-sink.kryo b/data/tinkerpop-sink.kryo
index 9a26e15..25419fa 100644
Binary files a/data/tinkerpop-sink.kryo and b/data/tinkerpop-sink.kryo differ

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0490a082/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink-typed.json
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink-typed.json b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink-typed.json
index f62a717..aae410e 100644
--- a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink-typed.json
+++ b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink-typed.json
@@ -1 +1,3 @@
-{"@class":"java.util.HashMap","id":["java.lang.Long",0],"label":"loops","inE":{"@class":"java.util.HashMap","self":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",2],"outV":["java.lang.Long",0]}]]},"outE":{"@class":"java.util.HashMap","self":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",2],"inV":["java.lang.Long",0]}]]},"properties":{"@class":"java.util.HashMap","name":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",1],"value":"loop"}]]}}
+{"@class":"java.util.HashMap","id":2000,"label":"message_passing_test","inE":{"@class":"java.util.HashMap","msg_pass_test_edge":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":5,"outV":2000}]]},"outE":{"@class":"java.util.HashMap","msg_pass_test_edge":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":4,"inV":2001},{"@class":"java.util.HashMap","id":5,"inV":2000}]]},"properties":{"@class":"java.util.HashMap","propertyin":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",2],"value":"a"}]]}}
+{"@class":"java.util.HashMap","id":2001,"label":"message_passing_test","inE":{"@class":"java.util.HashMap","msg_pass_test_edge":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":4,"outV":2000}]]},"properties":{"@class":"java.util.HashMap","propertyin":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",3],"value":"b"}]]}}
+{"@class":"java.util.HashMap","id":1000,"label":"loops","inE":{"@class":"java.util.HashMap","self":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":1,"outV":1000}]]},"outE":{"@class":"java.util.HashMap","self":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":1,"inV":1000}]]},"properties":{"@class":"java.util.HashMap","name":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",0],"value":"loop"}]]}}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0490a082/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink-v2d0-typed.json
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink-v2d0-typed.json b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink-v2d0-typed.json
index df22167..e90b677 100644
--- a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink-v2d0-typed.json
+++ b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink-v2d0-typed.json
@@ -1 +1,3 @@
-{"id":{"@type":"g:Int64","@value":0},"label":"loops","inE":{"self":[{"id":{"@type":"g:Int64","@value":2},"outV":{"@type":"g:Int64","@value":0}}]},"outE":{"self":[{"id":{"@type":"g:Int64","@value":2},"inV":{"@type":"g:Int64","@value":0}}]},"properties":{"name":[{"id":{"@type":"g:Int64","@value":1},"value":"loop"}]}}
+{"id":{"@type":"g:Int32","@value":2000},"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":{"@type":"g:Int32","@value":5},"outV":{"@type":"g:Int32","@value":2000}}]},"outE":{"msg_pass_test_edge":[{"id":{"@type":"g:Int32","@value":4},"inV":{"@type":"g:Int32","@value":2001}},{"id":{"@type":"g:Int32","@value":5},"inV":{"@type":"g:Int32","@value":2000}}]},"properties":{"propertyin":[{"id":{"@type":"g:Int64","@value":2},"value":"a"}]}}
+{"id":{"@type":"g:Int32","@value":2001},"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":{"@type":"g:Int32","@value":4},"outV":{"@type":"g:Int32","@value":2000}}]},"properties":{"propertyin":[{"id":{"@type":"g:Int64","@value":3},"value":"b"}]}}
+{"id":{"@type":"g:Int32","@value":1000},"label":"loops","inE":{"self":[{"id":{"@type":"g:Int32","@value":1},"outV":{"@type":"g:Int32","@value":1000}}]},"outE":{"self":[{"id":{"@type":"g:Int32","@value":1},"inV":{"@type":"g:Int32","@value":1000}}]},"properties":{"name":[{"id":{"@type":"g:Int64","@value":0},"value":"loop"}]}}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0490a082/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink-v2d0.json
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink-v2d0.json b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink-v2d0.json
index 39496ba..e6c284e 100644
--- a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink-v2d0.json
+++ b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink-v2d0.json
@@ -1 +1,3 @@
-{"id":0,"label":"loops","inE":{"self":[{"id":2,"outV":0}]},"outE":{"self":[{"id":2,"inV":0}]},"properties":{"name":[{"id":1,"value":"loop"}]}}
+{"id":2000,"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":5,"outV":2000}]},"outE":{"msg_pass_test_edge":[{"id":4,"inV":2001},{"id":5,"inV":2000}]},"properties":{"propertyin":[{"id":2,"value":"a"}]}}
+{"id":2001,"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":4,"outV":2000}]},"properties":{"propertyin":[{"id":3,"value":"b"}]}}
+{"id":1000,"label":"loops","inE":{"self":[{"id":1,"outV":1000}]},"outE":{"self":[{"id":1,"inV":1000}]},"properties":{"name":[{"id":0,"value":"loop"}]}}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0490a082/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink.json
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink.json b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink.json
index 39496ba..e6c284e 100644
--- a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink.json
+++ b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink.json
@@ -1 +1,3 @@
-{"id":0,"label":"loops","inE":{"self":[{"id":2,"outV":0}]},"outE":{"self":[{"id":2,"inV":0}]},"properties":{"name":[{"id":1,"value":"loop"}]}}
+{"id":2000,"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":5,"outV":2000}]},"outE":{"msg_pass_test_edge":[{"id":4,"inV":2001},{"id":5,"inV":2000}]},"properties":{"propertyin":[{"id":2,"value":"a"}]}}
+{"id":2001,"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":4,"outV":2000}]},"properties":{"propertyin":[{"id":3,"value":"b"}]}}
+{"id":1000,"label":"loops","inE":{"self":[{"id":1,"outV":1000}]},"outE":{"self":[{"id":1,"inV":1000}]},"properties":{"name":[{"id":0,"value":"loop"}]}}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0490a082/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/gryo/tinkerpop-sink.kryo
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/gryo/tinkerpop-sink.kryo b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/gryo/tinkerpop-sink.kryo
index 9a26e15..25419fa 100644
Binary files a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/gryo/tinkerpop-sink.kryo and b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/gryo/tinkerpop-sink.kryo differ

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0490a082/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerFactory.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerFactory.java b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerFactory.java
index 96d26ca..4e2989d 100644
--- a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerFactory.java
+++ b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerFactory.java
@@ -149,6 +149,13 @@ public final class TinkerFactory {
         g.addV("loops").property(T.id, 1000).property("name", "loop").as("me").
           addE("self").to("me").
           iterate();
+        final String LABEL = "message_passing_test";
+        final String EDGE_LABEL = "msg_pass_test_edge";
+        final String PROPERTY_IN = "propertyin";
+        Vertex a = graph.addVertex(T.id, 2000, T.label, LABEL, PROPERTY_IN, "a");
+        Vertex b = graph.addVertex(T.id, 2001, T.label, LABEL, PROPERTY_IN, "b");
+        a.addEdge(EDGE_LABEL, b);
+        a.addEdge(EDGE_LABEL, a);
     }
 
     private static TinkerGraph getTinkerGraphWithNumberManager() {


[47/50] tinkerpop git commit: fixed link - CTR

Posted by dk...@apache.org.
fixed link - CTR


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

Branch: refs/heads/TINKERPOP-1447
Commit: 97fb12e79edfcf613f9a988beca4be731fc0ac48
Parents: 34f924e
Author: Robert Dale <ro...@gmail.com>
Authored: Fri Mar 9 07:33:03 2018 -0500
Committer: Robert Dale <ro...@gmail.com>
Committed: Fri Mar 9 07:33:03 2018 -0500

----------------------------------------------------------------------
 docs/src/index.asciidoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/97fb12e7/docs/src/index.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/index.asciidoc b/docs/src/index.asciidoc
index 5cc3dd5..f07bd99 100644
--- a/docs/src/index.asciidoc
+++ b/docs/src/index.asciidoc
@@ -57,7 +57,7 @@ Note the "+" following the link in each table entry - it forces an asciidoc line
 A gentle introduction to TinkerPop and the Gremlin traversal language that is divided into five, ten and fifteen minute tutorial blocks.
 |image:gremlin-dashboard.png[] |link:http://tinkerpop.apache.org/docs/x.y.z/tutorials/the-gremlin-console/[The Gremlin Console] +
 Provides a detailed look at The Gremlin Console and how it can be used when working with TinkerPop.
-^|image:gremlin-anatomy.png[width=125] |link:http://tinkerpop.apache.org/docs/x.y.z/gremlins-anatomy/[Gremlin's Anatomy]
+^|image:gremlin-anatomy.png[width=125] |link:http://tinkerpop.apache.org/docs/x.y.z/tutorials/gremlins-anatomy/[Gremlin's Anatomy]
 Identifies and explains the component parts of a Gremlin traversal.
 ^|image:gremlin-chef.png[width=125] |link:http://tinkerpop.apache.org/docs/x.y.z/recipes/[Gremlin Recipes]
 A collection of best practices and common traversal patterns for Gremlin.


[11/50] tinkerpop git commit: Test bug fix and refactoring repeated code

Posted by dk...@apache.org.
Test bug fix and refactoring repeated code


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

Branch: refs/heads/TINKERPOP-1447
Commit: 5467a33f2e17ad22b736effebede124556f049ed
Parents: 153238b
Author: Graff, Philip B <Ph...@jhuapl.edu>
Authored: Sun Jan 14 13:44:33 2018 -0500
Committer: Graff, Philip B <Ph...@jhuapl.edu>
Committed: Sun Feb 25 10:44:53 2018 -0500

----------------------------------------------------------------------
 .../process/computer/GraphComputerTest.java     | 28 +++++++++-----------
 1 file changed, 12 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5467a33f/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
index 785f03d..da0e53f 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
@@ -2689,12 +2689,8 @@ public class GraphComputerTest extends AbstractGremlinProcessTest {
 
     @Test
     public void testMessagePassingIn() throws Exception {
-        runTest(Direction.BOTH).forEachRemaining(v -> {
-            assertEquals(2, v.keys().size());
-            assertTrue(v.keys().contains(VertexProgramR.PROPERTY_IN));
-            assertTrue(v.keys().contains(VertexProgramR.PROPERTY_OUT));
-            assertEquals(1, IteratorUtils.count(v.values(VertexProgramR.PROPERTY_IN)));
-            assertEquals(1, IteratorUtils.count(v.values(VertexProgramR.PROPERTY_OUT)));
+        runTest(Direction.IN).forEachRemaining(v -> {
+            vertexPropertyChecks(v);
             final String in = v.value(VertexProgramR.PROPERTY_IN);
             if (in.equals("a"))
                 assertEquals("ab", v.value(VertexProgramR.PROPERTY_OUT).toString());
@@ -2709,11 +2705,7 @@ public class GraphComputerTest extends AbstractGremlinProcessTest {
     @Test
     public void testMessagePassingOut() throws Exception {
         runTest(Direction.OUT).forEachRemaining(v -> {
-            assertEquals(2, v.keys().size());
-            assertTrue(v.keys().contains(VertexProgramR.PROPERTY_IN));
-            assertTrue(v.keys().contains(VertexProgramR.PROPERTY_OUT));
-            assertEquals(1, IteratorUtils.count(v.values(VertexProgramR.PROPERTY_IN)));
-            assertEquals(1, IteratorUtils.count(v.values(VertexProgramR.PROPERTY_OUT)));
+            vertexPropertyChecks(v);
             final String in = v.value(VertexProgramR.PROPERTY_IN);
             if (in.equals("a"))
                 assertEquals("a", v.value(VertexProgramR.PROPERTY_OUT).toString());
@@ -2728,11 +2720,7 @@ public class GraphComputerTest extends AbstractGremlinProcessTest {
     @Test
     public void testMessagePassingBoth() throws Exception {
         runTest(Direction.BOTH).forEachRemaining(v -> {
-            assertEquals(2, v.keys().size());
-            assertTrue(v.keys().contains(VertexProgramR.PROPERTY_IN));
-            assertTrue(v.keys().contains(VertexProgramR.PROPERTY_OUT));
-            assertEquals(1, IteratorUtils.count(v.values(VertexProgramR.PROPERTY_IN)));
-            assertEquals(1, IteratorUtils.count(v.values(VertexProgramR.PROPERTY_OUT)));
+            vertexPropertyChecks(v);
             final String in = v.value(VertexProgramR.PROPERTY_IN);
             if (in.equals("a"))
                 assertEquals("aab", v.value(VertexProgramR.PROPERTY_OUT).toString());
@@ -2754,6 +2742,14 @@ public class GraphComputerTest extends AbstractGremlinProcessTest {
         return result.graph().traversal().V();
     }
 
+    private static void vertexPropertyChecks(Vertex v) {
+        assertEquals(2, v.keys().size());
+        assertTrue(v.keys().contains(VertexProgramR.PROPERTY_IN));
+        assertTrue(v.keys().contains(VertexProgramR.PROPERTY_OUT));
+        assertEquals(1, IteratorUtils.count(v.values(VertexProgramR.PROPERTY_IN)));
+        assertEquals(1, IteratorUtils.count(v.values(VertexProgramR.PROPERTY_OUT)));
+    }
+
     private static class VertexProgramR implements VertexProgram<String> {
         private static final String SIMPLE_VERTEX_PROGRAM_CFG_PREFIX = "gremlin.simpleVertexProgram";
         private static final String PROPERTY_OUT = "propertyout";


[31/50] tinkerpop git commit: Updated test class for loading "sink" data to spark CTR

Posted by dk...@apache.org.
Updated test class for loading "sink" data to spark CTR


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

Branch: refs/heads/TINKERPOP-1447
Commit: a61dd58eea353637d74086426e4258de5927a8d9
Parents: 2350cbe
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Mar 1 13:45:22 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Mar 1 13:45:22 2018 -0500

----------------------------------------------------------------------
 .../tinkerpop/gremlin/spark/structure/io/ToyGraphInputRDD.java     | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a61dd58e/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/structure/io/ToyGraphInputRDD.java
----------------------------------------------------------------------
diff --git a/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/structure/io/ToyGraphInputRDD.java b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/structure/io/ToyGraphInputRDD.java
index 4cd8cea..72b5b9a 100644
--- a/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/structure/io/ToyGraphInputRDD.java
+++ b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/structure/io/ToyGraphInputRDD.java
@@ -55,6 +55,8 @@ public final class ToyGraphInputRDD implements InputRDD {
             vertices = IteratorUtils.list(IteratorUtils.map(TinkerFactory.createClassic().vertices(), VertexWritable::new));
         else if (configuration.getString(Constants.GREMLIN_HADOOP_INPUT_LOCATION).contains("crew"))
             vertices = IteratorUtils.list(IteratorUtils.map(TinkerFactory.createTheCrew().vertices(), VertexWritable::new));
+        else if (configuration.getString(Constants.GREMLIN_HADOOP_INPUT_LOCATION).contains("sink"))
+            vertices = IteratorUtils.list(IteratorUtils.map(TinkerFactory.createKitchenSink().vertices(), VertexWritable::new));
         else if (configuration.getString(Constants.GREMLIN_HADOOP_INPUT_LOCATION).contains("grateful")) {
             try {
                 final Graph graph = TinkerGraph.open();


[46/50] tinkerpop git commit: fix build docs error - CTR

Posted by dk...@apache.org.
fix build docs error - CTR


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

Branch: refs/heads/TINKERPOP-1447
Commit: 34f924e50db3a20a3ba538c4e16bbfcfa9e7b873
Parents: 7bff988
Author: Robert Dale <ro...@gmail.com>
Authored: Thu Mar 8 15:52:40 2018 -0500
Committer: Robert Dale <ro...@gmail.com>
Committed: Thu Mar 8 15:52:40 2018 -0500

----------------------------------------------------------------------
 docs/src/recipes/olap-spark-yarn.asciidoc | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/34f924e5/docs/src/recipes/olap-spark-yarn.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/recipes/olap-spark-yarn.asciidoc b/docs/src/recipes/olap-spark-yarn.asciidoc
index 634adeb..1543829 100644
--- a/docs/src/recipes/olap-spark-yarn.asciidoc
+++ b/docs/src/recipes/olap-spark-yarn.asciidoc
@@ -105,6 +105,7 @@ conf.setProperty('spark.executor.extraClassPath', "./$archive/*:$hadoopConfDir")
 conf.setProperty('spark.driver.extraLibraryPath', "$hadoop/lib/native:$hadoop/lib/native/Linux-amd64-64")
 conf.setProperty('spark.executor.extraLibraryPath', "$hadoop/lib/native:$hadoop/lib/native/Linux-amd64-64")
 conf.setProperty('gremlin.spark.persistContext', 'true')
+hdfs.copyFromLocal('data/tinkerpop-modern.kryo', 'tinkerpop-modern.kryo')
 graph = GraphFactory.open(conf)
 g = graph.traversal().withComputer(SparkGraphComputer)
 g.V().group().by(values('name')).by(both().count())


[22/50] tinkerpop git commit: Removed more ignored GLV tests for .NET

Posted by dk...@apache.org.
Removed more ignored GLV tests for .NET

Not sure why these suddenly pass. Makes me wonder if they were ever really failing in the first place. CTR


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

Branch: refs/heads/TINKERPOP-1447
Commit: 85b733879abd7836f400ecff969eaee0a5b517f2
Parents: 2c96d42
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Mar 1 09:06:26 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Mar 1 09:07:01 2018 -0500

----------------------------------------------------------------------
 .../Gherkin/GherkinTestRunner.cs                            | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/85b73387/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
index 402a910..7fa9716 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
@@ -38,12 +38,8 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
     public class GherkinTestRunner
     {
         private static readonly IDictionary<string, IgnoreReason> IgnoredScenarios = new Dictionary<string, IgnoreReason> {
-            { "g_V_hasLabelXpersonX_hasXage_notXlteX10X_andXnotXbetweenX11_20XXXX_andXltX29X_orXeqX35XXXX_name", IgnoreReason.NeedsFurtherInvestigation },
-            { "g_VX1X_out_aggregateXxX_out_whereXnotXwithinXaXXX", IgnoreReason.NeedsFurtherInvestigation },
-            { "g_V_asXaX_out_asXbX_whereXandXasXaX_outXknowsX_asXbX__orXasXbX_outXcreatedX_hasXname_rippleX__asXbX_inXknowsX_count_isXnotXeqX0XXXXX_selectXa_bX", IgnoreReason.NeedsFurtherInvestigation },
-            { "g_V_asXaX_outXcreatedX_asXbX_inXcreatedX_asXcX_bothXknowsX_bothXknowsX_asXdX_whereXc__notXeqXaX_orXeqXdXXXX_selectXa_b_c_dX", IgnoreReason.NeedsFurtherInvestigation },
-            { "g_V_asXaX_outEXcreatedX_asXbX_inV_asXcX_whereXa_gtXbX_orXeqXbXXX_byXageX_byXweightX_byXweightX_selectXa_cX_byXnameX", IgnoreReason.NeedsFurtherInvestigation },
-            { "g_V_asXaX_outEXcreatedX_asXbX_inV_asXcX_inXcreatedX_asXdX_whereXa_ltXbX_orXgtXcXX_andXneqXdXXX_byXageX_byXweightX_byXinXcreatedX_valuesXageX_minX_selectXa_c_dX", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_V_hasLabelXpersonX_hasXage_notXlteX10X_andXnotXbetweenX11_20XXXX_andXltX29X_orXeqX35XXXX_name", IgnoreReason.NeedsFurtherInvestigation }, // TINKERPOP-1859??
+            { "g_VX1X_out_aggregateXxX_out_whereXnotXwithinXaXXX", IgnoreReason.NeedsFurtherInvestigation }, // TINKERPOP-1859??
             { "g_withBulkXfalseX_withSackX1_sumX_VX1X_localXoutEXknowsX_barrierXnormSackX_inVX_inXknowsX_barrier_sack", IgnoreReason.NeedsFurtherInvestigation },
             { "g_withBulkXfalseX_withSackX1_sumX_V_out_barrier_sack", IgnoreReason.NeedsFurtherInvestigation },
             { "g_withSackX1_sumX_VX1X_localXoutXknowsX_barrierXnormSackXX_inXknowsX_barrier_sack", IgnoreReason.NeedsFurtherInvestigation },
@@ -52,7 +48,6 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
             { "g_V_outE_weight_groupCount_selectXkeysX_unfold", IgnoreReason.NeedsFurtherInvestigation },
             { "g_V_foo_injectX9999999999X_min", IgnoreReason.NeedsFurtherInvestigation },
             { "g_V_hasLabelXpersonX_group_byXnameX_byXoutE_weight_sumX_orderXlocalX_byXvaluesX", IgnoreReason.NeedsFurtherInvestigation },
-            { "g_V_localXbothE_weight_foldX_order_byXsumXlocalX_decrX", IgnoreReason.NeedsFurtherInvestigation },
             { "g_V_hasLabelXpersonX_group_byXnameX_byXoutE_weight_sumX_unfold_order_byXvalues_decrX", IgnoreReason.NeedsFurtherInvestigation }
         };
         


[12/50] tinkerpop git commit: Updating kitchen sink graph

Posted by dk...@apache.org.
Updating kitchen sink graph


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

Branch: refs/heads/TINKERPOP-1447
Commit: febe0ac8ecdf1828233017864b629a644c7260a8
Parents: 5467a33
Author: Graff, Philip B <Ph...@jhuapl.edu>
Authored: Sun Feb 25 12:22:39 2018 -0500
Committer: Graff, Philip B <Ph...@jhuapl.edu>
Committed: Sun Feb 25 12:22:39 2018 -0500

----------------------------------------------------------------------
 data/tinkerpop-sink-typed.json      |   2 ++
 data/tinkerpop-sink-v2d0-typed.json |   2 ++
 data/tinkerpop-sink-v2d0.json       |   2 ++
 data/tinkerpop-sink.json            |   2 ++
 data/tinkerpop-sink.kryo            | Bin 76 -> 291 bytes
 5 files changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/febe0ac8/data/tinkerpop-sink-typed.json
----------------------------------------------------------------------
diff --git a/data/tinkerpop-sink-typed.json b/data/tinkerpop-sink-typed.json
index f62a717..1bbdcff 100644
--- a/data/tinkerpop-sink-typed.json
+++ b/data/tinkerpop-sink-typed.json
@@ -1 +1,3 @@
 {"@class":"java.util.HashMap","id":["java.lang.Long",0],"label":"loops","inE":{"@class":"java.util.HashMap","self":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",2],"outV":["java.lang.Long",0]}]]},"outE":{"@class":"java.util.HashMap","self":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",2],"inV":["java.lang.Long",0]}]]},"properties":{"@class":"java.util.HashMap","name":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",1],"value":"loop"}]]}}
+{"@class":"java.util.HashMap","id":["java.lang.Long",1],"label":"message_passing_test","inE":{"@class":"java.util.HashMap","msg_pass_test_edge":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",6],"outV":["java.lang.Long",1]}]]},"outE":{"@class":"java.util.HashMap","msg_pass_test_edge":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",5],"inV":["java.lang.Long",2]},{"@class":"java.util.HashMap","id":["java.lang.Long",6],"inV":["java.lang.Long",1]}]]},"properties":{"@class":"java.util.HashMap","propertyin":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",3],"value":"a"}]]}}
+{"@class":"java.util.HashMap","id":["java.lang.Long",2],"label":"message_passing_test","inE":{"@class":"java.util.HashMap","msg_pass_test_edge":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",5],"outV":["java.lang.Long",1]}]]},"properties":{"@class":"java.util.HashMap","propertyin":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",4],"value":"b"}]]}}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/febe0ac8/data/tinkerpop-sink-v2d0-typed.json
----------------------------------------------------------------------
diff --git a/data/tinkerpop-sink-v2d0-typed.json b/data/tinkerpop-sink-v2d0-typed.json
index df22167..ecb5c52 100644
--- a/data/tinkerpop-sink-v2d0-typed.json
+++ b/data/tinkerpop-sink-v2d0-typed.json
@@ -1 +1,3 @@
 {"id":{"@type":"g:Int64","@value":0},"label":"loops","inE":{"self":[{"id":{"@type":"g:Int64","@value":2},"outV":{"@type":"g:Int64","@value":0}}]},"outE":{"self":[{"id":{"@type":"g:Int64","@value":2},"inV":{"@type":"g:Int64","@value":0}}]},"properties":{"name":[{"id":{"@type":"g:Int64","@value":1},"value":"loop"}]}}
+{"id":{"@type":"g:Int64","@value":1},"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":{"@type":"g:Int64","@value":6},"outV":{"@type":"g:Int64","@value":1}}]},"outE":{"msg_pass_test_edge":[{"id":{"@type":"g:Int64","@value":5},"inV":{"@type":"g:Int64","@value":2}},{"id":{"@type":"g:Int64","@value":6},"inV":{"@type":"g:Int64","@value":1}}]},"properties":{"propertyin":[{"id":{"@type":"g:Int64","@value":3},"value":"a"}]}}
+{"id":{"@type":"g:Int64","@value":2},"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":{"@type":"g:Int64","@value":5},"outV":{"@type":"g:Int64","@value":1}}]},"properties":{"propertyin":[{"id":{"@type":"g:Int64","@value":4},"value":"b"}]}}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/febe0ac8/data/tinkerpop-sink-v2d0.json
----------------------------------------------------------------------
diff --git a/data/tinkerpop-sink-v2d0.json b/data/tinkerpop-sink-v2d0.json
index 39496ba..1eade99 100644
--- a/data/tinkerpop-sink-v2d0.json
+++ b/data/tinkerpop-sink-v2d0.json
@@ -1 +1,3 @@
 {"id":0,"label":"loops","inE":{"self":[{"id":2,"outV":0}]},"outE":{"self":[{"id":2,"inV":0}]},"properties":{"name":[{"id":1,"value":"loop"}]}}
+{"id":1,"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":5,"outV":1}]},"outE":{"msg_pass_test_edge":[{"id":4,"inV":2},{"id":5,"inV":1}]},"properties":{"propertyin":[{"id":0,"value":"a"}]}}
+{"id":2,"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":4,"outV":1}]},"properties":{"propertyin":[{"id":3,"value":"b"}]}}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/febe0ac8/data/tinkerpop-sink.json
----------------------------------------------------------------------
diff --git a/data/tinkerpop-sink.json b/data/tinkerpop-sink.json
index 39496ba..1eade99 100644
--- a/data/tinkerpop-sink.json
+++ b/data/tinkerpop-sink.json
@@ -1 +1,3 @@
 {"id":0,"label":"loops","inE":{"self":[{"id":2,"outV":0}]},"outE":{"self":[{"id":2,"inV":0}]},"properties":{"name":[{"id":1,"value":"loop"}]}}
+{"id":1,"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":5,"outV":1}]},"outE":{"msg_pass_test_edge":[{"id":4,"inV":2},{"id":5,"inV":1}]},"properties":{"propertyin":[{"id":0,"value":"a"}]}}
+{"id":2,"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":4,"outV":1}]},"properties":{"propertyin":[{"id":3,"value":"b"}]}}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/febe0ac8/data/tinkerpop-sink.kryo
----------------------------------------------------------------------
diff --git a/data/tinkerpop-sink.kryo b/data/tinkerpop-sink.kryo
index 9a26e15..5f5da45 100644
Binary files a/data/tinkerpop-sink.kryo and b/data/tinkerpop-sink.kryo differ


[20/50] tinkerpop git commit: Fixed a GLV test definition.

Posted by dk...@apache.org.
Fixed a GLV test definition.

This allowed some ignored tests to pass CTR


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

Branch: refs/heads/TINKERPOP-1447
Commit: 6cfdfa93787ff7620ac73dcda70dc8e11be519cc
Parents: d520516
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Mar 1 08:35:57 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Mar 1 08:35:57 2018 -0500

----------------------------------------------------------------------
 .../test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs  | 2 --
 gremlin-test/features/map/Match.feature                            | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6cfdfa93/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
index 69af86f..627570c 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
@@ -39,7 +39,6 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
     {
         private static readonly IDictionary<string, IgnoreReason> IgnoredScenarios = new Dictionary<string, IgnoreReason> {
             { "g_V_hasLabelXpersonX_hasXage_notXlteX10X_andXnotXbetweenX11_20XXXX_andXltX29X_orXeqX35XXXX_name", IgnoreReason.NeedsFurtherInvestigation },
-            { "g_V_hasIdXwithinXemptyXX_count", IgnoreReason.NeedsFurtherInvestigation },
             { "g_VX1X_out_aggregateXxX_out_whereXnotXwithinXaXXX", IgnoreReason.NeedsFurtherInvestigation },
             { "g_V_asXaX_out_asXbX_whereXandXasXaX_outXknowsX_asXbX__orXasXbX_outXcreatedX_hasXname_rippleX__asXbX_inXknowsX_count_isXnotXeqX0XXXXX_selectXa_bX", IgnoreReason.NeedsFurtherInvestigation },
             { "g_V_asXaX_outXcreatedX_asXbX_inXcreatedX_asXcX_bothXknowsX_bothXknowsX_asXdX_whereXc__notXeqXaX_orXeqXdXXXX_selectXa_b_c_dX", IgnoreReason.NeedsFurtherInvestigation },
@@ -53,7 +52,6 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
             { "g_V_outE_weight_groupCount_unfold_selectXkeysX_unfold", IgnoreReason.NeedsFurtherInvestigation },
             { "g_V_outE_weight_groupCount_selectXkeysX_unfold", IgnoreReason.NeedsFurtherInvestigation },
             { "g_V_asXaX_out_asXbX_matchXa_out_count_c__b_in_count_cX", IgnoreReason.NeedsFurtherInvestigation },
-            { "g_V_matchXa_knows_b__andXa_created_c__b_created_c__andXb_created_count_d__a_knows_count_dXXX", IgnoreReason.NeedsFurtherInvestigation },
             { "g_V_foo_injectX9999999999X_min", IgnoreReason.NeedsFurtherInvestigation },
             { "g_V_hasLabelXpersonX_group_byXnameX_byXoutE_weight_sumX_orderXlocalX_byXvaluesX", IgnoreReason.NeedsFurtherInvestigation },
             { "g_V_localXbothE_weight_foldX_order_byXsumXlocalX_decrX", IgnoreReason.NeedsFurtherInvestigation },

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6cfdfa93/gremlin-test/features/map/Match.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/map/Match.feature b/gremlin-test/features/map/Match.feature
index 006692a..e44d363 100644
--- a/gremlin-test/features/map/Match.feature
+++ b/gremlin-test/features/map/Match.feature
@@ -230,7 +230,7 @@ Feature: Step - match()
     When iterated to list
     Then the result should be unordered
       | result |
-      | m[{"a":"v[marko]","b":"v[josh]","c":"v[lop]","d":2}] |
+      | m[{"a":"v[marko]","b":"v[josh]","c":"v[lop]","d":"d[2].l"}] |
 
   Scenario: g_V_matchXa_whereXa_neqXcXX__a_created_b__orXa_knows_vadas__a_0knows_and_a_hasXlabel_personXX__b_0created_c__b_0created_count_isXgtX1XXX_selectXa_b_cX_byXidX
     Given the modern graph


[43/50] tinkerpop git commit: TINKERPOP-1885 Add README for Gremlin.Net CTR

Posted by dk...@apache.org.
TINKERPOP-1885 Add README for Gremlin.Net CTR


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

Branch: refs/heads/TINKERPOP-1447
Commit: c1de9f2d0198f398da626a441b257257d30cea06
Parents: 0bc84bd
Author: Florian Hockmann <fh...@florian-hockmann.de>
Authored: Tue Mar 6 20:50:44 2018 +0100
Committer: Florian Hockmann <fh...@florian-hockmann.de>
Committed: Tue Mar 6 20:50:44 2018 +0100

----------------------------------------------------------------------
 gremlin-dotnet/README.md | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c1de9f2d/gremlin-dotnet/README.md
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/README.md b/gremlin-dotnet/README.md
new file mode 100644
index 0000000..de80335
--- /dev/null
+++ b/gremlin-dotnet/README.md
@@ -0,0 +1,40 @@
+<!--
+
+ 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.
+
+-->
+
+# Gremlin.Net
+
+[Apache TinkerPop™][tk] is a graph computing framework for both graph databases (OLTP) and graph analytic systems
+(OLAP). [Gremlin][gremlin] is the graph traversal language of TinkerPop. It can be described as a functional,
+data-flow language that enables users to succinctly express complex traversals on (or queries of) their application's
+property graph.
+
+Gremlin.Net implements Gremlin within the C# language. It targets .NET Standard and can therefore be used on different
+operating systems and with different .NET frameworks, such as .NET Framework and .NET Core.
+
+```bash
+nuget install Gremlin.Net
+```
+
+Please see the [reference documentation][docs] at Apache TinkerPop for more information.
+
+[tk]: http://tinkerpop.apache.org
+[gremlin]: http://tinkerpop.apache.org/gremlin.html
+[docs]: http://tinkerpop.apache.org/docs/current/reference/#gremlin-DotNet
\ No newline at end of file


[16/50] tinkerpop git commit: Updated branching strategy now that tp33 is present CTR

Posted by dk...@apache.org.
Updated branching strategy now that tp33 is present CTR


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

Branch: refs/heads/TINKERPOP-1447
Commit: 1a857da8a09bb5289296493f21ba89b581e77882
Parents: 072f112
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Feb 27 08:51:18 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Feb 27 08:51:18 2018 -0500

----------------------------------------------------------------------
 docs/src/dev/developer/for-committers.asciidoc | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1a857da8/docs/src/dev/developer/for-committers.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/dev/developer/for-committers.asciidoc b/docs/src/dev/developer/for-committers.asciidoc
index b44de9a..c8b5559 100644
--- a/docs/src/dev/developer/for-committers.asciidoc
+++ b/docs/src/dev/developer/for-committers.asciidoc
@@ -65,10 +65,11 @@ TinkerPop has several release branches:
 * `tp30` - 3.0.x (no longer maintained)
 * `tp31` - 3.1.x (no longer maintained)
 * `tp32` - 3.2.x (bug fixes and documentation updates only)
-* `master` - 3.3.x
+* `tp33` - 3.3.x (current development)
+* `master` - 3.4.x (future development)
 
-Changes to `tp32` should merge to `master`. Please read more about this process in the <<pull-requests, Pull Requests>>
-section.
+Changes to `tp32` should merge to `tp33` and then `tp33` to `master`. Please read more about this process in the
+<<pull-requests, Pull Requests>> section.
 
 Other branches may be created for collaborating on features or for RFC's that other developers may want to inspect.
 It is suggested that the JIRA issue ID be used as the prefix, since that triggers certain automation, and it provides a


[14/50] tinkerpop git commit: Revert "Updating kitchen sink graph"

Posted by dk...@apache.org.
Revert "Updating kitchen sink graph"

This reverts commit febe0ac8ecdf1828233017864b629a644c7260a8.


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

Branch: refs/heads/TINKERPOP-1447
Commit: b0b124b84c597079b271adb0dec2044f0c2ec9b3
Parents: f03c4df
Author: Graff, Philip B <Ph...@jhuapl.edu>
Authored: Sun Feb 25 16:15:40 2018 -0500
Committer: Graff, Philip B <Ph...@jhuapl.edu>
Committed: Sun Feb 25 16:15:40 2018 -0500

----------------------------------------------------------------------
 data/tinkerpop-sink-typed.json      |   2 --
 data/tinkerpop-sink-v2d0-typed.json |   2 --
 data/tinkerpop-sink-v2d0.json       |   2 --
 data/tinkerpop-sink.json            |   2 --
 data/tinkerpop-sink.kryo            | Bin 291 -> 76 bytes
 5 files changed, 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b0b124b8/data/tinkerpop-sink-typed.json
----------------------------------------------------------------------
diff --git a/data/tinkerpop-sink-typed.json b/data/tinkerpop-sink-typed.json
index 1bbdcff..f62a717 100644
--- a/data/tinkerpop-sink-typed.json
+++ b/data/tinkerpop-sink-typed.json
@@ -1,3 +1 @@
 {"@class":"java.util.HashMap","id":["java.lang.Long",0],"label":"loops","inE":{"@class":"java.util.HashMap","self":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",2],"outV":["java.lang.Long",0]}]]},"outE":{"@class":"java.util.HashMap","self":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",2],"inV":["java.lang.Long",0]}]]},"properties":{"@class":"java.util.HashMap","name":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",1],"value":"loop"}]]}}
-{"@class":"java.util.HashMap","id":["java.lang.Long",1],"label":"message_passing_test","inE":{"@class":"java.util.HashMap","msg_pass_test_edge":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",6],"outV":["java.lang.Long",1]}]]},"outE":{"@class":"java.util.HashMap","msg_pass_test_edge":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",5],"inV":["java.lang.Long",2]},{"@class":"java.util.HashMap","id":["java.lang.Long",6],"inV":["java.lang.Long",1]}]]},"properties":{"@class":"java.util.HashMap","propertyin":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",3],"value":"a"}]]}}
-{"@class":"java.util.HashMap","id":["java.lang.Long",2],"label":"message_passing_test","inE":{"@class":"java.util.HashMap","msg_pass_test_edge":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",5],"outV":["java.lang.Long",1]}]]},"properties":{"@class":"java.util.HashMap","propertyin":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",4],"value":"b"}]]}}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b0b124b8/data/tinkerpop-sink-v2d0-typed.json
----------------------------------------------------------------------
diff --git a/data/tinkerpop-sink-v2d0-typed.json b/data/tinkerpop-sink-v2d0-typed.json
index ecb5c52..df22167 100644
--- a/data/tinkerpop-sink-v2d0-typed.json
+++ b/data/tinkerpop-sink-v2d0-typed.json
@@ -1,3 +1 @@
 {"id":{"@type":"g:Int64","@value":0},"label":"loops","inE":{"self":[{"id":{"@type":"g:Int64","@value":2},"outV":{"@type":"g:Int64","@value":0}}]},"outE":{"self":[{"id":{"@type":"g:Int64","@value":2},"inV":{"@type":"g:Int64","@value":0}}]},"properties":{"name":[{"id":{"@type":"g:Int64","@value":1},"value":"loop"}]}}
-{"id":{"@type":"g:Int64","@value":1},"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":{"@type":"g:Int64","@value":6},"outV":{"@type":"g:Int64","@value":1}}]},"outE":{"msg_pass_test_edge":[{"id":{"@type":"g:Int64","@value":5},"inV":{"@type":"g:Int64","@value":2}},{"id":{"@type":"g:Int64","@value":6},"inV":{"@type":"g:Int64","@value":1}}]},"properties":{"propertyin":[{"id":{"@type":"g:Int64","@value":3},"value":"a"}]}}
-{"id":{"@type":"g:Int64","@value":2},"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":{"@type":"g:Int64","@value":5},"outV":{"@type":"g:Int64","@value":1}}]},"properties":{"propertyin":[{"id":{"@type":"g:Int64","@value":4},"value":"b"}]}}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b0b124b8/data/tinkerpop-sink-v2d0.json
----------------------------------------------------------------------
diff --git a/data/tinkerpop-sink-v2d0.json b/data/tinkerpop-sink-v2d0.json
index 1eade99..39496ba 100644
--- a/data/tinkerpop-sink-v2d0.json
+++ b/data/tinkerpop-sink-v2d0.json
@@ -1,3 +1 @@
 {"id":0,"label":"loops","inE":{"self":[{"id":2,"outV":0}]},"outE":{"self":[{"id":2,"inV":0}]},"properties":{"name":[{"id":1,"value":"loop"}]}}
-{"id":1,"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":5,"outV":1}]},"outE":{"msg_pass_test_edge":[{"id":4,"inV":2},{"id":5,"inV":1}]},"properties":{"propertyin":[{"id":0,"value":"a"}]}}
-{"id":2,"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":4,"outV":1}]},"properties":{"propertyin":[{"id":3,"value":"b"}]}}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b0b124b8/data/tinkerpop-sink.json
----------------------------------------------------------------------
diff --git a/data/tinkerpop-sink.json b/data/tinkerpop-sink.json
index 1eade99..39496ba 100644
--- a/data/tinkerpop-sink.json
+++ b/data/tinkerpop-sink.json
@@ -1,3 +1 @@
 {"id":0,"label":"loops","inE":{"self":[{"id":2,"outV":0}]},"outE":{"self":[{"id":2,"inV":0}]},"properties":{"name":[{"id":1,"value":"loop"}]}}
-{"id":1,"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":5,"outV":1}]},"outE":{"msg_pass_test_edge":[{"id":4,"inV":2},{"id":5,"inV":1}]},"properties":{"propertyin":[{"id":0,"value":"a"}]}}
-{"id":2,"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":4,"outV":1}]},"properties":{"propertyin":[{"id":3,"value":"b"}]}}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b0b124b8/data/tinkerpop-sink.kryo
----------------------------------------------------------------------
diff --git a/data/tinkerpop-sink.kryo b/data/tinkerpop-sink.kryo
index 5f5da45..9a26e15 100644
Binary files a/data/tinkerpop-sink.kryo and b/data/tinkerpop-sink.kryo differ


[30/50] tinkerpop git commit: TINKERPOP-1894 Fixed deserialization of P.not() for GraphSON 2.x

Posted by dk...@apache.org.
TINKERPOP-1894 Fixed deserialization of P.not() for GraphSON 2.x

javascript and python GLVs seemed to respond well to this fix, but .NET did not. The related tests are still failing.


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

Branch: refs/heads/TINKERPOP-1447
Commit: 2350cbe04b5a4ed3fdca389b8a345017a4bc7d0a
Parents: aaf5146
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Mar 1 12:04:42 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Mar 1 12:06:43 2018 -0500

----------------------------------------------------------------------
 CHANGELOG.asciidoc                                       |  1 +
 .../gremlin/structure/io/graphson/GraphSONTokens.java    |  1 +
 .../structure/io/graphson/TraversalSerializersV2d0.java  |  2 ++
 .../ser/GraphSONMessageSerializerGremlinV2d0Test.java    | 11 +++++++++++
 .../gremlin-javascript/test/cucumber/feature-steps.js    |  4 ----
 gremlin-python/src/main/jython/radish/feature_steps.py   |  5 -----
 6 files changed, 15 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2350cbe0/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 92e1d9e..a24b1fb 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 * Added `checkAdjacentVertices` option to `SubgraphStrategy`.
 * Modified `GremlinDslProcessor` so that it generated the `getAnonymousTraversalClass()` method to return the DSL version of `__`.
 * Added the "Kitchen Sink" test data set.
+* Fixed deserialization of `P.not()` for GraphSON.
 * Added `idleConnectionTimeout` and `keepAliveInterval` to Gremlin Server that enables a "ping" and auto-close for seemingly dead clients.
 * Fixed a bug in `NumberHelper` that led to wrong min/max results if numbers exceeded the Integer limits.
 * Delayed setting of the request identifier until `RequestMessage` construction by the builder.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2350cbe0/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTokens.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTokens.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTokens.java
index 9f0648a..7ec004a 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTokens.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTokens.java
@@ -72,6 +72,7 @@ public final class GraphSONTokens {
     public static final String ARGUMENTS = "arguments";
     public static final String PREDICATE = "predicate";
     public static final String AND = "and";
+    public static final String NOT = "not";
     public static final String OR = "or";
     public static final String SOURCE = "source";
     public static final String STEP = "step";

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2350cbe0/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/TraversalSerializersV2d0.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/TraversalSerializersV2d0.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/TraversalSerializersV2d0.java
index f399cfa..a696280 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/TraversalSerializersV2d0.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/TraversalSerializersV2d0.java
@@ -329,6 +329,8 @@ final class TraversalSerializersV2d0 {
 
             if (predicate.equals(GraphSONTokens.AND) || predicate.equals(GraphSONTokens.OR)) {
                 return predicate.equals(GraphSONTokens.AND) ? new AndP((List<P>) value) : new OrP((List<P>) value);
+            } else if (predicate.equals(GraphSONTokens.NOT) && value instanceof P) {
+                return P.not((P<?>) value);
             } else {
                 try {
                     if (value instanceof Collection) {

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2350cbe0/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerGremlinV2d0Test.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerGremlinV2d0Test.java b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerGremlinV2d0Test.java
index 1f7efda..fb9bfe2 100644
--- a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerGremlinV2d0Test.java
+++ b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerGremlinV2d0Test.java
@@ -22,6 +22,7 @@ import io.netty.buffer.ByteBuf;
 import io.netty.buffer.ByteBufAllocator;
 import io.netty.buffer.UnpooledByteBufAllocator;
 import org.apache.tinkerpop.gremlin.driver.MessageSerializer;
+import org.apache.tinkerpop.gremlin.driver.message.RequestMessage;
 import org.apache.tinkerpop.gremlin.driver.message.ResponseMessage;
 import org.apache.tinkerpop.gremlin.driver.message.ResponseStatusCode;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
@@ -329,6 +330,16 @@ public class GraphSONMessageSerializerGremlinV2d0Test {
         assertEquals(ResponseStatusCode.SUCCESS.getValue(), deserialized.getStatus().getCode().getValue());
         assertEquals("worked", deserialized.getStatus().getMessage());
     }
+
+    @Test
+    public void shouldDeserializeNotPredicate() throws Exception {
+        final String requestMessageWithP = "{\"requestId\":{\"@type\":\"g:UUID\",\"@value\":\"0397b9c0-ffab-470e-a6a8-644fc80c01d6\"},\"op\":\"bytecode\",\"processor\":\"traversal\",\"args\":{\"gremlin\":{\"@type\":\"g:Bytecode\",\"@value\":{\"step\":[[\"V\"],[\"hasLabel\",\"person\"],[\"has\",\"age\",{\"@type\":\"g:P\",\"@value\":{\"predicate\":\"not\",\"value\":{\"@type\":\"g:P\",\"@value\":{\"predicate\":\"lte\",\"value\":{\"@type\":\"g:Int32\",\"@value\":10}}}}}]]}},\"aliases\":{\"g\":\"gmodern\"}}}";
+        final ByteBuf bb = allocator.buffer(requestMessageWithP.length());
+        bb.writeBytes(requestMessageWithP.getBytes());
+        final RequestMessage m = serializer.deserializeRequest(bb);
+        assertEquals("bytecode", m.getOp());
+        assertNotNull(m.getArgs());
+    }
     
     private void assertCommon(final ResponseMessage response) {
         assertEquals(requestId, response.getRequestId());

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2350cbe0/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
----------------------------------------------------------------------
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
index 2bb6ef0..c4eaebc 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
@@ -61,10 +61,6 @@ const ignoreReason = {
 const ignoredScenarios = {
   // An associative array containing the scenario name as key, for example:
   // 'g_V_branchXlabel_eq_person': new IgnoreError(ignoreReason.lambdaNotSupported),
-  'g_V_hasLabelXpersonX_hasXage_notXlteX10X_andXnotXbetweenX11_20XXXX_andXltX29X_orXeqX35XXXX_name': new IgnoreError(ignoreReason.needsFurtherInvestigation),
-  'g_VX1X_out_aggregateXxX_out_whereXnotXwithinXaXXX': new IgnoreError(ignoreReason.needsFurtherInvestigation),
-  'g_V_asXaX_out_asXbX_whereXandXasXaX_outXknowsX_asXbX__orXasXbX_outXcreatedX_hasXname_rippleX__asXbX_inXknowsX_count_isXnotXeqX0XXXXX_selectXa_bX': new IgnoreError(ignoreReason.needsFurtherInvestigation),
-  'g_V_asXaX_outXcreatedX_asXbX_inXcreatedX_asXcX_bothXknowsX_bothXknowsX_asXdX_whereXc__notXeqXaX_orXeqXdXXXX_selectXa_b_c_dX': new IgnoreError(ignoreReason.needsFurtherInvestigation),
 };
 
 defineSupportCode(function(methods) {

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2350cbe0/gremlin-python/src/main/jython/radish/feature_steps.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/radish/feature_steps.py b/gremlin-python/src/main/jython/radish/feature_steps.py
index 3ba88a2..5cf9059 100644
--- a/gremlin-python/src/main/jython/radish/feature_steps.py
+++ b/gremlin-python/src/main/jython/radish/feature_steps.py
@@ -44,11 +44,6 @@ tail = __.tail
 
 ignores = [
     "g.V(v1Id).out().inject(v2).values(\"name\")",  # bug in attachment won't connect v2
-    # TINKERPOP-1859 - for the following...seems to be related to P.not processing
-    "g.V().hasLabel(\"person\").has(\"age\", P.not(P.lte(d10).and(P.not(P.between(d11, d20)))).and(P.lt(d29).or(P.eq(d35)))).values(\"name\")",
-    "g.V(v1Id).out().aggregate(\"x\").out().where(P.not(P.within(\"x\")))",
-    "g.V().as(\"a\").out().as(\"b\").where(__.and(__.as(\"a\").out(\"knows\").as(\"b\"), __.or(__.as(\"b\").out(\"created\").has(\"name\", \"ripple\"), __.as(\"b\").in(\"knows\").count().is(P.not(P.eq(0)))))).select(\"a\", \"b\")",
-    "g.V().as(\"a\").out(\"created\").as(\"b\").in(\"created\").as(\"c\").both(\"knows\").both(\"knows\").as(\"d\").where(\"c\", P.not(P.eq(\"a\").or(P.eq(\"d\")))).select(\"a\", \"b\", \"c\", \"d\")"
            ]
 
 


[29/50] tinkerpop git commit: CTR: Minor change in the doc generation process. In case of an error, we'll now see the last 10 lines first and after a short 5 second break the errornous file will be opened for full inspection. This should make i

Posted by dk...@apache.org.
CTR: Minor change in the doc generation process. In case of an error, we'll now
     see the last 10 lines first and after a short 5 second break the errornous
     file will be opened for full inspection. This should make it much easier to
     identify errors that are not obvious in the output of the last 10 lines.


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

Branch: refs/heads/TINKERPOP-1447
Commit: aaf51464d91e481f9bd943e9d21303122f8ca981
Parents: 8ef717f
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Thu Mar 1 09:15:48 2018 -0700
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Thu Mar 1 09:15:48 2018 -0700

----------------------------------------------------------------------
 docs/preprocessor/preprocess-file.sh | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/aaf51464/docs/preprocessor/preprocess-file.sh
----------------------------------------------------------------------
diff --git a/docs/preprocessor/preprocess-file.sh b/docs/preprocessor/preprocess-file.sh
index 0ca534a..d5076f1 100755
--- a/docs/preprocessor/preprocess-file.sh
+++ b/docs/preprocessor/preprocess-file.sh
@@ -76,6 +76,9 @@ function cleanup {
       echo -e "\n\e[1mLast 10 lines of ${output}:\e[0m\n"
       tail -n10 ${output}
       echo
+      echo "Opening ${output} for full inspection"
+      sleep 5
+      less ${output}
     fi
   fi
   rm -rf ${output} ${CONSOLE_HOME}/.ext


[04/50] tinkerpop git commit: Merge branch 'TINKERPOP-1726' into tp32

Posted by dk...@apache.org.
Merge branch 'TINKERPOP-1726' into tp32


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

Branch: refs/heads/TINKERPOP-1447
Commit: d9705644360763e7eff139358ae864c314925bd9
Parents: 3df6c58 1281878
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Feb 23 07:02:24 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Feb 23 07:02:24 2018 -0500

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 .../src/reference/gremlin-applications.asciidoc | 13 +++--
 .../upgrade/release-3.2.x-incubating.asciidoc   | 15 ++++++
 .../driver/handler/WebSocketClientHandler.java  |  5 +-
 gremlin-server/conf/gremlin-server-classic.yaml |  2 +
 .../conf/gremlin-server-modern-py.yaml          |  2 +
 .../conf/gremlin-server-modern-readonly.yaml    |  2 +
 gremlin-server/conf/gremlin-server-modern.yaml  |  2 +
 gremlin-server/conf/gremlin-server-neo4j.yaml   |  2 +
 gremlin-server/conf/gremlin-server-secure.yaml  |  2 +
 gremlin-server/conf/gremlin-server-spark.yaml   |  2 +
 gremlin-server/conf/gremlin-server.yaml         |  2 +
 .../gremlin/server/AbstractChannelizer.java     | 14 ++++-
 .../tinkerpop/gremlin/server/Channelizer.java   | 17 ++++++
 .../tinkerpop/gremlin/server/GremlinServer.java | 11 +++-
 .../tinkerpop/gremlin/server/Settings.java      | 18 ++++++-
 .../server/channel/WebSocketChannelizer.java    | 11 ++++
 .../server/channel/WsAndHttpChannelizer.java    | 28 +++++-----
 .../server/handler/OpSelectorHandler.java       | 35 +++++++++++++
 .../handler/WsAndHttpChannelizerHandler.java    | 11 +++-
 .../server/GremlinServerIntegrateTest.java      | 55 +++++++++++++++++++-
 .../gremlin/util/Log4jRecordingAppender.java    |  5 +-
 .../util/Log4jRecordingAppenderTest.java        |  2 +-
 .../remote/gremlin-server-integration.yaml      |  2 +
 .../server/gremlin-server-integration.yaml      |  2 +
 .../server/gremlin-server-performance.yaml      |  2 +
 26 files changed, 232 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d9705644/CHANGELOG.asciidoc
----------------------------------------------------------------------


[40/50] tinkerpop git commit: TINKERPOP-1885 Add Gremlin.Net logo to ref docs CTR

Posted by dk...@apache.org.
TINKERPOP-1885 Add Gremlin.Net logo to ref docs CTR


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

Branch: refs/heads/TINKERPOP-1447
Commit: c2940e1ee5020f7b767b33fe7a0d2a3d7e839e09
Parents: 2c6c151
Author: Florian Hockmann <fh...@florian-hockmann.de>
Authored: Tue Mar 6 20:06:48 2018 +0100
Committer: Florian Hockmann <fh...@florian-hockmann.de>
Committed: Tue Mar 6 20:06:48 2018 +0100

----------------------------------------------------------------------
 docs/src/reference/gremlin-variants.asciidoc |   2 +-
 docs/static/images/gremlin-dotnet-logo.png   | Bin 0 -> 40779 bytes
 2 files changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c2940e1e/docs/src/reference/gremlin-variants.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/gremlin-variants.asciidoc b/docs/src/reference/gremlin-variants.asciidoc
index 94bcac4..f06fe02 100644
--- a/docs/src/reference/gremlin-variants.asciidoc
+++ b/docs/src/reference/gremlin-variants.asciidoc
@@ -311,7 +311,7 @@ g.V().out().map(lambda: "x: len(x.get().value('name'))").sum().toList()
 [[gremlin-DotNet]]
 == Gremlin.Net
 
-Apache TinkerPop's Gremlin.Net implements Gremlin within the C# language. It targets .NET Standard and can
+image:gremlin-dotnet-logo.png[width=371,float=right] Apache TinkerPop's Gremlin.Net implements Gremlin within the C# language. It targets .NET Standard and can
 therefore be used on different operating systems and with different .NET frameworks, such as .NET Framework
 and link:https://www.microsoft.com/net/core[.NET Core]. Since the C# syntax is very similar to that of Java, it should be very easy to switch between
 Gremlin-Java and Gremlin.Net. The only major syntactical difference is that all method names in Gremlin.Net

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c2940e1e/docs/static/images/gremlin-dotnet-logo.png
----------------------------------------------------------------------
diff --git a/docs/static/images/gremlin-dotnet-logo.png b/docs/static/images/gremlin-dotnet-logo.png
new file mode 100644
index 0000000..30c96e4
Binary files /dev/null and b/docs/static/images/gremlin-dotnet-logo.png differ


[13/50] tinkerpop git commit: Updating message passing tests to use kitchen sink

Posted by dk...@apache.org.
Updating message passing tests to use kitchen sink


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

Branch: refs/heads/TINKERPOP-1447
Commit: f03c4df45473bafcf95d47f34467479f89af73a1
Parents: febe0ac
Author: Graff, Philip B <Ph...@jhuapl.edu>
Authored: Sun Feb 25 12:35:43 2018 -0500
Committer: Graff, Philip B <Ph...@jhuapl.edu>
Committed: Sun Feb 25 12:35:43 2018 -0500

----------------------------------------------------------------------
 .../process/computer/GraphComputerTest.java     | 21 ++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f03c4df4/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
index da0e53f..4cbe584 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
@@ -69,6 +69,7 @@ import java.util.concurrent.Future;
 
 import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData.GRATEFUL;
 import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData.MODERN;
+import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData.SINK;
 import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.outE;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
@@ -2688,8 +2689,9 @@ public class GraphComputerTest extends AbstractGremlinProcessTest {
     ///////////////////////////////////
 
     @Test
+    @LoadGraphWith(SINK)
     public void testMessagePassingIn() throws Exception {
-        runTest(Direction.IN).forEachRemaining(v -> {
+        runMPTest(Direction.IN).forEachRemaining(v -> {
             vertexPropertyChecks(v);
             final String in = v.value(VertexProgramR.PROPERTY_IN);
             if (in.equals("a"))
@@ -2703,8 +2705,9 @@ public class GraphComputerTest extends AbstractGremlinProcessTest {
     }
 
     @Test
+    @LoadGraphWith(SINK)
     public void testMessagePassingOut() throws Exception {
-        runTest(Direction.OUT).forEachRemaining(v -> {
+        runMPTest(Direction.OUT).forEachRemaining(v -> {
             vertexPropertyChecks(v);
             final String in = v.value(VertexProgramR.PROPERTY_IN);
             if (in.equals("a"))
@@ -2718,8 +2721,9 @@ public class GraphComputerTest extends AbstractGremlinProcessTest {
     }
 
     @Test
+    @LoadGraphWith(SINK)
     public void testMessagePassingBoth() throws Exception {
-        runTest(Direction.BOTH).forEachRemaining(v -> {
+        runMPTest(Direction.BOTH).forEachRemaining(v -> {
             vertexPropertyChecks(v);
             final String in = v.value(VertexProgramR.PROPERTY_IN);
             if (in.equals("a"))
@@ -2732,14 +2736,10 @@ public class GraphComputerTest extends AbstractGremlinProcessTest {
         });
     }
 
-    private GraphTraversal<Vertex, Vertex> runTest(Direction direction) throws Exception {
-        final Vertex a = graph.addVertex(VertexProgramR.PROPERTY_IN, "a");
-        final Vertex b = graph.addVertex(VertexProgramR.PROPERTY_IN, "b");
-        a.addEdge("edge", b);
-        a.addEdge("edge", a);
+    private GraphTraversal<Vertex, Vertex> runMPTest(Direction direction) throws Exception {
         final VertexProgramR svp = VertexProgramR.build().direction(direction).create();
-        final ComputerResult result = graphProvider.getGraphComputer(graph).program(svp).submit().get();
-        return result.graph().traversal().V();
+        final ComputerResult result = graphProvider.getGraphComputer(graph).program(svp).vertices(__.hasLabel(VertexProgramR.VERTEX_LABEL)).submit().get();
+        return result.graph().traversal().V().hasLabel(VertexProgramR.VERTEX_LABEL);
     }
 
     private static void vertexPropertyChecks(Vertex v) {
@@ -2754,6 +2754,7 @@ public class GraphComputerTest extends AbstractGremlinProcessTest {
         private static final String SIMPLE_VERTEX_PROGRAM_CFG_PREFIX = "gremlin.simpleVertexProgram";
         private static final String PROPERTY_OUT = "propertyout";
         private static final String PROPERTY_IN = "propertyin";
+        private static final String VERTEX_LABEL = "message_passing_test";
         private static final String DIRECTION_CFG_KEY = SIMPLE_VERTEX_PROGRAM_CFG_PREFIX + ".direction";
 
         private final MessageScope.Local<String> inMessageScope = MessageScope.Local.of(__::inE);


[45/50] tinkerpop git commit: Merge branch 'TINKERPOP-1738' into tp32

Posted by dk...@apache.org.
Merge branch 'TINKERPOP-1738' into tp32


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

Branch: refs/heads/TINKERPOP-1447
Commit: 7bff988961587c0bcf9644b520faa3ed72a79952
Parents: 03a96f8 f35f04a
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Mar 8 07:22:04 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Mar 8 07:22:04 2018 -0500

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 .../io/graphson/GraphSONTypeSerializer.java     | 94 ++++++--------------
 ...aphSONMapperV2d0PartialEmbeddedTypeTest.java | 32 +++++++
 gremlin-shaded/pom.xml                          |  2 +-
 4 files changed, 61 insertions(+), 68 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7bff9889/CHANGELOG.asciidoc
----------------------------------------------------------------------


[27/50] tinkerpop git commit: Added friendWeight to type info in .NET

Posted by dk...@apache.org.
Added friendWeight to type info in .NET

Tests were failing for .NET as a result of the missing type information. We really shouldn't have tests that modify the toy graphs, but something to resolve another day. CTR


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

Branch: refs/heads/TINKERPOP-1447
Commit: 153f852b3abbe801f77d4cc3cd15ca8bc88ad5ed
Parents: c972512
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Mar 1 10:22:59 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Mar 1 10:22:59 2018 -0500

----------------------------------------------------------------------
 .../test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs | 3 +--
 .../Gherkin/TraversalEvaluation/ModernGraphTypeInformation.cs     | 3 ++-
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/153f852b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
index cc2b540..c2a8850 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
@@ -40,8 +40,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
         private static readonly IDictionary<string, IgnoreReason> IgnoredScenarios = new Dictionary<string, IgnoreReason> {
             { "g_V_hasLabelXpersonX_hasXage_notXlteX10X_andXnotXbetweenX11_20XXXX_andXltX29X_orXeqX35XXXX_name", IgnoreReason.NeedsFurtherInvestigation }, // TINKERPOP-1859??
             { "g_VX1X_out_aggregateXxX_out_whereXnotXwithinXaXXX", IgnoreReason.NeedsFurtherInvestigation }, // TINKERPOP-1859??
-            { "g_withBulkXfalseX_withSackX1_sumX_V_out_barrier_sack", IgnoreReason.NeedsFurtherInvestigation },
-            { "g_V_hasXname_markoX_propertyXfriendWeight_outEXknowsX_weight_sum__acl_privateX", IgnoreReason.NeedsFurtherInvestigation }
+            { "g_withBulkXfalseX_withSackX1_sumX_V_out_barrier_sack", IgnoreReason.NeedsFurtherInvestigation }
         };
         
         private static class Keywords

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/153f852b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/ModernGraphTypeInformation.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/ModernGraphTypeInformation.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/ModernGraphTypeInformation.cs
index 7eca018..327a50a 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/ModernGraphTypeInformation.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/ModernGraphTypeInformation.cs
@@ -38,7 +38,8 @@ namespace Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation
             {"name", typeof(string)},
             {"lang", typeof(string)},
             {"weight", typeof(float)},
-            {"foo", typeof(object)} // used when for invalid property key lookups
+            {"foo", typeof(object)}, // used when for invalid property key lookups
+            {"friendWeight", typeof(float)}  // used in an AddVertex.feature test
         };
         
         /// <summary>


[48/50] tinkerpop git commit: Added automatic tab generation for code snippets in asciidoc files.

Posted by dk...@apache.org.
Added automatic tab generation for code snippets in asciidoc files.


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

Branch: refs/heads/TINKERPOP-1447
Commit: 844d997f34bd78895cbecb86aad8163a9e7113d4
Parents: 97fb12e
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Fri Dec 15 14:30:59 2017 -0700
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Fri Mar 9 08:34:51 2018 -0700

----------------------------------------------------------------------
 docs/postprocessor/processor.awk     |   4 +
 docs/preprocessor/awk/tabify.awk     | 108 ++++++++++++++++++
 docs/preprocessor/preprocess-file.sh |   4 +-
 docs/sass/compile                    |  30 +++++
 docs/sass/tabs.scss                  | 178 ++++++++++++++++++++++++++++++
 docs/stylesheets/tabs.css            |  19 ++++
 6 files changed, 342 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/844d997f/docs/postprocessor/processor.awk
----------------------------------------------------------------------
diff --git a/docs/postprocessor/processor.awk b/docs/postprocessor/processor.awk
index 18ada47..da82420 100644
--- a/docs/postprocessor/processor.awk
+++ b/docs/postprocessor/processor.awk
@@ -33,6 +33,10 @@ BEGIN {
   }
 }
 
+/<body/ {
+  print "<link rel=\"stylesheet\" href=\"/docs/x.y.z/stylesheets/tabs.css\" />"
+}
+
 !/<span class="comment">/ {
   if (firstMatch || !isHeader) {
     print gensub(/(<b class="conum">)\(([0-9]+)\)(<\/b>)/,

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/844d997f/docs/preprocessor/awk/tabify.awk
----------------------------------------------------------------------
diff --git a/docs/preprocessor/awk/tabify.awk b/docs/preprocessor/awk/tabify.awk
new file mode 100644
index 0000000..bc8d644
--- /dev/null
+++ b/docs/preprocessor/awk/tabify.awk
@@ -0,0 +1,108 @@
+# 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.
+
+#
+# @author Daniel Kuppitz (http://gremlin.guru)
+#
+function print_tabs(next_id, tabs, blocks) {
+
+  num_tabs = length(tabs)
+  x = next_id
+
+  print "++++"
+  print "<section class=\"tabs tabs-" num_tabs "\">"
+
+  for (i in tabs) {
+    title = tabs[i]
+    print "  <input id=\"tab-" id_part "-" x "\" type=\"radio\" name=\"radio-set-" id_part "-" next_id "\" class=\"tab-selector-" i "\"" (i == 1 ? " checked=\"checked\"" : "") " />"
+    print "  <label for=\"tab-" id_part "-" x "\" class=\"tab-label-" i "\">" title "</label>"
+    x++
+  }
+
+  for (i in blocks) {
+    print "  <div class=\"tabcontent\">"
+    print "    <div class=\"tabcontent-" i "\">"
+    print "++++\n"
+    print blocks[i]
+    print "++++"
+    print "    </div>"
+    print "  </div>"
+  }
+
+  print "</section>"
+  print "++++\n"
+}
+
+BEGIN {
+  id_part=systime()
+  status = 0
+  next_id = 1
+  block[0] = 0 # initialize "blocks" as an array
+  delete blocks[0]
+}
+
+/^\[gremlin-/ {
+  status = 1
+  lang = gensub(/^\[gremlin-([^,\]]+).*/, "\\1", "g", $0)
+  code = ""
+}
+
+/^\[source,/ {
+  if (status == 3) {
+    status = 1
+    lang = gensub(/^\[source,([^\]]+).*/, "\\1", "g", $0)
+    code = ""
+  }
+}
+
+! /^\[source,/ {
+  if (status == 3 && $0 != "") {
+    print_tabs(next_id, tabs, blocks)
+    next_id = next_id + length(tabs)
+    for (i in tabs) {
+      delete tabs[i]
+      delete blocks[i]
+    }
+    status = 0
+  }
+}
+
+/^----$/ {
+  if (status == 1) {
+    status = 2
+  } else if (status == 2) {
+    status = 3
+  }
+}
+
+{ if (status == 3) {
+    if ($0 == "----") {
+      i = length(blocks) + 1
+      if (i == 1) {
+        tabs[i] = "console (" lang ")"
+        blocks[i] = code_header code "\n" $0 "\n"
+        i++
+      }
+      tabs[i] = lang
+      blocks[i] = "[source," lang "]" code "\n" $0 "\n"
+    }
+  } else {
+    if (status == 0) print
+    else if (status == 1) code_header = $0
+    else code = code "\n" $0
+  }
+}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/844d997f/docs/preprocessor/preprocess-file.sh
----------------------------------------------------------------------
diff --git a/docs/preprocessor/preprocess-file.sh b/docs/preprocessor/preprocess-file.sh
index d5076f1..7d3956d 100755
--- a/docs/preprocessor/preprocess-file.sh
+++ b/docs/preprocessor/preprocess-file.sh
@@ -132,6 +132,7 @@ if [ ! ${SKIP} ] && [ $(grep -c '^\[gremlin' ${input}) -gt 0 ]; then
   fi
 
   sed 's/\t/    /g' ${input} |
+  awk -f ${AWK_SCRIPTS}/tabify.awk |
   awk -f ${AWK_SCRIPTS}/prepare.awk |
   awk -f ${AWK_SCRIPTS}/init-code-blocks.awk -v TP_HOME="${TP_HOME}" -v PYTHONPATH="${TP_HOME}/gremlin-python/target/classes/Lib" |
   awk -f ${AWK_SCRIPTS}/progressbar.awk -v tpl=${AWK_SCRIPTS}/progressbar.groovy.template |
@@ -141,8 +142,9 @@ if [ ! ${SKIP} ] && [ $(grep -c '^\[gremlin' ${input}) -gt 0 ]; then
   ${lb} awk -f ${AWK_SCRIPTS}/cleanup.awk  |
   ${lb} awk -f ${AWK_SCRIPTS}/language-variants.awk > ${output}
 
+  # check exit code for each of the previously piped commands
   ps=(${PIPESTATUS[@]})
-  for i in {0..6}; do
+  for i in {0..9}; do
     ec=${ps[i]}
     [ ${ec} -eq 0 ] || break
   done

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/844d997f/docs/sass/compile
----------------------------------------------------------------------
diff --git a/docs/sass/compile b/docs/sass/compile
new file mode 100755
index 0000000..002954e
--- /dev/null
+++ b/docs/sass/compile
@@ -0,0 +1,30 @@
+#!/bin/bash
+#
+#
+# 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.
+#
+
+DIR=`dirname $0`
+
+IF="${DIR}/tabs.scss"
+OF="${DIR}/../stylesheets/tabs.css"
+TF=`mktemp`
+
+scss --sourcemap=none -t compressed -C ${IF} ${OF}
+
+cat ${DIR}/../stylesheets/tinkerpop.css | awk 'BEGIN {p=1} {if (p) print} /\*\// {p=0}' | cat - ${OF} > ${TF} && mv ${TF} ${OF}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/844d997f/docs/sass/tabs.scss
----------------------------------------------------------------------
diff --git a/docs/sass/tabs.scss b/docs/sass/tabs.scss
new file mode 100644
index 0000000..39c88f4
--- /dev/null
+++ b/docs/sass/tabs.scss
@@ -0,0 +1,178 @@
+/*
+ * 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.
+ */
+
+$blue: #3f6b9d;
+$orange: #e08f24;
+$white: #fefefe;
+$black: #1a1a1a;
+$gray: #eee;
+
+$active: #609060;
+$inactive: #e9ffe9;
+
+$tabHeight: 50px;
+$minTabs: 2;
+$maxTabs: 4;
+
+@mixin single-transition($property:all, $speed:150ms, $ease:ease, $delay: 0s) {
+  -webkit-transition: $property $speed $ease $delay;  
+  transition: $property $speed $ease $delay;
+}
+
+.tabs {
+
+  position: relative;
+  margin: 40px auto;
+  width: 1024px;
+  max-width: 100%;
+  overflow: hidden;
+  padding-top: 10px;
+  margin-bottom: 60px;
+
+  input  {
+    position: absolute;
+    z-index: 1000;
+    height: $tabHeight;
+    left: 0;
+    top: 0;
+    opacity: 0;
+    -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
+    filter: alpha(opacity=0);
+    cursor: pointer;
+    margin: 0;
+    &:hover + label {
+      background: $orange;
+    }
+  }
+
+  label {
+    background: $inactive;
+    color: $black;
+    font-size: 15px;
+    line-height: $tabHeight;
+    height: $tabHeight + 10;
+    position: relative;
+    top: 0;
+    padding: 0 20px;
+    float: left;
+    display: block;
+    letter-spacing: 1px;
+    text-transform: uppercase;
+    font-weight: bold;
+    text-align: center;
+    box-shadow: 2px 0 2px rgba(0,0,0,0.1), -2px 0 2px rgba(0,0,0,0.1);
+    box-sizing: border-box;
+    @include single-transition();
+    &:hover{
+      cursor: pointer;
+    }
+    &:after {
+      content: '';
+      background: $active;
+      position: absolute;
+      bottom: -2px;
+      left: 0;
+      width: 100%;
+      height: 2px;
+      display: block;
+    }
+  }  
+}
+
+@for $n from $minTabs through $maxTabs {
+
+  .tabs-#{$n} {
+
+    input {
+      width: 100% / $n;
+      @for $i from 1 through $n {
+        &.tab-selector-#{$i}{
+          left: ($i - 1) * (100% / $n);
+        }
+      }
+    }
+
+    label {
+      width: 100% / $n;
+    }
+  }
+}
+
+.tabs label:first-of-type {
+  z-index: 4;
+}
+.tab-label-2 {
+  z-index: 4;
+}
+.tab-label-3 {
+  z-index: 3;
+}
+.tab-label-4 {
+  z-index: 2;
+}
+
+.tabs input:checked + label {
+  background: $active;
+  color: $white;
+  z-index: 6;
+}
+
+.clear-shadow {
+  clear: both;
+}
+
+.tabcontent {
+  height: auto;
+  width: 100%;
+  float: left;
+  position: relative;
+  z-index: 5;
+  background: $gray;
+  top: -10px;
+  box-sizing: border-box;
+  &>div{
+    position: relative;
+    float: left;
+    width: 0;
+    height: 0;
+    box-sizing: border-box;
+    top: 0;
+    left: 0;
+    z-index: 1;
+    opacity: 0;
+    background: $gray;
+  }
+  .CodeRay {
+    background-color: $white;
+  }
+}
+
+@for $i from 1 through $maxTabs {
+  .tabs .tab-selector-#{$i}:checked ~ .tabcontent .tabcontent-#{$i} {
+    z-index: 100;
+    -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
+    filter: alpha(opacity=100);
+    opacity: 1;
+    width: 100%;
+    height: auto;
+    width: 100%;
+    height: auto;
+    padding-top: 30px;
+  }
+}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/844d997f/docs/stylesheets/tabs.css
----------------------------------------------------------------------
diff --git a/docs/stylesheets/tabs.css b/docs/stylesheets/tabs.css
new file mode 100644
index 0000000..df508b7
--- /dev/null
+++ b/docs/stylesheets/tabs.css
@@ -0,0 +1,19 @@
+/*
+ * 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.
+ */
+.tabs{position:relative;margin:40px auto;width:1024px;max-width:100%;overflow:hidden;padding-top:10px;margin-bottom:60px}.tabs input{position:absolute;z-index:1000;height:50px;left:0;top:0;opacity:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";filter:alpha(opacity=0);cursor:pointer;margin:0}.tabs input:hover+label{background:#e08f24}.tabs label{background:#e9ffe9;color:#1a1a1a;font-size:15px;line-height:50px;height:60px;position:relative;top:0;padding:0 20px;float:left;display:block;letter-spacing:1px;text-transform:uppercase;font-weight:bold;text-align:center;box-shadow:2px 0 2px rgba(0,0,0,0.1),-2px 0 2px rgba(0,0,0,0.1);box-sizing:border-box;-webkit-transition:all 150ms ease 0s;transition:all 150ms ease 0s}.tabs label:hover{cursor:pointer}.tabs label:after{content:'';background:#609060;position:absolute;bottom:-2px;left:0;width:100%;height:2px;display:block}.tabs-2 input{width:50%}.tabs-2 input.tab-selector-1{left:0%}.tabs-2 input.tab-selector-2{left:50%}.tabs-
 2 label{width:50%}.tabs-3 input{width:33.33333%}.tabs-3 input.tab-selector-1{left:0%}.tabs-3 input.tab-selector-2{left:33.33333%}.tabs-3 input.tab-selector-3{left:66.66667%}.tabs-3 label{width:33.33333%}.tabs-4 input{width:25%}.tabs-4 input.tab-selector-1{left:0%}.tabs-4 input.tab-selector-2{left:25%}.tabs-4 input.tab-selector-3{left:50%}.tabs-4 input.tab-selector-4{left:75%}.tabs-4 label{width:25%}.tabs label:first-of-type{z-index:4}.tab-label-2{z-index:4}.tab-label-3{z-index:3}.tab-label-4{z-index:2}.tabs input:checked+label{background:#609060;color:#fefefe;z-index:6}.clear-shadow{clear:both}.tabcontent{height:auto;width:100%;float:left;position:relative;z-index:5;background:#eee;top:-10px;box-sizing:border-box}.tabcontent>div{position:relative;float:left;width:0;height:0;box-sizing:border-box;top:0;left:0;z-index:1;opacity:0;background:#eee}.tabcontent .CodeRay{background-color:#fefefe}.tabs .tab-selector-1:checked ~ .tabcontent .tabcontent-1{z-index:100;-ms-filter:"progid:DXImag
 eTransform.Microsoft.Alpha(Opacity=100)";filter:alpha(opacity=100);opacity:1;width:100%;height:auto;width:100%;height:auto;padding-top:30px}.tabs .tab-selector-2:checked ~ .tabcontent .tabcontent-2{z-index:100;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";filter:alpha(opacity=100);opacity:1;width:100%;height:auto;width:100%;height:auto;padding-top:30px}.tabs .tab-selector-3:checked ~ .tabcontent .tabcontent-3{z-index:100;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";filter:alpha(opacity=100);opacity:1;width:100%;height:auto;width:100%;height:auto;padding-top:30px}.tabs .tab-selector-4:checked ~ .tabcontent .tabcontent-4{z-index:100;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";filter:alpha(opacity=100);opacity:1;width:100%;height:auto;width:100%;height:auto;padding-top:30px}


[39/50] tinkerpop git commit: Moved some tests to the correct packages CTR

Posted by dk...@apache.org.
Moved some tests to the correct packages CTR


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

Branch: refs/heads/TINKERPOP-1447
Commit: 2c6c151fc491fbad5541edcd49902899ee7a4b12
Parents: 6fbf130
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Mar 5 14:17:22 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Mar 5 14:17:22 2018 -0500

----------------------------------------------------------------------
 .../traversal/step/util/BulkSetTest.java        |  92 ++++
 .../traversal/util/TraversalHelperTest.java     | 424 +++++++++++++++++++
 .../gremlin/process/util/BulkSetTest.java       |  92 ----
 .../process/util/TraversalHelperTest.java       | 424 -------------------
 4 files changed, 516 insertions(+), 516 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2c6c151f/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/BulkSetTest.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/BulkSetTest.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/BulkSetTest.java
new file mode 100644
index 0000000..9b4980f
--- /dev/null
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/BulkSetTest.java
@@ -0,0 +1,92 @@
+/*
+ * 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.process.traversal.step.util;
+
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.BulkSet;
+import org.junit.Test;
+
+import java.util.Iterator;
+import java.util.Random;
+import java.util.Set;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertTrue;
+
+/**
+ * @author Marko A. Rodriguez (http://markorodriguez.com)
+ */
+public class BulkSetTest {
+
+    @Test
+    public void shouldHaveProperHashAndEquality() {
+        final BulkSet<String> a = new BulkSet<>();
+        final BulkSet<String> b = new BulkSet<>();
+        a.add("stephen", 12);
+        a.add("marko", 32);
+        a.add("daniel", 74);
+        b.add("stephen", 12);
+        b.add("marko", 32);
+        b.add("daniel", 74);
+        assertEquals(a, b);
+        assertTrue(a.equals(b));
+        assertEquals(a.hashCode(), b.hashCode());
+        assertTrue(a.hashCode() == b.hashCode());
+        assertEquals(12, a.get("stephen"));
+        assertEquals(12, b.get("stephen"));
+        a.add("matthias", 99);
+        assertFalse(a.equals(b));
+        assertFalse(a.hashCode() == b.hashCode());
+        assertNotEquals(a.hashCode(), b.hashCode());
+    }
+
+    @Test
+    public void shouldHaveProperCountAndNotOutOfMemoryException() {
+        final Set<Boolean> list = new BulkSet<>();
+        final Random random = new Random();
+        for (int i = 0; i < 10000000; i++) {
+            list.add(random.nextBoolean());
+        }
+        assertEquals(10000000, list.size());
+    }
+
+    @Test
+    public void shouldHaveCorrectBulkCounts() {
+        final BulkSet<String> set = new BulkSet<>();
+        set.add("marko");
+        set.add("matthias");
+        set.add("marko", 7);
+        set.add("stephen");
+        set.add("stephen");
+        assertEquals(8, set.get("marko"));
+        assertEquals(1, set.get("matthias"));
+        assertEquals(2, set.get("stephen"));
+        final Iterator<String> iterator = set.iterator();
+        for (int i = 0; i < 11; i++) {
+            if (i < 8)
+                assertEquals("marko", iterator.next());
+            else if (i < 9)
+                assertEquals("matthias", iterator.next());
+            else
+                assertEquals("stephen", iterator.next());
+        }
+        assertEquals(11, set.size());
+    }
+}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2c6c151f/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/util/TraversalHelperTest.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/util/TraversalHelperTest.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/util/TraversalHelperTest.java
new file mode 100644
index 0000000..74ef6a4
--- /dev/null
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/util/TraversalHelperTest.java
@@ -0,0 +1,424 @@
+/*
+ * 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.process.traversal.util;
+
+import org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.TraversalVertexProgramStep;
+import org.apache.tinkerpop.gremlin.process.traversal.Step;
+import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
+import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent;
+import org.apache.tinkerpop.gremlin.process.traversal.step.branch.LocalStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.branch.RepeatStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.branch.UnionStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.FilterStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.HasStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.LambdaFilterStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.PathFilterStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.TraversalFilterStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.WhereTraversalStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.NotStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.FlatMapStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.PropertiesStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.TraversalFlatMapStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.TraversalMapStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.VertexStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.IdentityStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.EmptyStep;
+import org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversal;
+import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper;
+import org.apache.tinkerpop.gremlin.structure.PropertyType;
+import org.apache.tinkerpop.gremlin.structure.T;
+import org.apache.tinkerpop.gremlin.structure.util.empty.EmptyGraph;
+import org.junit.Test;
+import org.mockito.Mockito;
+
+import java.util.List;
+import java.util.Optional;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.in;
+import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.out;
+import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.outE;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
+
+/**
+ * @author Marko A. Rodriguez (http://markorodriguez.com)
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+public class TraversalHelperTest {
+
+    @Test
+    public void shouldSetPreviousStepToEmptyStep() {
+        final Traversal.Admin<?, ?> traversal = __.V().out().asAdmin();
+        //transform the traversal to __.V().not(out())
+        //the VertexStep's previousStep should be the EmptyStep
+        Optional<VertexStep> vertexStepOpt = TraversalHelper.getFirstStepOfAssignableClass(VertexStep.class, traversal);
+        assertTrue(vertexStepOpt.isPresent());
+        Traversal.Admin<?,?> inner = __.start().asAdmin();
+        inner.addStep(0, vertexStepOpt.get());
+        TraversalHelper.replaceStep(vertexStepOpt.get(), new NotStep<>(__.identity().asAdmin(), inner), traversal);
+        List<VertexStep> vertexSteps = TraversalHelper.getStepsOfAssignableClassRecursively(VertexStep.class, traversal);
+        assertEquals(1, vertexSteps.size());
+        VertexStep vertexStep = vertexSteps.get(0);
+        assertTrue("Expected the previousStep to be an EmptyStep, found instead " + vertexStep.getPreviousStep().toString(),vertexStep.getPreviousStep() == EmptyStep.instance());
+    }
+
+    @Test
+    public void shouldIdentifyLocalChildren() {
+        final Traversal.Admin<?, ?> localChild = __.as("x").select("a", "b").by("name").asAdmin();
+        new LocalStep<>(new DefaultTraversal(), localChild);
+        assertFalse(TraversalHelper.isGlobalChild(localChild));
+        ///
+        new WhereTraversalStep<>(new DefaultTraversal(), localChild);
+        assertFalse(TraversalHelper.isGlobalChild(localChild));
+        ///
+        new TraversalFilterStep<>(new DefaultTraversal(), localChild);
+        assertFalse(TraversalHelper.isGlobalChild(localChild));
+        ///
+        new TraversalMapStep<>(new DefaultTraversal(), localChild);
+        assertFalse(TraversalHelper.isGlobalChild(localChild));
+        ///
+        new TraversalFlatMapStep<>(new DefaultTraversal(), localChild);
+        assertFalse(TraversalHelper.isGlobalChild(localChild));
+        ///
+        final Traversal.Admin<?, ?> remoteLocalChild = __.repeat(localChild).asAdmin();
+        new LocalStep<>(new DefaultTraversal<>(), remoteLocalChild);
+        assertFalse(TraversalHelper.isGlobalChild(localChild));
+    }
+
+    @Test
+    public void shouldIdentifyGlobalChildren() {
+        final Traversal.Admin<?, ?> globalChild = __.select("a", "b").by("name").asAdmin();
+        TraversalParent parent = new RepeatStep<>(new DefaultTraversal());
+        ((RepeatStep) parent).setRepeatTraversal(globalChild);
+        assertTrue(TraversalHelper.isGlobalChild(globalChild));
+        ///
+        new UnionStep<>(new DefaultTraversal(), globalChild);
+        assertTrue(TraversalHelper.isGlobalChild(globalChild));
+        ///
+        new TraversalVertexProgramStep(new DefaultTraversal<>(), globalChild);
+        assertTrue(TraversalHelper.isGlobalChild(globalChild));
+        ///
+        final Traversal.Admin<?, ?> remoteRemoteChild = __.repeat(globalChild).asAdmin();
+        new UnionStep<>(new DefaultTraversal(), remoteRemoteChild);
+        assertTrue(TraversalHelper.isGlobalChild(globalChild));
+    }
+
+    @Test
+    public void shouldIdentifyLocalProperties() {
+        assertTrue(TraversalHelper.isLocalProperties(__.identity().asAdmin()));
+        assertTrue(TraversalHelper.isLocalProperties(__.id().asAdmin()));
+        assertTrue(TraversalHelper.isLocalProperties(__.label().asAdmin()));
+        assertTrue(TraversalHelper.isLocalProperties(__.values("name").asAdmin()));
+        assertFalse(TraversalHelper.isLocalProperties(outE("knows").asAdmin()));
+    }
+
+    @Test
+    public void shouldNotFindStepOfClassInTraversal() {
+        final Traversal.Admin traversal = new DefaultTraversal<>(EmptyGraph.instance());
+        traversal.asAdmin().addStep(0, new HasStep(traversal));
+        traversal.asAdmin().addStep(0, new HasStep(traversal));
+        traversal.asAdmin().addStep(0, new HasStep(traversal));
+
+        assertThat(TraversalHelper.hasStepOfClass(FilterStep.class, traversal), is(false));
+    }
+
+    @Test
+    public void shouldFindStepOfClassInTraversal() {
+        final Traversal.Admin traversal = new DefaultTraversal<>(EmptyGraph.instance());
+        traversal.asAdmin().addStep(0, new HasStep(traversal));
+        traversal.asAdmin().addStep(0, new IdentityStep<>(traversal));
+        traversal.asAdmin().addStep(0, new HasStep(traversal));
+
+        assertThat(TraversalHelper.hasStepOfClass(IdentityStep.class, traversal), is(true));
+    }
+
+    @Test
+    public void shouldNotFindStepOfAssignableClassInTraversal() {
+        final Traversal.Admin traversal = new DefaultTraversal<>(EmptyGraph.instance());
+        traversal.asAdmin().addStep(0, new HasStep(traversal));
+        traversal.asAdmin().addStep(0, new HasStep(traversal));
+        traversal.asAdmin().addStep(0, new HasStep(traversal));
+
+        assertThat(TraversalHelper.hasStepOfAssignableClass(IdentityStep.class, traversal), is(false));
+    }
+
+    @Test
+    public void shouldFindStepOfAssignableClassInTraversal() {
+        final Traversal.Admin traversal = new DefaultTraversal<>(EmptyGraph.instance());
+        traversal.asAdmin().addStep(0, new HasStep(traversal));
+        traversal.asAdmin().addStep(0, new HasStep(traversal));
+        traversal.asAdmin().addStep(0, new HasStep(traversal));
+
+        assertThat(TraversalHelper.hasStepOfAssignableClass(FilterStep.class, traversal), is(true));
+    }
+
+    @Test
+    public void shouldGetTheStepIndex() {
+        final Traversal.Admin traversal = new DefaultTraversal<>(EmptyGraph.instance());
+        final HasStep hasStep = new HasStep(traversal);
+        traversal.asAdmin().addStep(0, new HasStep(traversal));
+        traversal.asAdmin().addStep(0, hasStep);
+        traversal.asAdmin().addStep(0, new HasStep(traversal));
+
+        assertEquals(1, TraversalHelper.stepIndex(hasStep, traversal));
+    }
+
+    @Test
+    public void shouldNotFindTheStepIndex() {
+        final Traversal.Admin traversal = new DefaultTraversal<>(EmptyGraph.instance());
+        final IdentityStep identityStep = new IdentityStep(traversal);
+        traversal.asAdmin().addStep(0, new HasStep(traversal));
+        traversal.asAdmin().addStep(0, new HasStep(traversal));
+        traversal.asAdmin().addStep(0, new HasStep(traversal));
+
+        assertEquals(-1, TraversalHelper.stepIndex(identityStep, traversal));
+    }
+
+    @Test
+    public void shouldInsertBeforeStep() {
+        final Traversal.Admin traversal = new DefaultTraversal<>(EmptyGraph.instance());
+        final HasStep hasStep = new HasStep(traversal);
+        final IdentityStep identityStep = new IdentityStep(traversal);
+        traversal.asAdmin().addStep(0, new HasStep(traversal));
+        traversal.asAdmin().addStep(0, hasStep);
+        traversal.asAdmin().addStep(0, new HasStep(traversal));
+
+        TraversalHelper.insertBeforeStep(identityStep, hasStep, traversal);
+
+        assertEquals(traversal.asAdmin().getSteps().get(1), identityStep);
+        assertEquals(4, traversal.asAdmin().getSteps().size());
+    }
+
+    @Test
+    public void shouldInsertAfterStep() {
+        final Traversal.Admin traversal = new DefaultTraversal<>(EmptyGraph.instance());
+        final HasStep hasStep = new HasStep(traversal);
+        final IdentityStep identityStep = new IdentityStep(traversal);
+        traversal.asAdmin().addStep(0, new HasStep(traversal));
+        traversal.asAdmin().addStep(0, hasStep);
+        traversal.asAdmin().addStep(0, new HasStep(traversal));
+
+        TraversalHelper.insertAfterStep(identityStep, hasStep, traversal);
+
+        assertEquals(traversal.asAdmin().getSteps().get(2), identityStep);
+        assertEquals(4, traversal.asAdmin().getSteps().size());
+    }
+
+    @Test
+    public void shouldReplaceStep() {
+        final Traversal.Admin traversal = new DefaultTraversal<>(EmptyGraph.instance());
+        final HasStep hasStep = new HasStep(traversal);
+        final IdentityStep identityStep = new IdentityStep(traversal);
+        traversal.asAdmin().addStep(0, new HasStep(traversal));
+        traversal.asAdmin().addStep(0, hasStep);
+        traversal.asAdmin().addStep(0, new HasStep(traversal));
+
+        TraversalHelper.replaceStep(hasStep, identityStep, traversal);
+
+        assertEquals(traversal.asAdmin().getSteps().get(1), identityStep);
+        assertEquals(3, traversal.asAdmin().getSteps().size());
+    }
+
+    @Test
+    public void shouldChainTogetherStepsWithNextPreviousInALinkedListStructure() {
+        final Traversal.Admin traversal = new DefaultTraversal<>(EmptyGraph.instance());
+        traversal.asAdmin().addStep(new IdentityStep(traversal));
+        traversal.asAdmin().addStep(new HasStep(traversal));
+        traversal.asAdmin().addStep(new LambdaFilterStep(traversal, traverser -> true));
+        validateToyTraversal(traversal);
+    }
+
+    @Test
+    public void shouldAddStepsCorrectly() {
+        Traversal.Admin traversal = new DefaultTraversal<>(EmptyGraph.instance());
+        traversal.asAdmin().addStep(0, new LambdaFilterStep(traversal, traverser -> true));
+        traversal.asAdmin().addStep(0, new HasStep(traversal));
+        traversal.asAdmin().addStep(0, new IdentityStep(traversal));
+        validateToyTraversal(traversal);
+
+        traversal = new DefaultTraversal<>(EmptyGraph.instance());
+        traversal.asAdmin().addStep(0, new IdentityStep(traversal));
+        traversal.asAdmin().addStep(1, new HasStep(traversal));
+        traversal.asAdmin().addStep(2, new LambdaFilterStep(traversal, traverser -> true));
+        validateToyTraversal(traversal);
+    }
+
+    @Test
+    public void shouldRemoveStepsCorrectly() {
+        final Traversal.Admin traversal = new DefaultTraversal<>(EmptyGraph.instance());
+        traversal.asAdmin().addStep(new IdentityStep(traversal));
+        traversal.asAdmin().addStep(new HasStep(traversal));
+        traversal.asAdmin().addStep(new LambdaFilterStep(traversal, traverser -> true));
+
+        traversal.asAdmin().addStep(new PropertiesStep(traversal, PropertyType.VALUE, "marko"));
+        traversal.asAdmin().removeStep(3);
+        validateToyTraversal(traversal);
+
+        traversal.asAdmin().addStep(0, new PropertiesStep(traversal, PropertyType.PROPERTY, "marko"));
+        traversal.asAdmin().removeStep(0);
+        validateToyTraversal(traversal);
+
+        traversal.asAdmin().removeStep(1);
+        traversal.asAdmin().addStep(1, new HasStep(traversal));
+        validateToyTraversal(traversal);
+    }
+
+    private static void validateToyTraversal(final Traversal traversal) {
+        assertEquals(traversal.asAdmin().getSteps().size(), 3);
+
+        assertEquals(IdentityStep.class, traversal.asAdmin().getSteps().get(0).getClass());
+        assertEquals(HasStep.class, traversal.asAdmin().getSteps().get(1).getClass());
+        assertEquals(LambdaFilterStep.class, traversal.asAdmin().getSteps().get(2).getClass());
+
+        // IDENTITY STEP
+        assertEquals(EmptyStep.class, ((Step) traversal.asAdmin().getSteps().get(0)).getPreviousStep().getClass());
+        assertEquals(HasStep.class, ((Step) traversal.asAdmin().getSteps().get(0)).getNextStep().getClass());
+        assertEquals(LambdaFilterStep.class, ((Step) traversal.asAdmin().getSteps().get(0)).getNextStep().getNextStep().getClass());
+        assertEquals(EmptyStep.class, ((Step) traversal.asAdmin().getSteps().get(0)).getNextStep().getNextStep().getNextStep().getClass());
+
+        // HAS STEP
+        assertEquals(IdentityStep.class, ((Step) traversal.asAdmin().getSteps().get(1)).getPreviousStep().getClass());
+        assertEquals(EmptyStep.class, ((Step) traversal.asAdmin().getSteps().get(1)).getPreviousStep().getPreviousStep().getClass());
+        assertEquals(LambdaFilterStep.class, ((Step) traversal.asAdmin().getSteps().get(1)).getNextStep().getClass());
+        assertEquals(EmptyStep.class, ((Step) traversal.asAdmin().getSteps().get(1)).getNextStep().getNextStep().getClass());
+
+        // FILTER STEP
+        assertEquals(HasStep.class, ((Step) traversal.asAdmin().getSteps().get(2)).getPreviousStep().getClass());
+        assertEquals(IdentityStep.class, ((Step) traversal.asAdmin().getSteps().get(2)).getPreviousStep().getPreviousStep().getClass());
+        assertEquals(EmptyStep.class, ((Step) traversal.asAdmin().getSteps().get(2)).getPreviousStep().getPreviousStep().getPreviousStep().getClass());
+        assertEquals(EmptyStep.class, ((Step) traversal.asAdmin().getSteps().get(2)).getNextStep().getClass());
+
+        assertEquals(3, traversal.asAdmin().getSteps().size());
+    }
+
+    @Test
+    public void shouldTruncateLongName() {
+        Step s = Mockito.mock(Step.class);
+        Mockito.when(s.toString()).thenReturn("0123456789");
+        assertEquals("0123...", TraversalHelper.getShortName(s, 7));
+    }
+
+    @Test
+    public void shouldIdentifyStarGraphTraversals() {
+        assertTrue(TraversalHelper.isLocalStarGraph(__.identity().asAdmin()));
+        assertTrue(TraversalHelper.isLocalStarGraph(__.id().asAdmin()));
+        assertTrue(TraversalHelper.isLocalStarGraph(__.out().asAdmin()));
+        assertTrue(TraversalHelper.isLocalStarGraph(__.label().asAdmin()));
+        assertTrue(TraversalHelper.isLocalStarGraph(__.bothE().asAdmin()));
+        assertTrue(TraversalHelper.isLocalStarGraph(__.values().asAdmin()));
+        assertTrue(TraversalHelper.isLocalStarGraph(__.properties().asAdmin()));
+        assertTrue(TraversalHelper.isLocalStarGraph(__.repeat(__.identity()).asAdmin()));
+        assertTrue(TraversalHelper.isLocalStarGraph(__.repeat(__.has("name")).asAdmin()));
+        assertTrue(TraversalHelper.isLocalStarGraph(__.out().repeat(__.identity()).asAdmin()));
+        assertTrue(TraversalHelper.isLocalStarGraph(__.out().id().asAdmin()));
+        assertTrue(TraversalHelper.isLocalStarGraph(__.label().union(__.out(), in()).asAdmin()));
+        assertTrue(TraversalHelper.isLocalStarGraph(__.label().union(__.out(), in()).id().asAdmin()));
+        assertTrue(TraversalHelper.isLocalStarGraph(__.coalesce(out("likes"), out("knows"), out("created")).groupCount().asAdmin()));
+        assertTrue(TraversalHelper.isLocalStarGraph(__.local(__.out()).groupCount().asAdmin()));
+        assertTrue(TraversalHelper.isLocalStarGraph(__.local(__.out()).groupCount().by(T.id).asAdmin()));
+        // assertTrue(TraversalHelper.isLocalStarGraph(__.out().repeat(__.has("name")).asAdmin()));
+        //
+        assertFalse(TraversalHelper.isLocalStarGraph(__.out().label().asAdmin()));
+        assertFalse(TraversalHelper.isLocalStarGraph(__.out().values().asAdmin()));
+        assertFalse(TraversalHelper.isLocalStarGraph(__.out().valueMap().asAdmin()));
+        assertFalse(TraversalHelper.isLocalStarGraph(__.repeat(__.out()).asAdmin()));
+        assertFalse(TraversalHelper.isLocalStarGraph(__.repeat(__.has("name").out()).asAdmin()));
+        assertFalse(TraversalHelper.isLocalStarGraph(__.repeat(__.has("name").union(__.out(), in())).asAdmin()));
+        assertFalse(TraversalHelper.isLocalStarGraph(__.union(__.out(), in()).label().asAdmin()));
+        assertFalse(TraversalHelper.isLocalStarGraph(__.union(__.out(), in().out()).asAdmin()));
+        assertFalse(TraversalHelper.isLocalStarGraph(__.union(__.out(), __.out().union(in(), __.out())).asAdmin()));
+        assertFalse(TraversalHelper.isLocalStarGraph(__.union(__.values(), __.out().union(in(), __.out())).out().asAdmin()));
+        assertFalse(TraversalHelper.isLocalStarGraph(__.coalesce(out("likes"), out("knows"), out("created")).groupCount().by("name").asAdmin()));
+        assertFalse(TraversalHelper.isLocalStarGraph(__.local(__.out()).groupCount().by("name").asAdmin()));
+    }
+
+    @Test
+    public void shouldGetStepsByClass() {
+        Set<String> labels = (Set) TraversalHelper.getStepsOfClass(VertexStep.class, __.out().as("a").values("name").as("b").in().as("c").groupCount().as("d").asAdmin())
+                .stream()
+                .flatMap(s -> s.getLabels().stream())
+                .collect(Collectors.toSet());
+        assertEquals(2, labels.size());
+        assertTrue(labels.contains("a"));
+        assertTrue(labels.contains("c"));
+        //
+        labels = (Set) TraversalHelper.getStepsOfAssignableClass(VertexStep.class, __.out().as("a").values("name").as("b").in().as("c").groupCount().as("d").asAdmin())
+                .stream()
+                .flatMap(s -> s.getLabels().stream())
+                .collect(Collectors.toSet());
+        assertEquals(2, labels.size());
+        assertTrue(labels.contains("a"));
+        assertTrue(labels.contains("c"));
+        //
+        labels = (Set) TraversalHelper.getStepsOfAssignableClass(FlatMapStep.class, __.out().as("a").values("name").as("b").in().as("c").groupCount().as("d").asAdmin())
+                .stream()
+                .flatMap(s -> s.getLabels().stream())
+                .collect(Collectors.toSet());
+        assertEquals(3, labels.size());
+        assertTrue(labels.contains("a"));
+        assertTrue(labels.contains("b"));
+        assertTrue(labels.contains("c"));
+        //
+        labels = (Set) TraversalHelper.getStepsOfClass(Step.class, __.out().as("a").values("name").as("b").in().as("c").groupCount().as("d").asAdmin())
+                .stream()
+                .flatMap(s -> s.getLabels().stream())
+                .collect(Collectors.toSet());
+        assertEquals(0, labels.size());
+        //
+        labels = (Set) TraversalHelper.getStepsOfAssignableClass(Step.class, __.out().as("a").values("name").as("b").in().as("c").groupCount().as("d").asAdmin())
+                .stream()
+                .flatMap(s -> s.getLabels().stream())
+                .collect(Collectors.toSet());
+        assertEquals(4, labels.size());
+        assertTrue(labels.contains("a"));
+        assertTrue(labels.contains("b"));
+        assertTrue(labels.contains("c"));
+        assertTrue(labels.contains("d"));
+    }
+
+    @Test
+    public void shouldGetLabels() {
+        Set<String> labels = (Set) TraversalHelper.getLabels(__.out().as("a").values("name").as("b").in().as("c").groupCount().as("d").asAdmin());
+        assertEquals(4, labels.size());
+        assertTrue(labels.contains("a"));
+        assertTrue(labels.contains("b"));
+        assertTrue(labels.contains("c"));
+        assertTrue(labels.contains("d"));
+        labels = (Set) TraversalHelper.getLabels(__.out().as("a").repeat(__.out("name").as("b")).local(in().as("c")).as("d").groupCount().by(outE().as("e")).as("f").asAdmin());
+        assertEquals(6, labels.size());
+        assertTrue(labels.contains("a"));
+        assertTrue(labels.contains("b"));
+        assertTrue(labels.contains("c"));
+        assertTrue(labels.contains("d"));
+        assertTrue(labels.contains("e"));
+        assertTrue(labels.contains("f"));
+    }
+
+    @Test
+    public void shouldFindStepsRecursively() {
+        final Traversal<?,?> traversal = __.V().repeat(__.out().simplePath());
+        assertTrue(TraversalHelper.anyStepRecursively(s -> s instanceof PathFilterStep, traversal.asAdmin()));
+    }
+}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2c6c151f/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/util/BulkSetTest.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/util/BulkSetTest.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/util/BulkSetTest.java
deleted file mode 100644
index df1c54f..0000000
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/util/BulkSetTest.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * 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.process.util;
-
-import org.apache.tinkerpop.gremlin.process.traversal.step.util.BulkSet;
-import org.junit.Test;
-
-import java.util.Iterator;
-import java.util.Random;
-import java.util.Set;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertTrue;
-
-/**
- * @author Marko A. Rodriguez (http://markorodriguez.com)
- */
-public class BulkSetTest {
-
-    @Test
-    public void shouldHaveProperHashAndEquality() {
-        final BulkSet<String> a = new BulkSet<>();
-        final BulkSet<String> b = new BulkSet<>();
-        a.add("stephen", 12);
-        a.add("marko", 32);
-        a.add("daniel", 74);
-        b.add("stephen", 12);
-        b.add("marko", 32);
-        b.add("daniel", 74);
-        assertEquals(a, b);
-        assertTrue(a.equals(b));
-        assertEquals(a.hashCode(), b.hashCode());
-        assertTrue(a.hashCode() == b.hashCode());
-        assertEquals(12, a.get("stephen"));
-        assertEquals(12, b.get("stephen"));
-        a.add("matthias", 99);
-        assertFalse(a.equals(b));
-        assertFalse(a.hashCode() == b.hashCode());
-        assertNotEquals(a.hashCode(), b.hashCode());
-    }
-
-    @Test
-    public void shouldHaveProperCountAndNotOutOfMemoryException() {
-        final Set<Boolean> list = new BulkSet<>();
-        final Random random = new Random();
-        for (int i = 0; i < 10000000; i++) {
-            list.add(random.nextBoolean());
-        }
-        assertEquals(10000000, list.size());
-    }
-
-    @Test
-    public void shouldHaveCorrectBulkCounts() {
-        final BulkSet<String> set = new BulkSet<>();
-        set.add("marko");
-        set.add("matthias");
-        set.add("marko", 7);
-        set.add("stephen");
-        set.add("stephen");
-        assertEquals(8, set.get("marko"));
-        assertEquals(1, set.get("matthias"));
-        assertEquals(2, set.get("stephen"));
-        final Iterator<String> iterator = set.iterator();
-        for (int i = 0; i < 11; i++) {
-            if (i < 8)
-                assertEquals("marko", iterator.next());
-            else if (i < 9)
-                assertEquals("matthias", iterator.next());
-            else
-                assertEquals("stephen", iterator.next());
-        }
-        assertEquals(11, set.size());
-    }
-}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2c6c151f/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/util/TraversalHelperTest.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/util/TraversalHelperTest.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/util/TraversalHelperTest.java
deleted file mode 100644
index df22cd2..0000000
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/util/TraversalHelperTest.java
+++ /dev/null
@@ -1,424 +0,0 @@
-/*
- * 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.process.util;
-
-import org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.TraversalVertexProgramStep;
-import org.apache.tinkerpop.gremlin.process.traversal.Step;
-import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
-import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
-import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent;
-import org.apache.tinkerpop.gremlin.process.traversal.step.branch.LocalStep;
-import org.apache.tinkerpop.gremlin.process.traversal.step.branch.RepeatStep;
-import org.apache.tinkerpop.gremlin.process.traversal.step.branch.UnionStep;
-import org.apache.tinkerpop.gremlin.process.traversal.step.filter.FilterStep;
-import org.apache.tinkerpop.gremlin.process.traversal.step.filter.HasStep;
-import org.apache.tinkerpop.gremlin.process.traversal.step.filter.LambdaFilterStep;
-import org.apache.tinkerpop.gremlin.process.traversal.step.filter.PathFilterStep;
-import org.apache.tinkerpop.gremlin.process.traversal.step.filter.TraversalFilterStep;
-import org.apache.tinkerpop.gremlin.process.traversal.step.filter.WhereTraversalStep;
-import org.apache.tinkerpop.gremlin.process.traversal.step.filter.NotStep;
-import org.apache.tinkerpop.gremlin.process.traversal.step.map.FlatMapStep;
-import org.apache.tinkerpop.gremlin.process.traversal.step.map.PropertiesStep;
-import org.apache.tinkerpop.gremlin.process.traversal.step.map.TraversalFlatMapStep;
-import org.apache.tinkerpop.gremlin.process.traversal.step.map.TraversalMapStep;
-import org.apache.tinkerpop.gremlin.process.traversal.step.map.VertexStep;
-import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.IdentityStep;
-import org.apache.tinkerpop.gremlin.process.traversal.step.util.EmptyStep;
-import org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversal;
-import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper;
-import org.apache.tinkerpop.gremlin.structure.PropertyType;
-import org.apache.tinkerpop.gremlin.structure.T;
-import org.apache.tinkerpop.gremlin.structure.util.empty.EmptyGraph;
-import org.junit.Test;
-import org.mockito.Mockito;
-
-import java.util.List;
-import java.util.Optional;
-import java.util.Set;
-import java.util.stream.Collectors;
-
-import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.in;
-import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.out;
-import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.outE;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.assertTrue;
-
-/**
- * @author Marko A. Rodriguez (http://markorodriguez.com)
- * @author Stephen Mallette (http://stephen.genoprime.com)
- */
-public class TraversalHelperTest {
-
-    @Test
-    public void shouldSetPreviousStepToEmptyStep() {
-        final Traversal.Admin<?, ?> traversal = __.V().out().asAdmin();
-        //transform the traversal to __.V().not(out())
-        //the VertexStep's previousStep should be the EmptyStep
-        Optional<VertexStep> vertexStepOpt = TraversalHelper.getFirstStepOfAssignableClass(VertexStep.class, traversal);
-        assertTrue(vertexStepOpt.isPresent());
-        Traversal.Admin<?,?> inner = __.start().asAdmin();
-        inner.addStep(0, vertexStepOpt.get());
-        TraversalHelper.replaceStep(vertexStepOpt.get(), new NotStep<>(__.identity().asAdmin(), inner), traversal);
-        List<VertexStep> vertexSteps = TraversalHelper.getStepsOfAssignableClassRecursively(VertexStep.class, traversal);
-        assertEquals(1, vertexSteps.size());
-        VertexStep vertexStep = vertexSteps.get(0);
-        assertTrue("Expected the previousStep to be an EmptyStep, found instead " + vertexStep.getPreviousStep().toString(),vertexStep.getPreviousStep() == EmptyStep.instance());
-    }
-
-    @Test
-    public void shouldIdentifyLocalChildren() {
-        final Traversal.Admin<?, ?> localChild = __.as("x").select("a", "b").by("name").asAdmin();
-        new LocalStep<>(new DefaultTraversal(), localChild);
-        assertFalse(TraversalHelper.isGlobalChild(localChild));
-        ///
-        new WhereTraversalStep<>(new DefaultTraversal(), localChild);
-        assertFalse(TraversalHelper.isGlobalChild(localChild));
-        ///
-        new TraversalFilterStep<>(new DefaultTraversal(), localChild);
-        assertFalse(TraversalHelper.isGlobalChild(localChild));
-        ///
-        new TraversalMapStep<>(new DefaultTraversal(), localChild);
-        assertFalse(TraversalHelper.isGlobalChild(localChild));
-        ///
-        new TraversalFlatMapStep<>(new DefaultTraversal(), localChild);
-        assertFalse(TraversalHelper.isGlobalChild(localChild));
-        ///
-        final Traversal.Admin<?, ?> remoteLocalChild = __.repeat(localChild).asAdmin();
-        new LocalStep<>(new DefaultTraversal<>(), remoteLocalChild);
-        assertFalse(TraversalHelper.isGlobalChild(localChild));
-    }
-
-    @Test
-    public void shouldIdentifyGlobalChildren() {
-        final Traversal.Admin<?, ?> globalChild = __.select("a", "b").by("name").asAdmin();
-        TraversalParent parent = new RepeatStep<>(new DefaultTraversal());
-        ((RepeatStep) parent).setRepeatTraversal(globalChild);
-        assertTrue(TraversalHelper.isGlobalChild(globalChild));
-        ///
-        new UnionStep<>(new DefaultTraversal(), globalChild);
-        assertTrue(TraversalHelper.isGlobalChild(globalChild));
-        ///
-        new TraversalVertexProgramStep(new DefaultTraversal<>(), globalChild);
-        assertTrue(TraversalHelper.isGlobalChild(globalChild));
-        ///
-        final Traversal.Admin<?, ?> remoteRemoteChild = __.repeat(globalChild).asAdmin();
-        new UnionStep<>(new DefaultTraversal(), remoteRemoteChild);
-        assertTrue(TraversalHelper.isGlobalChild(globalChild));
-    }
-
-    @Test
-    public void shouldIdentifyLocalProperties() {
-        assertTrue(TraversalHelper.isLocalProperties(__.identity().asAdmin()));
-        assertTrue(TraversalHelper.isLocalProperties(__.id().asAdmin()));
-        assertTrue(TraversalHelper.isLocalProperties(__.label().asAdmin()));
-        assertTrue(TraversalHelper.isLocalProperties(__.values("name").asAdmin()));
-        assertFalse(TraversalHelper.isLocalProperties(outE("knows").asAdmin()));
-    }
-
-    @Test
-    public void shouldNotFindStepOfClassInTraversal() {
-        final Traversal.Admin traversal = new DefaultTraversal<>(EmptyGraph.instance());
-        traversal.asAdmin().addStep(0, new HasStep(traversal));
-        traversal.asAdmin().addStep(0, new HasStep(traversal));
-        traversal.asAdmin().addStep(0, new HasStep(traversal));
-
-        assertThat(TraversalHelper.hasStepOfClass(FilterStep.class, traversal), is(false));
-    }
-
-    @Test
-    public void shouldFindStepOfClassInTraversal() {
-        final Traversal.Admin traversal = new DefaultTraversal<>(EmptyGraph.instance());
-        traversal.asAdmin().addStep(0, new HasStep(traversal));
-        traversal.asAdmin().addStep(0, new IdentityStep<>(traversal));
-        traversal.asAdmin().addStep(0, new HasStep(traversal));
-
-        assertThat(TraversalHelper.hasStepOfClass(IdentityStep.class, traversal), is(true));
-    }
-
-    @Test
-    public void shouldNotFindStepOfAssignableClassInTraversal() {
-        final Traversal.Admin traversal = new DefaultTraversal<>(EmptyGraph.instance());
-        traversal.asAdmin().addStep(0, new HasStep(traversal));
-        traversal.asAdmin().addStep(0, new HasStep(traversal));
-        traversal.asAdmin().addStep(0, new HasStep(traversal));
-
-        assertThat(TraversalHelper.hasStepOfAssignableClass(IdentityStep.class, traversal), is(false));
-    }
-
-    @Test
-    public void shouldFindStepOfAssignableClassInTraversal() {
-        final Traversal.Admin traversal = new DefaultTraversal<>(EmptyGraph.instance());
-        traversal.asAdmin().addStep(0, new HasStep(traversal));
-        traversal.asAdmin().addStep(0, new HasStep(traversal));
-        traversal.asAdmin().addStep(0, new HasStep(traversal));
-
-        assertThat(TraversalHelper.hasStepOfAssignableClass(FilterStep.class, traversal), is(true));
-    }
-
-    @Test
-    public void shouldGetTheStepIndex() {
-        final Traversal.Admin traversal = new DefaultTraversal<>(EmptyGraph.instance());
-        final HasStep hasStep = new HasStep(traversal);
-        traversal.asAdmin().addStep(0, new HasStep(traversal));
-        traversal.asAdmin().addStep(0, hasStep);
-        traversal.asAdmin().addStep(0, new HasStep(traversal));
-
-        assertEquals(1, TraversalHelper.stepIndex(hasStep, traversal));
-    }
-
-    @Test
-    public void shouldNotFindTheStepIndex() {
-        final Traversal.Admin traversal = new DefaultTraversal<>(EmptyGraph.instance());
-        final IdentityStep identityStep = new IdentityStep(traversal);
-        traversal.asAdmin().addStep(0, new HasStep(traversal));
-        traversal.asAdmin().addStep(0, new HasStep(traversal));
-        traversal.asAdmin().addStep(0, new HasStep(traversal));
-
-        assertEquals(-1, TraversalHelper.stepIndex(identityStep, traversal));
-    }
-
-    @Test
-    public void shouldInsertBeforeStep() {
-        final Traversal.Admin traversal = new DefaultTraversal<>(EmptyGraph.instance());
-        final HasStep hasStep = new HasStep(traversal);
-        final IdentityStep identityStep = new IdentityStep(traversal);
-        traversal.asAdmin().addStep(0, new HasStep(traversal));
-        traversal.asAdmin().addStep(0, hasStep);
-        traversal.asAdmin().addStep(0, new HasStep(traversal));
-
-        TraversalHelper.insertBeforeStep(identityStep, hasStep, traversal);
-
-        assertEquals(traversal.asAdmin().getSteps().get(1), identityStep);
-        assertEquals(4, traversal.asAdmin().getSteps().size());
-    }
-
-    @Test
-    public void shouldInsertAfterStep() {
-        final Traversal.Admin traversal = new DefaultTraversal<>(EmptyGraph.instance());
-        final HasStep hasStep = new HasStep(traversal);
-        final IdentityStep identityStep = new IdentityStep(traversal);
-        traversal.asAdmin().addStep(0, new HasStep(traversal));
-        traversal.asAdmin().addStep(0, hasStep);
-        traversal.asAdmin().addStep(0, new HasStep(traversal));
-
-        TraversalHelper.insertAfterStep(identityStep, hasStep, traversal);
-
-        assertEquals(traversal.asAdmin().getSteps().get(2), identityStep);
-        assertEquals(4, traversal.asAdmin().getSteps().size());
-    }
-
-    @Test
-    public void shouldReplaceStep() {
-        final Traversal.Admin traversal = new DefaultTraversal<>(EmptyGraph.instance());
-        final HasStep hasStep = new HasStep(traversal);
-        final IdentityStep identityStep = new IdentityStep(traversal);
-        traversal.asAdmin().addStep(0, new HasStep(traversal));
-        traversal.asAdmin().addStep(0, hasStep);
-        traversal.asAdmin().addStep(0, new HasStep(traversal));
-
-        TraversalHelper.replaceStep(hasStep, identityStep, traversal);
-
-        assertEquals(traversal.asAdmin().getSteps().get(1), identityStep);
-        assertEquals(3, traversal.asAdmin().getSteps().size());
-    }
-
-    @Test
-    public void shouldChainTogetherStepsWithNextPreviousInALinkedListStructure() {
-        final Traversal.Admin traversal = new DefaultTraversal<>(EmptyGraph.instance());
-        traversal.asAdmin().addStep(new IdentityStep(traversal));
-        traversal.asAdmin().addStep(new HasStep(traversal));
-        traversal.asAdmin().addStep(new LambdaFilterStep(traversal, traverser -> true));
-        validateToyTraversal(traversal);
-    }
-
-    @Test
-    public void shouldAddStepsCorrectly() {
-        Traversal.Admin traversal = new DefaultTraversal<>(EmptyGraph.instance());
-        traversal.asAdmin().addStep(0, new LambdaFilterStep(traversal, traverser -> true));
-        traversal.asAdmin().addStep(0, new HasStep(traversal));
-        traversal.asAdmin().addStep(0, new IdentityStep(traversal));
-        validateToyTraversal(traversal);
-
-        traversal = new DefaultTraversal<>(EmptyGraph.instance());
-        traversal.asAdmin().addStep(0, new IdentityStep(traversal));
-        traversal.asAdmin().addStep(1, new HasStep(traversal));
-        traversal.asAdmin().addStep(2, new LambdaFilterStep(traversal, traverser -> true));
-        validateToyTraversal(traversal);
-    }
-
-    @Test
-    public void shouldRemoveStepsCorrectly() {
-        final Traversal.Admin traversal = new DefaultTraversal<>(EmptyGraph.instance());
-        traversal.asAdmin().addStep(new IdentityStep(traversal));
-        traversal.asAdmin().addStep(new HasStep(traversal));
-        traversal.asAdmin().addStep(new LambdaFilterStep(traversal, traverser -> true));
-
-        traversal.asAdmin().addStep(new PropertiesStep(traversal, PropertyType.VALUE, "marko"));
-        traversal.asAdmin().removeStep(3);
-        validateToyTraversal(traversal);
-
-        traversal.asAdmin().addStep(0, new PropertiesStep(traversal, PropertyType.PROPERTY, "marko"));
-        traversal.asAdmin().removeStep(0);
-        validateToyTraversal(traversal);
-
-        traversal.asAdmin().removeStep(1);
-        traversal.asAdmin().addStep(1, new HasStep(traversal));
-        validateToyTraversal(traversal);
-    }
-
-    private static void validateToyTraversal(final Traversal traversal) {
-        assertEquals(traversal.asAdmin().getSteps().size(), 3);
-
-        assertEquals(IdentityStep.class, traversal.asAdmin().getSteps().get(0).getClass());
-        assertEquals(HasStep.class, traversal.asAdmin().getSteps().get(1).getClass());
-        assertEquals(LambdaFilterStep.class, traversal.asAdmin().getSteps().get(2).getClass());
-
-        // IDENTITY STEP
-        assertEquals(EmptyStep.class, ((Step) traversal.asAdmin().getSteps().get(0)).getPreviousStep().getClass());
-        assertEquals(HasStep.class, ((Step) traversal.asAdmin().getSteps().get(0)).getNextStep().getClass());
-        assertEquals(LambdaFilterStep.class, ((Step) traversal.asAdmin().getSteps().get(0)).getNextStep().getNextStep().getClass());
-        assertEquals(EmptyStep.class, ((Step) traversal.asAdmin().getSteps().get(0)).getNextStep().getNextStep().getNextStep().getClass());
-
-        // HAS STEP
-        assertEquals(IdentityStep.class, ((Step) traversal.asAdmin().getSteps().get(1)).getPreviousStep().getClass());
-        assertEquals(EmptyStep.class, ((Step) traversal.asAdmin().getSteps().get(1)).getPreviousStep().getPreviousStep().getClass());
-        assertEquals(LambdaFilterStep.class, ((Step) traversal.asAdmin().getSteps().get(1)).getNextStep().getClass());
-        assertEquals(EmptyStep.class, ((Step) traversal.asAdmin().getSteps().get(1)).getNextStep().getNextStep().getClass());
-
-        // FILTER STEP
-        assertEquals(HasStep.class, ((Step) traversal.asAdmin().getSteps().get(2)).getPreviousStep().getClass());
-        assertEquals(IdentityStep.class, ((Step) traversal.asAdmin().getSteps().get(2)).getPreviousStep().getPreviousStep().getClass());
-        assertEquals(EmptyStep.class, ((Step) traversal.asAdmin().getSteps().get(2)).getPreviousStep().getPreviousStep().getPreviousStep().getClass());
-        assertEquals(EmptyStep.class, ((Step) traversal.asAdmin().getSteps().get(2)).getNextStep().getClass());
-
-        assertEquals(3, traversal.asAdmin().getSteps().size());
-    }
-
-    @Test
-    public void shouldTruncateLongName() {
-        Step s = Mockito.mock(Step.class);
-        Mockito.when(s.toString()).thenReturn("0123456789");
-        assertEquals("0123...", TraversalHelper.getShortName(s, 7));
-    }
-
-    @Test
-    public void shouldIdentifyStarGraphTraversals() {
-        assertTrue(TraversalHelper.isLocalStarGraph(__.identity().asAdmin()));
-        assertTrue(TraversalHelper.isLocalStarGraph(__.id().asAdmin()));
-        assertTrue(TraversalHelper.isLocalStarGraph(__.out().asAdmin()));
-        assertTrue(TraversalHelper.isLocalStarGraph(__.label().asAdmin()));
-        assertTrue(TraversalHelper.isLocalStarGraph(__.bothE().asAdmin()));
-        assertTrue(TraversalHelper.isLocalStarGraph(__.values().asAdmin()));
-        assertTrue(TraversalHelper.isLocalStarGraph(__.properties().asAdmin()));
-        assertTrue(TraversalHelper.isLocalStarGraph(__.repeat(__.identity()).asAdmin()));
-        assertTrue(TraversalHelper.isLocalStarGraph(__.repeat(__.has("name")).asAdmin()));
-        assertTrue(TraversalHelper.isLocalStarGraph(__.out().repeat(__.identity()).asAdmin()));
-        assertTrue(TraversalHelper.isLocalStarGraph(__.out().id().asAdmin()));
-        assertTrue(TraversalHelper.isLocalStarGraph(__.label().union(__.out(), in()).asAdmin()));
-        assertTrue(TraversalHelper.isLocalStarGraph(__.label().union(__.out(), in()).id().asAdmin()));
-        assertTrue(TraversalHelper.isLocalStarGraph(__.coalesce(out("likes"), out("knows"), out("created")).groupCount().asAdmin()));
-        assertTrue(TraversalHelper.isLocalStarGraph(__.local(__.out()).groupCount().asAdmin()));
-        assertTrue(TraversalHelper.isLocalStarGraph(__.local(__.out()).groupCount().by(T.id).asAdmin()));
-        // assertTrue(TraversalHelper.isLocalStarGraph(__.out().repeat(__.has("name")).asAdmin()));
-        //
-        assertFalse(TraversalHelper.isLocalStarGraph(__.out().label().asAdmin()));
-        assertFalse(TraversalHelper.isLocalStarGraph(__.out().values().asAdmin()));
-        assertFalse(TraversalHelper.isLocalStarGraph(__.out().valueMap().asAdmin()));
-        assertFalse(TraversalHelper.isLocalStarGraph(__.repeat(__.out()).asAdmin()));
-        assertFalse(TraversalHelper.isLocalStarGraph(__.repeat(__.has("name").out()).asAdmin()));
-        assertFalse(TraversalHelper.isLocalStarGraph(__.repeat(__.has("name").union(__.out(), in())).asAdmin()));
-        assertFalse(TraversalHelper.isLocalStarGraph(__.union(__.out(), in()).label().asAdmin()));
-        assertFalse(TraversalHelper.isLocalStarGraph(__.union(__.out(), in().out()).asAdmin()));
-        assertFalse(TraversalHelper.isLocalStarGraph(__.union(__.out(), __.out().union(in(), __.out())).asAdmin()));
-        assertFalse(TraversalHelper.isLocalStarGraph(__.union(__.values(), __.out().union(in(), __.out())).out().asAdmin()));
-        assertFalse(TraversalHelper.isLocalStarGraph(__.coalesce(out("likes"), out("knows"), out("created")).groupCount().by("name").asAdmin()));
-        assertFalse(TraversalHelper.isLocalStarGraph(__.local(__.out()).groupCount().by("name").asAdmin()));
-    }
-
-    @Test
-    public void shouldGetStepsByClass() {
-        Set<String> labels = (Set) TraversalHelper.getStepsOfClass(VertexStep.class, __.out().as("a").values("name").as("b").in().as("c").groupCount().as("d").asAdmin())
-                .stream()
-                .flatMap(s -> s.getLabels().stream())
-                .collect(Collectors.toSet());
-        assertEquals(2, labels.size());
-        assertTrue(labels.contains("a"));
-        assertTrue(labels.contains("c"));
-        //
-        labels = (Set) TraversalHelper.getStepsOfAssignableClass(VertexStep.class, __.out().as("a").values("name").as("b").in().as("c").groupCount().as("d").asAdmin())
-                .stream()
-                .flatMap(s -> s.getLabels().stream())
-                .collect(Collectors.toSet());
-        assertEquals(2, labels.size());
-        assertTrue(labels.contains("a"));
-        assertTrue(labels.contains("c"));
-        //
-        labels = (Set) TraversalHelper.getStepsOfAssignableClass(FlatMapStep.class, __.out().as("a").values("name").as("b").in().as("c").groupCount().as("d").asAdmin())
-                .stream()
-                .flatMap(s -> s.getLabels().stream())
-                .collect(Collectors.toSet());
-        assertEquals(3, labels.size());
-        assertTrue(labels.contains("a"));
-        assertTrue(labels.contains("b"));
-        assertTrue(labels.contains("c"));
-        //
-        labels = (Set) TraversalHelper.getStepsOfClass(Step.class, __.out().as("a").values("name").as("b").in().as("c").groupCount().as("d").asAdmin())
-                .stream()
-                .flatMap(s -> s.getLabels().stream())
-                .collect(Collectors.toSet());
-        assertEquals(0, labels.size());
-        //
-        labels = (Set) TraversalHelper.getStepsOfAssignableClass(Step.class, __.out().as("a").values("name").as("b").in().as("c").groupCount().as("d").asAdmin())
-                .stream()
-                .flatMap(s -> s.getLabels().stream())
-                .collect(Collectors.toSet());
-        assertEquals(4, labels.size());
-        assertTrue(labels.contains("a"));
-        assertTrue(labels.contains("b"));
-        assertTrue(labels.contains("c"));
-        assertTrue(labels.contains("d"));
-    }
-
-    @Test
-    public void shouldGetLabels() {
-        Set<String> labels = (Set) TraversalHelper.getLabels(__.out().as("a").values("name").as("b").in().as("c").groupCount().as("d").asAdmin());
-        assertEquals(4, labels.size());
-        assertTrue(labels.contains("a"));
-        assertTrue(labels.contains("b"));
-        assertTrue(labels.contains("c"));
-        assertTrue(labels.contains("d"));
-        labels = (Set) TraversalHelper.getLabels(__.out().as("a").repeat(__.out("name").as("b")).local(in().as("c")).as("d").groupCount().by(outE().as("e")).as("f").asAdmin());
-        assertEquals(6, labels.size());
-        assertTrue(labels.contains("a"));
-        assertTrue(labels.contains("b"));
-        assertTrue(labels.contains("c"));
-        assertTrue(labels.contains("d"));
-        assertTrue(labels.contains("e"));
-        assertTrue(labels.contains("f"));
-    }
-
-    @Test
-    public void shouldFindStepsRecursively() {
-        final Traversal<?,?> traversal = __.V().repeat(__.out().simplePath());
-        assertTrue(TraversalHelper.anyStepRecursively(s -> s instanceof PathFilterStep, traversal.asAdmin()));
-    }
-}


[32/50] tinkerpop git commit: TINKERPOP-1738 Bump to jackson 2.9.4

Posted by dk...@apache.org.
TINKERPOP-1738 Bump to jackson 2.9.4

This fixes a problem where Jackson was missing an error in GraphSON type information depending on the order of the JSON elements. It required some internal changes to the GraphSONTypeSerializer given API shifts in jackson - should not really affect TinkerPop  users. Modified the original test that demonstrated this problem to be a bit more robust.


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

Branch: refs/heads/TINKERPOP-1447
Commit: f35f04a8da88280e8b121356ac5839fc0b8ac859
Parents: a61dd58
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Feb 13 10:16:46 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Mar 2 09:11:34 2018 -0500

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 .../io/graphson/GraphSONTypeSerializer.java     | 94 ++++++--------------
 ...aphSONMapperV2d0PartialEmbeddedTypeTest.java | 32 +++++++
 gremlin-shaded/pom.xml                          |  2 +-
 4 files changed, 61 insertions(+), 68 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f35f04a8/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index a24b1fb..f99d1a2 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -27,6 +27,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 * Modified `GremlinDslProcessor` so that it generated the `getAnonymousTraversalClass()` method to return the DSL version of `__`.
 * Added the "Kitchen Sink" test data set.
 * Fixed deserialization of `P.not()` for GraphSON.
+* Bumped to Jackson 2.9.4.
 * Added `idleConnectionTimeout` and `keepAliveInterval` to Gremlin Server that enables a "ping" and auto-close for seemingly dead clients.
 * Fixed a bug in `NumberHelper` that led to wrong min/max results if numbers exceeded the Integer limits.
 * Delayed setting of the request identifier until `RequestMessage` construction by the builder.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f35f04a8/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializer.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializer.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializer.java
index 78c670a..8b1ba25 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializer.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializer.java
@@ -39,6 +39,8 @@ import org.apache.tinkerpop.gremlin.util.function.HashMapSupplier;
 import org.apache.tinkerpop.gremlin.util.function.Lambda;
 import org.apache.tinkerpop.shaded.jackson.annotation.JsonTypeInfo;
 import org.apache.tinkerpop.shaded.jackson.core.JsonGenerator;
+import org.apache.tinkerpop.shaded.jackson.core.JsonToken;
+import org.apache.tinkerpop.shaded.jackson.core.type.WritableTypeId;
 import org.apache.tinkerpop.shaded.jackson.databind.BeanProperty;
 import org.apache.tinkerpop.shaded.jackson.databind.jsontype.TypeIdResolver;
 import org.apache.tinkerpop.shaded.jackson.databind.jsontype.TypeSerializer;
@@ -79,7 +81,7 @@ public class GraphSONTypeSerializer extends TypeSerializer {
 
     @Override
     public JsonTypeInfo.As getTypeInclusion() {
-        return null;
+        return JsonTypeInfo.As.WRAPPER_OBJECT;
     }
 
     @Override
@@ -93,79 +95,37 @@ public class GraphSONTypeSerializer extends TypeSerializer {
     }
 
     @Override
-    public void writeTypePrefixForScalar(final Object o, final JsonGenerator jsonGenerator) throws IOException {
-        if (canWriteTypeId()) {
-            writeTypePrefix(jsonGenerator, getTypeIdResolver().idFromValueAndType(o, getClassFromObject(o)));
+    public WritableTypeId writeTypePrefix(final JsonGenerator jsonGenerator, final WritableTypeId writableTypeId) throws IOException {
+        if (writableTypeId.valueShape == JsonToken.VALUE_STRING) {
+            if (canWriteTypeId()) {
+                writeTypePrefix(jsonGenerator, getTypeIdResolver().idFromValueAndType(writableTypeId.forValue, getClassFromObject(writableTypeId.forValue)));
+            }
+        } else if (writableTypeId.valueShape == JsonToken.START_OBJECT) {
+            jsonGenerator.writeStartObject();
+        } else if (writableTypeId.valueShape == JsonToken.START_ARRAY) {
+            jsonGenerator.writeStartArray();
+        } else {
+            throw new IllegalStateException("Could not write prefix");
         }
-    }
-
-    @Override
-    public void writeTypePrefixForObject(final Object o, final JsonGenerator jsonGenerator) throws IOException {
-        jsonGenerator.writeStartObject();
-        // TODO: FULL_TYPES should be implemented here as : if (fullTypesModeEnabled()) writeTypePrefix(Map);
-    }
-
-    @Override
-    public void writeTypePrefixForArray(final Object o, final JsonGenerator jsonGenerator) throws IOException {
-        jsonGenerator.writeStartArray();
-        // TODO: FULL_TYPES should be implemented here as : if (fullTypesModeEnabled()) writeTypePrefix(List);
-    }
-
-    @Override
-    public void writeTypeSuffixForScalar(final Object o, final JsonGenerator jsonGenerator) throws IOException {
-        if (canWriteTypeId()) {
-            writeTypeSuffix(jsonGenerator);
-        }
-    }
-
-    @Override
-    public void writeTypeSuffixForObject(final Object o, final JsonGenerator jsonGenerator) throws IOException {
-        jsonGenerator.writeEndObject();
-        // TODO: FULL_TYPES should be implemented here as : if (fullTypesModeEnabled()) writeTypeSuffix(Map);
-    }
-
-    @Override
-    public void writeTypeSuffixForArray(final Object o, final JsonGenerator jsonGenerator) throws IOException {
-        jsonGenerator.writeEndArray();
-        // TODO: FULL_TYPES should be implemented here as : if (fullTypesModeEnabled()) writeTypeSuffix(List);
-    }
 
-    @Override
-    public void writeCustomTypePrefixForScalar(final Object o, final JsonGenerator jsonGenerator, final String s) throws IOException {
-        if (canWriteTypeId()) {
-            writeTypePrefix(jsonGenerator, s);
-        }
+        return writableTypeId;
     }
 
     @Override
-    public void writeCustomTypePrefixForObject(final Object o, final JsonGenerator jsonGenerator, final String s) throws IOException {
-        jsonGenerator.writeStartObject();
-        // TODO: FULL_TYPES should be implemented here as : if (fullTypesModeEnabled()) writeTypePrefix(s);
-    }
-
-    @Override
-    public void writeCustomTypePrefixForArray(final Object o, final JsonGenerator jsonGenerator, final String s) throws IOException {
-        jsonGenerator.writeStartArray();
-        // TODO: FULL_TYPES should be implemented here as : if (fullTypesModeEnabled()) writeTypePrefix(s);
-    }
-
-    @Override
-    public void writeCustomTypeSuffixForScalar(final Object o, final JsonGenerator jsonGenerator, final String s) throws IOException {
-        if (canWriteTypeId()) {
-            writeTypeSuffix(jsonGenerator);
+    public WritableTypeId writeTypeSuffix(final JsonGenerator jsonGenerator, final WritableTypeId writableTypeId) throws IOException {
+        if (writableTypeId.valueShape == JsonToken.VALUE_STRING) {
+            if (canWriteTypeId()) {
+                writeTypeSuffix(jsonGenerator);
+            }
+        } else if (writableTypeId.valueShape == JsonToken.START_OBJECT) {
+            jsonGenerator.writeEndObject();
+        } else if (writableTypeId.valueShape == JsonToken.START_ARRAY) {
+            jsonGenerator.writeEndArray();
+        } else {
+            throw new IllegalStateException("Could not write suffix");
         }
-    }
-
-    @Override
-    public void writeCustomTypeSuffixForObject(final Object o, final JsonGenerator jsonGenerator, final String s) throws IOException {
-        jsonGenerator.writeEndObject();
-        // TODO: FULL_TYPES should be implemented here as : if (fullTypesModeEnabled()) writeTypeSuffix(s);
-    }
 
-    @Override
-    public void writeCustomTypeSuffixForArray(final Object o, final JsonGenerator jsonGenerator,final  String s) throws IOException {
-        jsonGenerator.writeEndArray();
-        // TODO: FULL_TYPES should be implemented here as : if (fullTypesModeEnabled()) writeTypeSuffix(s);
+        return writableTypeId;
     }
 
     private boolean canWriteTypeId() {

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f35f04a8/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONMapperV2d0PartialEmbeddedTypeTest.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONMapperV2d0PartialEmbeddedTypeTest.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONMapperV2d0PartialEmbeddedTypeTest.java
index 5b009e1..c388e61 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONMapperV2d0PartialEmbeddedTypeTest.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONMapperV2d0PartialEmbeddedTypeTest.java
@@ -19,8 +19,10 @@
 package org.apache.tinkerpop.gremlin.structure.io.graphson;
 
 import org.apache.tinkerpop.gremlin.process.remote.traversal.DefaultRemoteTraverser;
+import org.apache.tinkerpop.gremlin.process.traversal.Bytecode;
 import org.apache.tinkerpop.gremlin.process.traversal.P;
 import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
+import org.apache.tinkerpop.shaded.jackson.databind.JsonMappingException;
 import org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper;
 import org.junit.Test;
 
@@ -40,6 +42,7 @@ import java.util.Map;
 import java.util.UUID;
 
 import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.core.IsInstanceOf.instanceOf;
 import static org.hamcrest.core.StringContains.containsString;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotEquals;
@@ -56,6 +59,35 @@ public class GraphSONMapperV2d0PartialEmbeddedTypeTest extends AbstractGraphSONT
             .typeInfo(TypeInfo.PARTIAL_TYPES)
             .create()
             .createMapper();
+    @Test
+    public void elementOrderShouldNotMatter() throws Exception {
+        final String bytecodeJSONFail1 = "{\"@type\":\"g:Bytecode\",\"@value\":{\"step\":[[\"addV\",\"poc_int\"],[\"property\",\"bigint1value\",{\"@type\":\"g:Int32\",\"@value\":-4294967295}]]}}";
+        final String bytecodeJSONFail2 = "{\"@value\":{\"step\":[[\"addV\",\"poc_int\"],[\"property\",\"bigint1value\",{\"@value\":-4294967295,\"@type\":\"g:Int32\"}]]},\"@type\":\"g:Bytecode\"}";
+
+        // first validate the failures of TINKERPOP-1738 - prior to the jackson fix on 2.9.4 one of these would have
+        // passed based on the ordering of the properties
+        try {
+            mapper.readValue(bytecodeJSONFail1, Bytecode.class);
+            fail("Should have thrown an error because 'bigint1value' is not an int32");
+        } catch (Exception ex) {
+            assertThat(ex, instanceOf(JsonMappingException.class));
+        }
+
+        try {
+            mapper.readValue(bytecodeJSONFail2, Bytecode.class);
+            fail("Should have thrown an error because 'bigint1value' is not an int32");
+        } catch (Exception ex) {
+            assertThat(ex, instanceOf(JsonMappingException.class));
+        }
+
+        // now do a legit parsing based on order
+        final String bytecodeJSON1 = "{\"@type\":\"g:Bytecode\",\"@value\":{\"step\":[[\"addV\",\"poc_int\"],[\"property\",\"bigint1value\",{\"@type\":\"g:Int64\",\"@value\":-4294967295}]]}}";
+        final String bytecodeJSON2 = "{\"@value\":{\"step\":[[\"addV\",\"poc_int\"],[\"property\",\"bigint1value\",{\"@value\":-4294967295,\"@type\":\"g:Int64\"}]]},\"@type\":\"g:Bytecode\"}";
+
+        final Bytecode bytecode1 = mapper.readValue(bytecodeJSON1, Bytecode.class);
+        final Bytecode bytecode2 = mapper.readValue(bytecodeJSON2, Bytecode.class);
+        assertEquals(bytecode1, bytecode2);
+    }
 
     @Test
     public void shouldSerializeDeserializeNestedCollectionsAndMapAndTypedValuesCorrectly() throws Exception {

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f35f04a8/gremlin-shaded/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-shaded/pom.xml b/gremlin-shaded/pom.xml
index 2219a4e..aeda3d4 100644
--- a/gremlin-shaded/pom.xml
+++ b/gremlin-shaded/pom.xml
@@ -50,7 +50,7 @@ limitations under the License.
             <groupId>com.fasterxml.jackson.core</groupId>
             <artifactId>jackson-databind</artifactId>
             <!-- Update the shade plugin config whenever you change this version -->
-            <version>2.8.10</version>
+            <version>2.9.4</version>
             <optional>true</optional>
         </dependency>
     </dependencies>


[09/50] tinkerpop git commit: Test cleanup - hopefully can run now

Posted by dk...@apache.org.
Test cleanup - hopefully can run now


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

Branch: refs/heads/TINKERPOP-1447
Commit: 750677cf55d7445c3746870d86c6592f6cd3664d
Parents: 80c0b84
Author: Graff, Philip B <Ph...@jhuapl.edu>
Authored: Sat Jan 13 23:49:27 2018 -0500
Committer: Graff, Philip B <Ph...@jhuapl.edu>
Committed: Sun Feb 25 10:44:27 2018 -0500

----------------------------------------------------------------------
 .../process/computer/GraphComputerTest.java     | 97 +++++++++++---------
 1 file changed, 52 insertions(+), 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/750677cf/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
index c34c2dc..0e8d06a 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
@@ -2689,63 +2689,84 @@ public class GraphComputerTest extends AbstractGremlinProcessTest {
 
     @Test
     public void testMessagePassingIn() throws Exception {
-        runTest(Direction.IN).forEachRemaining(v -> {
-            String in = v.value("propin").toString();
-            if (in.equals("a")) {
-                assertEquals("ab", v.value("propout").toString());
-            } else {
-                assertEquals("", v.value("propout").toString());
-            }
+        runTest(Direction.BOTH).forEachRemaining(v -> {
+            assertEquals(2, v.keys().size());
+            assertTrue(v.keys().contains(VertexProgramR.PROPERTY_IN));
+            assertTrue(v.keys().contains(VertexProgramR.PROPERTY_OUT));
+            assertEquals(1, IteratorUtils.count(v.values(VertexProgramR.PROPERTY_IN)));
+            assertEquals(1, IteratorUtils.count(v.values(VertexProgramR.PROPERTY_OUT)));
+            final String in = v.value(VertexProgramR.PROPERTY_IN);
+            if (in.equals("a"))
+                assertEquals("ab", v.value(VertexProgramR.PROPERTY_OUT).toString());
+            else if (in.equals("b"))
+                assertEquals("", v.value(VertexProgramR.PROPERTY_OUT).toString());
+            else
+                throw new IllegalStateException("This vertex should not exist: " + VertexProgramR.PROPERTY_IN
+                        + "=" + String.valueOf(in));
         });
     }
 
     @Test
     public void testMessagePassingOut() throws Exception {
         runTest(Direction.OUT).forEachRemaining(v -> {
-            String in = v.value("propin").toString();
-            if (in.equals("a")) {
-                assertEquals("a", v.value("propout").toString());
-            } else {
-                assertEquals("a", v.value("propout").toString());
-            }
+            assertEquals(2, v.keys().size());
+            assertTrue(v.keys().contains(VertexProgramR.PROPERTY_IN));
+            assertTrue(v.keys().contains(VertexProgramR.PROPERTY_OUT));
+            assertEquals(1, IteratorUtils.count(v.values(VertexProgramR.PROPERTY_IN)));
+            assertEquals(1, IteratorUtils.count(v.values(VertexProgramR.PROPERTY_OUT)));
+            final String in = v.value(VertexProgramR.PROPERTY_IN);
+            if (in.equals("a"))
+                assertEquals("a", v.value(VertexProgramR.PROPERTY_OUT).toString());
+            else if (in.equals("b"))
+                assertEquals("a", v.value(VertexProgramR.PROPERTY_OUT).toString());
+            else
+                throw new IllegalStateException("This vertex should not exist: " + VertexProgramR.PROPERTY_IN
+                        + "=" + String.valueOf(in));
         });
     }
 
     @Test
     public void testMessagePassingBoth() throws Exception {
         runTest(Direction.BOTH).forEachRemaining(v -> {
-            String in = v.value("propin").toString();
-            if (in.equals("a")) {
-                assertEquals("aab", v.value("propout").toString());
-            } else {
-                assertEquals("a", v.value("propout").toString());
-            }
+            assertEquals(2, v.keys().size());
+            assertTrue(v.keys().contains(VertexProgramR.PROPERTY_IN));
+            assertTrue(v.keys().contains(VertexProgramR.PROPERTY_OUT));
+            assertEquals(1, IteratorUtils.count(v.values(VertexProgramR.PROPERTY_IN)));
+            assertEquals(1, IteratorUtils.count(v.values(VertexProgramR.PROPERTY_OUT)));
+            final String in = v.value(VertexProgramR.PROPERTY_IN);
+            if (in.equals("a"))
+                assertEquals("aab", v.value(VertexProgramR.PROPERTY_OUT).toString());
+            else if (in.equals("b"))
+                assertEquals("a", v.value(VertexProgramR.PROPERTY_OUT).toString());
+            else
+                throw new IllegalStateException("This vertex should not exist: " + VertexProgramR.PROPERTY_IN
+                        + "=" + String.valueOf(in));
         });
     }
 
     private GraphTraversal<Vertex, Vertex> runTest(Direction direction) throws Exception {
-        g.addV().property("propin", "a").as("a")
-                .addV().property("propin", "b").as("b")
-                .addE("edge").from("a").to("b").addE("edge").from("a").to("a").iterate();
-        final VertexProgramR svp = VertexProgramR.build().propertyIn("propin")
-                .propertyOut("propout").direction(direction).create();
+        final Vertex a = graph.addVertex(VertexProgramR.PROPERTY_IN, "a");
+        final Vertex b = graph.addVertex(VertexProgramR.PROPERTY_IN, "b");
+        a.addEdge("edge", b);
+        a.addEdge("edge", a);
+        final VertexProgramR svp = VertexProgramR.build().direction(direction).create();
         final ComputerResult result = graphProvider.getGraphComputer(graph).program(svp).submit().get();
         return result.graph().traversal().V();
     }
 
     private static class VertexProgramR implements VertexProgram<String> {
         private static final String SIMPLE_VERTEX_PROGRAM_CFG_PREFIX = "gremlin.simpleVertexProgram";
-        private static final String PROPERTY_OUT_CFG_KEY = SIMPLE_VERTEX_PROGRAM_CFG_PREFIX + ".propertyout";
-        private static final String PROPERTY_IN_CFG_KEY = SIMPLE_VERTEX_PROGRAM_CFG_PREFIX + ".propertyin";
+        private static final String PROPERTY_OUT = "propertyout";
+        private static final String PROPERTY_IN = "propertyin";
         private static final String DIRECTION_CFG_KEY = SIMPLE_VERTEX_PROGRAM_CFG_PREFIX + ".direction";
 
         private final MessageScope.Local<String> inMessageScope = MessageScope.Local.of(__::inE);
         private final MessageScope.Local<String> outMessageScope = MessageScope.Local.of(__::outE);
         private final MessageScope.Local<String> bothMessageScope = MessageScope.Local.of(__::bothE);
         private MessageScope.Local<String> messageScope;
-        private Set<VertexComputeKey> vertexComputeKeys;
-
-        private String propertyout, propertyin;
+        private final Set<VertexComputeKey> vertexComputeKeys = new HashSet<>(Arrays.asList(
+                VertexComputeKey.of(VertexProgramR.PROPERTY_OUT, false),
+                VertexComputeKey.of(VertexProgramR.PROPERTY_IN, false)));
 
         /**
          * Clones this vertex program.
@@ -2756,8 +2777,6 @@ public class GraphComputerTest extends AbstractGremlinProcessTest {
 
         @Override
         public void loadState(final Graph graph, final Configuration configuration) {
-            this.propertyout = configuration.getString(PROPERTY_OUT_CFG_KEY);
-            this.propertyin = configuration.getString(PROPERTY_IN_CFG_KEY);
             Direction direction = Direction.valueOf(configuration.getString(DIRECTION_CFG_KEY));
             switch (direction) {
                 case IN:
@@ -2770,8 +2789,6 @@ public class GraphComputerTest extends AbstractGremlinProcessTest {
                     this.messageScope = this.bothMessageScope;
                     break;
             }
-            this.vertexComputeKeys = new HashSet<>(Arrays.asList(VertexComputeKey.of(this.propertyout, false),
-                    VertexComputeKey.of(this.propertyin, false)));
         }
 
         @Override
@@ -2781,11 +2798,11 @@ public class GraphComputerTest extends AbstractGremlinProcessTest {
         @Override
         public void execute(Vertex vertex, Messenger<String> messenger, Memory memory) {
             if (memory.isInitialIteration()) {
-                messenger.sendMessage(this.messageScope, vertex.value(this.propertyin).toString());
+                messenger.sendMessage(this.messageScope, vertex.value(PROPERTY_IN).toString());
             } else {
                 char[] composite = IteratorUtils.reduce(messenger.receiveMessages(), "", (a, b) -> a + b).toCharArray();
                 Arrays.sort(composite);
-                vertex.property(this.propertyout, new String(composite));
+                vertex.property(PROPERTY_OUT, new String(composite));
             }
         }
 
@@ -2842,16 +2859,6 @@ public class GraphComputerTest extends AbstractGremlinProcessTest {
                 return create(null);
             }
 
-            public Builder propertyOut(final String name) {
-                configuration.setProperty(PROPERTY_OUT_CFG_KEY, name);
-                return this;
-            }
-
-            public Builder propertyIn(final String name) {
-                configuration.setProperty(PROPERTY_IN_CFG_KEY, name);
-                return this;
-            }
-
             public Builder direction(final Direction direction) {
                 configuration.setProperty(DIRECTION_CFG_KEY, direction.toString());
                 return this;


[21/50] tinkerpop git commit: Fixed up more GLV definitions to get more .NET tests pass

Posted by dk...@apache.org.
Fixed up more GLV definitions to get more .NET tests pass


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

Branch: refs/heads/TINKERPOP-1447
Commit: 2c96d424d825ce98d8ad28d915f6fa375fc3b714
Parents: 6cfdfa9
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Mar 1 08:46:53 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Mar 1 08:46:53 2018 -0500

----------------------------------------------------------------------
 .../test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs  | 2 --
 gremlin-test/features/map/Match.feature                            | 2 +-
 gremlin-test/features/sideEffect/SideEffectCap.feature             | 2 +-
 3 files changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2c96d424/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
index 627570c..402a910 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
@@ -47,11 +47,9 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
             { "g_withBulkXfalseX_withSackX1_sumX_VX1X_localXoutEXknowsX_barrierXnormSackX_inVX_inXknowsX_barrier_sack", IgnoreReason.NeedsFurtherInvestigation },
             { "g_withBulkXfalseX_withSackX1_sumX_V_out_barrier_sack", IgnoreReason.NeedsFurtherInvestigation },
             { "g_withSackX1_sumX_VX1X_localXoutXknowsX_barrierXnormSackXX_inXknowsX_barrier_sack", IgnoreReason.NeedsFurtherInvestigation },
-            { "g_V_hasXageX_groupCountXaX_byXnameX_out_capXaX", IgnoreReason.NeedsFurtherInvestigation },
             { "g_V_hasXname_markoX_propertyXfriendWeight_outEXknowsX_weight_sum__acl_privateX", IgnoreReason.NeedsFurtherInvestigation },
             { "g_V_outE_weight_groupCount_unfold_selectXkeysX_unfold", IgnoreReason.NeedsFurtherInvestigation },
             { "g_V_outE_weight_groupCount_selectXkeysX_unfold", IgnoreReason.NeedsFurtherInvestigation },
-            { "g_V_asXaX_out_asXbX_matchXa_out_count_c__b_in_count_cX", IgnoreReason.NeedsFurtherInvestigation },
             { "g_V_foo_injectX9999999999X_min", IgnoreReason.NeedsFurtherInvestigation },
             { "g_V_hasLabelXpersonX_group_byXnameX_byXoutE_weight_sumX_orderXlocalX_byXvaluesX", IgnoreReason.NeedsFurtherInvestigation },
             { "g_V_localXbothE_weight_foldX_order_byXsumXlocalX_decrX", IgnoreReason.NeedsFurtherInvestigation },

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2c96d424/gremlin-test/features/map/Match.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/map/Match.feature b/gremlin-test/features/map/Match.feature
index e44d363..55dffcf 100644
--- a/gremlin-test/features/map/Match.feature
+++ b/gremlin-test/features/map/Match.feature
@@ -134,7 +134,7 @@ Feature: Step - match()
     When iterated to list
     Then the result should be unordered
       | result |
-      | m[{"a":"v[marko]","b":"v[lop]","c":3}] |
+      | m[{"a":"v[marko]","b":"v[lop]","c":"d[3].l"}] |
 
   Scenario: g_V_matchXa__a_out_b__notXa_created_bXX
     Given the modern graph

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2c96d424/gremlin-test/features/sideEffect/SideEffectCap.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/sideEffect/SideEffectCap.feature b/gremlin-test/features/sideEffect/SideEffectCap.feature
index 795db7e..437bd08 100644
--- a/gremlin-test/features/sideEffect/SideEffectCap.feature
+++ b/gremlin-test/features/sideEffect/SideEffectCap.feature
@@ -26,7 +26,7 @@ Feature: Step - cap()
     When iterated to list
     Then the result should be unordered
       | result |
-      | m[{"peter":"d[1].i", "vadas":"d[1].i", "josh":"d[1].i", "marko": "d[1].i"}] |
+      | m[{"peter":"d[1].l", "vadas":"d[1].l", "josh":"d[1].l", "marko": "d[1].l"}] |
 
   Scenario: g_V_chooseXlabel_person__age_groupCountXaX__name_groupCountXbXX_capXa_bX
     Given an unsupported test


[42/50] tinkerpop git commit: TINKERPOP-1885 Add Gremlin.Net logo for NuGet package CTR

Posted by dk...@apache.org.
TINKERPOP-1885 Add Gremlin.Net logo for NuGet package CTR


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

Branch: refs/heads/TINKERPOP-1447
Commit: 0bc84bdea2a130aede0c11a17bf3adcad741fbcb
Parents: eeeb4ee
Author: Florian Hockmann <fh...@florian-hockmann.de>
Authored: Tue Mar 6 20:31:27 2018 +0100
Committer: Florian Hockmann <fh...@florian-hockmann.de>
Committed: Tue Mar 6 20:31:27 2018 +0100

----------------------------------------------------------------------
 docs/static/images/gremlin-dotnet-logo_256x256.png | Bin 0 -> 24406 bytes
 gremlin-dotnet/glv/Gremlin.Net.csproj.template     |   1 +
 gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj  |   1 +
 3 files changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0bc84bde/docs/static/images/gremlin-dotnet-logo_256x256.png
----------------------------------------------------------------------
diff --git a/docs/static/images/gremlin-dotnet-logo_256x256.png b/docs/static/images/gremlin-dotnet-logo_256x256.png
new file mode 100644
index 0000000..a7c0f2a
Binary files /dev/null and b/docs/static/images/gremlin-dotnet-logo_256x256.png differ

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0bc84bde/gremlin-dotnet/glv/Gremlin.Net.csproj.template
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/glv/Gremlin.Net.csproj.template b/gremlin-dotnet/glv/Gremlin.Net.csproj.template
index 48b9b3c..ce36e76 100644
--- a/gremlin-dotnet/glv/Gremlin.Net.csproj.template
+++ b/gremlin-dotnet/glv/Gremlin.Net.csproj.template
@@ -46,6 +46,7 @@ NOTE: Gremlin.Net is an extension of the Gremlin.Net driver by Florian Hockmann
     <PackageTags>gremlin;tinkerpop;apache</PackageTags>
     <PackageProjectUrl>http://tinkerpop.apache.org</PackageProjectUrl>
     <PackageLicenseUrl>https://github.com/apache/tinkerpop/blob/master/LICENSE</PackageLicenseUrl>
+    <PackageIconUrl>http://tinkerpop.apache.org/docs/current/images/gremlin-dotnet-logo_256x256.png</PackageIconUrl>
     <RepositoryUrl>https://github.com/apache/tinkerpop</RepositoryUrl>
   </PropertyGroup>
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0bc84bde/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj b/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj
index 25787ec..445a9bc 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj
+++ b/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj
@@ -46,6 +46,7 @@ NOTE: Gremlin.Net is an extension of the Gremlin.Net driver by Florian Hockmann
     <PackageTags>gremlin;tinkerpop;apache</PackageTags>
     <PackageProjectUrl>http://tinkerpop.apache.org</PackageProjectUrl>
     <PackageLicenseUrl>https://github.com/apache/tinkerpop/blob/master/LICENSE</PackageLicenseUrl>
+    <PackageIconUrl>http://tinkerpop.apache.org/docs/current/images/gremlin-dotnet-logo_256x256.png</PackageIconUrl>
     <RepositoryUrl>https://github.com/apache/tinkerpop</RepositoryUrl>
   </PropertyGroup>
 


[03/50] tinkerpop git commit: Merge branch 'TINKERPOP-1872' into tp32

Posted by dk...@apache.org.
Merge branch 'TINKERPOP-1872' into tp32

Conflicts:
	CHANGELOG.asciidoc


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

Branch: refs/heads/TINKERPOP-1447
Commit: 3df6c5806a585e8e1c381e4043338110ef8b4517
Parents: d42d54d 0f0d97a
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Feb 23 07:00:39 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Feb 23 07:00:39 2018 -0500

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 .../process/computer/GraphComputerTest.java     | 70 ++++++++++++++++
 .../spark/process/computer/SparkMessenger.java  |  2 +-
 .../process/computer/SparkMessengerTest.java    | 86 ++++++++++++++++++++
 4 files changed, 158 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3df6c580/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --cc CHANGELOG.asciidoc
index f1519b6,4d93912..1ed018c
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@@ -31,7 -27,7 +31,8 @@@ image::https://raw.githubusercontent.co
  * Removed hardcoded expectation in metrics serialization test suite as different providers may have different outputs.
  * Added `IndexedTraverserSet` which indexes on the value of a `Traverser` thus improving performance when used.
  * Utilized `IndexedTraverserSet` in `TraversalVertexProgram` to avoid extra iteration when doing `Vertex` lookups.
 +* Fixed a bug in Gremlin Console which prevented handling of `gremlin.sh` flags that had an "=" between the flag and its arguments.
+ * Fixed bug where `SparkMessenger` was not applying the `edgeFunction` from `MessageScope`.
  * Fixed a bug in `ComputerAwareStep` that didn't handle `reset()` properly and thus occasionally produced some extra traversers.
  
  [[release-3-2-7]]


[37/50] tinkerpop git commit: Update to apache pom version 19 CTR

Posted by dk...@apache.org.
Update to apache pom version 19 CTR


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

Branch: refs/heads/TINKERPOP-1447
Commit: 81e6ba6fc4b49cc66b1ede2dd41a97495168b8e8
Parents: 4db0991
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Mar 5 07:01:02 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Mar 5 07:01:02 2018 -0500

----------------------------------------------------------------------
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/81e6ba6f/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index f6ff536..5a3db27 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,7 +21,7 @@ limitations under the License.
     <parent>
         <groupId>org.apache</groupId>
         <artifactId>apache</artifactId>
-        <version>18</version>
+        <version>19</version>
     </parent>
     <groupId>org.apache.tinkerpop</groupId>
     <artifactId>tinkerpop</artifactId>


[24/50] tinkerpop git commit: Fixed up failing .NET GLV test

Posted by dk...@apache.org.
Fixed up failing .NET GLV test

Was using "foo" as a property key that .NET gherkin parser didn't know about. CTR


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

Branch: refs/heads/TINKERPOP-1447
Commit: 2ddf2e3110376acfd6ef7d8142ba156eb27de6c5
Parents: eab4bce
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Mar 1 09:46:16 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Mar 1 09:46:16 2018 -0500

----------------------------------------------------------------------
 .../test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs | 1 -
 .../Gherkin/TraversalEvaluation/ModernGraphTypeInformation.cs     | 3 ++-
 gremlin-test/features/map/Min.feature                             | 3 ++-
 3 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2ddf2e31/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
index 0685d89..a8c25ec 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
@@ -44,7 +44,6 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
             { "g_V_hasXname_markoX_propertyXfriendWeight_outEXknowsX_weight_sum__acl_privateX", IgnoreReason.NeedsFurtherInvestigation },
             { "g_V_outE_weight_groupCount_unfold_selectXkeysX_unfold", IgnoreReason.NeedsFurtherInvestigation },
             { "g_V_outE_weight_groupCount_selectXkeysX_unfold", IgnoreReason.NeedsFurtherInvestigation },
-            { "g_V_foo_injectX9999999999X_min", IgnoreReason.NeedsFurtherInvestigation },
             { "g_V_hasLabelXpersonX_group_byXnameX_byXoutE_weight_sumX_orderXlocalX_byXvaluesX", IgnoreReason.NeedsFurtherInvestigation },
             { "g_V_hasLabelXpersonX_group_byXnameX_byXoutE_weight_sumX_unfold_order_byXvalues_decrX", IgnoreReason.NeedsFurtherInvestigation }
         };

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2ddf2e31/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/ModernGraphTypeInformation.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/ModernGraphTypeInformation.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/ModernGraphTypeInformation.cs
index aec3d3e..7eca018 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/ModernGraphTypeInformation.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/ModernGraphTypeInformation.cs
@@ -37,7 +37,8 @@ namespace Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation
             {"age", typeof(int)},
             {"name", typeof(string)},
             {"lang", typeof(string)},
-            {"weight", typeof(float)}
+            {"weight", typeof(float)},
+            {"foo", typeof(object)} // used when for invalid property key lookups
         };
         
         /// <summary>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2ddf2e31/gremlin-test/features/map/Min.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/map/Min.feature b/gremlin-test/features/map/Min.feature
index 99d53dd..d77e9f3 100644
--- a/gremlin-test/features/map/Min.feature
+++ b/gremlin-test/features/map/Min.feature
@@ -52,9 +52,10 @@ Feature: Step - min()
 
   Scenario: g_V_foo_injectX9999999999X_min
     Given the modern graph
+    And using the parameter injectVal defined as "d[9999999999].l"
     And the traversal of
       """
-      g.V().values("foo").inject(9999999999L).min()
+      g.V().values("foo").inject(injectVal).min()
       """
     When iterated to list
     Then the result should be unordered


[06/50] tinkerpop git commit: Updated dev docs for release candidates CTR

Posted by dk...@apache.org.
Updated dev docs for release candidates CTR


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

Branch: refs/heads/TINKERPOP-1447
Commit: 072f112df0faff4d8e78772e73c8b708e184a44b
Parents: 5b4bd00
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Sat Feb 24 16:00:37 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Sat Feb 24 16:00:37 2018 -0500

----------------------------------------------------------------------
 docs/src/dev/developer/release.asciidoc | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/072f112d/docs/src/dev/developer/release.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/dev/developer/release.asciidoc b/docs/src/dev/developer/release.asciidoc
index 44afe8f..fab9819 100644
--- a/docs/src/dev/developer/release.asciidoc
+++ b/docs/src/dev/developer/release.asciidoc
@@ -135,7 +135,8 @@ of the published documentation on the dev mailing list.
 
 A release candidate is an unofficial release that is represented by a tagged version in the Git repository.  It is
 offered in cases where there is significant change in a particular version and the potential for upgrades and problems
-might be high.
+might be high. Release candidates do not require a vote thread. Lazy consensus is acceptable for confirming their
+deployment.
 
 . `mvn clean install -DincludeNeo4j`
 .. `mvn verify -DskipIntegrationTests=false -DincludeNeo4j`
@@ -153,6 +154,14 @@ might be high.
 . Announce the release candidate to `dev` mailing list and await feedback
 . Repeat as required or proceed to the next phase
 
+Note that release candidates need not require the release of all artifacts. For example, if the risk is with one
+particular GLV, then a release candidate can be prepared of just that particular artifact. In those cases, a tag on
+the commit that represents the release candidate is sufficient and does not necessarily require that the versions
+be bumped to reflect the actual "-rc" version. In other words, if preparing a release candidate for .NET, then there
+is no need to go through the processing of bumping versions in Java artifacts and all GLVs. Nor is it necessary to
+alter the version of .NET to include the release candidate versioning. It can simply be altered locally by the
+release manager and deployed.
+
 == PMC Vote
 
 This section describes the process that process that prepares a release for VOTE by the community. If there are multiple


[44/50] tinkerpop git commit: Removed some dead/println code from test CTR

Posted by dk...@apache.org.
Removed some dead/println code from test CTR


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

Branch: refs/heads/TINKERPOP-1447
Commit: 03a96f89609b7a84e10b2c02e35f022b6fd1e05e
Parents: c1de9f2
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Mar 7 15:05:12 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Mar 7 15:08:27 2018 -0500

----------------------------------------------------------------------
 .../process/computer/SparkMessengerTest.java    | 21 ++++----------------
 1 file changed, 4 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/03a96f89/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkMessengerTest.java
----------------------------------------------------------------------
diff --git a/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkMessengerTest.java b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkMessengerTest.java
index c280ab2..17224a1 100644
--- a/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkMessengerTest.java
+++ b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkMessengerTest.java
@@ -19,11 +19,9 @@
 
 package org.apache.tinkerpop.gremlin.spark.process.computer;
 
-import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.tinkerpop.gremlin.process.computer.MessageScope;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
 import org.apache.tinkerpop.gremlin.spark.AbstractSparkTest;
-import org.apache.tinkerpop.gremlin.structure.Edge;
 import org.apache.tinkerpop.gremlin.structure.T;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.apache.tinkerpop.gremlin.structure.util.star.StarGraph;
@@ -33,29 +31,22 @@ import scala.Tuple2;
 
 import java.util.Arrays;
 import java.util.List;
-import java.util.function.BiFunction;
 
 /**
  * @author Dean Zhu
  */
 public class SparkMessengerTest extends AbstractSparkTest {
-    private static ObjectMapper objectmapper = new ObjectMapper();
 
     @Test
     public void testSparkMessenger() throws Exception {
         // Define scopes
         final MessageScope.Local<String> orderSrcMessageScope = MessageScope.Local
-                .of(__::inE, new BiFunction<String, Edge, String>() {
-                    @Override
-                    public String apply(String message, Edge edge) {
-                        System.out.println(edge);
-                        if ("mocked_edge_label1".equals(edge.label())) {
-                            return message;
-                        }
-                        return null;
+                .of(__::inE, (message, edge) -> {
+                    if ("mocked_edge_label1".equals(edge.label())) {
+                        return message;
                     }
+                    return null;
                 });
-        final MessageScope.Local<String> inMessageScope = MessageScope.Local.of(__::inE);
 
         // Define star graph
         final StarGraph starGraph = StarGraph.open();
@@ -75,12 +66,8 @@ public class SparkMessengerTest extends AbstractSparkTest {
 
         messenger.sendMessage(orderSrcMessageScope, "a");
         List<Tuple2<Object, String>> outgoingMessages0 = messenger.getOutgoingMessages();
-        System.out.println(objectmapper.writeValueAsString(outgoingMessages0));
 
         Assert.assertEquals("a", outgoingMessages0.get(0)._2());
         Assert.assertNull(outgoingMessages0.get(1)._2());
-        //messenger.sendMessage(inMessageScope, "a");
-        //List<Tuple2<Object, String>> outgoingMessages1 = messenger.getOutgoingMessages();
-        //System.out.println(objectmapper.writeValueAsString(outgoingMessages1));
     }
 }
\ No newline at end of file


[19/50] tinkerpop git commit: Merge branch 'TINKERPOP-1586' into tp32

Posted by dk...@apache.org.
Merge branch 'TINKERPOP-1586' into tp32


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

Branch: refs/heads/TINKERPOP-1447
Commit: d52051615783c83f7d185b257059ec2d37e97095
Parents: 3aa9e70 d112154
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Feb 28 15:40:20 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 28 15:40:20 2018 -0500

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 .../strategy/decoration/SubgraphStrategy.java   | 58 ++++++++++----
 .../decoration/SubgraphStrategyProcessTest.java | 84 ++++++++++++++++++++
 3 files changed, 127 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d5205161/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --cc CHANGELOG.asciidoc
index 60e0ef4,1701342..92e1d9e
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@@ -23,9 -23,9 +23,10 @@@ image::https://raw.githubusercontent.co
  [[release-3-2-8]]
  === TinkerPop 3.2.8 (Release Date: NOT OFFICIALLY RELEASED YET)
  
+ * Added `checkAdjacentVertices` option to `SubgraphStrategy`.
  * Modified `GremlinDslProcessor` so that it generated the `getAnonymousTraversalClass()` method to return the DSL version of `__`.
  * Added the "Kitchen Sink" test data set.
 +* Added `idleConnectionTimeout` and `keepAliveInterval` to Gremlin Server that enables a "ping" and auto-close for seemingly dead clients.
  * Fixed a bug in `NumberHelper` that led to wrong min/max results if numbers exceeded the Integer limits.
  * Delayed setting of the request identifier until `RequestMessage` construction by the builder.
  * Improved error messaging for failed serialization and deserialization of request/response messages.


[07/50] tinkerpop git commit: TinkerMessenger proper handling of Direction.BOTH

Posted by dk...@apache.org.
TinkerMessenger proper handling of Direction.BOTH


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

Branch: refs/heads/TINKERPOP-1447
Commit: f02ea338a8d039c50896f7c65ca57a695975fc43
Parents: 072f112
Author: Graff, Philip B <Ph...@jhuapl.edu>
Authored: Thu Jan 4 13:27:44 2018 -0500
Committer: Graff, Philip B <Ph...@jhuapl.edu>
Committed: Sun Feb 25 10:43:57 2018 -0500

----------------------------------------------------------------------
 .../tinkergraph/process/computer/TinkerMessenger.java    | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f02ea338/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/process/computer/TinkerMessenger.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/process/computer/TinkerMessenger.java b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/process/computer/TinkerMessenger.java
index 5a0f478..3e49c34 100644
--- a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/process/computer/TinkerMessenger.java
+++ b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/process/computer/TinkerMessenger.java
@@ -68,7 +68,16 @@ public final class TinkerMessenger<M> implements Messenger<M> {
                 final Direction direction = TinkerMessenger.getDirection(incidentTraversal);
                 final Edge[] edge = new Edge[1]; // simulates storage side-effects available in Gremlin, but not Java8 streams
                 multiIterator.addIterator(StreamSupport.stream(Spliterators.spliteratorUnknownSize(VertexProgramHelper.reverse(incidentTraversal.asAdmin()), Spliterator.IMMUTABLE | Spliterator.SIZED), false)
-                        .map(e -> this.messageBoard.receiveMessages.get(messageScope).get((edge[0] = e).vertices(direction).next()))
+                        .map((Edge e) -> {
+                            edge[0] = e;
+                            Vertex vv;
+                            if (direction.equals(Direction.IN) || direction.equals(Direction.OUT)) {
+                                vv = e.vertices(direction).next();
+                            } else {
+                                vv = e.outVertex() == this.vertex ? e.inVertex() : e.outVertex();
+                            }
+                            return this.messageBoard.receiveMessages.get(messageScope).get(vv);
+                        })
                         .filter(q -> null != q)
                         .flatMap(Queue::stream)
                         .map(message -> localMessageScope.getEdgeFunction().apply(message, edge[0]))


[36/50] tinkerpop git commit: TINKERPOP-1509 tree() tests working now

Posted by dk...@apache.org.
TINKERPOP-1509 tree() tests working now

Seems like this was fixed at some point a while back. Test is passing consistently now. CTR


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

Branch: refs/heads/TINKERPOP-1447
Commit: 4db099137548d4dcfe2534112282f052710bff9e
Parents: a61dd58
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Mar 2 15:00:49 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Mar 2 15:00:49 2018 -0500

----------------------------------------------------------------------
 .../driver/ser/GraphSONMessageSerializerGremlinV2d0Test.java        | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4db09913/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerGremlinV2d0Test.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerGremlinV2d0Test.java b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerGremlinV2d0Test.java
index fb9bfe2..7b25120 100644
--- a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerGremlinV2d0Test.java
+++ b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerGremlinV2d0Test.java
@@ -261,7 +261,6 @@ public class GraphSONMessageSerializerGremlinV2d0Test {
     }
 
     @Test
-    @org.junit.Ignore
     public void shouldSerializeToTreeJson() throws Exception {
         final TinkerGraph graph = TinkerFactory.createClassic();
         final GraphTraversalSource g = graph.traversal();


[26/50] tinkerpop git commit: Fixed GLV types in tests that were failing for .NET CTR

Posted by dk...@apache.org.
Fixed GLV types in tests that were failing for .NET CTR


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

Branch: refs/heads/TINKERPOP-1447
Commit: c97251297e47a3dafb3541d886e14e4cd28cc5f5
Parents: bbc96ee
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Mar 1 10:16:08 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Mar 1 10:16:45 2018 -0500

----------------------------------------------------------------------
 .../Gherkin/GherkinTestRunner.cs                    |  4 +---
 gremlin-test/features/map/Select.feature            | 16 ++++++++--------
 2 files changed, 9 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c9725129/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
index 3b39cd3..cc2b540 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
@@ -41,9 +41,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
             { "g_V_hasLabelXpersonX_hasXage_notXlteX10X_andXnotXbetweenX11_20XXXX_andXltX29X_orXeqX35XXXX_name", IgnoreReason.NeedsFurtherInvestigation }, // TINKERPOP-1859??
             { "g_VX1X_out_aggregateXxX_out_whereXnotXwithinXaXXX", IgnoreReason.NeedsFurtherInvestigation }, // TINKERPOP-1859??
             { "g_withBulkXfalseX_withSackX1_sumX_V_out_barrier_sack", IgnoreReason.NeedsFurtherInvestigation },
-            { "g_V_hasXname_markoX_propertyXfriendWeight_outEXknowsX_weight_sum__acl_privateX", IgnoreReason.NeedsFurtherInvestigation },
-            { "g_V_outE_weight_groupCount_unfold_selectXkeysX_unfold", IgnoreReason.NeedsFurtherInvestigation },
-            { "g_V_outE_weight_groupCount_selectXkeysX_unfold", IgnoreReason.NeedsFurtherInvestigation }
+            { "g_V_hasXname_markoX_propertyXfriendWeight_outEXknowsX_weight_sum__acl_privateX", IgnoreReason.NeedsFurtherInvestigation }
         };
         
         private static class Keywords

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c9725129/gremlin-test/features/map/Select.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/map/Select.feature b/gremlin-test/features/map/Select.feature
index d77e21f..35d9322 100644
--- a/gremlin-test/features/map/Select.feature
+++ b/gremlin-test/features/map/Select.feature
@@ -347,10 +347,10 @@ Feature: Step - select()
     When iterated to list
     Then the result should be unordered
       | result |
-      | d[0.5].f |
-      | d[1.0].f |
-      | d[0.4].f |
-      | d[0.2].f |
+      | d[0.5].d |
+      | d[1.0].d |
+      | d[0.4].d |
+      | d[0.2].d |
 
   Scenario: g_V_hasLabelXsoftwareX_asXnameX_asXlanguageX_asXcreatorsX_selectXname_language_creatorsX_byXnameX_byXlangX_byXinXcreatedX_name_fold_orderXlocalXX
     Given the modern graph
@@ -374,10 +374,10 @@ Feature: Step - select()
     When iterated to list
     Then the result should be unordered
       | result |
-      | d[0.5].f |
-      | d[1.0].f |
-      | d[0.4].f |
-      | d[0.2].f |
+      | d[0.5].d |
+      | d[1.0].d |
+      | d[0.4].d |
+      | d[0.2].d |
 
   Scenario: g_V_outE_weight_groupCount_unfold_selectXvaluesX_unfold
     Given the modern graph


[25/50] tinkerpop git commit: Fixed some types in GLV tests that were failing for .NET CTR

Posted by dk...@apache.org.
Fixed some types in GLV tests that were failing for .NET CTR


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

Branch: refs/heads/TINKERPOP-1447
Commit: bbc96eeaf41e97ec0fecc1e7a36da824e9654015
Parents: 2ddf2e3
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Mar 1 10:07:33 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Mar 1 10:07:33 2018 -0500

----------------------------------------------------------------------
 .../Gherkin/GherkinTestRunner.cs                    |  4 +---
 gremlin-test/features/map/Order.feature             | 16 ++++++++--------
 2 files changed, 9 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/bbc96eea/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
index a8c25ec..3b39cd3 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
@@ -43,9 +43,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
             { "g_withBulkXfalseX_withSackX1_sumX_V_out_barrier_sack", IgnoreReason.NeedsFurtherInvestigation },
             { "g_V_hasXname_markoX_propertyXfriendWeight_outEXknowsX_weight_sum__acl_privateX", IgnoreReason.NeedsFurtherInvestigation },
             { "g_V_outE_weight_groupCount_unfold_selectXkeysX_unfold", IgnoreReason.NeedsFurtherInvestigation },
-            { "g_V_outE_weight_groupCount_selectXkeysX_unfold", IgnoreReason.NeedsFurtherInvestigation },
-            { "g_V_hasLabelXpersonX_group_byXnameX_byXoutE_weight_sumX_orderXlocalX_byXvaluesX", IgnoreReason.NeedsFurtherInvestigation },
-            { "g_V_hasLabelXpersonX_group_byXnameX_byXoutE_weight_sumX_unfold_order_byXvalues_decrX", IgnoreReason.NeedsFurtherInvestigation }
+            { "g_V_outE_weight_groupCount_selectXkeysX_unfold", IgnoreReason.NeedsFurtherInvestigation }
         };
         
         private static class Keywords

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/bbc96eea/gremlin-test/features/map/Order.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/map/Order.feature b/gremlin-test/features/map/Order.feature
index e7ff00c..6dd8ac4 100644
--- a/gremlin-test/features/map/Order.feature
+++ b/gremlin-test/features/map/Order.feature
@@ -192,7 +192,7 @@ Feature: Step - order()
     When iterated to list
     Then the result should be ordered
       | result |
-      | m[{"vadas":"d[0].d","peter":"d[0.2].d","josh":"d[1.4].d","marko":"d[1.9].d"}] |
+      | m[{"vadas":"d[0].i","peter":"d[0.2].d","josh":"d[1.4].d","marko":"d[1.9].d"}] |
 
   Scenario: g_V_localXbothE_weight_foldX_order_byXsumXlocalX_decrX
     Given the modern graph
@@ -203,12 +203,12 @@ Feature: Step - order()
     When iterated to list
     Then the result should be ordered
       | result |
-      | l[d[1.0].f,d[0.4].f,d[1.0].f] |
-      | l[d[0.4].f,d[0.5].f,d[1.0].f] |
-      | l[d[0.4].f,d[0.4].f,d[0.2].f] |
-      | l[d[1.0].f]                   |
-      | l[d[0.5].f]                   |
-      | l[d[0.2].f]                   |
+      | l[d[1.0].d,d[0.4].d,d[1.0].d] |
+      | l[d[0.4].d,d[0.5].d,d[1.0].d] |
+      | l[d[0.4].d,d[0.4].d,d[0.2].d] |
+      | l[d[1.0].d]                   |
+      | l[d[0.5].d]                   |
+      | l[d[0.2].d]                   |
 
   Scenario: g_V_group_byXlabelX_byXname_order_byXdecrX_foldX
     Given the modern graph
@@ -233,7 +233,7 @@ Feature: Step - order()
       | m[{"marko":"d[1.9].d"}]  |
       | m[{"josh":"d[1.4].d"}]  |
       | m[{"peter":"d[0.2].d"}]  |
-      | m[{"vadas":"d[0].d"}]  |
+      | m[{"vadas":"d[0].i"}]  |
 
   Scenario: g_V_asXvX_mapXbothE_weight_foldX_sumXlocalX_asXsX_selectXv_sX_order_byXselectXsX_decrX
     Given the modern graph


[05/50] tinkerpop git commit: Added some docs about Gherkin tests CTR

Posted by dk...@apache.org.
Added some docs about Gherkin tests CTR


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

Branch: refs/heads/TINKERPOP-1447
Commit: 5b4bd0074f5547ecb9b08a751a3b7b0988835ed8
Parents: d970564
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Sat Feb 24 11:51:27 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Sat Feb 24 11:51:27 2018 -0500

----------------------------------------------------------------------
 docs/src/dev/developer/for-committers.asciidoc | 216 +++++++++++++++++++-
 1 file changed, 215 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5b4bd007/docs/src/dev/developer/for-committers.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/dev/developer/for-committers.asciidoc b/docs/src/dev/developer/for-committers.asciidoc
index 14fa90a..b44de9a 100644
--- a/docs/src/dev/developer/for-committers.asciidoc
+++ b/docs/src/dev/developer/for-committers.asciidoc
@@ -174,7 +174,14 @@ for an example.
 
 === Gremlin Language Test Cases
 
-When writing a test case for a Gremlin step, be sure to use the following conventions.
+Test cases for the Gremlin Language currently requires that the newly developed test be added in three places:
+
+1. As a test written in Java in the `gremlin-test` module within the subpackages of
+`org.apache.tinkerpop.gremlin.process.traversal.step`
+2. As a test written in Groovy in the `gremlin-groovy-test` module within the same subpackage structure as `gremlin-test`
+3. As a test written in Gherkin in the `gremlin-test` module in the `/features` subdirectory
+
+When writing a Java test case for a Gremlin step, be sure to use the following conventions.
 
 * The name of the traversal generator should start with `get`, use `X` for brackets, `_` for space, and the Gremlin-Groovy sugar syntax.
 ** `get_g_V_hasLabelXpersonX_groupXaX_byXageX_byXsumX_name()`
@@ -189,6 +196,213 @@ When writing a test case for a Gremlin step, be sure to use the following conven
 ** `checkResults(Arrays.asList("marko","josh"), traversal)`
 ** `checkMap(new HashMap<String,Long>() {{ put("marko",1l); }}, traversal.next())`
 
+Groovy tests are implemented by extending the Java test and implementing the abstract method that produces the
+traversal. Simply follow existing patterns in those tests - they are self-evident.
+
+Gherkin tests follow some important conventions and have a sub-language that must be adhered to for the tests to
+function properly. Note that Gherkin tests are designed to support the testing of GLVs and at some point will likely
+replace the Java tests (Groovy tests have already been removed in 3.3.x). If a new Java test is added and an associated
+Gherkin tests is not, the overall build will fail the `FeatureCoverageTest` of `gremlin-test` which validates that all
+tests written in Java are also implemented in Gherkin.
+
+The basic syntax of a Gherkin test is as follows:
+
+[source,gherkin]
+----
+Scenario: g_VX1X_unionXrepeatXoutX_timesX2X__outX_name
+  Given the modern graph
+  And using the parameter v1Id defined as "v[marko].id"
+  And the traversal of
+    """
+    g.V(v1Id).union(__.repeat(__.out()).times(2), __.out()).values("name")
+    """
+  When iterated to list
+  Then the result should be unordered
+    | result |
+    | ripple |
+    | lop |
+    | lop   |
+    | vadas |
+    | josh  |
+----
+
+==== Scenario Name
+
+The name of the scenario needs to match the name of the Java test. If it does not then the `FeatureCoverageTest` will
+fail.
+
+==== Given
+
+"Given" sets the context of the test. Specifically, it establishes the graph that will be used for the test. It
+conforms to the pattern of "Given the _xxx_ graph" where the "xxx" may be one of the following:
+
+* empty
+* modern
+* classic
+* crew
+* sink
+* grateful
+
+Never modify the data of any of the graphs except for the "empty" graph. The "empty" graph is the only graph that is
+guaranteed to be refreshed between tests. The "empty" graph maybe be modified by the traversal under test or by an
+additional "Given" option:
+
+[source,gherkin]
+----
+Given the empty graph
+And the graph initializer of
+  """
+  g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
+    addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
+    addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
+    addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
+    addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
+    addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
+    addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
+    addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
+    addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
+    addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
+    addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
+    addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+  """
+----
+
+The above configuration will use the "empty" graph and initialize it with the specified traversal. In this case, that
+traversal loads the "empty" graph with the "modern" graph.
+
+Once the graph for the test is defined, the context can be expanded to include parameters that will be applied to the
+traversal under test. Any variable value being used in the traversal under test, especially ones that require a
+specific type, should be defined as parameters. The structure for parameter definition looks like this:
+
+[source,gherkin]
+----
+Given the modern graph
+And using the parameter v1Id defined as "v[marko].id"
+----
+
+In the above example, "v1Id" is the name of the parameter that will be used in the traversal. The end of that line in
+quotes is the value of that parameter and should use the type system notation that has been developed for the TinkerPop
+Gherkin tests. The type system notation ensures that different language variants have the ability to construct the
+appropriate types expected by the tests.
+
+The syntax of the type notation involves a prefix character to help denote the type, a value between two square
+brackets, optionally suffixed with some additional notation depending on the primary type.
+
+* Edge - *e[_xxx_]* - The "xxx" should be replaced with a representation of an edge in the form of the
+`vertex_name-edgelabel->vertex_name`. This syntax may also include the `.id` suffix which would indicate getting the
+edge identifier or the `.sid` suffix which gets a string representation of the edge identifier.
+* Lambda - *c[_xxx_]* - The "xxx" should contain a lambda written in Groovy.
+* List - *l[_xxx_,_yyy_,_zzz_,...]* - A comma separated collection of values that make up the list should be added to
+between the square brackets. These values respect the type system thus allowing for creation of lists of vertices,
+edges, maps, and any other available type.
+* Map - *m[_xxx_]* - The "xxx" should be replaced with a JSON string. Note that keys and values will be parsed using
+the type notation system so that it is possible to have maps containing arbitrary keys and values.
+* Numeric - *d[_xxx_]._y_* - The "xxx" should be replaced with a number. The suffix denoted by "y" should always be
+included to further qualify the type of numeric. The following options are available:
+** *d* - 32-bit Double
+** *f* - 32-bit Float
+** *i* - 32-bit Integer
+** *l* - 64-bit Long
+** *m* - Arbitrary-precision signed decimal numbers (i.e. BigDecimal in Java)
+* Path - *p[_xxx_,_yyy_,_zzz_,...]* - A comma separated collection of values that make up the `Path` should be added to
+between the square brackets. These values respect the type system thus allowing for creation of `Path` of vertices,
+edges, maps, and any other available type.
+* Set - *s[_xxx_,_yyy_,_zzz_,...]* - A comma separated collection of values that make up the set should be added to
+between the square brackets. These values respect the type system thus allowing for creation of sets of vertices,
+edges, maps, and any other available type.
+* String - Any value not using the system notation will be interpreted as a string.
+* T - *t[_xxx_]* - The "xxx" should be replaced with a value of the `T` enum, such as `id` or `label`.
+* Vertex - *v[_xxx_]* - The "xxx" should be replaced with the "name" property of a vertex in the graph. This syntax may
+include the `.id` suffix which would indicate getting the vertex identifier or the `.sid` suffix which gets a string
+representation of the edge identifier.
+
+Finally, specify the traversal under test with the "Given" option "and the traversal":
+
+[source,gherkin]
+----
+And the traversal of
+  """
+  g.V(v1Id).union(__.repeat(__.out()).times(2), __.out()).values("name")
+  """
+----
+
+It will be the results of this traversal that end up being asserted by Gherkin. When writing these test traversals,
+be sure to always use the method and enum prefixes. For example, use  `__.out()` for an anonymous traversal rather
+than just `out()` and prefer `Scope.local` rather than just `local`.
+
+If a particular test cannot be written in Gherkin for some reason or cannot be otherwise supported by a GLV, first,
+consider whether or not this test can be re-written in Java so that it will work for GLVs and then, second, if it
+cannot, then use the following syntax for unsupported tests:
+
+[source,gherkin]
+----
+Scenario: g_V_outXcreatedX_groupCountXxX_capXxX
+  Given an unsupported test
+  Then nothing should happen because
+    """
+    The result returned is not supported under GraphSON 2.x and therefore cannot be properly asserted. More
+    specifically it has vertex keys which basically get toString()'d under GraphSON 2.x. This test can be supported
+    with GraphSON 3.x.
+    """
+----
+
+==== When
+
+The "When" options get the result from the traversal in preparation for assertion. There are two options to iterate:
+
+* "When iterated to list" - iterates the entire traversal into a list result that is asserted
+* "When iterated next" - gets the first value from the traversal as the result to be asserted
+
+There should be only one "When" defined in a scenario.
+
+==== Then
+
+The "Then" options handle the assertion of the result. There are several options to consider:
+
+* "the result should have a count of _xxx_" - assumes a list value in the result and counts the number of values
+in it
+* "the result should be empty" - no results
+* "the result should be ordered" - the exact results and should appear in the order presented
+* "the result should be unordered" - the exact results but can appear any order
+* "the result should be of" - results can be any of the specified values and in any order (use when guarantees
+regarding the exact results cannot be pre-determined easily - see the `range()` step tests for examples)
+
+These final three types of assertions mentioned above should be followed by a Gherkin table that has one column, where
+each row value in that column represents a value to assert in the result. These values are type notation respected as
+shown in the following example:
+
+[source,gherkin]
+----
+Then the result should be unordered
+  | result |
+  | ripple |
+  | lop |
+  | lop   |
+  | vadas |
+  | josh  |
+----
+
+Another method of assertion is to test mutations in the original graph. Again, mutations should only occur on the
+"empty" graph, but they can be validated as follows:
+
+[source,gherkin]
+----
+Scenario: g_V_outE_drop
+  Given the empty graph
+  And the graph initializer of
+    """
+    g.addV().as("a").addV().as("b").addE("knows").to("a")
+    """
+  And the traversal of
+    """
+    g.V().outE().drop()
+    """
+  When iterated to list
+  Then the result should be empty
+  And the graph should return 2 for count of "g.V()"
+  And the graph should return 0 for count of "g.E()"
+----
+
 == Developing Benchmarks
 
 Benchmarks are a useful tool to track performance between TinkerPop versions and also as tools to aid development


[50/50] tinkerpop git commit: transformed callouts to enable easy copy/pasting from code tabs

Posted by dk...@apache.org.
transformed callouts to enable easy copy/pasting from code tabs


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

Branch: refs/heads/TINKERPOP-1447
Commit: 605c0690768a4c2fcae5c3914dd59d5dac4517a1
Parents: 7629dec
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Wed Jan 3 10:13:06 2018 -0700
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Fri Mar 9 08:34:51 2018 -0700

----------------------------------------------------------------------
 docs/preprocessor/awk/tabify.awk | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/605c0690/docs/preprocessor/awk/tabify.awk
----------------------------------------------------------------------
diff --git a/docs/preprocessor/awk/tabify.awk b/docs/preprocessor/awk/tabify.awk
index df92734..24d42a6 100644
--- a/docs/preprocessor/awk/tabify.awk
+++ b/docs/preprocessor/awk/tabify.awk
@@ -47,6 +47,10 @@ function print_tabs(next_id, tabs, blocks) {
   print "++++\n"
 }
 
+function transform_callouts(code, c) {
+  return gensub(/\s*((<[0-9]+>\s*)*<[0-9]+>)\s*\n/, " " c c " \\1\\2\n", "g", code)
+}
+
 BEGIN {
   id_part=systime()
   status = 0
@@ -98,7 +102,15 @@ BEGIN {
         i++
       }
       tabs[i] = lang
-      blocks[i] = "[source," lang "]" code "\n" $0 "\n"
+      switch (lang) {
+        case "python":
+          c = "#"
+          break
+        default:
+          c = "//"
+          break
+      }
+      blocks[i] = "[source," lang "]" transform_callouts(code, c) "\n" $0 "\n"
     }
   } else {
     if (status == 0) print


[02/50] tinkerpop git commit: Merge branch 'TINKERPOP-1857' into tp32

Posted by dk...@apache.org.
Merge branch 'TINKERPOP-1857' into tp32


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

Branch: refs/heads/TINKERPOP-1447
Commit: d42d54d6afbcb8fb8187a6472eccfe1b41d53d1b
Parents: 545f3bf 7212253
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Feb 20 13:46:53 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Feb 20 13:46:53 2018 -0500

----------------------------------------------------------------------
 .../Gherkin/GherkinTestRunner.cs                |  24 +-
 .../Gherkin/IgnoreException.cs                  |   6 +-
 .../Gherkin/ScenarioData.cs                     |   2 +-
 .../step/map/GroovyAddVertexTest.groovy         |   5 -
 .../lib/driver/driver-remote-connection.js      |  35 ++
 .../test/cucumber/feature-steps.js              |   7 +
 .../gremlin-javascript/test/cucumber/world.js   |   2 +-
 gremlin-python/glv/TraversalSource.template     |  14 +-
 .../jython/gremlin_python/process/traversal.py  |  14 +-
 .../src/main/jython/radish/feature_steps.py     | 101 +++-
 .../src/main/jython/radish/terrain.py           |  11 +-
 .../src/test/scripts/generate-all.groovy        |   4 +-
 .../src/test/scripts/test-server-start.groovy   |   2 +
 gremlin-test/features/branch/Repeat.feature     |  16 +
 gremlin-test/features/branch/Union.feature      |  16 +-
 gremlin-test/features/filter/Filter.feature     |  24 +
 gremlin-test/features/filter/Has.feature        | 479 ++++++++++++++++++-
 gremlin-test/features/filter/Range.feature      |   4 +-
 gremlin-test/features/filter/Where.feature      | 221 +++++++++
 gremlin-test/features/map/AddVertex.feature     | 165 ++++++-
 gremlin-test/features/map/Match.feature         | 315 ++++++++++++
 gremlin-test/features/map/Min.feature           |  11 +
 gremlin-test/features/map/Order.feature         | 193 ++++++++
 gremlin-test/features/map/Properties.feature    |  16 +-
 gremlin-test/features/map/Select.feature        | 195 +++++++-
 gremlin-test/features/sideEffect/Inject.feature |  17 +
 gremlin-test/features/sideEffect/Sack.feature   |  42 +-
 .../features/sideEffect/SideEffectCap.feature   |   8 +-
 .../traversal/step/branch/LocalTest.java        |   2 +-
 .../traversal/step/branch/RepeatTest.java       |   2 +-
 .../traversal/step/branch/UnionTest.java        |   4 +-
 .../process/traversal/step/filter/AndTest.java  |   4 +-
 .../traversal/step/filter/FilterTest.java       |   9 +-
 .../process/traversal/step/filter/HasTest.java  |  43 +-
 .../traversal/step/filter/WhereTest.java        |  10 +-
 .../traversal/step/map/AddVertexTest.java       |  27 +-
 .../process/traversal/step/map/MatchTest.java   |   4 +-
 .../process/traversal/step/map/SelectTest.java  |   2 +-
 .../gremlin/process/FeatureCoverageTest.java    | 120 ++++-
 39 files changed, 2030 insertions(+), 146 deletions(-)
----------------------------------------------------------------------



[49/50] tinkerpop git commit: Fixed issue that accidentally caused non-source code blocks to slip into the new tabbified view. cc/ @robertdale

Posted by dk...@apache.org.
Fixed issue that accidentally caused non-source code blocks to slip into the new tabbified view.
cc/ @robertdale


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

Branch: refs/heads/TINKERPOP-1447
Commit: 7629dec025cdd8cc01d76c26c7e7f257bbc92a75
Parents: 844d997
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Tue Jan 2 10:41:14 2018 -0700
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Fri Mar 9 08:34:51 2018 -0700

----------------------------------------------------------------------
 docs/preprocessor/awk/tabify.awk      | 4 ++--
 docs/src/dev/provider/index.asciidoc  | 4 ++--
 docs/src/recipes/index.asciidoc       | 4 ++--
 docs/src/reference/the-graph.asciidoc | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7629dec0/docs/preprocessor/awk/tabify.awk
----------------------------------------------------------------------
diff --git a/docs/preprocessor/awk/tabify.awk b/docs/preprocessor/awk/tabify.awk
index bc8d644..df92734 100644
--- a/docs/preprocessor/awk/tabify.awk
+++ b/docs/preprocessor/awk/tabify.awk
@@ -61,7 +61,7 @@ BEGIN {
   code = ""
 }
 
-/^\[source,/ {
+/^\[source,(csharp|groovy|java|python)/ {
   if (status == 3) {
     status = 1
     lang = gensub(/^\[source,([^\]]+).*/, "\\1", "g", $0)
@@ -69,7 +69,7 @@ BEGIN {
   }
 }
 
-! /^\[source,/ {
+! /^\[source,(csharp|groovy|java|python)/ {
   if (status == 3 && $0 != "") {
     print_tabs(next_id, tabs, blocks)
     next_id = next_id + length(tabs)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7629dec0/docs/src/dev/provider/index.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/dev/provider/index.asciidoc b/docs/src/dev/provider/index.asciidoc
index 5bc4d9e..2a3fe04 100644
--- a/docs/src/dev/provider/index.asciidoc
+++ b/docs/src/dev/provider/index.asciidoc
@@ -611,7 +611,7 @@ features it implements) or should not otherwise be executed.  It is possible for
 by using the `@Graph.OptOut` annotation.  The following is an example of this annotation usage as taken from
 `HadoopGraph`:
 
-[source, java]
+[source,java]
 ----
 @Graph.OptIn(Graph.OptIn.SUITE_PROCESS_STANDARD)
 @Graph.OptIn(Graph.OptIn.SUITE_PROCESS_COMPUTER)
@@ -648,7 +648,7 @@ Also note that some of the tests in the Gremlin Test Suite are parameterized tes
 specificity to be properly ignored.  To ignore these types of tests, examine the name template of the parameterized
 tests.  It is defined by a Java annotation that looks like this:
 
-[source, java]
+[source,java]
 @Parameterized.Parameters(name = "expect({0})")
 
 The annotation above shows that the name of each parameterized test will be prefixed with "expect" and have

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7629dec0/docs/src/recipes/index.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/recipes/index.asciidoc b/docs/src/recipes/index.asciidoc
index c59cc89..3fdee22 100644
--- a/docs/src/recipes/index.asciidoc
+++ b/docs/src/recipes/index.asciidoc
@@ -90,12 +90,12 @@ prior to submitting a recipe.
 
 To contribute a recipe, first clone the repository:
 
-[source, shell]
+[source,shell]
 git clone https://github.com/apache/tinkerpop.git
 
 The recipes can be found in this directory:
 
-[source, shell]
+[source,shell]
 ls docs/src/recipes
 
 Each recipe exists within a separate `.asciidoc` file.  The file name should match the name of the recipe. Recipe names

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7629dec0/docs/src/reference/the-graph.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/the-graph.asciidoc b/docs/src/reference/the-graph.asciidoc
index 339b392..fa8cdb5 100644
--- a/docs/src/reference/the-graph.asciidoc
+++ b/docs/src/reference/the-graph.asciidoc
@@ -721,7 +721,7 @@ f.close()
 Creating a GraphSON 2.0 mapper is done by calling `.version(GraphSONVersion.V2_0)` on the mapper builder. Here's is the
 example output from the code above:
 
-[source, json]
+[source,json]
 ----
 {
     "@type": "g:Vertex",


[34/50] tinkerpop git commit: TINKERPOP-1862 Updated changelog

Posted by dk...@apache.org.
TINKERPOP-1862 Updated changelog


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

Branch: refs/heads/TINKERPOP-1447
Commit: 7956b481b459a9998401abc8b02322f256a73ae7
Parents: 26a5770
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Mar 2 11:33:21 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Mar 2 11:33:21 2018 -0500

----------------------------------------------------------------------
 CHANGELOG.asciidoc | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7956b481/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 60e0ef4..ca1053e 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -29,6 +29,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 * Fixed a bug in `NumberHelper` that led to wrong min/max results if numbers exceeded the Integer limits.
 * Delayed setting of the request identifier until `RequestMessage` construction by the builder.
 * Improved error messaging for failed serialization and deserialization of request/response messages.
+* Fixed handling of `Direction.BOTH` in `Messenger` implementations to pass the message to the opposite side of the `StarGraph`.
 * Removed hardcoded expectation in metrics serialization test suite as different providers may have different outputs.
 * Added `IndexedTraverserSet` which indexes on the value of a `Traverser` thus improving performance when used.
 * Utilized `IndexedTraverserSet` in `TraversalVertexProgram` to avoid extra iteration when doing `Vertex` lookups.


[17/50] tinkerpop git commit: Using "name" instead of "propertyin"

Posted by dk...@apache.org.
Using "name" instead of "propertyin"


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

Branch: refs/heads/TINKERPOP-1447
Commit: 027ae2771d3c67bb613c525a689fe10123686b45
Parents: 0490a08
Author: Graff, Philip B <Ph...@jhuapl.edu>
Authored: Wed Feb 28 11:38:33 2018 -0500
Committer: Graff, Philip B <Ph...@jhuapl.edu>
Committed: Wed Feb 28 11:38:33 2018 -0500

----------------------------------------------------------------------
 data/tinkerpop-sink-typed.json                     |   4 ++--
 data/tinkerpop-sink-v2d0-typed.json                |   4 ++--
 data/tinkerpop-sink-v2d0.json                      |   4 ++--
 data/tinkerpop-sink.json                           |   4 ++--
 data/tinkerpop-sink.kryo                           | Bin 300 -> 288 bytes
 .../process/computer/GraphComputerTest.java        |   2 +-
 .../io/graphson/tinkerpop-sink-typed.json          |   4 ++--
 .../io/graphson/tinkerpop-sink-v2d0-typed.json     |   4 ++--
 .../structure/io/graphson/tinkerpop-sink-v2d0.json |   4 ++--
 .../structure/io/graphson/tinkerpop-sink.json      |   4 ++--
 .../gremlin/structure/io/gryo/tinkerpop-sink.kryo  | Bin 300 -> 288 bytes
 .../tinkergraph/structure/TinkerFactory.java       |   6 +++---
 12 files changed, 20 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/027ae277/data/tinkerpop-sink-typed.json
----------------------------------------------------------------------
diff --git a/data/tinkerpop-sink-typed.json b/data/tinkerpop-sink-typed.json
index aae410e..bc56489 100644
--- a/data/tinkerpop-sink-typed.json
+++ b/data/tinkerpop-sink-typed.json
@@ -1,3 +1,3 @@
-{"@class":"java.util.HashMap","id":2000,"label":"message_passing_test","inE":{"@class":"java.util.HashMap","msg_pass_test_edge":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":5,"outV":2000}]]},"outE":{"@class":"java.util.HashMap","msg_pass_test_edge":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":4,"inV":2001},{"@class":"java.util.HashMap","id":5,"inV":2000}]]},"properties":{"@class":"java.util.HashMap","propertyin":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",2],"value":"a"}]]}}
-{"@class":"java.util.HashMap","id":2001,"label":"message_passing_test","inE":{"@class":"java.util.HashMap","msg_pass_test_edge":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":4,"outV":2000}]]},"properties":{"@class":"java.util.HashMap","propertyin":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",3],"value":"b"}]]}}
+{"@class":"java.util.HashMap","id":2000,"label":"message_passing_test","inE":{"@class":"java.util.HashMap","msg_pass_test_edge":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":5,"outV":2000}]]},"outE":{"@class":"java.util.HashMap","msg_pass_test_edge":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":4,"inV":2001},{"@class":"java.util.HashMap","id":5,"inV":2000}]]},"properties":{"@class":"java.util.HashMap","name":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",2],"value":"a"}]]}}
+{"@class":"java.util.HashMap","id":2001,"label":"message_passing_test","inE":{"@class":"java.util.HashMap","msg_pass_test_edge":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":4,"outV":2000}]]},"properties":{"@class":"java.util.HashMap","name":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",3],"value":"b"}]]}}
 {"@class":"java.util.HashMap","id":1000,"label":"loops","inE":{"@class":"java.util.HashMap","self":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":1,"outV":1000}]]},"outE":{"@class":"java.util.HashMap","self":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":1,"inV":1000}]]},"properties":{"@class":"java.util.HashMap","name":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",0],"value":"loop"}]]}}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/027ae277/data/tinkerpop-sink-v2d0-typed.json
----------------------------------------------------------------------
diff --git a/data/tinkerpop-sink-v2d0-typed.json b/data/tinkerpop-sink-v2d0-typed.json
index e90b677..c0844a3 100644
--- a/data/tinkerpop-sink-v2d0-typed.json
+++ b/data/tinkerpop-sink-v2d0-typed.json
@@ -1,3 +1,3 @@
-{"id":{"@type":"g:Int32","@value":2000},"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":{"@type":"g:Int32","@value":5},"outV":{"@type":"g:Int32","@value":2000}}]},"outE":{"msg_pass_test_edge":[{"id":{"@type":"g:Int32","@value":4},"inV":{"@type":"g:Int32","@value":2001}},{"id":{"@type":"g:Int32","@value":5},"inV":{"@type":"g:Int32","@value":2000}}]},"properties":{"propertyin":[{"id":{"@type":"g:Int64","@value":2},"value":"a"}]}}
-{"id":{"@type":"g:Int32","@value":2001},"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":{"@type":"g:Int32","@value":4},"outV":{"@type":"g:Int32","@value":2000}}]},"properties":{"propertyin":[{"id":{"@type":"g:Int64","@value":3},"value":"b"}]}}
+{"id":{"@type":"g:Int32","@value":2000},"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":{"@type":"g:Int32","@value":5},"outV":{"@type":"g:Int32","@value":2000}}]},"outE":{"msg_pass_test_edge":[{"id":{"@type":"g:Int32","@value":4},"inV":{"@type":"g:Int32","@value":2001}},{"id":{"@type":"g:Int32","@value":5},"inV":{"@type":"g:Int32","@value":2000}}]},"properties":{"name":[{"id":{"@type":"g:Int64","@value":2},"value":"a"}]}}
+{"id":{"@type":"g:Int32","@value":2001},"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":{"@type":"g:Int32","@value":4},"outV":{"@type":"g:Int32","@value":2000}}]},"properties":{"name":[{"id":{"@type":"g:Int64","@value":3},"value":"b"}]}}
 {"id":{"@type":"g:Int32","@value":1000},"label":"loops","inE":{"self":[{"id":{"@type":"g:Int32","@value":1},"outV":{"@type":"g:Int32","@value":1000}}]},"outE":{"self":[{"id":{"@type":"g:Int32","@value":1},"inV":{"@type":"g:Int32","@value":1000}}]},"properties":{"name":[{"id":{"@type":"g:Int64","@value":0},"value":"loop"}]}}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/027ae277/data/tinkerpop-sink-v2d0.json
----------------------------------------------------------------------
diff --git a/data/tinkerpop-sink-v2d0.json b/data/tinkerpop-sink-v2d0.json
index e6c284e..44fbda9 100644
--- a/data/tinkerpop-sink-v2d0.json
+++ b/data/tinkerpop-sink-v2d0.json
@@ -1,3 +1,3 @@
-{"id":2000,"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":5,"outV":2000}]},"outE":{"msg_pass_test_edge":[{"id":4,"inV":2001},{"id":5,"inV":2000}]},"properties":{"propertyin":[{"id":2,"value":"a"}]}}
-{"id":2001,"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":4,"outV":2000}]},"properties":{"propertyin":[{"id":3,"value":"b"}]}}
+{"id":2000,"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":5,"outV":2000}]},"outE":{"msg_pass_test_edge":[{"id":4,"inV":2001},{"id":5,"inV":2000}]},"properties":{"name":[{"id":2,"value":"a"}]}}
+{"id":2001,"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":4,"outV":2000}]},"properties":{"name":[{"id":3,"value":"b"}]}}
 {"id":1000,"label":"loops","inE":{"self":[{"id":1,"outV":1000}]},"outE":{"self":[{"id":1,"inV":1000}]},"properties":{"name":[{"id":0,"value":"loop"}]}}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/027ae277/data/tinkerpop-sink.json
----------------------------------------------------------------------
diff --git a/data/tinkerpop-sink.json b/data/tinkerpop-sink.json
index e6c284e..44fbda9 100644
--- a/data/tinkerpop-sink.json
+++ b/data/tinkerpop-sink.json
@@ -1,3 +1,3 @@
-{"id":2000,"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":5,"outV":2000}]},"outE":{"msg_pass_test_edge":[{"id":4,"inV":2001},{"id":5,"inV":2000}]},"properties":{"propertyin":[{"id":2,"value":"a"}]}}
-{"id":2001,"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":4,"outV":2000}]},"properties":{"propertyin":[{"id":3,"value":"b"}]}}
+{"id":2000,"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":5,"outV":2000}]},"outE":{"msg_pass_test_edge":[{"id":4,"inV":2001},{"id":5,"inV":2000}]},"properties":{"name":[{"id":2,"value":"a"}]}}
+{"id":2001,"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":4,"outV":2000}]},"properties":{"name":[{"id":3,"value":"b"}]}}
 {"id":1000,"label":"loops","inE":{"self":[{"id":1,"outV":1000}]},"outE":{"self":[{"id":1,"inV":1000}]},"properties":{"name":[{"id":0,"value":"loop"}]}}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/027ae277/data/tinkerpop-sink.kryo
----------------------------------------------------------------------
diff --git a/data/tinkerpop-sink.kryo b/data/tinkerpop-sink.kryo
index 25419fa..24a3468 100644
Binary files a/data/tinkerpop-sink.kryo and b/data/tinkerpop-sink.kryo differ

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/027ae277/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
index 4cbe584..9157571 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
@@ -2753,7 +2753,7 @@ public class GraphComputerTest extends AbstractGremlinProcessTest {
     private static class VertexProgramR implements VertexProgram<String> {
         private static final String SIMPLE_VERTEX_PROGRAM_CFG_PREFIX = "gremlin.simpleVertexProgram";
         private static final String PROPERTY_OUT = "propertyout";
-        private static final String PROPERTY_IN = "propertyin";
+        private static final String PROPERTY_IN = "name";
         private static final String VERTEX_LABEL = "message_passing_test";
         private static final String DIRECTION_CFG_KEY = SIMPLE_VERTEX_PROGRAM_CFG_PREFIX + ".direction";
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/027ae277/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink-typed.json
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink-typed.json b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink-typed.json
index aae410e..bc56489 100644
--- a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink-typed.json
+++ b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink-typed.json
@@ -1,3 +1,3 @@
-{"@class":"java.util.HashMap","id":2000,"label":"message_passing_test","inE":{"@class":"java.util.HashMap","msg_pass_test_edge":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":5,"outV":2000}]]},"outE":{"@class":"java.util.HashMap","msg_pass_test_edge":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":4,"inV":2001},{"@class":"java.util.HashMap","id":5,"inV":2000}]]},"properties":{"@class":"java.util.HashMap","propertyin":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",2],"value":"a"}]]}}
-{"@class":"java.util.HashMap","id":2001,"label":"message_passing_test","inE":{"@class":"java.util.HashMap","msg_pass_test_edge":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":4,"outV":2000}]]},"properties":{"@class":"java.util.HashMap","propertyin":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",3],"value":"b"}]]}}
+{"@class":"java.util.HashMap","id":2000,"label":"message_passing_test","inE":{"@class":"java.util.HashMap","msg_pass_test_edge":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":5,"outV":2000}]]},"outE":{"@class":"java.util.HashMap","msg_pass_test_edge":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":4,"inV":2001},{"@class":"java.util.HashMap","id":5,"inV":2000}]]},"properties":{"@class":"java.util.HashMap","name":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",2],"value":"a"}]]}}
+{"@class":"java.util.HashMap","id":2001,"label":"message_passing_test","inE":{"@class":"java.util.HashMap","msg_pass_test_edge":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":4,"outV":2000}]]},"properties":{"@class":"java.util.HashMap","name":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",3],"value":"b"}]]}}
 {"@class":"java.util.HashMap","id":1000,"label":"loops","inE":{"@class":"java.util.HashMap","self":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":1,"outV":1000}]]},"outE":{"@class":"java.util.HashMap","self":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":1,"inV":1000}]]},"properties":{"@class":"java.util.HashMap","name":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",0],"value":"loop"}]]}}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/027ae277/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink-v2d0-typed.json
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink-v2d0-typed.json b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink-v2d0-typed.json
index e90b677..c0844a3 100644
--- a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink-v2d0-typed.json
+++ b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink-v2d0-typed.json
@@ -1,3 +1,3 @@
-{"id":{"@type":"g:Int32","@value":2000},"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":{"@type":"g:Int32","@value":5},"outV":{"@type":"g:Int32","@value":2000}}]},"outE":{"msg_pass_test_edge":[{"id":{"@type":"g:Int32","@value":4},"inV":{"@type":"g:Int32","@value":2001}},{"id":{"@type":"g:Int32","@value":5},"inV":{"@type":"g:Int32","@value":2000}}]},"properties":{"propertyin":[{"id":{"@type":"g:Int64","@value":2},"value":"a"}]}}
-{"id":{"@type":"g:Int32","@value":2001},"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":{"@type":"g:Int32","@value":4},"outV":{"@type":"g:Int32","@value":2000}}]},"properties":{"propertyin":[{"id":{"@type":"g:Int64","@value":3},"value":"b"}]}}
+{"id":{"@type":"g:Int32","@value":2000},"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":{"@type":"g:Int32","@value":5},"outV":{"@type":"g:Int32","@value":2000}}]},"outE":{"msg_pass_test_edge":[{"id":{"@type":"g:Int32","@value":4},"inV":{"@type":"g:Int32","@value":2001}},{"id":{"@type":"g:Int32","@value":5},"inV":{"@type":"g:Int32","@value":2000}}]},"properties":{"name":[{"id":{"@type":"g:Int64","@value":2},"value":"a"}]}}
+{"id":{"@type":"g:Int32","@value":2001},"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":{"@type":"g:Int32","@value":4},"outV":{"@type":"g:Int32","@value":2000}}]},"properties":{"name":[{"id":{"@type":"g:Int64","@value":3},"value":"b"}]}}
 {"id":{"@type":"g:Int32","@value":1000},"label":"loops","inE":{"self":[{"id":{"@type":"g:Int32","@value":1},"outV":{"@type":"g:Int32","@value":1000}}]},"outE":{"self":[{"id":{"@type":"g:Int32","@value":1},"inV":{"@type":"g:Int32","@value":1000}}]},"properties":{"name":[{"id":{"@type":"g:Int64","@value":0},"value":"loop"}]}}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/027ae277/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink-v2d0.json
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink-v2d0.json b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink-v2d0.json
index e6c284e..44fbda9 100644
--- a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink-v2d0.json
+++ b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink-v2d0.json
@@ -1,3 +1,3 @@
-{"id":2000,"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":5,"outV":2000}]},"outE":{"msg_pass_test_edge":[{"id":4,"inV":2001},{"id":5,"inV":2000}]},"properties":{"propertyin":[{"id":2,"value":"a"}]}}
-{"id":2001,"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":4,"outV":2000}]},"properties":{"propertyin":[{"id":3,"value":"b"}]}}
+{"id":2000,"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":5,"outV":2000}]},"outE":{"msg_pass_test_edge":[{"id":4,"inV":2001},{"id":5,"inV":2000}]},"properties":{"name":[{"id":2,"value":"a"}]}}
+{"id":2001,"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":4,"outV":2000}]},"properties":{"name":[{"id":3,"value":"b"}]}}
 {"id":1000,"label":"loops","inE":{"self":[{"id":1,"outV":1000}]},"outE":{"self":[{"id":1,"inV":1000}]},"properties":{"name":[{"id":0,"value":"loop"}]}}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/027ae277/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink.json
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink.json b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink.json
index e6c284e..44fbda9 100644
--- a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink.json
+++ b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink.json
@@ -1,3 +1,3 @@
-{"id":2000,"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":5,"outV":2000}]},"outE":{"msg_pass_test_edge":[{"id":4,"inV":2001},{"id":5,"inV":2000}]},"properties":{"propertyin":[{"id":2,"value":"a"}]}}
-{"id":2001,"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":4,"outV":2000}]},"properties":{"propertyin":[{"id":3,"value":"b"}]}}
+{"id":2000,"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":5,"outV":2000}]},"outE":{"msg_pass_test_edge":[{"id":4,"inV":2001},{"id":5,"inV":2000}]},"properties":{"name":[{"id":2,"value":"a"}]}}
+{"id":2001,"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":4,"outV":2000}]},"properties":{"name":[{"id":3,"value":"b"}]}}
 {"id":1000,"label":"loops","inE":{"self":[{"id":1,"outV":1000}]},"outE":{"self":[{"id":1,"inV":1000}]},"properties":{"name":[{"id":0,"value":"loop"}]}}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/027ae277/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/gryo/tinkerpop-sink.kryo
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/gryo/tinkerpop-sink.kryo b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/gryo/tinkerpop-sink.kryo
index 25419fa..24a3468 100644
Binary files a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/gryo/tinkerpop-sink.kryo and b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/gryo/tinkerpop-sink.kryo differ

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/027ae277/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerFactory.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerFactory.java b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerFactory.java
index 4e2989d..1b908ab 100644
--- a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerFactory.java
+++ b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerFactory.java
@@ -151,9 +151,9 @@ public final class TinkerFactory {
           iterate();
         final String LABEL = "message_passing_test";
         final String EDGE_LABEL = "msg_pass_test_edge";
-        final String PROPERTY_IN = "propertyin";
-        Vertex a = graph.addVertex(T.id, 2000, T.label, LABEL, PROPERTY_IN, "a");
-        Vertex b = graph.addVertex(T.id, 2001, T.label, LABEL, PROPERTY_IN, "b");
+        final String PROPERTY_IN = "name";
+        final Vertex a = graph.addVertex(T.id, 2000, T.label, LABEL, PROPERTY_IN, "a");
+        final Vertex b = graph.addVertex(T.id, 2001, T.label, LABEL, PROPERTY_IN, "b");
         a.addEdge(EDGE_LABEL, b);
         a.addEdge(EDGE_LABEL, a);
     }