You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2018/05/30 18:07:28 UTC

[01/22] tinkerpop git commit: TINKERPOP-1958 Fixed a bug in TinkerGraphCountStrategy [Forced Update!]

Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1975 cb03a1b11 -> 01f18eab0 (forced update)


TINKERPOP-1958 Fixed a bug in TinkerGraphCountStrategy

The strategy did not consider, that certain map steps may not emit an element.


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

Branch: refs/heads/TINKERPOP-1975
Commit: 2407739b2e7b3624478bd9b5dbc55c9c28f1da28
Parents: 288b455
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Wed May 9 07:53:24 2018 -0700
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Fri May 11 18:18:53 2018 -0700

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 .../traversal/step/map/GroovySelectTest.groovy  |  5 ++++
 gremlin-test/features/map/Select.feature        | 22 ++++++++++++++++-
 .../process/traversal/step/map/SelectTest.java  | 15 ++++++++++++
 .../optimization/TinkerGraphCountStrategy.java  |  2 +-
 .../TinkerGraphCountStrategyTest.java           | 25 ++++++++++++--------
 6 files changed, 58 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2407739b/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 41d83c4..23e130e 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -23,6 +23,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 [[release-3-2-10]]
 === TinkerPop 3.2.10 (Release Date: NOT OFFICIALLY RELEASED YET)
 
+* Fixed a bug in `TinkerGraphCountStrategy`, which didn't consider that certain map steps may not emit an element.
 
 [[release-3-2-9]]
 === TinkerPop 3.2.9 (Release Date: May 8, 2018)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2407739b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovySelectTest.groovy
----------------------------------------------------------------------
diff --git a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovySelectTest.groovy b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovySelectTest.groovy
index 89fc691..104322d 100644
--- a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovySelectTest.groovy
+++ b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovySelectTest.groovy
@@ -104,6 +104,11 @@ public abstract class GroovySelectTest {
             new ScriptTraversal<>(g, "gremlin-groovy", "g.V.choose(__.outE().count().is(0L), __.as('a'), __.as('b')).choose(select('a'),select('a'),select('b'))")
         }
 
+        @Override
+        public Traversal<Vertex, Long> get_g_V_selectXaX_count() {
+            new ScriptTraversal<>(g, "gremlin-groovy", "g.V.select('a').count")
+        }
+
         // below are original back()-tests
 
         @Override

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2407739b/gremlin-test/features/map/Select.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/map/Select.feature b/gremlin-test/features/map/Select.feature
index 35d9322..1e45a0e 100644
--- a/gremlin-test/features/map/Select.feature
+++ b/gremlin-test/features/map/Select.feature
@@ -514,4 +514,24 @@ Feature: Step - select()
     Then the result should be unordered
       | result |
       | d[2].l |
-      | d[2].l |
\ No newline at end of file
+      | d[2].l |
+
+  Scenario: g_V_selectXaX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().select("a")
+      """
+    When iterated to list
+    Then the result should be empty
+
+  Scenario: g_V_selectXaX_count
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().select("a").count()
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | d[0].l |

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2407739b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SelectTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SelectTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SelectTest.java
index c0486d0..3d778e4 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SelectTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SelectTest.java
@@ -83,6 +83,8 @@ public abstract class SelectTest extends AbstractGremlinProcessTest {
 
     public abstract Traversal<Vertex, Vertex> get_g_V_chooseXoutE_count_isX0X__asXaX__asXbXX_chooseXselectXaX__selectXaX__selectXbXX();
 
+    public abstract Traversal<Vertex, Long> get_g_V_selectXaX_count();
+
     // below are original back()-tests
 
     public abstract Traversal<Vertex, Vertex> get_g_VX1X_asXhereX_out_selectXhereX(final Object v1Id);
@@ -344,6 +346,14 @@ public abstract class SelectTest extends AbstractGremlinProcessTest {
         assertEquals(3, xCounter);
     }
 
+    @Test
+    @LoadGraphWith(MODERN)
+    public void g_V_selectXaX_count() {
+        final Traversal<Vertex, Long> traversal = get_g_V_selectXaX_count();
+        printTraversalForm(traversal);
+        assertEquals(0L, traversal.next().longValue());
+    }
+
     // below are original back()-tests
 
     @Test
@@ -725,6 +735,11 @@ public abstract class SelectTest extends AbstractGremlinProcessTest {
             return g.V().choose(__.outE().count().is(0L), __.as("a"), __.as("b")).choose(__.select("a"), __.select("a"), __.select("b"));
         }
 
+        @Override
+        public Traversal<Vertex, Long> get_g_V_selectXaX_count() {
+            return g.V().select("a").count();
+        }
+
         // below are original back()-tests
 
         @Override

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2407739b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/optimization/TinkerGraphCountStrategy.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/optimization/TinkerGraphCountStrategy.java b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/optimization/TinkerGraphCountStrategy.java
index 50e5c18..55e6b55 100644
--- a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/optimization/TinkerGraphCountStrategy.java
+++ b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/optimization/TinkerGraphCountStrategy.java
@@ -71,7 +71,7 @@ public final class TinkerGraphCountStrategy extends AbstractTraversalStrategy<Tr
             return;
         for (int i = 1; i < steps.size() - 1; i++) {
             final Step current = steps.get(i);
-            if (!(current instanceof MapStep ||
+            if (!(//current instanceof MapStep ||  // MapSteps will not necessarily emit an element as demonstrated in https://issues.apache.org/jira/browse/TINKERPOP-1958
                     current instanceof IdentityStep ||
                     current instanceof NoOpBarrierStep ||
                     current instanceof CollectingBarrierStep) ||

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2407739b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/optimization/TinkerGraphCountStrategyTest.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/optimization/TinkerGraphCountStrategyTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/optimization/TinkerGraphCountStrategyTest.java
index 0db378b..ec9bd93 100644
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/optimization/TinkerGraphCountStrategyTest.java
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/optimization/TinkerGraphCountStrategyTest.java
@@ -64,6 +64,11 @@ public class TinkerGraphCountStrategyTest {
         for (final TraversalStrategy strategy : this.otherStrategies) {
             strategies.addStrategies(strategy);
         }
+        if (this.optimized == null) {
+            this.optimized = this.original.asAdmin().clone();
+            this.optimized.asAdmin().setStrategies(strategies);
+            this.optimized.asAdmin().applyStrategies();
+        }
         this.original.asAdmin().setStrategies(strategies);
         this.original.asAdmin().applyStrategies();
         assertEquals(this.optimized, this.original);
@@ -81,17 +86,17 @@ public class TinkerGraphCountStrategyTest {
                 {__.V().count(), countStep(Vertex.class), TraversalStrategies.GlobalCache.getStrategies(TinkerGraph.class).toList()},
                 {__.V().as("a").count(), countStep(Vertex.class), TraversalStrategies.GlobalCache.getStrategies(TinkerGraph.class).toList()},
                 {__.V().count().as("a"), countStep(Vertex.class), TraversalStrategies.GlobalCache.getStrategies(TinkerGraph.class).toList()},
-                {__.V().map(out()).count().as("a"), countStep(Vertex.class), TraversalStrategies.GlobalCache.getStrategies(TinkerGraph.class).toList()},
-                {__.V().map(out()).identity().count().as("a"), countStep(Vertex.class), TraversalStrategies.GlobalCache.getStrategies(TinkerGraph.class).toList()},
-                {__.V().map(out().groupCount()).identity().count().as("a"), countStep(Vertex.class), TraversalStrategies.GlobalCache.getStrategies(TinkerGraph.class).toList()},
-                {__.V().label().map(s -> s.get().length()).count(), countStep(Vertex.class), TraversalStrategies.GlobalCache.getStrategies(TinkerGraph.class).toList()},
-                {__.V().as("a").map(select("a")).count(), countStep(Vertex.class),TraversalStrategies.GlobalCache.getStrategies(TinkerGraph.class).toList()},
+                {__.V().map(out()).count().as("a"), null, TraversalStrategies.GlobalCache.getStrategies(TinkerGraph.class).toList()},
+                {__.V().map(out()).identity().count().as("a"), null, TraversalStrategies.GlobalCache.getStrategies(TinkerGraph.class).toList()},
+                {__.V().map(out().groupCount()).identity().count().as("a"), null, TraversalStrategies.GlobalCache.getStrategies(TinkerGraph.class).toList()},
+                {__.V().label().map(s -> s.get().length()).count(), null, TraversalStrategies.GlobalCache.getStrategies(TinkerGraph.class).toList()},
+                {__.V().as("a").map(select("a")).count(), null, TraversalStrategies.GlobalCache.getStrategies(TinkerGraph.class).toList()},
                 //
-                {__.V(), __.V(), Collections.emptyList()},
-                {__.V().out().count(), __.V().out().count(), Collections.emptyList()},
-                {__.V(1).count(), __.V(1).count(), Collections.emptyList()},
-                {__.count(), __.count(), Collections.emptyList()},
-                {__.V().map(out().groupCount("m")).identity().count().as("a"), __.V().map(out().groupCount("m")).identity().count().as("a"), Collections.emptyList()},
+                {__.V(), null, Collections.emptyList()},
+                {__.V().out().count(), null, Collections.emptyList()},
+                {__.V(1).count(), null, Collections.emptyList()},
+                {__.count(), null, Collections.emptyList()},
+                {__.V().map(out().groupCount("m")).identity().count().as("a"), null, Collections.emptyList()},
         });
     }
 }


[13/22] tinkerpop git commit: Removed caveat from docs about stargraph limitation

Posted by sp...@apache.org.
Removed caveat from docs about stargraph limitation

Note that TINKERPOP-693 as "crazy" so no point referencing that anymore CTR


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

Branch: refs/heads/TINKERPOP-1975
Commit: 1b59b9efdcb5c820622c15d483bae54caf2ff62a
Parents: 6feff18
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue May 29 16:14:21 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue May 29 16:14:21 2018 -0400

----------------------------------------------------------------------
 docs/src/reference/the-traversal.asciidoc | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1b59b9ef/docs/src/reference/the-traversal.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc
index e2e3be2..0e7fa26 100644
--- a/docs/src/reference/the-traversal.asciidoc
+++ b/docs/src/reference/the-traversal.asciidoc
@@ -2845,8 +2845,7 @@ g.V().as('a').out('knows').as('b').
 WARNING: The anonymous traversal of `where()` processes the current object "locally". In OLAP, where the atomic unit
 of computing is the vertex and its local "star graph," it is important that the anonymous traversal does not leave
 the confines of the vertex's star graph. In other words, it can not traverse to an adjacent vertex's properties or
-edges. Note that is only a temporary limitation that will be addressed in a future version of TinkerPop3 (see
-link:https://issues.apache.org/jira/browse/TINKERPOP-693[TINKERPOP-693]).
+edges. 
 
 *Additional References*
 


[09/22] tinkerpop git commit: Merge branch 'tp32' into tp33

Posted by sp...@apache.org.
Merge branch 'tp32' into tp33

Conflicts:
	docs/src/tutorials/getting-started/index.asciidoc


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

Branch: refs/heads/TINKERPOP-1975
Commit: 2862ff989c810710583f3157a66cb9ef73f3d968
Parents: ae9d7f6 6feff18
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue May 29 12:53:22 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue May 29 12:53:22 2018 -0400

----------------------------------------------------------------------
 docs/src/dev/provider/index.asciidoc            |  80 ++++++++++
 .../src/reference/gremlin-applications.asciidoc |   5 +-
 .../reference/implementations-neo4j.asciidoc    |  10 +-
 docs/src/reference/intro.asciidoc               | 148 ++-----------------
 docs/src/reference/the-graph.asciidoc           |  40 ++---
 5 files changed, 126 insertions(+), 157 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2862ff98/docs/src/dev/provider/index.asciidoc
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2862ff98/docs/src/reference/gremlin-applications.asciidoc
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2862ff98/docs/src/reference/implementations-neo4j.asciidoc
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2862ff98/docs/src/reference/the-graph.asciidoc
----------------------------------------------------------------------


[22/22] tinkerpop git commit: wip

Posted by sp...@apache.org.
wip


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

Branch: refs/heads/TINKERPOP-1975
Commit: ff6f6d8473cf093c243806487a8ee882e6f0fcec
Parents: 2d4d625
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri May 25 13:38:32 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed May 30 13:46:14 2018 -0400

----------------------------------------------------------------------
 .../tinkerpop/gremlin/jsr223/CoreImports.java   |  2 +
 .../gremlin/jsr223/JavaTranslator.java          | 37 ++++++++++++++
 .../step/map/PageRankVertexProgramStep.java     | 44 +++++++++++++++++
 .../gremlin/process/traversal/Bytecode.java     | 16 +++++-
 .../traversal/dsl/graph/GraphTraversal.java     | 15 +++---
 .../traversal/step/StepConfiguration.java       | 51 ++++++++++++++++++++
 .../process/traversal/step/WithModulating.java  | 26 ----------
 .../process/traversal/step/WithModulation.java  | 26 ----------
 .../structure/io/graphson/GraphSONModule.java   | 10 +++-
 .../io/graphson/TraversalSerializersV2d0.java   | 37 ++++++++++++--
 .../io/graphson/TraversalSerializersV3d0.java   | 34 ++++++++++++-
 .../structure/io/gryo/GryoSerializersV1d0.java  | 32 ++++++++++++
 .../structure/io/gryo/GryoSerializersV3d0.java  |  2 +-
 .../gremlin/structure/io/gryo/GryoVersion.java  |  7 ++-
 .../traversal/dsl/graph/GraphTraversalTest.java |  2 +-
 .../process/traversal/step/StepTest.java        |  2 +-
 .../GraphSONMapperPartialEmbeddedTypeTest.java  | 10 ++++
 .../structure/io/gryo/GryoMapperTest.java       |  7 +++
 gremlin-dotnet/glv/generate.groovy              |  1 +
 .../Process/Traversal/GraphTraversal.cs         |  2 +-
 .../gremlin/groovy/jsr223/GroovyTranslator.java |  9 +++-
 gremlin-python/glv/generate.groovy              |  1 +
 .../gremlin_python/process/graph_traversal.py   |  2 +-
 .../traversal/step/map/PageRankTest.java        | 41 ++++++++++++++++
 24 files changed, 341 insertions(+), 75 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ff6f6d84/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/CoreImports.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/CoreImports.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/CoreImports.java
index 8839dcd..368b92d 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/CoreImports.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/CoreImports.java
@@ -48,6 +48,7 @@ import org.apache.tinkerpop.gremlin.process.computer.ranking.pagerank.PageRankMa
 import org.apache.tinkerpop.gremlin.process.computer.ranking.pagerank.PageRankVertexProgram;
 import org.apache.tinkerpop.gremlin.process.computer.traversal.MemoryTraversalSideEffects;
 import org.apache.tinkerpop.gremlin.process.computer.traversal.TraversalVertexProgram;
+import org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.PageRankVertexProgramStep;
 import org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy;
 import org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.optimization.GraphFilterStrategy;
 import org.apache.tinkerpop.gremlin.process.remote.RemoteConnection;
@@ -260,6 +261,7 @@ public final class CoreImports {
         CLASS_IMPORTS.add(PeerPressureVertexProgram.class);
         CLASS_IMPORTS.add(PageRankMapReduce.class);
         CLASS_IMPORTS.add(PageRankVertexProgram.class);
+        CLASS_IMPORTS.add(PageRankVertexProgramStep.PageRank.class);
         CLASS_IMPORTS.add(GraphFilterStrategy.class);
         CLASS_IMPORTS.add(TraversalVertexProgram.class);
         CLASS_IMPORTS.add(VertexProgramStrategy.class);

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ff6f6d84/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/JavaTranslator.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/JavaTranslator.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/JavaTranslator.java
index 7480974..4813fab 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/JavaTranslator.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/JavaTranslator.java
@@ -25,7 +25,10 @@ import org.apache.tinkerpop.gremlin.process.traversal.Bytecode;
 import org.apache.tinkerpop.gremlin.process.traversal.Translator;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalSource;
+import org.apache.tinkerpop.gremlin.process.traversal.step.StepConfiguration;
 import org.apache.tinkerpop.gremlin.process.traversal.step.util.BulkSet;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.DefaultStepConfiguration;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.StepConfigurationProxy;
 import org.apache.tinkerpop.gremlin.process.traversal.step.util.Tree;
 import org.apache.tinkerpop.gremlin.process.traversal.strategy.TraversalStrategyProxy;
 import org.apache.tinkerpop.gremlin.structure.util.StringFactory;
@@ -119,6 +122,16 @@ public final class JavaTranslator<S extends TraversalSource, T extends Traversal
             final Configuration configuration = ((TraversalStrategyProxy) object).getConfiguration();
             configuration.getKeys().forEachRemaining(key -> map.put(key, translateObject(configuration.getProperty(key))));
             return invokeStrategyCreationMethod(object, map);
+        } else if (object instanceof DefaultStepConfiguration) {
+            final Map<String, Object> map = new LinkedHashMap<>();
+            final Configuration configuration = ((DefaultStepConfiguration) object).getConfiguration();
+            configuration.getKeys().forEachRemaining(key -> map.put(key, translateObject(configuration.getProperty(key))));
+            return invokeStepConfigurationCreationMethod(object, map);
+        }else if (object instanceof StepConfigurationProxy) {
+            final Map<String, Object> map = new LinkedHashMap<>();
+            final Configuration configuration = ((StepConfigurationProxy) object).getConfiguration();
+            configuration.getKeys().forEachRemaining(key -> map.put(key, translateObject(configuration.getProperty(key))));
+            return invokeStepConfigurationCreationMethod(object, map);
         } else if (object instanceof Map) {
             final Map<Object, Object> map = object instanceof Tree ?
                     new Tree() :
@@ -184,6 +197,30 @@ public final class JavaTranslator<S extends TraversalSource, T extends Traversal
         }
     }
 
+    private Object invokeStepConfigurationCreationMethod(final Object delegate, final Map<String, Object> map) {
+        final Class<?> stepConfigurationClass = delegate instanceof DefaultStepConfiguration ? delegate.getClass() : ((StepConfigurationProxy) delegate).getStepConfigurationClass();
+        final Map<String, Method> methodCache = localMethodCache.computeIfAbsent(stepConfigurationClass, k -> {
+            final Map<String, Method> cacheEntry = new HashMap<>();
+
+            try {
+                cacheEntry.put("create", stepConfigurationClass.getMethod("create", Configuration.class));
+            } catch (NoSuchMethodException ignored) {
+                // nothing - the StepConfiguration may not be constructed this way
+            }
+
+            if (cacheEntry.isEmpty())
+                throw new IllegalStateException(String.format("%s does can only be constructed with create(Configuration)", stepConfigurationClass.getSimpleName()));
+
+            return cacheEntry;
+        });
+
+        try {
+            return methodCache.get("create").invoke(null, new MapConfiguration(map));
+        } catch (final InvocationTargetException | IllegalAccessException e) {
+            throw new IllegalStateException(e.getMessage(), e);
+        }
+    }
+
     private Object invokeMethod(final Object delegate, final Class<?> returnType, final String methodName, final Object... arguments) {
         // populate method cache for fast access to methods in subsequent calls
         final Map<String, List<Method>> methodCache = GLOBAL_METHOD_CACHE.getOrDefault(delegate.getClass(), new HashMap<>());

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ff6f6d84/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/PageRankVertexProgramStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/PageRankVertexProgramStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/PageRankVertexProgramStep.java
index 2f67aeb..8ebedd5 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/PageRankVertexProgramStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/PageRankVertexProgramStep.java
@@ -23,12 +23,16 @@ import org.apache.tinkerpop.gremlin.process.computer.GraphFilter;
 import org.apache.tinkerpop.gremlin.process.computer.Memory;
 import org.apache.tinkerpop.gremlin.process.computer.ranking.pagerank.PageRankVertexProgram;
 import org.apache.tinkerpop.gremlin.process.computer.traversal.lambda.HaltedTraversersCountTraversal;
+import org.apache.tinkerpop.gremlin.process.traversal.Step;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategies;
+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.ByModulating;
+import org.apache.tinkerpop.gremlin.process.traversal.step.StepConfiguration;
 import org.apache.tinkerpop.gremlin.process.traversal.step.TimesModulating;
 import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.DefaultStepConfiguration;
 import org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement;
 import org.apache.tinkerpop.gremlin.process.traversal.util.PureTraversal;
 import org.apache.tinkerpop.gremlin.structure.Edge;
@@ -56,13 +60,30 @@ public final class PageRankVertexProgramStep extends VertexProgramStep implement
         this.modulateBy(__.<Vertex>outE().asAdmin());
     }
 
+    public void setEdgeTraversal(final Traversal.Admin<Vertex, Edge> edgeTraversal) {
+        this.edgeTraversal = new PureTraversal<>(edgeTraversal);
+        this.integrateChild(this.edgeTraversal.get());
+    }
+
+    public void setPageRankProperty(final String pageRankProperty) {
+        this.pageRankProperty = pageRankProperty;
+    }
+
+    /**
+     * @deprecated As of release 3.4.0, replaced by {@link #setEdgeTraversal(Traversal.Admin)} and {@link GraphTraversal#with(StepConfiguration)}.
+     */
     @Override
+    @Deprecated
     public void modulateBy(final Traversal.Admin<?, ?> edgeTraversal) {
         this.edgeTraversal = new PureTraversal<>((Traversal.Admin<Vertex, Edge>) edgeTraversal);
         this.integrateChild(this.edgeTraversal.get());
     }
 
+    /**
+     * @deprecated As of release 3.4.0, replaced by {@link #setPageRankProperty(String)} and {@link GraphTraversal#with(StepConfiguration)}.
+     */
     @Override
+    @Deprecated
     public void modulateBy(final String pageRankProperty) {
         this.pageRankProperty = pageRankProperty;
     }
@@ -118,4 +139,27 @@ public final class PageRankVertexProgramStep extends VertexProgramStep implement
     public int hashCode() {
         return super.hashCode() ^ this.edgeTraversal.hashCode() ^ this.pageRankProperty.hashCode() ^ this.times;
     }
+
+    /**
+     * Gremlin expressions that can be used to produce {@link StepConfiguration} options for use with
+     * {@link GraphTraversal#pageRank()}.
+     *
+     * @author Stephen Mallette (http://stephen.genoprime.com)
+     */
+    public static class PageRank {
+
+        /**
+         * The traversal to use to filter the edges traversed during the page rank calculation.
+         */
+        public static StepConfiguration<Step> edges(final Traversal<Vertex, Edge> edgeTraversal) {
+            return new DefaultStepConfiguration(PageRankVertexProgramStep.class, "setEdgeTraversal", edgeTraversal.asAdmin());
+        }
+
+        /**
+         * The name of the property that will contain the final pagerank value.
+         */
+        public static StepConfiguration<Step> propertyName(final String property) {
+            return new DefaultStepConfiguration(PageRankVertexProgramStep.class, "setPageRankProperty", property);
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ff6f6d84/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Bytecode.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Bytecode.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Bytecode.java
index a3ba9f0..ad50c5c 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Bytecode.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Bytecode.java
@@ -19,6 +19,8 @@
 
 package org.apache.tinkerpop.gremlin.process.traversal;
 
+import org.apache.tinkerpop.gremlin.process.traversal.step.StepConfiguration;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.DefaultStepConfiguration;
 import org.apache.tinkerpop.gremlin.process.traversal.strategy.TraversalStrategyProxy;
 import org.apache.tinkerpop.gremlin.structure.util.StringFactory;
 import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;
@@ -276,7 +278,19 @@ public final class Bytecode implements Cloneable, Serializable {
         //
         if (argument instanceof Traversal)
             return ((Traversal) argument).asAdmin().getBytecode();
-        else if (argument instanceof Map) {
+        else if (argument instanceof StepConfiguration) {
+            final StepConfiguration stepConfig = (StepConfiguration) argument;
+            final LinkedHashMap<String,List<Object>> m = new LinkedHashMap<>();
+            final org.apache.commons.configuration.Configuration conf = stepConfig.getConfiguration();
+            final java.util.Iterator<String> keys = conf.getKeys();
+            while (keys.hasNext()) {
+                final String key = keys.next();
+                final List<Object> args = new ArrayList<>();
+                conf.getList(key).forEach(x -> args.add(convertArgument(x, true)));
+                m.put(key, args);
+            }
+            return new DefaultStepConfiguration(m);
+        } else if (argument instanceof Map) {
             final Map<Object, Object> map = new LinkedHashMap<>(((Map) argument).size());
             for (final Map.Entry<?, ?> entry : ((Map<?, ?>) argument).entrySet()) {
                 map.put(convertArgument(entry.getKey(), true), convertArgument(entry.getValue(), true));

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ff6f6d84/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
index b7bf736..5747df2 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
@@ -40,8 +40,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.FromToModulating;
 import org.apache.tinkerpop.gremlin.process.traversal.step.Mutating;
 import org.apache.tinkerpop.gremlin.process.traversal.step.TimesModulating;
 import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalOptionParent;
-import org.apache.tinkerpop.gremlin.process.traversal.step.WithModulating;
-import org.apache.tinkerpop.gremlin.process.traversal.step.WithModulation;
+import org.apache.tinkerpop.gremlin.process.traversal.step.StepConfiguration;
 import org.apache.tinkerpop.gremlin.process.traversal.step.branch.BranchStep;
 import org.apache.tinkerpop.gremlin.process.traversal.step.branch.ChooseStep;
 import org.apache.tinkerpop.gremlin.process.traversal.step.branch.LocalStep;
@@ -2498,20 +2497,20 @@ public interface GraphTraversal<S, E> extends Traversal<S, E> {
         return this.asAdmin().addStep(new LambdaCollectingBarrierStep<>(this.asAdmin(), (Consumer) barrierConsumer, Integer.MAX_VALUE));
     }
 
-    //// WITH-MODULATORS
+    //// WITH-MODULATOR
 
     /**
-     * Provides a configuration to a step in the form of a {@link WithModulation}. The step configuration must be
+     * Provides a configuration to a step in the form of a {@link StepConfiguration}. The step configuration must be
      * step specific and therefore a configuration could be supplied that is not known to be valid until execution.
      *
-     * @param config the configuration to apply to a step
+     * @param modulation the configuration to apply to a step
      * @return the traversal with a modulated step
      * @see <a href="http://tinkerpop.apache.org/docs/${project.version}/reference/#with-step" target="_blank">Reference Documentation - With Step</a>
      * @since 3.4.0
      */
-    public default GraphTraversal<S,E> with(final WithModulation config) {
-        this.asAdmin().getBytecode().addStep(Symbols.with, config);
-        ((WithModulating) this.asAdmin().getEndStep()).modulateWith(config);
+    public default GraphTraversal<S,E> with(final StepConfiguration<Step> modulation) {
+        this.asAdmin().getBytecode().addStep(Symbols.with, modulation);
+        modulation.accept(this.asAdmin().getEndStep());
         return this;
     }
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ff6f6d84/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/StepConfiguration.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/StepConfiguration.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/StepConfiguration.java
new file mode 100644
index 0000000..3a9d4a7
--- /dev/null
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/StepConfiguration.java
@@ -0,0 +1,51 @@
+/*
+ * 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;
+
+import org.apache.commons.configuration.BaseConfiguration;
+import org.apache.commons.configuration.Configuration;
+import org.apache.tinkerpop.gremlin.process.traversal.Step;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.DefaultStepConfiguration;
+
+import java.util.function.Consumer;
+
+/**
+ * A {@code WithOption} can be supplied to {@link GraphTraversal#with(StepConfiguration)} and is designed to modulate a
+ * {@link Step} in some way. As {@code WithStep} is a {@code Consumer} that accepts a {@link Step}, the implementation
+ * can modify that step in any way it deems necessary. Typical usage for those adding to the Gremlin language in some
+ * way would be to provide an expression that returns a {@link DefaultStepConfiguration}.
+ * <p/>
+ * To work properly with TinkerPop serialization, implementations should provide a static
+ * {@code StepConfiguration create(Configuration)} method.
+ *
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+public interface StepConfiguration<S extends Step> extends Consumer<S> {
+
+    /**
+     * Get the configuration representation of this strategy. This is useful for converting a strategy into a
+     * serialized form.
+     *
+     * @return the configuration used to create this strategy
+     */
+    public default Configuration getConfiguration() {
+        return new BaseConfiguration();
+    }
+}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ff6f6d84/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/WithModulating.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/WithModulating.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/WithModulating.java
deleted file mode 100644
index 2a81c45..0000000
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/WithModulating.java
+++ /dev/null
@@ -1,26 +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.traversal.step;
-
-/**
- * @author Stephen Mallette (http://stephen.genoprime.com)
- */
-public interface WithModulating {
-    public void modulateWith(final WithModulation configuration);
-}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ff6f6d84/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/WithModulation.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/WithModulation.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/WithModulation.java
deleted file mode 100644
index 404b02f..0000000
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/WithModulation.java
+++ /dev/null
@@ -1,26 +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.traversal.step;
-
-/**
- * @author Stephen Mallette (http://stephen.genoprime.com)
- */
-public interface WithModulation {
-    public Object[]
-}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ff6f6d84/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONModule.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONModule.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONModule.java
index 2e795a5..4253c15 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONModule.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONModule.java
@@ -31,7 +31,9 @@ import org.apache.tinkerpop.gremlin.process.traversal.Scope;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
+import org.apache.tinkerpop.gremlin.process.traversal.step.StepConfiguration;
 import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalOptionParent;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.DefaultStepConfiguration;
 import org.apache.tinkerpop.gremlin.process.traversal.step.util.Tree;
 import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.ConnectiveStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.ElementIdStrategy;
@@ -129,7 +131,7 @@ abstract class GraphSONModule extends TinkerPopJacksonModule {
                     put(List.class, "List");
                     put(Set.class, "Set");
 
-                    // Tinkerpop Graph objects
+                    // TinkerPop Graph objects
                     put(Lambda.class, "Lambda");
                     put(Vertex.class, "Vertex");
                     put(Edge.class, "Edge");
@@ -184,6 +186,7 @@ abstract class GraphSONModule extends TinkerPopJacksonModule {
                             GraphFilterStrategy.class,
                             VertexProgramStrategy.class
                     ).forEach(strategy -> put(strategy, strategy.getSimpleName()));
+                    Arrays.asList(DefaultStepConfiguration.class).forEach(stepConfiguration-> put(stepConfiguration, stepConfiguration.getSimpleName()));
                 }});
 
         /**
@@ -234,6 +237,7 @@ abstract class GraphSONModule extends TinkerPopJacksonModule {
             addSerializer(Bytecode.Binding.class, new TraversalSerializersV3d0.BindingJacksonSerializer());
             addSerializer(Traverser.class, new TraversalSerializersV3d0.TraverserJacksonSerializer());
             addSerializer(TraversalStrategy.class, new TraversalSerializersV3d0.TraversalStrategyJacksonSerializer());
+            addSerializer(StepConfiguration.class, new TraversalSerializersV3d0.StepConfigurationJacksonSerializer());
 
             /////////////////////// DESERIALIZERS ////////////////////////////
 
@@ -300,6 +304,7 @@ abstract class GraphSONModule extends TinkerPopJacksonModule {
                     GraphFilterStrategy.class,
                     VertexProgramStrategy.class
             ).forEach(strategy -> addDeserializer(strategy, new TraversalSerializersV3d0.TraversalStrategyProxyJacksonDeserializer(strategy)));
+            Arrays.asList(DefaultStepConfiguration.class).forEach(stepConf -> addDeserializer(stepConf, new TraversalSerializersV3d0.StepConfigurationProxyJacksonDeserializer(stepConf)));
         }
 
         public static Builder build() {
@@ -398,6 +403,7 @@ abstract class GraphSONModule extends TinkerPopJacksonModule {
                             GraphFilterStrategy.class,
                             VertexProgramStrategy.class
                     ).forEach(strategy -> put(strategy, strategy.getSimpleName()));
+                    Arrays.asList(DefaultStepConfiguration.class).forEach(stepConfiguration-> put(stepConfiguration, stepConfiguration.getSimpleName()));
                 }});
 
         /**
@@ -445,6 +451,7 @@ abstract class GraphSONModule extends TinkerPopJacksonModule {
             addSerializer(Bytecode.Binding.class, new TraversalSerializersV2d0.BindingJacksonSerializer());
             addSerializer(Traverser.class, new TraversalSerializersV2d0.TraverserJacksonSerializer());
             addSerializer(TraversalStrategy.class, new TraversalSerializersV2d0.TraversalStrategyJacksonSerializer());
+            addSerializer(StepConfiguration.class, new TraversalSerializersV2d0.StepConfigurationJacksonSerializer());
 
             /////////////////////// DESERIALIZERS ////////////////////////////
 
@@ -506,6 +513,7 @@ abstract class GraphSONModule extends TinkerPopJacksonModule {
                     GraphFilterStrategy.class,
                     VertexProgramStrategy.class
             ).forEach(strategy -> addDeserializer(strategy, new TraversalSerializersV2d0.TraversalStrategyProxyJacksonDeserializer(strategy)));
+            Arrays.asList(DefaultStepConfiguration.class).forEach(stepConf -> addDeserializer(stepConf, new TraversalSerializersV2d0.StepConfigurationProxyJacksonDeserializer(stepConf)));
         }
 
         public static Builder build() {

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ff6f6d84/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 040fd1d..bc105e6 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
@@ -27,6 +27,8 @@ import org.apache.tinkerpop.gremlin.process.traversal.P;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
+import org.apache.tinkerpop.gremlin.process.traversal.step.StepConfiguration;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.StepConfigurationProxy;
 import org.apache.tinkerpop.gremlin.process.traversal.strategy.TraversalStrategyProxy;
 import org.apache.tinkerpop.gremlin.process.traversal.util.AndP;
 import org.apache.tinkerpop.gremlin.process.traversal.util.ConnectiveP;
@@ -37,18 +39,14 @@ import org.apache.tinkerpop.shaded.jackson.core.JsonParser;
 import org.apache.tinkerpop.shaded.jackson.core.JsonProcessingException;
 import org.apache.tinkerpop.shaded.jackson.core.JsonToken;
 import org.apache.tinkerpop.shaded.jackson.databind.DeserializationContext;
-import org.apache.tinkerpop.shaded.jackson.databind.JavaType;
-import org.apache.tinkerpop.shaded.jackson.databind.JsonNode;
 import org.apache.tinkerpop.shaded.jackson.databind.SerializerProvider;
 import org.apache.tinkerpop.shaded.jackson.databind.deser.std.StdDeserializer;
 import org.apache.tinkerpop.shaded.jackson.databind.jsontype.TypeSerializer;
 import org.apache.tinkerpop.shaded.jackson.databind.ser.std.StdScalarSerializer;
 import org.apache.tinkerpop.shaded.jackson.databind.ser.std.StdSerializer;
-import org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory;
 
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collection;
 import java.util.List;
 import java.util.Map;
@@ -243,6 +241,23 @@ final class TraversalSerializersV2d0 {
         }
     }
 
+    final static class StepConfigurationJacksonSerializer extends StdScalarSerializer<StepConfiguration> {
+
+        public StepConfigurationJacksonSerializer() {
+            super(StepConfiguration.class);
+        }
+
+        @Override
+        public void serialize(final StepConfiguration stepConfiguration, final JsonGenerator jsonGenerator, final SerializerProvider serializerProvider)
+                throws IOException {
+            jsonGenerator.writeStartObject();
+            for (final Map.Entry<Object, Object> entry : ConfigurationConverter.getMap(stepConfiguration.getConfiguration()).entrySet()) {
+                jsonGenerator.writeObjectField((String) entry.getKey(), entry.getValue());
+            }
+            jsonGenerator.writeEndObject();
+        }
+    }
+
     ///////////////////
     // DESERIALIZERS //
     //////////////////
@@ -490,4 +505,18 @@ final class TraversalSerializersV2d0 {
             return new TraversalStrategyProxy<>(this.clazz, new MapConfiguration(data));
         }
     }
+
+    final static class StepConfigurationProxyJacksonDeserializer<T extends StepConfiguration> extends AbstractObjectDeserializer<StepConfigurationProxy> {
+        private final Class<T> clazz;
+
+        public StepConfigurationProxyJacksonDeserializer(final Class<T> clazz) {
+            super(StepConfigurationProxy.class);
+            this.clazz = clazz;
+        }
+
+        @Override
+        public StepConfigurationProxy<T> createObject(final Map<String, Object> data) {
+            return new StepConfigurationProxy<>(this.clazz, new MapConfiguration(data));
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ff6f6d84/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/TraversalSerializersV3d0.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/TraversalSerializersV3d0.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/TraversalSerializersV3d0.java
index eaa7b0f..59ba4a0 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/TraversalSerializersV3d0.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/TraversalSerializersV3d0.java
@@ -27,6 +27,8 @@ import org.apache.tinkerpop.gremlin.process.traversal.P;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
+import org.apache.tinkerpop.gremlin.process.traversal.step.StepConfiguration;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.StepConfigurationProxy;
 import org.apache.tinkerpop.gremlin.process.traversal.strategy.TraversalStrategyProxy;
 import org.apache.tinkerpop.gremlin.process.traversal.util.AndP;
 import org.apache.tinkerpop.gremlin.process.traversal.util.ConnectiveP;
@@ -47,7 +49,6 @@ import org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory;
 
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collection;
 import java.util.List;
 import java.util.Map;
@@ -235,6 +236,23 @@ final class TraversalSerializersV3d0 {
         }
     }
 
+    final static class StepConfigurationJacksonSerializer extends StdScalarSerializer<StepConfiguration> {
+
+        public StepConfigurationJacksonSerializer() {
+            super(StepConfiguration.class);
+        }
+
+        @Override
+        public void serialize(final StepConfiguration stepConfiguration, final JsonGenerator jsonGenerator, final SerializerProvider serializerProvider)
+                throws IOException {
+            jsonGenerator.writeStartObject();
+            for (final Map.Entry<Object, Object> entry : ConfigurationConverter.getMap(stepConfiguration.getConfiguration()).entrySet()) {
+                jsonGenerator.writeObjectField((String) entry.getKey(), entry.getValue());
+            }
+            jsonGenerator.writeEndObject();
+        }
+    }
+
     ///////////////////
     // DESERIALIZERS //
     //////////////////
@@ -484,4 +502,18 @@ final class TraversalSerializersV3d0 {
             return new TraversalStrategyProxy<>(this.clazz, new MapConfiguration(data));
         }
     }
+
+    final static class StepConfigurationProxyJacksonDeserializer<T extends StepConfiguration> extends AbstractObjectDeserializer<StepConfigurationProxy> {
+        private final Class<T> clazz;
+
+        public StepConfigurationProxyJacksonDeserializer(final Class<T> clazz) {
+            super(StepConfigurationProxy.class);
+            this.clazz = clazz;
+        }
+
+        @Override
+        public StepConfigurationProxy<T> createObject(final Map<String, Object> data) {
+            return new StepConfigurationProxy<>(this.clazz, new MapConfiguration(data));
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ff6f6d84/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoSerializersV1d0.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoSerializersV1d0.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoSerializersV1d0.java
index ca7c241..9fdfd4e 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoSerializersV1d0.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoSerializersV1d0.java
@@ -18,11 +18,14 @@
  */
 package org.apache.tinkerpop.gremlin.structure.io.gryo;
 
+import org.apache.commons.configuration.Configuration;
 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.Path;
+import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalSource;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.DefaultStepConfiguration;
 import org.apache.tinkerpop.gremlin.process.traversal.util.AndP;
 import org.apache.tinkerpop.gremlin.process.traversal.util.ConnectiveP;
 import org.apache.tinkerpop.gremlin.process.traversal.util.OrP;
@@ -44,7 +47,10 @@ import org.apache.tinkerpop.gremlin.util.function.Lambda;
 
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
  * This class holds serializers for graph-based objects such as vertices, edges, properties, and paths. These objects
@@ -281,4 +287,30 @@ public final class GryoSerializersV1d0 {
             return new DefaultRemoteTraverser<>(o, input.readLong());
         }
     }
+
+//    public final static class DefaultStepConfigurationSerializer implements SerializerShim<DefaultStepConfiguration> {
+//        @Override
+//        public <O extends OutputShim> void write(final KryoShim<?, O> kryo, final O output, final DefaultStepConfiguration stepConfig) {
+//            final LinkedHashMap<String,List<Object>> m = new LinkedHashMap<>();
+//            final Configuration conf = stepConfig.getConfiguration();
+//            final Iterator<String> keys = conf.getKeys();
+//            while (keys.hasNext()) {
+//                final String key = keys.next();
+//                final List<Object> args = new ArrayList<>();
+//
+//                // gryo doesn't (for whatever reason that i can't remember) coerce traversals to bytecode so if a
+//                // step configuration has a traversal it needs to be coerced here. not sure........
+//                conf.getList(key).forEach(x -> args.add(x instanceof Traversal ? ((Traversal) x).asAdmin().getBytecode() : x));
+//                m.put(key, args);
+//            }
+//
+//            kryo.writeObject(output, m);
+//        }
+//
+//        @Override
+//        public <I extends InputShim> DefaultStepConfiguration read(final KryoShim<I, ?> kryo, final I input, final Class<DefaultStepConfiguration> clazz) {
+//            final LinkedHashMap<String,List<Object>> m = kryo.readObject(input, LinkedHashMap.class);
+//            return DefaultStepConfiguration.
+//        }
+//    }
 }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ff6f6d84/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoSerializersV3d0.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoSerializersV3d0.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoSerializersV3d0.java
index 8a57a06..da91e42 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoSerializersV3d0.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoSerializersV3d0.java
@@ -46,12 +46,12 @@ import org.apache.tinkerpop.gremlin.structure.util.detached.DetachedProperty;
 import org.apache.tinkerpop.gremlin.structure.util.detached.DetachedVertex;
 import org.apache.tinkerpop.gremlin.structure.util.detached.DetachedVertexProperty;
 import org.apache.tinkerpop.gremlin.util.function.Lambda;
-import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;
 
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Iterator;
+import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.TimeUnit;

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ff6f6d84/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoVersion.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoVersion.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoVersion.java
index 6bb7b34..5d4b30b 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoVersion.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoVersion.java
@@ -43,6 +43,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.map.MeanGlobalStep;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.OrderGlobalStep;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.TreeStep;
 import org.apache.tinkerpop.gremlin.process.traversal.step.util.BulkSet;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.DefaultStepConfiguration;
 import org.apache.tinkerpop.gremlin.process.traversal.step.util.ProfileStep;
 import org.apache.tinkerpop.gremlin.process.traversal.step.util.Tree;
 import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.ConnectiveStrategy;
@@ -310,6 +311,7 @@ public enum GryoVersion {
             add(GryoTypeReg.of(TraversalOptionParent.Pick.class, 137));
             add(GryoTypeReg.of(HashSetSupplier.class, 136, new UtilSerializers.HashSetSupplierSerializer()));
             add(GryoTypeReg.of(MultiComparator.class, 165));
+            add(GryoTypeReg.of(DefaultStepConfiguration.class, 174));                 // ***LAST ID***
 
             add(GryoTypeReg.of(ConnectiveStrategy.class, 138));
             add(GryoTypeReg.of(HaltedTraverserStrategy.class, 139));
@@ -373,7 +375,7 @@ public enum GryoVersion {
             add(GryoTypeReg.of(RangeGlobalStep.RangeBiOperator.class, 114));
             add(GryoTypeReg.of(OrderGlobalStep.OrderBiOperator.class, 118));
             add(GryoTypeReg.of(ProfileStep.ProfileBiOperator.class, 119));
-            add(GryoTypeReg.of(IndexedTraverserSet.VertexIndexedTraverserSet.class, 173));                 // ***LAST ID***
+            add(GryoTypeReg.of(IndexedTraverserSet.VertexIndexedTraverserSet.class, 173));
 
             // placeholder serializers for classes that don't live here in core. this will allow them to be used if
             // present  or ignored if the class isn't available. either way the registration numbers are held as
@@ -486,6 +488,7 @@ public enum GryoVersion {
             add(GryoTypeReg.of(TraversalOptionParent.Pick.class, 137));
             add(GryoTypeReg.of(HashSetSupplier.class, 136, new UtilSerializers.HashSetSupplierSerializer()));
             add(GryoTypeReg.of(MultiComparator.class, 165));
+            add(GryoTypeReg.of(DefaultStepConfiguration.class, 174));                 // ***LAST ID***
 
             add(GryoTypeReg.of(TraverserSet.class, 58));
 
@@ -552,7 +555,7 @@ public enum GryoVersion {
             add(GryoTypeReg.of(MatchStep.CountMatchAlgorithm.class, 160));
             add(GryoTypeReg.of(MatchStep.GreedyMatchAlgorithm.class, 167));
             // skip 171, 172 to sync with tp33
-            add(GryoTypeReg.of(IndexedTraverserSet.VertexIndexedTraverserSet.class, 173));                 // ***LAST ID***
+            add(GryoTypeReg.of(IndexedTraverserSet.VertexIndexedTraverserSet.class, 173));
         }};
     }
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ff6f6d84/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalTest.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalTest.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalTest.java
index 6decbe0..9009d0b 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalTest.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalTest.java
@@ -42,7 +42,7 @@ import static org.junit.Assert.assertEquals;
 public class GraphTraversalTest {
     private static final Logger logger = LoggerFactory.getLogger(GraphTraversalTest.class);
 
-    private static Set<String> NO_GRAPH = new HashSet<>(Arrays.asList("asAdmin", "by", "option", "iterate", "to", "from", "profile", "pageRank", "peerPressure", "program", "none"));
+    private static Set<String> NO_GRAPH = new HashSet<>(Arrays.asList("asAdmin", "by", "with", "option", "iterate", "to", "from", "profile", "pageRank", "peerPressure", "program", "none"));
     private static Set<String> NO_ANONYMOUS = new HashSet<>(Arrays.asList("start", "__"));
     private static Set<String> IGNORES_BYTECODE = new HashSet<>(Arrays.asList("asAdmin", "iterate", "mapValues", "mapKeys"));
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ff6f6d84/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/StepTest.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/StepTest.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/StepTest.java
index cfdb08b..e2f4ae0 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/StepTest.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/StepTest.java
@@ -47,7 +47,7 @@ public abstract class StepTest {
     }
 
     @Test
-    public void testEquality() {
+    public void shouldValidateEqualityExpectations() {
         final List<Step> instances1 = this.getStepInstances();
         final List<Step> instances2 = this.getStepInstances();
         for (int i = 0; i < instances1.size(); i++) {

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ff6f6d84/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONMapperPartialEmbeddedTypeTest.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONMapperPartialEmbeddedTypeTest.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONMapperPartialEmbeddedTypeTest.java
index 4e86ebd..de4dded 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONMapperPartialEmbeddedTypeTest.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONMapperPartialEmbeddedTypeTest.java
@@ -22,6 +22,8 @@ import org.apache.tinkerpop.gremlin.process.remote.traversal.DefaultRemoteTraver
 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.gremlin.process.traversal.step.util.DefaultStepConfiguration;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.StepConfigurationProxy;
 import org.apache.tinkerpop.shaded.jackson.databind.JsonMappingException;
 import org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper;
 import org.junit.Test;
@@ -334,6 +336,14 @@ public class GraphSONMapperPartialEmbeddedTypeTest extends AbstractGraphSONTest
         }
     }
 
+    @Test
+    public void shouldHandleWithDefaultStepConfiguration() throws Exception {
+        final DefaultStepConfiguration stepConfig = new DefaultStepConfiguration("setInterval", 1000);
+        final StepConfigurationProxy deserStepConfig = serializeDeserializeAuto(mapper, stepConfig);
+        assertEquals(1000, deserStepConfig.getConfiguration().getInt("setInterval"));
+        assertEquals(DefaultStepConfiguration.class, deserStepConfig.getStepConfigurationClass());
+    }
+
     // Class needs to be defined as statics as it's a nested class.
     public static class FunObject {
         private String val;

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ff6f6d84/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoMapperTest.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoMapperTest.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoMapperTest.java
index fcb040a..3013098 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoMapperTest.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoMapperTest.java
@@ -20,6 +20,7 @@ package org.apache.tinkerpop.gremlin.structure.io.gryo;
 
 import org.apache.tinkerpop.gremlin.process.remote.traversal.DefaultRemoteTraverser;
 import org.apache.tinkerpop.gremlin.process.traversal.Bytecode;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.DefaultStepConfiguration;
 import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalExplanation;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.apache.tinkerpop.gremlin.structure.io.IoX;
@@ -377,6 +378,12 @@ public class GryoMapperTest {
         assertThat(Arrays.equals(bb.array(), serializeDeserialize(bb, ByteBuffer.class).array()), is(true));
     }
 
+    @Test
+    public void shouldHandleDefaultStepConfiguration() throws Exception {
+        final DefaultStepConfiguration stepConf = new DefaultStepConfiguration("pageRankProperty", "xxx");
+        assertEquals(stepConf, serializeDeserialize(stepConf, DefaultStepConfiguration.class));
+    }
+
     public <T> T serializeDeserialize(final Object o, final Class<T> clazz) throws Exception {
         final Kryo kryo = builder.get().create().createMapper();
         try (final ByteArrayOutputStream stream = new ByteArrayOutputStream()) {

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ff6f6d84/gremlin-dotnet/glv/generate.groovy
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/glv/generate.groovy b/gremlin-dotnet/glv/generate.groovy
index 91f9b94..6121483 100644
--- a/gremlin-dotnet/glv/generate.groovy
+++ b/gremlin-dotnet/glv/generate.groovy
@@ -53,6 +53,7 @@ def toCSharpTypeMap = ["Long": "long",
                        "Traversal[]": "ITraversal[]",
                        "Predicate": "IPredicate",
                        "P": "P",
+                       "StepConfiguration": "IStepConfiguration",
                        "TraversalStrategy": "ITraversalStrategy",
                        "TraversalStrategy[]": "ITraversalStrategy[]",
                        "Function": "IFunction",

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ff6f6d84/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
index bb3d5d8..d1bdabc 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
@@ -1679,7 +1679,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the with step to this <see cref="GraphTraversal{SType, EType}" />.
         /// </summary>
-        public GraphTraversal<S, E> With (StepConfiguration modulation)
+        public GraphTraversal<S, E> With (IStepConfiguration modulation)
         {
             Bytecode.AddStep("with", modulation);
             return Wrap<S, E>(this);

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ff6f6d84/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GroovyTranslator.java
----------------------------------------------------------------------
diff --git a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GroovyTranslator.java b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GroovyTranslator.java
index 48ba882..ee8b0c3 100644
--- a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GroovyTranslator.java
+++ b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GroovyTranslator.java
@@ -28,6 +28,8 @@ import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalSource;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalOptionParent;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.DefaultStepConfiguration;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.StepConfigurationProxy;
 import org.apache.tinkerpop.gremlin.process.traversal.strategy.TraversalStrategyProxy;
 import org.apache.tinkerpop.gremlin.process.traversal.util.ConnectiveP;
 import org.apache.tinkerpop.gremlin.process.traversal.util.OrP;
@@ -182,7 +184,12 @@ public final class GroovyTranslator implements Translator.ScriptTranslator {
                         "Collections.emptyMap()," +
                         convertToString(vertexProperty.element()) + ")";
             }
-        } else if (object instanceof Lambda) {
+        } else if (object instanceof DefaultStepConfiguration) {
+            return DefaultStepConfiguration.class.getName() + ".create(new org.apache.commons.configuration.MapConfiguration(" + convertToString(ConfigurationConverter.getMap(((DefaultStepConfiguration) object).getConfiguration())) + "))";
+        } else if (object instanceof StepConfigurationProxy) {
+            final StepConfigurationProxy proxy = (StepConfigurationProxy) object;
+            return proxy.getStepConfigurationClass().getCanonicalName() + ".create(new org.apache.commons.configuration.MapConfiguration(" + convertToString(ConfigurationConverter.getMap(proxy.getConfiguration())) + "))";
+        }else if (object instanceof Lambda) {
             final String lambdaString = ((Lambda) object).getLambdaScript().trim();
             return lambdaString.startsWith("{") ? lambdaString : "{" + lambdaString + "}";
         } else if (object instanceof TraversalStrategyProxy) {

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ff6f6d84/gremlin-python/glv/generate.groovy
----------------------------------------------------------------------
diff --git a/gremlin-python/glv/generate.groovy b/gremlin-python/glv/generate.groovy
index 58d0cd3..85a3dc4 100644
--- a/gremlin-python/glv/generate.groovy
+++ b/gremlin-python/glv/generate.groovy
@@ -29,6 +29,7 @@ import java.lang.reflect.Modifier
 def toPythonMap = ["global": "global_",
                    "as": "as_",
                    "in": "in_",
+                   "with": "with_",
                    "and": "and_",
                    "or": "or_",
                    "is": "is_",

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ff6f6d84/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py b/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py
index a492f9c..bb81d87 100644
--- a/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py
+++ b/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py
@@ -505,7 +505,7 @@ class GraphTraversal(Traversal):
         self.bytecode.add_step("where", *args)
         return self
 
-    def with(self, *args):
+    def with_(self, *args):
         self.bytecode.add_step("with", *args)
         return self
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ff6f6d84/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PageRankTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PageRankTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PageRankTest.java
index 07a2b04..4f706b6 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PageRankTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PageRankTest.java
@@ -23,6 +23,7 @@ import org.apache.tinkerpop.gremlin.LoadGraphWith;
 import org.apache.tinkerpop.gremlin.process.AbstractGremlinProcessTest;
 import org.apache.tinkerpop.gremlin.process.GremlinProcessRunner;
 import org.apache.tinkerpop.gremlin.process.computer.ranking.pagerank.PageRankVertexProgram;
+import org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.PageRankVertexProgramStep.PageRank;
 import org.apache.tinkerpop.gremlin.process.traversal.Order;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
@@ -63,6 +64,8 @@ public abstract class PageRankTest extends AbstractGremlinProcessTest {
 
     public abstract Traversal<Vertex, Map<String, List<Object>>> get_g_V_hasLabelXsoftwareX_hasXname_rippleX_pageRankX1X_byXinEXcreatedXX_timesX1X_byXpriorsX_inXcreatedX_unionXboth__identityX_valueMapXname_priorsX();
 
+    public abstract Traversal<Vertex, Map<Object, List<Vertex>>> get_g_V_outXcreatedX_groupXmX_byXlabelX_pageRankX1X_withXpropertyNameXpageRankXX_withXedgesXinEXX_timesX1X_inXcreatedX_groupXmX_byXpageRankX_capXmX();
+
     public abstract Traversal<Vertex, Map<Object, List<Vertex>>> get_g_V_outXcreatedX_groupXmX_byXlabelX_pageRankX1X_byXpageRankX_byXinEX_timesX1X_inXcreatedX_groupXmX_byXpageRankX_capXmX();
 
     @Test
@@ -238,6 +241,39 @@ public abstract class PageRankTest extends AbstractGremlinProcessTest {
         });
     }
 
+    @Test
+    @LoadGraphWith(MODERN)
+    public void g_V_outXcreatedX_groupXmX_byXlabelX_pageRankX1X_withXpropertyNameXpageRankXX_withXedgesXinEXX_timesX1X_inXcreatedX_groupXmX_byXpageRankX_capXmX() {
+        // [{2.0=[v[4], v[4], v[4], v[4]], 1.0=[v[6], v[6], v[6], v[1], v[1], v[1]], software=[v[5], v[3], v[3], v[3]]}]
+        final Traversal<Vertex, Map<Object, List<Vertex>>> traversal = get_g_V_outXcreatedX_groupXmX_byXlabelX_pageRankX1X_withXpropertyNameXpageRankXX_withXedgesXinEXX_timesX1X_inXcreatedX_groupXmX_byXpageRankX_capXmX();
+        printTraversalForm(traversal);
+        final Map<Object, List<Vertex>> map = traversal.next();
+        assertFalse(traversal.hasNext());
+        assertEquals(3, map.size());
+        assertTrue(map.containsKey("software"));
+        map.forEach((k, v) -> {
+            boolean found = false;
+            if (!k.equals("software") && v.size() == 4) {
+                assertEquals(2.0d, ((Number) k).doubleValue(), 0.01d);
+                assertEquals(4, v.stream().filter(vertex -> vertex.id().equals(convertToVertexId(graph, "josh"))).count());
+                found = true;
+            } else if (v.size() == 6) {
+                assertEquals(1.0d, ((Number) k).doubleValue(), 0.01d);
+                assertEquals(3, v.stream().filter(vertex -> vertex.id().equals(convertToVertexId(graph, "peter"))).count());
+                assertEquals(3, v.stream().filter(vertex -> vertex.id().equals(convertToVertexId(graph, "marko"))).count());
+                found = true;
+            } else if (v.size() == 4) {
+                assertEquals("software", k);
+                assertEquals(3, v.stream().filter(vertex -> vertex.id().equals(convertToVertexId(graph, "lop"))).count());
+                assertEquals(1, v.stream().filter(vertex -> vertex.id().equals(convertToVertexId(graph, "ripple"))).count());
+                found = true;
+            }
+
+            if (!found)
+                fail("There are too many key/values: " + k + "--" + v);
+        });
+    }
+
     public static class Traversals extends PageRankTest {
 
         @Override
@@ -284,5 +320,10 @@ public abstract class PageRankTest extends AbstractGremlinProcessTest {
         public Traversal<Vertex, Map<Object, List<Vertex>>> get_g_V_outXcreatedX_groupXmX_byXlabelX_pageRankX1X_byXpageRankX_byXinEX_timesX1X_inXcreatedX_groupXmX_byXpageRankX_capXmX() {
             return g.V().out("created").group("m").by(T.label).pageRank(1.0).by("pageRank").by(__.inE()).times(1).in("created").group("m").by("pageRank").cap("m");
         }
+
+        @Override
+        public Traversal<Vertex, Map<Object, List<Vertex>>> get_g_V_outXcreatedX_groupXmX_byXlabelX_pageRankX1X_withXpropertyNameXpageRankXX_withXedgesXinEXX_timesX1X_inXcreatedX_groupXmX_byXpageRankX_capXmX() {
+            return g.V().out("created").group("m").by(T.label).pageRank(1.0).with(PageRank.propertyName("pageRank")).with(PageRank.edges(__.inE())).times(1).in("created").group("m").by("pageRank").cap("m");
+        }
     }
 }


[21/22] tinkerpop git commit: wip

Posted by sp...@apache.org.
wip


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

Branch: refs/heads/TINKERPOP-1975
Commit: 02f583e01d24c69a498bcc897d8b7d1327847fc4
Parents: 99a4b36
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed May 30 08:27:07 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed May 30 13:46:14 2018 -0400

----------------------------------------------------------------------
 .../gremlin/jsr223/JavaTranslator.java          | 28 ++++++++---------
 .../structure/io/gryo/GryoSerializersV1d0.java  | 32 --------------------
 .../structure/io/gryo/GryoSerializersV3d0.java  |  1 -
 3 files changed, 12 insertions(+), 49 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/02f583e0/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/JavaTranslator.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/JavaTranslator.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/JavaTranslator.java
index 4813fab..6c3d906 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/JavaTranslator.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/JavaTranslator.java
@@ -27,7 +27,6 @@ import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalSource;
 import org.apache.tinkerpop.gremlin.process.traversal.step.StepConfiguration;
 import org.apache.tinkerpop.gremlin.process.traversal.step.util.BulkSet;
-import org.apache.tinkerpop.gremlin.process.traversal.step.util.DefaultStepConfiguration;
 import org.apache.tinkerpop.gremlin.process.traversal.step.util.StepConfigurationProxy;
 import org.apache.tinkerpop.gremlin.process.traversal.step.util.Tree;
 import org.apache.tinkerpop.gremlin.process.traversal.strategy.TraversalStrategyProxy;
@@ -118,20 +117,11 @@ public final class JavaTranslator<S extends TraversalSource, T extends Traversal
                 throw new IllegalStateException(e.getMessage());
             }
         } else if (object instanceof TraversalStrategyProxy) {
-            final Map<String, Object> map = new HashMap<>();
-            final Configuration configuration = ((TraversalStrategyProxy) object).getConfiguration();
-            configuration.getKeys().forEachRemaining(key -> map.put(key, translateObject(configuration.getProperty(key))));
-            return invokeStrategyCreationMethod(object, map);
-        } else if (object instanceof DefaultStepConfiguration) {
-            final Map<String, Object> map = new LinkedHashMap<>();
-            final Configuration configuration = ((DefaultStepConfiguration) object).getConfiguration();
-            configuration.getKeys().forEachRemaining(key -> map.put(key, translateObject(configuration.getProperty(key))));
-            return invokeStepConfigurationCreationMethod(object, map);
-        }else if (object instanceof StepConfigurationProxy) {
-            final Map<String, Object> map = new LinkedHashMap<>();
-            final Configuration configuration = ((StepConfigurationProxy) object).getConfiguration();
-            configuration.getKeys().forEachRemaining(key -> map.put(key, translateObject(configuration.getProperty(key))));
-            return invokeStepConfigurationCreationMethod(object, map);
+            return invokeStrategyCreationMethod(object, translateConfigurationToMap(((TraversalStrategyProxy) object).getConfiguration()));
+        } else if (object instanceof StepConfiguration) {
+            return invokeStepConfigurationCreationMethod(object, translateConfigurationToMap(((StepConfiguration) object).getConfiguration()));
+        } else if (object instanceof StepConfigurationProxy) {
+            return invokeStepConfigurationCreationMethod(object, translateConfigurationToMap(((StepConfigurationProxy) object).getConfiguration()));
         } else if (object instanceof Map) {
             final Map<Object, Object> map = object instanceof Tree ?
                     new Tree() :
@@ -166,6 +156,12 @@ public final class JavaTranslator<S extends TraversalSource, T extends Traversal
             return object;
     }
 
+    private Map<String,Object> translateConfigurationToMap(final Configuration conf) {
+        final Map<String, Object> map = new LinkedHashMap<>();
+        conf.getKeys().forEachRemaining(key -> map.put(key, translateObject(conf.getProperty(key))));
+        return map;
+    }
+
     private Object invokeStrategyCreationMethod(final Object delegate, final Map<String, Object> map) {
         final Class<?> strategyClass = ((TraversalStrategyProxy) delegate).getStrategyClass();
         final Map<String, Method> methodCache = localMethodCache.computeIfAbsent(strategyClass, k -> {
@@ -198,7 +194,7 @@ public final class JavaTranslator<S extends TraversalSource, T extends Traversal
     }
 
     private Object invokeStepConfigurationCreationMethod(final Object delegate, final Map<String, Object> map) {
-        final Class<?> stepConfigurationClass = delegate instanceof DefaultStepConfiguration ? delegate.getClass() : ((StepConfigurationProxy) delegate).getStepConfigurationClass();
+        final Class<?> stepConfigurationClass = delegate instanceof StepConfiguration ? delegate.getClass() : ((StepConfigurationProxy) delegate).getStepConfigurationClass();
         final Map<String, Method> methodCache = localMethodCache.computeIfAbsent(stepConfigurationClass, k -> {
             final Map<String, Method> cacheEntry = new HashMap<>();
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/02f583e0/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoSerializersV1d0.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoSerializersV1d0.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoSerializersV1d0.java
index 9fdfd4e..ca7c241 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoSerializersV1d0.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoSerializersV1d0.java
@@ -18,14 +18,11 @@
  */
 package org.apache.tinkerpop.gremlin.structure.io.gryo;
 
-import org.apache.commons.configuration.Configuration;
 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.Path;
-import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalSource;
-import org.apache.tinkerpop.gremlin.process.traversal.step.util.DefaultStepConfiguration;
 import org.apache.tinkerpop.gremlin.process.traversal.util.AndP;
 import org.apache.tinkerpop.gremlin.process.traversal.util.ConnectiveP;
 import org.apache.tinkerpop.gremlin.process.traversal.util.OrP;
@@ -47,10 +44,7 @@ import org.apache.tinkerpop.gremlin.util.function.Lambda;
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
 import java.util.List;
-import java.util.Map;
 
 /**
  * This class holds serializers for graph-based objects such as vertices, edges, properties, and paths. These objects
@@ -287,30 +281,4 @@ public final class GryoSerializersV1d0 {
             return new DefaultRemoteTraverser<>(o, input.readLong());
         }
     }
-
-//    public final static class DefaultStepConfigurationSerializer implements SerializerShim<DefaultStepConfiguration> {
-//        @Override
-//        public <O extends OutputShim> void write(final KryoShim<?, O> kryo, final O output, final DefaultStepConfiguration stepConfig) {
-//            final LinkedHashMap<String,List<Object>> m = new LinkedHashMap<>();
-//            final Configuration conf = stepConfig.getConfiguration();
-//            final Iterator<String> keys = conf.getKeys();
-//            while (keys.hasNext()) {
-//                final String key = keys.next();
-//                final List<Object> args = new ArrayList<>();
-//
-//                // gryo doesn't (for whatever reason that i can't remember) coerce traversals to bytecode so if a
-//                // step configuration has a traversal it needs to be coerced here. not sure........
-//                conf.getList(key).forEach(x -> args.add(x instanceof Traversal ? ((Traversal) x).asAdmin().getBytecode() : x));
-//                m.put(key, args);
-//            }
-//
-//            kryo.writeObject(output, m);
-//        }
-//
-//        @Override
-//        public <I extends InputShim> DefaultStepConfiguration read(final KryoShim<I, ?> kryo, final I input, final Class<DefaultStepConfiguration> clazz) {
-//            final LinkedHashMap<String,List<Object>> m = kryo.readObject(input, LinkedHashMap.class);
-//            return DefaultStepConfiguration.
-//        }
-//    }
 }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/02f583e0/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoSerializersV3d0.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoSerializersV3d0.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoSerializersV3d0.java
index da91e42..955e5d0 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoSerializersV3d0.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoSerializersV3d0.java
@@ -51,7 +51,6 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Iterator;
-import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.TimeUnit;


[06/22] tinkerpop git commit: Merge branch 'tp32' into tp33

Posted by sp...@apache.org.
Merge branch 'tp32' into tp33


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

Branch: refs/heads/TINKERPOP-1975
Commit: ae9d7f694a11c4dd7369e0de3651092802f78c2f
Parents: d975e19 9830a3f
Author: Florian Hockmann <fh...@florian-hockmann.de>
Authored: Sun May 27 19:50:29 2018 +0200
Committer: Florian Hockmann <fh...@florian-hockmann.de>
Committed: Sun May 27 19:50:29 2018 +0200

----------------------------------------------------------------------
 .../src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs   | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ae9d7f69/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs
----------------------------------------------------------------------


[03/22] tinkerpop git commit: Merge branch 'tp32' into tp33

Posted by sp...@apache.org.
Merge branch 'tp32' into tp33


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

Branch: refs/heads/TINKERPOP-1975
Commit: d975e1917272ea12c019b77f72953345fa59036f
Parents: 3891777 7c70013
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Tue May 22 08:44:12 2018 -0700
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Tue May 22 08:44:12 2018 -0700

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 gremlin-test/features/map/Select.feature        | 20 ++++++++++++++++
 .../process/traversal/step/map/SelectTest.java  | 15 ++++++++++++
 .../optimization/TinkerGraphCountStrategy.java  |  2 +-
 .../TinkerGraphCountStrategyTest.java           | 25 ++++++++++++--------
 5 files changed, 52 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


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

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d975e191/gremlin-test/features/map/Select.feature
----------------------------------------------------------------------
diff --cc gremlin-test/features/map/Select.feature
index 341a378,1e45a0e..788eda7
--- a/gremlin-test/features/map/Select.feature
+++ b/gremlin-test/features/map/Select.feature
@@@ -516,46 -516,22 +516,66 @@@ Feature: Step - select(
        | d[2].l |
        | d[2].l |
  
 +  Scenario: g_V_asXaX_groupXmX_by_byXbothE_countX_barrier_selectXmX_selectXselectXaXX
 +    Given the modern graph
 +    And the traversal of
 +      """
 +      g.V().as("a").group("m").by().by(__.bothE().count()).barrier().select("m").select(__.select("a"))
 +      """
 +    When iterated to list
 +    Then the result should be unordered
 +      | result |
 +      | d[3].l |
 +      | d[1].l |
 +      | d[3].l |
 +      | d[3].l |
 +      | d[1].l |
 +      | d[1].l |
 +
 +  Scenario: g_V_asXaX_groupXmX_by_byXbothE_countX_barrier_selectXmX_selectXselectXaXX_byXmathX_plus_XX
 +    Given the modern graph
 +    And the traversal of
 +      """
 +      g.V().as("a").group("m").by().by(__.bothE().count()).barrier().select("m").select(__.select("a")).by(__.math("_+_"))
 +      """
 +    When iterated to list
 +    Then the result should be unordered
 +      | result |
 +      | d[6].d |
 +      | d[2].d |
 +      | d[6].d |
 +      | d[6].d |
 +      | d[2].d |
 +      | d[2].d |
 +
 +  Scenario: g_V_asXaX_outXknowsX_asXaX_selectXall_constantXaXX
 +    Given the modern graph
 +    And the traversal of
 +      """
 +      g.V().as("a").out("knows").as("a").select(Pop.all, __.constant("a"))
 +      """
 +    When iterated to list
 +    Then the result should be unordered
 +      | result |
 +      | l[v[marko],v[vadas]] |
 +      | l[v[marko],v[josh]] |
++
+   Scenario: g_V_selectXaX
+     Given the modern graph
+     And the traversal of
+       """
+       g.V().select("a")
+       """
+     When iterated to list
+     Then the result should be empty
+ 
+   Scenario: g_V_selectXaX_count
+     Given the modern graph
+     And the traversal of
+       """
+       g.V().select("a").count()
+       """
+     When iterated to list
+     Then the result should be unordered
+       | result |
+       | d[0].l |

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d975e191/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SelectTest.java
----------------------------------------------------------------------
diff --cc gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SelectTest.java
index 72a1872,3d778e4..20eee0f
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SelectTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SelectTest.java
@@@ -83,12 -83,8 +83,14 @@@ public abstract class SelectTest extend
  
      public abstract Traversal<Vertex, Vertex> get_g_V_chooseXoutE_count_isX0X__asXaX__asXbXX_chooseXselectXaX__selectXaX__selectXbXX();
  
 +    public abstract Traversal<Vertex, Long> get_g_V_asXaX_groupXmX_by_byXbothE_countX_barrier_selectXmX_selectXselectXaXX();
 +
 +    public abstract Traversal<Vertex, Double> get_g_V_asXaX_groupXmX_by_byXbothE_countX_barrier_selectXmX_selectXselectXaXX_byXmathX_plus_XX();
 +
 +    public abstract Traversal<Vertex, List<Vertex>> get_g_V_asXaX_outXknowsX_asXaX_selectXall_constantXaXX();
 +
+     public abstract Traversal<Vertex, Long> get_g_V_selectXaX_count();
+ 
      // below are original back()-tests
  
      public abstract Traversal<Vertex, Vertex> get_g_VX1X_asXhereX_out_selectXhereX(final Object v1Id);
@@@ -349,31 -348,12 +351,39 @@@
  
      @Test
      @LoadGraphWith(MODERN)
 +    public void g_V_asXaX_groupXmX_by_byXbothE_countX_barrier_selectXmX_selectXselectXaXX() {
 +        final Traversal<Vertex, Long> traversal = get_g_V_asXaX_groupXmX_by_byXbothE_countX_barrier_selectXmX_selectXselectXaXX();
 +        printTraversalForm(traversal);
 +        checkResults(Arrays.asList(3L, 1L, 3L, 3L, 1L, 1L), traversal);
 +    }
 +
 +    @Test
 +    @LoadGraphWith(MODERN)
 +    public void g_V_asXaX_groupXmX_by_byXbothE_countX_barrier_selectXmX_selectXselectXaXX_byXmathX_plus_XX() {
 +        final Traversal<Vertex, Double> traversal = get_g_V_asXaX_groupXmX_by_byXbothE_countX_barrier_selectXmX_selectXselectXaXX_byXmathX_plus_XX();
 +        printTraversalForm(traversal);
 +        checkResults(Arrays.asList(6D, 2D, 6D, 6D, 2D, 2D), traversal);
 +    }
 +
 +    @Test
 +    @LoadGraphWith(MODERN)
 +    public void g_V_asXaX_outXknowsX_asXaX_selectXall_constantXaXX() {
 +        final Vertex marko = convertToVertex(graph, "marko");
 +        final Vertex vadas = convertToVertex(graph, "vadas");
 +        final Vertex josh = convertToVertex(graph, "josh");
 +        final Traversal<Vertex, List<Vertex>> traversal = get_g_V_asXaX_outXknowsX_asXaX_selectXall_constantXaXX();
 +        printTraversalForm(traversal);
 +        checkResults(Arrays.asList(Arrays.asList(marko, vadas), Arrays.asList(marko, josh)), traversal);
 +    }
 +
++    @Test
++    @LoadGraphWith(MODERN)
+     public void g_V_selectXaX_count() {
+         final Traversal<Vertex, Long> traversal = get_g_V_selectXaX_count();
+         printTraversalForm(traversal);
+         assertEquals(0L, traversal.next().longValue());
+     }
+ 
      // below are original back()-tests
  
      @Test
@@@ -756,20 -736,10 +766,25 @@@
          }
  
          @Override
 +        public Traversal<Vertex, Long> get_g_V_asXaX_groupXmX_by_byXbothE_countX_barrier_selectXmX_selectXselectXaXX() {
 +            return g.V().as("a").group("m").by().by(__.bothE().count()).barrier().select("m").select(__.select("a"));
 +        }
 +
 +        @Override
 +        public Traversal<Vertex, Double> get_g_V_asXaX_groupXmX_by_byXbothE_countX_barrier_selectXmX_selectXselectXaXX_byXmathX_plus_XX() {
 +            return g.V().as("a").group("m").by().by(__.bothE().count()).barrier().select("m").<Double>select(__.select("a")).by(__.math("_+_"));
 +        }
 +
 +        @Override
 +        public Traversal<Vertex, List<Vertex>> get_g_V_asXaX_outXknowsX_asXaX_selectXall_constantXaXX() {
 +            return g.V().as("a").out("knows").as("a").select(Pop.all, (Traversal) __.constant("a"));
 +        }
 +
++        @Override
+         public Traversal<Vertex, Long> get_g_V_selectXaX_count() {
+             return g.V().select("a").count();
+         }
+ 
          // below are original back()-tests
  
          @Override


[08/22] tinkerpop git commit: Removed references to Structure API from "user docs"

Posted by sp...@apache.org.
Removed references to Structure API from "user docs"

Restricted such references to Provider documentation CTR


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

Branch: refs/heads/TINKERPOP-1975
Commit: 6feff186984c6b1d71ba9dc6c9ace5e59e2d09e4
Parents: 9830a3f
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue May 29 12:50:59 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue May 29 12:50:59 2018 -0400

----------------------------------------------------------------------
 docs/src/dev/provider/index.asciidoc            |  80 ++++++++++
 .../src/reference/gremlin-applications.asciidoc |   5 +-
 .../reference/implementations-neo4j.asciidoc    |  10 +-
 docs/src/reference/intro.asciidoc               | 148 ++-----------------
 docs/src/reference/the-graph.asciidoc           |  40 ++---
 .../tutorials/getting-started/index.asciidoc    |  27 ++--
 6 files changed, 140 insertions(+), 170 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6feff186/docs/src/dev/provider/index.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/dev/provider/index.asciidoc b/docs/src/dev/provider/index.asciidoc
index 5bc4d9e..dddcb18 100644
--- a/docs/src/dev/provider/index.asciidoc
+++ b/docs/src/dev/provider/index.asciidoc
@@ -46,6 +46,86 @@ provided by TinkerPop (e.g. Gremlin Console, Gremlin Server, etc.) and 3rd-party
 Gremlin-JS, etc.) will integrate properly. Finally, please feel free to use the logo on the left to promote your
 TinkerPop3 implementation.
 
+[[graph-structure-api]]
+=== Graph Structure API
+
+The graph structure API of TinkerPop3 provides the interfaces necessary to create a TinkerPop enabled system and
+exposes the basic components of a property graph to include `Graph`, `Vertex`, `Edge`, `VertexProperty` and `Property`.
+The structure API can be used directly as follows:
+
+[source,java]
+Graph graph = TinkerGraph.open(); <1>
+Vertex marko = graph.addVertex(T.label, "person", T.id, 1, "name", "marko", "age", 29); <2>
+Vertex vadas = graph.addVertex(T.label, "person", T.id, 2, "name", "vadas", "age", 27);
+Vertex lop = graph.addVertex(T.label, "software", T.id, 3, "name", "lop", "lang", "java");
+Vertex josh = graph.addVertex(T.label, "person", T.id, 4, "name", "josh", "age", 32);
+Vertex ripple = graph.addVertex(T.label, "software", T.id, 5, "name", "ripple", "lang", "java");
+Vertex peter = graph.addVertex(T.label, "person", T.id, 6, "name", "peter", "age", 35);
+marko.addEdge("knows", vadas, T.id, 7, "weight", 0.5f); <3>
+marko.addEdge("knows", josh, T.id, 8, "weight", 1.0f);
+marko.addEdge("created", lop, T.id, 9, "weight", 0.4f);
+josh.addEdge("created", ripple, T.id, 10, "weight", 1.0f);
+josh.addEdge("created", lop, T.id, 11, "weight", 0.4f);
+peter.addEdge("created", lop, T.id, 12, "weight", 0.2f);
+
+<1> Create a new in-memory `TinkerGraph` and assign it to the variable `graph`.
+<2> Create a vertex along with a set of key/value pairs with `T.label` being the vertex label and `T.id` being the vertex id.
+<3> Create an edge along with a  set of key/value pairs with the edge label being specified as the first argument.
+
+In the above code all the vertices are created first and then their respective edges. There are two "accessor tokens":
+`T.id` and `T.label`. When any of these, along with a set of other key value pairs is provided to
+`Graph.addVertex(Object...)` or `Vertex.addEdge(String,Vertex,Object...)`, the respective element is created along
+with the provided key/value pair properties appended to it.
+
+Below is a sequence of basic graph mutation operations represented in Java 8. One of the major differences between
+TinkerPop2 and TinkerPop3 is that in TinkerPop3, the Java convention of using setters and getters has been abandoned
+in favor of a syntax that is more aligned with the syntax of Gremlin-Groovy in TinkerPop2. Given that Gremlin-Java8
+and Gremlin-Groovy are nearly identical due to the inclusion of Java 8 lambdas, a big effort was made to ensure that
+both languages are as similar as possible.
+
+image:basic-mutation.png[width=240,float=right]
+[source,java]
+----
+// create a new graph
+Graph graph = TinkerGraph.open();
+// add a software vertex with a name property
+Vertex gremlin = graph.addVertex(T.label, "software",
+                             "name", "gremlin"); <1>
+// only one vertex should exist
+assert(IteratorUtils.count(graph.vertices()) == 1)
+// no edges should exist as none have been created
+assert(IteratorUtils.count(graph.edges()) == 0)
+// add a new property
+gremlin.property("created",2009) <2>
+// add a new software vertex to the graph
+Vertex blueprints = graph.addVertex(T.label, "software",
+                                "name", "blueprints"); <3>
+// connect gremlin to blueprints via a dependsOn-edge
+gremlin.addEdge("dependsOn",blueprints); <4>
+// now there are two vertices and one edge
+assert(IteratorUtils.count(graph.vertices()) == 2)
+assert(IteratorUtils.count(graph.edges()) == 1)
+// add a property to blueprints
+blueprints.property("created",2010) <5>
+// remove that property
+blueprints.property("created").remove() <6>
+// connect gremlin to blueprints via encapsulates
+gremlin.addEdge("encapsulates",blueprints) <7>
+assert(IteratorUtils.count(graph.vertices()) == 2)
+assert(IteratorUtils.count(graph.edges()) == 2)
+// removing a vertex removes all its incident edges as well
+blueprints.remove() <8>
+gremlin.remove() <9>
+// the graph is now empty
+assert(IteratorUtils.count(graph.vertices()) == 0)
+assert(IteratorUtils.count(graph.edges()) == 0)
+// tada!
+----
+
+The above code samples are just examples of how the structure API can be used to access a graph. Those APIs are then
+used internally by the process API (i.e. Gremlin) to access any graph that implements those structure API interfaces
+to execute queries. Typically, the structure API methods are not used directly by end-users.
+
 === Implementing Gremlin-Core
 
 The classes that a graph system provider should focus on implementing are itemized below. It is a good idea to study

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6feff186/docs/src/reference/gremlin-applications.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc
index 1a68ad8..522bcfd 100644
--- a/docs/src/reference/gremlin-applications.asciidoc
+++ b/docs/src/reference/gremlin-applications.asciidoc
@@ -506,8 +506,9 @@ as "objects":
 m = result[0].object <4>
 m.sort {it.value}
 script = """
-         matthias = graph.addVertex('name','matthias')
-         matthias.addEdge('co-creator',g.V().has('name','marko').next())
+         g.addV('person',).property('name','matthias').as('matthias').
+           V().has('person','name','marko').as('marko').
+           addE('co-creator').from('matthias').to('marko')
          """
 :> @script   <5>
 :> g.V().has('name','matthias').out('co-creator').values('name')

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6feff186/docs/src/reference/implementations-neo4j.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/implementations-neo4j.asciidoc b/docs/src/reference/implementations-neo4j.asciidoc
index be7371f..1f4cc6b 100644
--- a/docs/src/reference/implementations-neo4j.asciidoc
+++ b/docs/src/reference/implementations-neo4j.asciidoc
@@ -75,11 +75,11 @@ The Gremlin-Console session below demonstrates Neo4j indices. For more informati
 [gremlin-groovy]
 ----
 graph = Neo4jGraph.open('/tmp/neo4j')
+g = graph.traversal()
 graph.cypher("CREATE INDEX ON :person(name)")
 graph.tx().commit()  <1>
-graph.addVertex(label,'person','name','marko')
-graph.addVertex(label,'dog','name','puppy')
-g = graph.traversal()
+g.addV('person').property('name','marko')
+g.addV('dog').property('name','puppy')
 g.V().hasLabel('person').has('name','marko').values('name')
 graph.close()
 ----
@@ -190,7 +190,8 @@ An example use case is presented below.
 [gremlin-groovy]
 ----
 graph = Neo4jGraph.open('/tmp/neo4j')
-vertex = (Neo4jVertex) graph.addVertex('human::animal') <1>
+g = graph.traversal()
+vertex = (Neo4jVertex) g.addV('human::animal').next() <1>
 vertex.label() <2>
 vertex.labels() <3>
 vertex.addLabel('organism') <4>
@@ -201,7 +202,6 @@ vertex.addLabel('organism') <6>
 vertex.labels()
 vertex.removeLabel('human') <7>
 vertex.label()
-g = graph.traversal()
 g.V().has(label,'organism') <8>
 g.V().has(label,of('organism')) <9>
 g.V().has(label,of('organism')).has(label,of('animal'))

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6feff186/docs/src/reference/intro.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/intro.asciidoc b/docs/src/reference/intro.asciidoc
index 0f226ec..890034d 100644
--- a/docs/src/reference/intro.asciidoc
+++ b/docs/src/reference/intro.asciidoc
@@ -31,14 +31,17 @@ dots) and edges (arcs, lines). When modeling a graph in a computer and applying
 the generic mathematically-oriented, binary graph is extended to support both labels and key/value properties. This
 structure is known as a property graph. More formally, it is a directed, binary, attributed multi-graph. An example
 property graph is diagrammed below. This graph example will be used extensively throughout the documentation and is
-called "TinkerPop Classic" as it is the original demo graph distributed with TinkerPop0 back in 2009 (i.e. the good
-ol' days -- it was the best of times and it was the worst of times).
+called "TinkerPop Modern" as it is a modern variation of the original demo graph distributed with TinkerPop0 back
+in 2009 (i.e. the good ol' days -- it was the best of times and it was the worst of times).
 
 TIP: The TinkerPop graph is available with <<tinkergraph-gremlin,TinkerGraph>> via `TinkerFactory.createModern()`.
 TinkerGraph is the reference implementation of TinkerPop3 and is used in nearly all the examples in this documentation.
 Note that there also exists the classic `TinkerFactory.createClassic()` which is the graph used in TinkerPop2 and does
 not include vertex labels.
 
+TIP: All of the toy graphs available in TinkerPop are described in
+link:http://tinkerpop.apache.org/docs/x.y.z/tutorials/the-gremlin-console/#toy-graphs[The Gremlin Console] tutorial.
+
 [[tinkerpop-modern]]
 .TinkerPop Modern
 image::tinkerpop-modern.png[width=500]
@@ -49,6 +52,12 @@ data model defined by a vertex/edge/property link:http://en.wikipedia.org/wiki/N
 of the graph is the means by which the structure is analyzed. The typical form of graph processing is called a
 link:http://en.wikipedia.org/wiki/Graph_traversal[traversal].
 
+Generally speaking, the structure or "graph" API is meant for link:http://tinkerpop.apache.org/providers.html[graph providers]
+who are implementing the TinkerPop interfaces and the process or "traversal" API (i.e. Gremlin) is meant for end-users
+who are utilizing a graph system from a graph provider. While the components of the process API are itemized below,
+they are described in greater detail in the link:http://tinkerpop.apache.org/docs/x.y.z/tutorials/gremlins-anatomy/[Gremlin's Anatomy]
+tutorial.
+
 .Primary components of the TinkerPop3 *structure* API 
  * `Graph`: maintains a set of vertices and edges, and access to database functions such as transactions.
  * `Element`: maintains a collection of properties and a string label denoting the element type.
@@ -88,136 +97,11 @@ providers, then the standard Java naming convention is followed (e.g. `getNextSt
 image:gremlin-standing.png[width=125,float=left] A graph's structure is the topology formed by the explicit references
 between its vertices, edges, and properties. A vertex has incident edges. A vertex is adjacent to another vertex if
 they share an incident edge. A property is attached to an element and an element has a set of properties. A property
-is a key/value pair, where the key is always a character `String`. The graph structure API of TinkerPop3 provides the
-methods necessary to create such a structure. The TinkerPop graph previously diagrammed can be created with the
-following Java 8 code. Note that this graph is available as an in-memory TinkerGraph using
-`TinkerFactory.createClassic()`.
-
-[source,java]
-Graph graph = TinkerGraph.open(); <1>
-Vertex marko = graph.addVertex(T.label, "person", T.id, 1, "name", "marko", "age", 29); <2>
-Vertex vadas = graph.addVertex(T.label, "person", T.id, 2, "name", "vadas", "age", 27);
-Vertex lop = graph.addVertex(T.label, "software", T.id, 3, "name", "lop", "lang", "java");
-Vertex josh = graph.addVertex(T.label, "person", T.id, 4, "name", "josh", "age", 32);
-Vertex ripple = graph.addVertex(T.label, "software", T.id, 5, "name", "ripple", "lang", "java");
-Vertex peter = graph.addVertex(T.label, "person", T.id, 6, "name", "peter", "age", 35);
-marko.addEdge("knows", vadas, T.id, 7, "weight", 0.5f); <3>
-marko.addEdge("knows", josh, T.id, 8, "weight", 1.0f);
-marko.addEdge("created", lop, T.id, 9, "weight", 0.4f);
-josh.addEdge("created", ripple, T.id, 10, "weight", 1.0f);
-josh.addEdge("created", lop, T.id, 11, "weight", 0.4f);
-peter.addEdge("created", lop, T.id, 12, "weight", 0.2f);
-
-<1> Create a new in-memory `TinkerGraph` and assign it to the variable `graph`.
-<2> Create a vertex along with a set of key/value pairs with `T.label` being the vertex label and `T.id` being the vertex id.
-<3> Create an edge along with a  set of key/value pairs with the edge label being specified as the first argument.
-
-In the above code all the vertices are created first and then their respective edges. There are two "accessor tokens":
-`T.id` and `T.label`. When any of these, along with a set of other key value pairs is provided to
-`Graph.addVertex(Object...)` or `Vertex.addEdge(String,Vertex,Object...)`, the respective element is created along
-with the provided key/value pair properties appended to it.
-
-WARNING: Many graph systems do not allow the user to specify an element ID and in such cases, an exception is thrown.
-
-NOTE: In TinkerPop3, vertices are allowed a single immutable string label (similar to an edge label). This
-functionality did not exist in TinkerPop2. Element ids are still immutable in TinkerPop3 as they were in TinkerPop2.
-
-=== Mutating the Graph
-
-Below is a sequence of basic graph mutation operations represented in Java 8. One of the major differences between
-TinkerPop2 and TinkerPop3 is that in TinkerPop3, the Java convention of using setters and getters has been abandoned
-in favor of a syntax that is more aligned with the syntax of Gremlin-Groovy in TinkerPop2. Given that Gremlin-Java8
-and Gremlin-Groovy are nearly identical due to the inclusion of Java 8 lambdas, a big effort was made to ensure that
-both languages are as similar as possible.
-
-WARNING: In the code examples presented throughout this documentation, either Gremlin-Java8 or Gremlin-Groovy is used.
-It is possible to determine which derivative of Gremlin is being used by mousing over the code block.  The word "JAVA"
-or "GROOVY" will appear in the top right corner of the code block.
-
-image:basic-mutation.png[width=240,float=right]
-[source,java]
-// create a new graph
-Graph graph = TinkerGraph.open();
-// add a software vertex with a name property
-Vertex gremlin = graph.addVertex(T.label, "software",
-                             "name", "gremlin"); <1>
-// only one vertex should exist
-assert(IteratorUtils.count(graph.vertices()) == 1)
-// no edges should exist as none have been created
-assert(IteratorUtils.count(graph.edges()) == 0)
-// add a new property
-gremlin.property("created",2009) <2>
-// add a new software vertex to the graph
-Vertex blueprints = graph.addVertex(T.label, "software",
-                                "name", "blueprints"); <3>
-// connect gremlin to blueprints via a dependsOn-edge
-gremlin.addEdge("dependsOn",blueprints); <4>
-// now there are two vertices and one edge
-assert(IteratorUtils.count(graph.vertices()) == 2)
-assert(IteratorUtils.count(graph.edges()) == 1)
-// add a property to blueprints
-blueprints.property("created",2010) <5>
-// remove that property
-blueprints.property("created").remove() <6>
-// connect gremlin to blueprints via encapsulates
-gremlin.addEdge("encapsulates",blueprints) <7>
-assert(IteratorUtils.count(graph.vertices()) == 2)
-assert(IteratorUtils.count(graph.edges()) == 2)
-// removing a vertex removes all its incident edges as well
-blueprints.remove() <8>
-gremlin.remove() <9>
-// the graph is now empty
-assert(IteratorUtils.count(graph.vertices()) == 0)
-assert(IteratorUtils.count(graph.edges()) == 0)
-// tada!
-
-IMPORTANT: image:groovy-logo.png[width=175,float=left] Gremlin-Groovy leverages the
-link:http://www.groovy-lang.org/[Groovy 2.x language] to express Gremlin traversals. One of the major benefits of
-Groovy is the inclusion of a runtime console that makes it easy for developers to practice with the Gremlin language
-and for production users to connect to their graph and execute traversals in an interactive manner. Moreover,
-Gremlin-Groovy provides various syntax simplifications.
-
-TIP: image:gremlin-sugar.png[width=100,float=left] For those wishing to use the Gremlin2 syntax, please see
-<<sugar-plugin,SugarPlugin>>. This plugin provides syntactic sugar at, typically, a runtime cost. It can be loaded
-programmatically via `SugarLoader.load()`. Once loaded, it is possible to do `g.V.out.name` instead of
-`g.V().out().values('name')` as well as a host of other conveniences.
-
-Here is the same code, but using Gremlin-Groovy in the <<gremlin-console,Gremlin Console>>.
-
-[source,groovy]
-----
-$ bin/gremlin.sh
-
-         \,,,/
-         (o o)
------oOOo-(3)-oOOo-----
-gremlin> graph = TinkerGraph.open()
-==>tinkergraph[vertices:0 edges:0]
-gremlin> gremlin = graph.addVertex(label,'software','name','gremlin')
-==>v[0]
-gremlin> gremlin.property('created',2009)
-==>vp[created->2009]
-gremlin> blueprints = graph.addVertex(label,'software','name','blueprints')
-==>v[3]
-gremlin> gremlin.addEdge('dependsOn',blueprints)
-==>e[5][0-dependsOn->3]
-gremlin> blueprints.property('created',2010)
-==>vp[created->2010]
-gremlin> blueprints.property('created').remove()
-==>null <1>
-gremlin> gremlin.addEdge('encapsulates',blueprints)
-==>e[7][0-encapsulates->3]
-gremlin> blueprints.remove()
-==>null
-gremlin> gremlin.remove()
-==>null
-----
-
-<1> A `==>null` output is usually from a `void` method call and simply indicates that there was no problem with the
-invocation. If there were a problem, an error would be output or an exception would be thrown.
-
-IMPORTANT: TinkerGraph is not a transactional graph. For more information on transaction handling (for those graph
-systems that support them) see the section dedicated to <<transactions,transactions>>.
+is a key/value pair, where the key is always a character `String`. Conceptual knowledge of how a graph is composed is
+essential to end-users working with graphs, however, as mentioned earlier, the structure API is not the appropriate
+way for users to think when building applications with TinkerPop. The structure API is reserved for usage by graph
+providers. Those interested in implementing the structure API to make their graph system TinkerPop enabled can learn
+more about it in the link:http://tinkerpop.apache.org/docs/x.y.z/dev/provider/[Graph Provider] documentation.
 
 [[the-graph-process]]
 == The Graph Process

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6feff186/docs/src/reference/the-graph.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/the-graph.asciidoc b/docs/src/reference/the-graph.asciidoc
index 1855249..9ac83e4 100644
--- a/docs/src/reference/the-graph.asciidoc
+++ b/docs/src/reference/the-graph.asciidoc
@@ -238,6 +238,8 @@ not support transactions.
 ----
 gremlin> graph = Neo4jGraph.open('/tmp/neo4j')
 ==>neo4jgraph[EmbeddedGraphDatabase [/tmp/neo4j]]
+gremlin> g = graph.traversal()
+==>graphtraversalsource[neo4jgraph[community single [/tmp/neo4j]], standard]
 gremlin> graph.features()
 ==>FEATURES
 > GraphFeatures
@@ -245,23 +247,23 @@ gremlin> graph.features()
 >-- Computer: false
 >-- Persistence: true
 ...
-gremlin> graph.tx().onReadWrite(Transaction.READ_WRITE_BEHAVIOR.AUTO) <2>
+gremlin> g.tx().onReadWrite(Transaction.READ_WRITE_BEHAVIOR.AUTO) <2>
 ==>org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jGraph$Neo4jTransaction@1c067c0d
-gremlin> graph.addVertex("name","stephen")  <3>
+gremlin> g.addV("person").("name","stephen")  <3>
 ==>v[0]
-gremlin> graph.tx().commit() <4>
+gremlin> g.tx().commit() <4>
 ==>null
-gremlin> graph.tx().onReadWrite(Transaction.READ_WRITE_BEHAVIOR.MANUAL) <5>
+gremlin> g.tx().onReadWrite(Transaction.READ_WRITE_BEHAVIOR.MANUAL) <5>
 ==>org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jGraph$Neo4jTransaction@1c067c0d
-gremlin> graph.tx().isOpen()
+gremlin> g.tx().isOpen()
 ==>false
-gremlin> graph.addVertex("name","marko") <6>
+gremlin> g.addV("person").("name","marko") <6>
 Open a transaction before attempting to read/write the transaction
-gremlin> graph.tx().open() <7>
+gremlin> g.tx().open() <7>
 ==>null
-gremlin> graph.addVertex("name","marko") <8>
+gremlin> g.addV("person").("name","marko") <8>
 ==>v[1]
-gremlin> graph.tx().commit()
+gremlin> g.tx().commit()
 ==>null
 ----
 
@@ -286,14 +288,15 @@ is bound to the current thread of execution. Consider the following example to d
 
 [source,java]
 ----
-graph.addVertex("name","stephen");
+GraphTraversalSource g = graph.traversal();
+g.addV("person").("name","stephen").iterate();
 
 Thread t1 = new Thread(() -> {
-    graph.addVertex("name","josh");
+    g.addV("person").("name","josh").iterate();
 });
 
 Thread t2 = new Thread(() -> {
-    graph.addVertex("name","marko");
+    g.addV("person").("name","marko").iterate();
 });
 
 t1.start()
@@ -302,14 +305,14 @@ t2.start()
 t1.join()
 t2.join()
 
-graph.tx().commit();
+g.tx().commit();
 ----
 
 The above code shows three vertices added to `graph` in three different threads: the current thread, `t1` and
 `t2`.  One might expect that by the time this body of code finished executing, that there would be three vertices
 persisted to the `Graph`.  However, given the `ThreadLocal` nature of transactions, there really were three separate
 transactions created in that body of code (i.e. one for each thread of execution) and the only one committed was the
-first call to `addVertex` in the primary thread of execution.  The other two calls to that method within `t1` and `t2`
+first call to `addV()` in the primary thread of execution.  The other two calls to that method within `t1` and `t2`
 were never committed and thus orphaned.
 
 A `Graph` that `supportsThreadedTransactions` is one that allows for a `Graph` to operate outside of that constraint,
@@ -319,14 +322,15 @@ different threads operating within the same transaction, the above code could be
 [source,java]
 ----
 Graph threaded = graph.tx().createThreadedTx();
-threaded.addVertex("name","stephen");
+GraphTraversalSource g = graph.traversal();
+g.addV("person").("name","stephen").iterate();
 
 Thread t1 = new Thread(() -> {
-    threaded.addVertex("name","josh");
+    threaded.addV("person").("name","josh").iterate();
 });
 
 Thread t2 = new Thread(() -> {
-    threaded.addVertex("name","marko");
+    threaded.addV("person").("name","marko").iterate();
 });
 
 t1.start()
@@ -335,7 +339,7 @@ t2.start()
 t1.join()
 t2.join()
 
-threaded.tx().commit();
+g.tx().commit();
 ----
 
 In the above case, the call to `graph.tx().createThreadedTx()` creates a new `Graph` instance that is unbound from the

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6feff186/docs/src/tutorials/getting-started/index.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/tutorials/getting-started/index.asciidoc b/docs/src/tutorials/getting-started/index.asciidoc
index 4d882ef..11e2533 100644
--- a/docs/src/tutorials/getting-started/index.asciidoc
+++ b/docs/src/tutorials/getting-started/index.asciidoc
@@ -199,24 +199,26 @@ as an example. First, you need to create this graph:
 [gremlin-groovy]
 ----
 graph = TinkerGraph.open()
-v1 = graph.addVertex(id, 1, label, "person", "name", "marko", "age", 29)
-v2 = graph.addVertex(id, 3, label, "software", "name", "lop", "lang", "java")
-v1.addEdge("created", v2, id, 9, "weight", 0.4)
+g = graph.traversal()
+g.addV("person").property(id, 1).property("name", "marko").property("age", 29).as('v1').
+  addV("software").property(id, 3).property("name", "lop").property("lang", "java").as('v2').
+  addE("created").property(id, 9).property("weight", 0.4).from('v1').to('v2')
 ----
 
-There are a number of important things to consider in the above code. First, recall that `id` and `label` are
-"reserved" for special usage in TinkerPop and are members of the enum, `T`. Those "keys" supplied to the creation
-method are link:https://docs.oracle.com/javase/8/docs/technotes/guides/language/static-import.html[statically imported]
-to the console, which allows you to access them without having to specify their owning enum. Think of it as a
+There are a number of important things to consider in the above code. First, recall that `id` is "reserved" for
+special usage in TinkerPop and is a members of the enum, `T`. The `T` enum has other important structural values like
+`label` as well. Note that the Gremlin Console link:https://docs.oracle.com/javase/8/docs/technotes/guides/language/static-import.html[statically imports]
+the enum values of `T`, which allows you to access them without having to specify their owning enum. Think of it as a
 shorthand form that enables a more fluid code style. You would normally refer to them as `T.id` and `T.label`. Without
 that static importing you would instead have to write:
 
 [gremlin-groovy]
 ----
 graph = TinkerGraph.open()
-v1 = graph.addVertex(T.id, 1, T.label, "person", "name", "marko", "age", 29)
-v2 = graph.addVertex(T.id, 3, T.label, "software", "name", "lop", "lang", "java")
-v1.addEdge("created", v2, id, 9, "weight", 0.4)
+g = graph.traversal()
+g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as('v1').
+  addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as('v2').
+  addE("created").property(T.id, 9).property("weight", 0.4).from('v1').to('v2')
 ----
 
 NOTE: The fully qualified name for `T` is `org.apache.tinkerpop.gremlin.structure.T`. Another important static import
@@ -226,9 +228,8 @@ for the creation of link:http://tinkerpop.apache.org/docs/x.y.z/reference/#graph
 Second, don't forget that you are working with TinkerGraph which allows for identifier assignment. That is _not_ the
 case with most graph databases.
 
-Finally, the label for an `Edge` is required and is thus part of the method signature of `addEdge()`. It is the first
-parameter supplied, followed by the `Vertex` to which `v1` should be connected. Therefore, this usage of `addEdge` is
-creating an edge that goes _out_ of `v1` and into `v2` with a label of "created".
+Finally, the `as()` steps label the value held at a particular step so that you can reference back to it later in the
+traversal. In this case, that allows you to reference both vertices as "v1" and "v2" during edge creation.
 
 === Graph Traversal - Staying Simple
 


[15/22] tinkerpop git commit: Merge branch 'tp33'

Posted by sp...@apache.org.
Merge branch 'tp33'

Conflicts:
	docs/src/reference/the-traversal.asciidoc


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

Branch: refs/heads/TINKERPOP-1975
Commit: 78d1a62b2ab96eba657ebc018a926d9be641464c
Parents: 849349a 0496922
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue May 29 16:16:08 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue May 29 16:16:08 2018 -0400

----------------------------------------------------------------------
 docs/src/reference/the-traversal.asciidoc | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/78d1a62b/docs/src/reference/the-traversal.asciidoc
----------------------------------------------------------------------
diff --cc docs/src/reference/the-traversal.asciidoc
index d61da37,60357fe..e28090a
--- a/docs/src/reference/the-traversal.asciidoc
+++ b/docs/src/reference/the-traversal.asciidoc
@@@ -2961,8 -2959,7 +2961,7 @@@ g.V().as('a').out('knows').as('b')
  WARNING: The anonymous traversal of `where()` processes the current object "locally". In OLAP, where the atomic unit
  of computing is the vertex and its local "star graph," it is important that the anonymous traversal does not leave
  the confines of the vertex's star graph. In other words, it can not traverse to an adjacent vertex's properties or
- edges. Note that is only a temporary limitation that will be addressed in a future version of TinkerPop (see
- link:https://issues.apache.org/jira/browse/TINKERPOP-693[TINKERPOP-693]).
 -edges. 
++edges.
  
  *Additional References*
  


[05/22] tinkerpop git commit: Make GraphSONWriter.ToDict() public CTR

Posted by sp...@apache.org.
Make GraphSONWriter.ToDict() public CTR

This method can be used to transform an object into its GraphSON
representation which is done recusively on member data. So this method is
necessary to serialize complex objects with their member data.


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

Branch: refs/heads/TINKERPOP-1975
Commit: 9830a3fffe6ec38367ec9c684d25816476605ce6
Parents: 7c70013
Author: Florian Hockmann <fh...@florian-hockmann.de>
Authored: Sun May 27 19:49:56 2018 +0200
Committer: Florian Hockmann <fh...@florian-hockmann.de>
Committed: Sun May 27 19:49:56 2018 +0200

----------------------------------------------------------------------
 .../src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs   | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9830a3ff/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs
index 7185868..8926d23 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs
@@ -93,7 +93,12 @@ namespace Gremlin.Net.Structure.IO.GraphSON
             return JsonConvert.SerializeObject(ToDict(objectData));
         }
 
-        internal dynamic ToDict(dynamic objectData)
+        /// <summary>
+        ///     Transforms an object into its GraphSON representation including type information.
+        /// </summary>
+        /// <param name="objectData">The object to transform.</param>
+        /// <returns>A GraphSON representation of the object ready to be serialized.</returns>
+        public dynamic ToDict(dynamic objectData)
         {
             var type = objectData.GetType();
             if (TryGetSerializerFor(out IGraphSONSerializer serializer, type))


[19/22] tinkerpop git commit: wip

Posted by sp...@apache.org.
wip


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

Branch: refs/heads/TINKERPOP-1975
Commit: 99a4b368d7f48dd4cf054dc5c71af71cc7e78b09
Parents: ff6f6d8
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri May 25 16:02:59 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed May 30 13:46:14 2018 -0400

----------------------------------------------------------------------
 .../step/util/DefaultStepConfiguration.java     | 158 ++++++++++++++++++
 .../step/util/StepConfigurationProxy.java       |  50 ++++++
 .../step/util/DefaultStepConfigurationTest.java | 167 +++++++++++++++++++
 .../Process/Traversal/IStepConfiguration.cs     |  32 ++++
 4 files changed, 407 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/99a4b368/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/DefaultStepConfiguration.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/DefaultStepConfiguration.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/DefaultStepConfiguration.java
new file mode 100644
index 0000000..b75358f
--- /dev/null
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/DefaultStepConfiguration.java
@@ -0,0 +1,158 @@
+/*
+ * 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.commons.configuration.Configuration;
+import org.apache.commons.configuration.MapConfiguration;
+import org.apache.commons.lang.reflect.MethodUtils;
+import org.apache.tinkerpop.gremlin.process.remote.traversal.strategy.decoration.RemoteStrategy;
+import org.apache.tinkerpop.gremlin.process.traversal.Step;
+import org.apache.tinkerpop.gremlin.process.traversal.step.StepConfiguration;
+import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+
+/**
+ * A basic {@link StepConfiguration} implementation that uses reflection to set methods on the step to which the
+ * configuration will be applied. While use of reflection isn't quite as nice as direct application of configuration
+ * options to a step, this implementation is serialization ready and thus requires no additional work from the
+ * developer to get a step option ready for usage. If using this implementation, it is of extreme importance that
+ * the developer implement solid test coverage to ensure that reflection calls will work at runtime as compilation
+ * errors will not be raised under this approach.
+ *
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+public class DefaultStepConfiguration implements StepConfiguration<Step> {
+
+    private final Map<String, List<Object>> conf;
+    private final Class<? extends Step> expects;
+
+    /**
+     * Creates a new {@code DefaultStepConfiguration}.
+     *
+     * @param method to call on the step
+     * @param args the arguments to pass to the method
+     */
+    public DefaultStepConfiguration(final String method, final Object... args) {
+        this(null, method, args);
+    }
+
+    /**
+     * Creates a new {@code DefaultStepConfiguration}.
+     *
+     * @param methods a map of methods to call when configuring a step where the keys are the method names and the
+     *                values are the list of arguments to apply to that method
+     */
+    public DefaultStepConfiguration(final LinkedHashMap<String, List<Object>> methods) {
+        this(null, methods);
+    }
+
+    /**
+     * Creates a new {@code DefaultStepConfiguration} with a validation option to ensure that the configuration is
+     * applied to the right type of step.
+     *
+     * @param expects the step type that this configuration should be applied to
+     * @param method to call on the step
+     * @param args the arguments to pass to the method
+     */
+    public DefaultStepConfiguration(final Class<? extends Step> expects, final String method, final Object... args) {
+        if (null == method || method.isEmpty()) throw new IllegalArgumentException("method may not be null or empty");
+        conf = new LinkedHashMap<>();
+        conf.put(method, Arrays.asList(args));
+        this.expects = expects;
+    }
+
+    /**
+     * Creates a new {@code DefaultStepConfiguration} with a validation option to ensure that the configuration is
+     * applied to the right type of step.
+     *
+     * @param expects the step type that this configuration should be applied to
+     * @param methods a map of methods to call when configuring a step where the keys are the method names and the
+     *                values are the list of arguments to apply to that method
+     */
+    public DefaultStepConfiguration(final Class<? extends Step> expects, final LinkedHashMap<String, List<Object>> methods) {
+        if (null == methods || methods.isEmpty()) throw new IllegalArgumentException("methods may not be null or empty");
+        if (IteratorUtils.anyMatch(methods.keySet().iterator(), k -> null == k || k.isEmpty())) throw new IllegalArgumentException("no key of methods map may be null or empty");
+        conf = methods;
+        this.expects = expects;
+    }
+
+    private DefaultStepConfiguration() {
+        // for gyro's sake.........
+        conf = Collections.emptyMap();
+        expects = null;
+    }
+
+    @Override
+    public void accept(final Step step) {
+        final Optional<Class<? extends Step>> opt = Optional.ofNullable(expects);
+        if (opt.isPresent() && !opt.get().isAssignableFrom(step.getClass())) {
+            throw new IllegalStateException(String.format("Could not apply step configuration of %s to %s", conf, step.getClass().getName()));
+        }
+
+        for (Map.Entry<String, List<Object>> kv : conf.entrySet()) {
+            try {
+                MethodUtils.invokeMethod(step, kv.getKey(), kv.getValue().toArray());
+            } catch (NoSuchMethodException nsme) {
+                if (!step.getTraversal().asAdmin().getStrategies().getStrategy(RemoteStrategy.class).isPresent())
+                    throw new IllegalStateException(String.format("Step configuration of %s with args of %s cannot be applied to %s",
+                            kv.getKey(), kv.getValue(), step.getClass().getName()), nsme);
+            } catch (Exception ex) {
+                throw new IllegalStateException(String.format("Step configuration of %s with args of %s cannot be applied to %s",
+                        kv.getKey(), kv.getValue(), step.getClass().getName()), ex);
+            }
+        }
+    }
+
+    public static StepConfiguration create(final Configuration conf) {
+        final LinkedHashMap<String,List<Object>> m = new LinkedHashMap<>();
+        final Iterator<String> keys = conf.getKeys();
+        while (keys.hasNext()) {
+            final String key = keys.next();
+            m.put(key, conf.getList(key));
+        }
+        return new DefaultStepConfiguration(m);
+    }
+
+    @Override
+    public Configuration getConfiguration() {
+        return new MapConfiguration(conf);
+    }
+
+    @Override
+    public boolean equals(final Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+
+        final DefaultStepConfiguration that = (DefaultStepConfiguration) o;
+
+        return conf.equals(that.conf);
+    }
+
+    @Override
+    public int hashCode() {
+        return conf.hashCode();
+    }
+}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/99a4b368/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/StepConfigurationProxy.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/StepConfigurationProxy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/StepConfigurationProxy.java
new file mode 100644
index 0000000..6226900
--- /dev/null
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/StepConfigurationProxy.java
@@ -0,0 +1,50 @@
+/*
+ * 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.commons.configuration.Configuration;
+import org.apache.tinkerpop.gremlin.process.traversal.step.StepConfiguration;
+
+import java.io.Serializable;
+
+/**
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+public class StepConfigurationProxy<T extends StepConfiguration> implements Serializable {
+
+    private final Configuration configuration;
+    private final Class<T> stepConfigurationClass;
+
+    public StepConfigurationProxy(final T stepConfiguration) {
+        this((Class<T>) stepConfiguration.getClass(), stepConfiguration.getConfiguration());
+    }
+
+    public StepConfigurationProxy(final Class<T> stepConfigurationClass, final Configuration configuration) {
+        this.configuration = configuration;
+        this.stepConfigurationClass = stepConfigurationClass;
+    }
+
+    public Configuration getConfiguration() {
+        return this.configuration;
+    }
+
+    public Class<T> getStepConfigurationClass() {
+        return this.stepConfigurationClass;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/99a4b368/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/DefaultStepConfigurationTest.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/DefaultStepConfigurationTest.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/DefaultStepConfigurationTest.java
new file mode 100644
index 0000000..6b3fc1c
--- /dev/null
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/DefaultStepConfigurationTest.java
@@ -0,0 +1,167 @@
+/*
+ * 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.commons.configuration.Configuration;
+import org.apache.commons.configuration.MapConfiguration;
+import org.apache.commons.lang.reflect.FieldUtils;
+import org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.PageRankVertexProgramStep;
+import org.apache.tinkerpop.gremlin.process.remote.RemoteConnection;
+import org.apache.tinkerpop.gremlin.process.remote.RemoteConnectionException;
+import org.apache.tinkerpop.gremlin.process.remote.traversal.RemoteTraversal;
+import org.apache.tinkerpop.gremlin.process.traversal.Bytecode;
+import org.apache.tinkerpop.gremlin.process.traversal.Step;
+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.GraphTraversalSource;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
+import org.apache.tinkerpop.gremlin.process.traversal.step.StepConfiguration;
+import org.apache.tinkerpop.gremlin.structure.util.empty.EmptyGraph;
+import org.junit.Test;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.NoSuchElementException;
+
+import static org.hamcrest.collection.IsIterableContainingInOrder.contains;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThat;
+
+/**
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+public class DefaultStepConfigurationTest {
+
+    @Test
+    public void shouldApplyDefaultConfiguration() throws Exception {
+        final Traversal t = __.V().pageRank().with(new DefaultStepConfiguration("modulateBy", "xxx"));
+        final Step s = t.asAdmin().getEndStep();
+        assertEquals("xxx", FieldUtils.readField(s, "pageRankProperty", true));
+    }
+
+    @Test
+    public void shouldApplyDefaultConfigurationWithClassValidation() throws Exception {
+        final Traversal t = __.V().pageRank().with(new DefaultStepConfiguration(PageRankVertexProgramStep.class, "modulateBy", "xxx"));
+        final Step s = t.asAdmin().getEndStep();
+        assertEquals("xxx", FieldUtils.readField(s, "pageRankProperty", true));
+    }
+
+    @Test
+    public void shouldApplyDefaultConfigurationInOrder() throws Exception {
+        final LinkedHashMap<String, List<Object>> methods = new LinkedHashMap<>();
+        methods.put("setY", Collections.singletonList(100L));
+        methods.put("setX", Collections.singletonList("xxx"));
+        methods.put("setZ", Collections.singletonList("zzz" ));
+        final StepConfiguration<Step> conf = new DefaultStepConfiguration(methods);
+        final MockStep step = new MockStep(__.__().asAdmin());
+
+        conf.accept(step);
+
+        assertThat(step.list, contains(100L, "Xxxx", "Zzzz"));
+    }
+
+    @Test
+    public void shouldGenerateConfiguration() throws Exception {
+        final LinkedHashMap<String, List<Object>> methods = new LinkedHashMap<>();
+        methods.put("setY", Collections.singletonList(100L));
+        methods.put("setX", Collections.singletonList("xxx"));
+        methods.put("setZ", Collections.singletonList("zzz" ));
+        final StepConfiguration<Step> conf = new DefaultStepConfiguration(methods);
+        final MapConfiguration c = (MapConfiguration) conf.getConfiguration();
+        c.setDelimiterParsingDisabled(false);
+
+        assertEquals(100L, c.getList("setY").get(0));
+        assertEquals("xxx", c.getList("setX").get(0));
+        assertEquals("zzz", c.getList("setZ").get(0));
+    }
+
+    @Test(expected = IllegalStateException.class)
+    public void shouldValidateClass() {
+        __.V().pageRank().with(new DefaultStepConfiguration(MockStep.class, "modulateBy", "xxx"));
+    }
+
+    @Test
+    public void shouldAllowNoSuchMethodIfUsingRemote() {
+        // create a fake remote
+        final GraphTraversalSource g = EmptyGraph.instance().traversal().withRemote(new RemoteConnection() {
+            @Override
+            public <E> Iterator<Traverser.Admin<E>> submit(final Traversal<?, E> traversal) throws RemoteConnectionException {
+                return null;
+            }
+
+            @Override
+            public <E> RemoteTraversal<?, E> submit(final Bytecode bytecode) throws RemoteConnectionException {
+                return null;
+            }
+
+            @Override
+            public void close() throws Exception {
+
+            }
+        });
+
+        // try to set a fake configuration option - lack of exception is good. not really sure how else to directly
+        // assert this
+        final LinkedHashMap<String, List<Object>> methods = new LinkedHashMap<>();
+        methods.put("setFakeyFakerton", Collections.singletonList(100L));
+        final StepConfiguration<Step> conf = new DefaultStepConfiguration(methods);
+        g.V().with(conf);
+    }
+
+    @Test(expected = IllegalStateException.class)
+    public void shouldNotAllowNoSuchMethodUnlessUsingRemote() {
+        final GraphTraversalSource g = EmptyGraph.instance().traversal();
+
+        // try to set a fake configuration option
+        final LinkedHashMap<String, List<Object>> methods = new LinkedHashMap<>();
+        methods.put("setFakeyFakerton", Collections.singletonList(100L));
+        final StepConfiguration<Step> conf = new DefaultStepConfiguration(methods);
+        g.V().with(conf);
+    }
+
+    static class MockStep extends AbstractStep {
+
+        List<Object> list = new ArrayList<>();
+
+        MockStep(final Traversal.Admin t) {
+            super(t);
+        }
+
+        public void setX(final String s) {
+            list.add("X" + s);
+        }
+
+        public void setY(final Long s) {
+            list.add(s);
+        }
+
+        public void setZ(final String s) {
+            list.add("Z" + s);
+        }
+
+
+        @Override
+        protected Traverser.Admin processNextStart() throws NoSuchElementException {
+            return null;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/99a4b368/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IStepConfiguration.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IStepConfiguration.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IStepConfiguration.cs
new file mode 100644
index 0000000..a01ac1c
--- /dev/null
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IStepConfiguration.cs
@@ -0,0 +1,32 @@
+#region License
+
+/*
+ * 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.
+ */
+
+#endregion
+
+namespace Gremlin.Net.Process.Traversal
+{
+    /// <summary>
+    ///     A configuration for a step supplied to the with() modulator of a traversal.
+    /// </summary>
+    public interface IStepConfiguration
+    {
+    }
+}
\ No newline at end of file


[10/22] tinkerpop git commit: Merge branch 'tp33'

Posted by sp...@apache.org.
Merge branch 'tp33'


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

Branch: refs/heads/TINKERPOP-1975
Commit: 51f0ae647c1e8ea9b1d8d04bfe4be299c3a8ce00
Parents: c22182b 2862ff9
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue May 29 12:53:33 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue May 29 12:53:33 2018 -0400

----------------------------------------------------------------------
 docs/src/dev/provider/index.asciidoc            |  80 ++++++++++
 .../src/reference/gremlin-applications.asciidoc |   5 +-
 .../reference/implementations-neo4j.asciidoc    |  10 +-
 docs/src/reference/intro.asciidoc               | 148 ++-----------------
 docs/src/reference/the-graph.asciidoc           |  40 ++---
 5 files changed, 126 insertions(+), 157 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/51f0ae64/docs/src/dev/provider/index.asciidoc
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/51f0ae64/docs/src/reference/gremlin-applications.asciidoc
----------------------------------------------------------------------


[17/22] tinkerpop git commit: Merge branch 'tp33'

Posted by sp...@apache.org.
Merge branch 'tp33'


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

Branch: refs/heads/TINKERPOP-1975
Commit: 94d0c3ceca9e99f728bd43a6c4f9cab7a966ade0
Parents: 78d1a62 d258071
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed May 30 13:27:00 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed May 30 13:27:00 2018 -0400

----------------------------------------------------------------------
 ...ctTinkerGraphGraphSONTranslatorProvider.java | 115 +++++++++++++++++++
 .../io/graphson/GraphSONTranslator.java         |  26 ++++-
 ...GraphGraphSONTranslatorComputerProvider.java |  37 ------
 ...phGraphSONTranslatorProcessComputerTest.java |  33 ------
 ...phGraphSONTranslatorProcessStandardTest.java |  33 ------
 .../TinkerGraphGraphSONTranslatorProvider.java  |  78 -------------
 ...GraphSONv2TranslatorProcessComputerTest.java |  34 ++++++
 ...GraphSONv2TranslatorProcessStandardTest.java |  34 ++++++
 ...GraphSONv3TranslatorProcessComputerTest.java |  34 ++++++
 ...GraphSONv3TranslatorProcessStandardTest.java |  34 ++++++
 10 files changed, 272 insertions(+), 186 deletions(-)
----------------------------------------------------------------------



[02/22] tinkerpop git commit: Merge branch 'TINKERPOP-1958' into tp32

Posted by sp...@apache.org.
Merge branch 'TINKERPOP-1958' into tp32


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

Branch: refs/heads/TINKERPOP-1975
Commit: 7c7001394a3dd5706c5ff38bcbf5c96dd6c611fc
Parents: bd85e5f 2407739
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Tue May 22 08:04:24 2018 -0700
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Tue May 22 08:04:24 2018 -0700

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 .../traversal/step/map/GroovySelectTest.groovy  |  5 ++++
 gremlin-test/features/map/Select.feature        | 22 ++++++++++++++++-
 .../process/traversal/step/map/SelectTest.java  | 15 ++++++++++++
 .../optimization/TinkerGraphCountStrategy.java  |  2 +-
 .../TinkerGraphCountStrategyTest.java           | 25 ++++++++++++--------
 6 files changed, 58 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7c700139/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --cc CHANGELOG.asciidoc
index 395bb55,23e130e..3d33c78
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@@ -23,10 -23,7 +23,11 @@@ image::https://raw.githubusercontent.co
  [[release-3-2-10]]
  === TinkerPop 3.2.10 (Release Date: NOT OFFICIALLY RELEASED YET)
  
 +* Removed recursive handling of streaming results from Gremlin-Python driver to avoid max recursion depth errors.
 +* Improved performance of `TraversalVertexProgram` and related infrastructure.
 +* Fixed bug in `GroovyTranslator` that didn't properly handle empty `Map` objects.
 +* Added concrete configuration methods to `SparkGraphComputer` to make a more clear API for configuring it.
+ * Fixed a bug in `TinkerGraphCountStrategy`, which didn't consider that certain map steps may not emit an element.
  
  [[release-3-2-9]]
  === TinkerPop 3.2.9 (Release Date: May 8, 2018)


[16/22] tinkerpop git commit: Added GraphSON 3.0 tests for translator CTR

Posted by sp...@apache.org.
Added GraphSON 3.0 tests for translator CTR


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

Branch: refs/heads/TINKERPOP-1975
Commit: d25807149c82d4b908a4486f709d050bc030d2d8
Parents: 0496922
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed May 30 13:26:24 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed May 30 13:26:24 2018 -0400

----------------------------------------------------------------------
 ...ctTinkerGraphGraphSONTranslatorProvider.java | 115 +++++++++++++++++++
 .../io/graphson/GraphSONTranslator.java         |  26 ++++-
 ...GraphGraphSONTranslatorComputerProvider.java |  37 ------
 ...phGraphSONTranslatorProcessComputerTest.java |  33 ------
 ...phGraphSONTranslatorProcessStandardTest.java |  33 ------
 .../TinkerGraphGraphSONTranslatorProvider.java  |  78 -------------
 ...GraphSONv2TranslatorProcessComputerTest.java |  34 ++++++
 ...GraphSONv2TranslatorProcessStandardTest.java |  34 ++++++
 ...GraphSONv3TranslatorProcessComputerTest.java |  34 ++++++
 ...GraphSONv3TranslatorProcessStandardTest.java |  34 ++++++
 10 files changed, 272 insertions(+), 186 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d2580714/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/AbstractTinkerGraphGraphSONTranslatorProvider.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/AbstractTinkerGraphGraphSONTranslatorProvider.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/AbstractTinkerGraphGraphSONTranslatorProvider.java
new file mode 100644
index 0000000..c20ed11
--- /dev/null
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/AbstractTinkerGraphGraphSONTranslatorProvider.java
@@ -0,0 +1,115 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.tinkerpop.gremlin.tinkergraph.structure.io.graphson;
+
+import org.apache.tinkerpop.gremlin.GraphProvider;
+import org.apache.tinkerpop.gremlin.LoadGraphWith;
+import org.apache.tinkerpop.gremlin.jsr223.JavaTranslator;
+import org.apache.tinkerpop.gremlin.process.traversal.CoreTraversalTest;
+import org.apache.tinkerpop.gremlin.process.traversal.TraversalInterruptionComputerTest;
+import org.apache.tinkerpop.gremlin.process.traversal.TraversalInterruptionTest;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.PageRankTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.ProgramTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.ElementIdStrategyProcessTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.EventStrategyProcessTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.PartitionStrategyProcessTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.TranslationStrategy;
+import org.apache.tinkerpop.gremlin.structure.Graph;
+import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONVersion;
+import org.apache.tinkerpop.gremlin.tinkergraph.TinkerGraphProvider;
+import org.apache.tinkerpop.gremlin.tinkergraph.process.computer.TinkerGraphComputer;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @author Marko A. Rodriguez (http://markorodriguez.com)
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+public abstract class AbstractTinkerGraphGraphSONTranslatorProvider extends TinkerGraphProvider {
+
+    private static Set<String> SKIP_TESTS = new HashSet<>(Arrays.asList(
+            "testProfileStrategyCallback",
+            "testProfileStrategyCallbackSideEffect",
+            //
+            ProgramTest.Traversals.class.getCanonicalName(),
+            TraversalInterruptionTest.class.getCanonicalName(),
+            TraversalInterruptionComputerTest.class.getCanonicalName(),
+            EventStrategyProcessTest.class.getCanonicalName(),
+            ElementIdStrategyProcessTest.class.getCanonicalName()));
+
+    private final GraphSONVersion version;
+
+    AbstractTinkerGraphGraphSONTranslatorProvider(final GraphSONVersion version) {
+        this.version = version;
+    }
+
+    @Override
+    public Map<String, Object> getBaseConfiguration(final String graphName, final Class<?> test, final String testMethodName,
+                                                    final LoadGraphWith.GraphData loadGraphWith) {
+        final Map<String, Object> config = super.getBaseConfiguration(graphName, test, testMethodName, loadGraphWith);
+        config.put("skipTest", SKIP_TESTS.contains(testMethodName) || SKIP_TESTS.contains(test.getCanonicalName()));
+        return config;
+    }
+
+    @Override
+    public GraphTraversalSource traversal(final Graph graph) {
+        if ((Boolean) graph.configuration().getProperty("skipTest"))
+            return graph.traversal();
+        else {
+            final GraphTraversalSource g = graph.traversal();
+            return g.withStrategies(new TranslationStrategy(g, new GraphSONTranslator<>(JavaTranslator.of(g), version)));
+        }
+    }
+
+    public static class TinkerGraphGraphSONv2TranslatorProvider extends AbstractTinkerGraphGraphSONTranslatorProvider {
+        public TinkerGraphGraphSONv2TranslatorProvider() {
+            super(GraphSONVersion.V2_0);
+        }
+    }
+
+    public static class TinkerGraphGraphSONv3TranslatorProvider extends AbstractTinkerGraphGraphSONTranslatorProvider {
+        public TinkerGraphGraphSONv3TranslatorProvider() {
+            super(GraphSONVersion.V3_0);
+        }
+    }
+
+    @GraphProvider.Descriptor(computer = TinkerGraphComputer.class)
+    public static class TinkerGraphGraphSONv2TranslatorComputerProvider extends TinkerGraphGraphSONv2TranslatorProvider {
+
+        @Override
+        public GraphTraversalSource traversal(final Graph graph) {
+            return super.traversal(graph).withComputer();
+        }
+    }
+
+    @GraphProvider.Descriptor(computer = TinkerGraphComputer.class)
+    public static class TinkerGraphGraphSONv3TranslatorComputerProvider extends TinkerGraphGraphSONv3TranslatorProvider {
+
+        @Override
+        public GraphTraversalSource traversal(final Graph graph) {
+            return super.traversal(graph).withComputer();
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d2580714/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/GraphSONTranslator.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/GraphSONTranslator.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/GraphSONTranslator.java
index 612c811..4a8c5f1 100644
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/GraphSONTranslator.java
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/GraphSONTranslator.java
@@ -29,23 +29,40 @@ import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONReader;
 import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONVersion;
 import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONWriter;
 import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONXModuleV2d0;
+import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONXModuleV3d0;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 
 /**
  * @author Marko A. Rodriguez (http://markorodriguez.com)
+ * @author Stephen Mallette (http://stephen.genoprime.com)
  */
 final class GraphSONTranslator<S extends TraversalSource, T extends Traversal.Admin<?, ?>> implements Translator.StepTranslator<S, T> {
 
     private final JavaTranslator<S, T> wrappedTranslator;
-    private final GraphSONMapper mapper = GraphSONMapper.build()
-            .addCustomModule(GraphSONXModuleV2d0.build().create(false)).version(GraphSONVersion.V2_0).create();
-    private final GraphSONWriter writer = GraphSONWriter.build().mapper(mapper).create();
-    private final GraphSONReader reader = GraphSONReader.build().mapper(mapper).create();
+    private final GraphSONWriter writer;
+    private final GraphSONReader reader;
 
     public GraphSONTranslator(final JavaTranslator<S, T> wrappedTranslator) {
+        this(wrappedTranslator, GraphSONVersion.V2_0);
+    }
+
+    public GraphSONTranslator(final JavaTranslator<S, T> wrappedTranslator, final GraphSONVersion version) {
         this.wrappedTranslator = wrappedTranslator;
+        final GraphSONMapper mapper;
+        if (version == GraphSONVersion.V2_0) {
+            mapper = GraphSONMapper.build()
+                    .addCustomModule(GraphSONXModuleV2d0.build().create(false)).version(GraphSONVersion.V2_0).create();
+        } else if (version == GraphSONVersion.V3_0) {
+            mapper = GraphSONMapper.build()
+                    .addCustomModule(GraphSONXModuleV3d0.build().create(false)).version(GraphSONVersion.V3_0).create();
+        } else {
+            throw new IllegalArgumentException("GraphSONVersion." + version.name() + " is not supported for testing");
+        }
+
+        writer = GraphSONWriter.build().mapper(mapper).create();
+        reader = GraphSONReader.build().mapper(mapper).create();
     }
 
     @Override
@@ -58,7 +75,6 @@ final class GraphSONTranslator<S extends TraversalSource, T extends Traversal.Ad
         try {
             final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
             this.writer.writeObject(outputStream, bytecode);
-            // System.out.println(new String(outputStream.toByteArray()));
             return this.wrappedTranslator.translate(this.reader.readObject(new ByteArrayInputStream(outputStream.toByteArray()), Bytecode.class));
         } catch (final Exception e) {
             throw new IllegalStateException(e.getMessage(), e);

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d2580714/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONTranslatorComputerProvider.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONTranslatorComputerProvider.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONTranslatorComputerProvider.java
deleted file mode 100644
index 2890bfe..0000000
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONTranslatorComputerProvider.java
+++ /dev/null
@@ -1,37 +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.tinkergraph.structure.io.graphson;
-
-import org.apache.tinkerpop.gremlin.GraphProvider;
-import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
-import org.apache.tinkerpop.gremlin.structure.Graph;
-import org.apache.tinkerpop.gremlin.tinkergraph.process.computer.TinkerGraphComputer;
-
-/**
- * @author Marko A. Rodriguez (http://markorodriguez.com)
- */
-@GraphProvider.Descriptor(computer = TinkerGraphComputer.class)
-public class TinkerGraphGraphSONTranslatorComputerProvider extends TinkerGraphGraphSONTranslatorProvider {
-
-    @Override
-    public GraphTraversalSource traversal(final Graph graph) {
-        return super.traversal(graph).withComputer();
-    }
-}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d2580714/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONTranslatorProcessComputerTest.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONTranslatorProcessComputerTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONTranslatorProcessComputerTest.java
deleted file mode 100644
index e715aef..0000000
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONTranslatorProcessComputerTest.java
+++ /dev/null
@@ -1,33 +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.tinkergraph.structure.io.graphson;
-
-import org.apache.tinkerpop.gremlin.GraphProviderClass;
-import org.apache.tinkerpop.gremlin.process.ProcessComputerSuite;
-import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;
-import org.junit.runner.RunWith;
-
-/**
- * @author Marko A. Rodriguez (http://markorodriguez.com)
- */
-@RunWith(ProcessComputerSuite.class)
-@GraphProviderClass(provider = TinkerGraphGraphSONTranslatorComputerProvider.class, graph = TinkerGraph.class)
-public class TinkerGraphGraphSONTranslatorProcessComputerTest {
-}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d2580714/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONTranslatorProcessStandardTest.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONTranslatorProcessStandardTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONTranslatorProcessStandardTest.java
deleted file mode 100644
index 4ccee61..0000000
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONTranslatorProcessStandardTest.java
+++ /dev/null
@@ -1,33 +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.tinkergraph.structure.io.graphson;
-
-import org.apache.tinkerpop.gremlin.GraphProviderClass;
-import org.apache.tinkerpop.gremlin.process.ProcessStandardSuite;
-import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;
-import org.junit.runner.RunWith;
-
-/**
- * @author Marko A. Rodriguez (http://markorodriguez.com)
- */
-@RunWith(ProcessStandardSuite.class)
-@GraphProviderClass(provider = TinkerGraphGraphSONTranslatorProvider.class, graph = TinkerGraph.class)
-public class TinkerGraphGraphSONTranslatorProcessStandardTest {
-}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d2580714/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONTranslatorProvider.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONTranslatorProvider.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONTranslatorProvider.java
deleted file mode 100644
index 54a0f5e..0000000
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONTranslatorProvider.java
+++ /dev/null
@@ -1,78 +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.tinkergraph.structure.io.graphson;
-
-import org.apache.tinkerpop.gremlin.LoadGraphWith;
-import org.apache.tinkerpop.gremlin.jsr223.JavaTranslator;
-import org.apache.tinkerpop.gremlin.process.traversal.CoreTraversalTest;
-import org.apache.tinkerpop.gremlin.process.traversal.TraversalInterruptionComputerTest;
-import org.apache.tinkerpop.gremlin.process.traversal.TraversalInterruptionTest;
-import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
-import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
-import org.apache.tinkerpop.gremlin.process.traversal.step.map.PageRankTest;
-import org.apache.tinkerpop.gremlin.process.traversal.step.map.ProgramTest;
-import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.ElementIdStrategyProcessTest;
-import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.EventStrategyProcessTest;
-import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.PartitionStrategyProcessTest;
-import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.TranslationStrategy;
-import org.apache.tinkerpop.gremlin.structure.Graph;
-import org.apache.tinkerpop.gremlin.tinkergraph.TinkerGraphProvider;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * @author Marko A. Rodriguez (http://markorodriguez.com)
- */
-public class TinkerGraphGraphSONTranslatorProvider extends TinkerGraphProvider {
-
-    private static Set<String> SKIP_TESTS = new HashSet<>(Arrays.asList(
-            "testProfileStrategyCallback",
-            "testProfileStrategyCallbackSideEffect",
-            //
-            ProgramTest.Traversals.class.getCanonicalName(),
-            TraversalInterruptionTest.class.getCanonicalName(),
-            TraversalInterruptionComputerTest.class.getCanonicalName(),
-            EventStrategyProcessTest.class.getCanonicalName(),
-            ElementIdStrategyProcessTest.class.getCanonicalName()));
-
-
-    @Override
-    public Map<String, Object> getBaseConfiguration(final String graphName, final Class<?> test, final String testMethodName,
-                                                    final LoadGraphWith.GraphData loadGraphWith) {
-
-        final Map<String, Object> config = super.getBaseConfiguration(graphName, test, testMethodName, loadGraphWith);
-        config.put("skipTest", SKIP_TESTS.contains(testMethodName) || SKIP_TESTS.contains(test.getCanonicalName()));
-        return config;
-    }
-
-    @Override
-    public GraphTraversalSource traversal(final Graph graph) {
-        if ((Boolean) graph.configuration().getProperty("skipTest"))
-            return graph.traversal();
-            //throw new VerificationException("This test current does not work with Gremlin-Python", EmptyTraversal.instance());
-        else {
-            final GraphTraversalSource g = graph.traversal();
-            return g.withStrategies(new TranslationStrategy(g, new GraphSONTranslator<>(JavaTranslator.of(g))));
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d2580714/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONv2TranslatorProcessComputerTest.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONv2TranslatorProcessComputerTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONv2TranslatorProcessComputerTest.java
new file mode 100644
index 0000000..7cb4a14
--- /dev/null
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONv2TranslatorProcessComputerTest.java
@@ -0,0 +1,34 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.tinkerpop.gremlin.tinkergraph.structure.io.graphson;
+
+import org.apache.tinkerpop.gremlin.GraphProviderClass;
+import org.apache.tinkerpop.gremlin.process.ProcessComputerSuite;
+import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;
+import org.junit.runner.RunWith;
+
+/**
+ * @author Marko A. Rodriguez (http://markorodriguez.com)
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+@RunWith(ProcessComputerSuite.class)
+@GraphProviderClass(provider = AbstractTinkerGraphGraphSONTranslatorProvider.TinkerGraphGraphSONv2TranslatorComputerProvider.class, graph = TinkerGraph.class)
+public class TinkerGraphGraphSONv2TranslatorProcessComputerTest {
+}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d2580714/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONv2TranslatorProcessStandardTest.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONv2TranslatorProcessStandardTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONv2TranslatorProcessStandardTest.java
new file mode 100644
index 0000000..7c368cb
--- /dev/null
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONv2TranslatorProcessStandardTest.java
@@ -0,0 +1,34 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.tinkerpop.gremlin.tinkergraph.structure.io.graphson;
+
+import org.apache.tinkerpop.gremlin.GraphProviderClass;
+import org.apache.tinkerpop.gremlin.process.ProcessStandardSuite;
+import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;
+import org.junit.runner.RunWith;
+
+/**
+ * @author Marko A. Rodriguez (http://markorodriguez.com)
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+@RunWith(ProcessStandardSuite.class)
+@GraphProviderClass(provider = AbstractTinkerGraphGraphSONTranslatorProvider.TinkerGraphGraphSONv2TranslatorProvider.class, graph = TinkerGraph.class)
+public class TinkerGraphGraphSONv2TranslatorProcessStandardTest {
+}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d2580714/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONv3TranslatorProcessComputerTest.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONv3TranslatorProcessComputerTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONv3TranslatorProcessComputerTest.java
new file mode 100644
index 0000000..d5af274
--- /dev/null
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONv3TranslatorProcessComputerTest.java
@@ -0,0 +1,34 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.tinkerpop.gremlin.tinkergraph.structure.io.graphson;
+
+import org.apache.tinkerpop.gremlin.GraphProviderClass;
+import org.apache.tinkerpop.gremlin.process.ProcessComputerSuite;
+import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;
+import org.junit.runner.RunWith;
+
+/**
+ * @author Marko A. Rodriguez (http://markorodriguez.com)
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+@RunWith(ProcessComputerSuite.class)
+@GraphProviderClass(provider = AbstractTinkerGraphGraphSONTranslatorProvider.TinkerGraphGraphSONv3TranslatorComputerProvider.class, graph = TinkerGraph.class)
+public class TinkerGraphGraphSONv3TranslatorProcessComputerTest {
+}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d2580714/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONv3TranslatorProcessStandardTest.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONv3TranslatorProcessStandardTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONv3TranslatorProcessStandardTest.java
new file mode 100644
index 0000000..4fba4e3
--- /dev/null
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONv3TranslatorProcessStandardTest.java
@@ -0,0 +1,34 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.tinkerpop.gremlin.tinkergraph.structure.io.graphson;
+
+import org.apache.tinkerpop.gremlin.GraphProviderClass;
+import org.apache.tinkerpop.gremlin.process.ProcessStandardSuite;
+import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;
+import org.junit.runner.RunWith;
+
+/**
+ * @author Marko A. Rodriguez (http://markorodriguez.com)
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+@RunWith(ProcessStandardSuite.class)
+@GraphProviderClass(provider = AbstractTinkerGraphGraphSONTranslatorProvider.TinkerGraphGraphSONv3TranslatorProvider.class, graph = TinkerGraph.class)
+public class TinkerGraphGraphSONv3TranslatorProcessStandardTest {
+}


[11/22] tinkerpop git commit: Added exakat.io to powered by listing CTR

Posted by sp...@apache.org.
Added exakat.io to powered by listing CTR


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

Branch: refs/heads/TINKERPOP-1975
Commit: dbf3a0e9d4d3952de534dd437507f367b78bc629
Parents: 51f0ae6
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue May 29 13:13:00 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue May 29 13:13:00 2018 -0400

----------------------------------------------------------------------
 docs/site/home/index.html | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dbf3a0e9/docs/site/home/index.html
----------------------------------------------------------------------
diff --git a/docs/site/home/index.html b/docs/site/home/index.html
index 73218e0..d882049 100644
--- a/docs/site/home/index.html
+++ b/docs/site/home/index.html
@@ -279,6 +279,7 @@ limitations under the License.
          <a name="poweredby"></a>
          <h4 id="poweredby">Powered By</h4>
          <ul>
+            <li><a href="https://www.exakat.io/">exakat.io</a> - Static analysis engine for PHP, powered by Gremlin.</li>
             <li><a href="https://bricaud.github.io/graphexp/graphexp.html">Graphexp</a> - Interactive visualization of the Gremlin graph database with D3.js.</li>
             <li><a href="http://www.pitneybowes.com/us/customer-information-management/data-integration-management/spectrum-data-hub-module.html">Pitney Bowes Spectrum Data Hub Module</a> - Uses Gremlin OLTP to query Neo4j-powered master data management based graph database.</li>
          </ul>


[14/22] tinkerpop git commit: Merge branch 'tp32' into tp33

Posted by sp...@apache.org.
Merge branch 'tp32' into tp33


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

Branch: refs/heads/TINKERPOP-1975
Commit: 04969222bf44ce5131d71fb8e53538af36747487
Parents: 2862ff9 1b59b9e
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue May 29 16:15:13 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue May 29 16:15:13 2018 -0400

----------------------------------------------------------------------
 docs/src/reference/the-traversal.asciidoc | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/04969222/docs/src/reference/the-traversal.asciidoc
----------------------------------------------------------------------


[07/22] tinkerpop git commit: Merge branch 'tp33'

Posted by sp...@apache.org.
Merge branch 'tp33'


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

Branch: refs/heads/TINKERPOP-1975
Commit: c22182b8ca38c0c88f8ed1d6577b07cccdc429e1
Parents: f393633 ae9d7f6
Author: Florian Hockmann <fh...@florian-hockmann.de>
Authored: Sun May 27 19:50:52 2018 +0200
Committer: Florian Hockmann <fh...@florian-hockmann.de>
Committed: Sun May 27 19:50:52 2018 +0200

----------------------------------------------------------------------
 .../src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs   | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------



[12/22] tinkerpop git commit: Moved references to TinkerPop 2.x to upgrade docs

Posted by sp...@apache.org.
Moved references to TinkerPop 2.x to upgrade docs

By now we're pretty much just "TinkerPop" - anything else is just sorta confusing. CTR


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

Branch: refs/heads/TINKERPOP-1975
Commit: 849349afc901ef543e36726b276645cb74cb20d1
Parents: dbf3a0e
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue May 29 16:13:01 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue May 29 16:13:01 2018 -0400

----------------------------------------------------------------------
 docs/src/dev/future/index.asciidoc              |   4 +-
 docs/src/dev/provider/index.asciidoc            |  24 ++--
 .../src/reference/gremlin-applications.asciidoc |   8 +-
 .../implementations-hadoop-start.asciidoc       |   8 +-
 .../reference/implementations-neo4j.asciidoc    |   4 +-
 .../implementations-tinkergraph.asciidoc        |   6 +-
 docs/src/reference/intro.asciidoc               |  38 +++----
 docs/src/reference/preface.asciidoc             |  10 +-
 docs/src/reference/the-graph.asciidoc           |  90 ++-------------
 docs/src/reference/the-graphcomputer.asciidoc   |  17 +--
 docs/src/reference/the-traversal.asciidoc       |  22 ++--
 .../the-gremlin-console/index.asciidoc          |   4 +-
 docs/src/upgrade/appendix.asciidoc              | 113 +++++++++++++++++++
 docs/src/upgrade/index.asciidoc                 |   2 +
 .../Process/Traversal/GraphTraversal.cs         |   9 ++
 .../lib/process/graph-traversal.js              |  10 ++
 .../gremlin_python/process/graph_traversal.py   |   4 +
 17 files changed, 216 insertions(+), 157 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/849349af/docs/src/dev/future/index.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/dev/future/index.asciidoc b/docs/src/dev/future/index.asciidoc
index 11115cf..6e41cf9 100644
--- a/docs/src/dev/future/index.asciidoc
+++ b/docs/src/dev/future/index.asciidoc
@@ -40,8 +40,8 @@ image:tp4-think.png[]
 
 == The Main Features
 
-TinkerPop4 should focus on the most successful aspects of TinkerPop3 and it should avoid the traps realized in TinkerPop3.
-These items include:
+TinkerPop 4.x should focus on the most successful aspects of TinkerPop 3.x and it should avoid the traps realized in
+TinkerPop 3.x. These items include:
 
 * The concept of Gremlin as both a virtual machine and language.
 ** A standard bytecode specification should be provided.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/849349af/docs/src/dev/provider/index.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/dev/provider/index.asciidoc b/docs/src/dev/provider/index.asciidoc
index 467b3f3..f6a964b 100644
--- a/docs/src/dev/provider/index.asciidoc
+++ b/docs/src/dev/provider/index.asciidoc
@@ -39,17 +39,17 @@ This document attempts to address the needs of the different providers that have
 [[graph-system-provider-requirements]]
 == Graph System Provider Requirements
 
-image:tinkerpop-enabled.png[width=140,float=left] At the core of TinkerPop3 is a Java8 API. The implementation of this
+image:tinkerpop-enabled.png[width=140,float=left] At the core of TinkerPop 3.x is a Java8 API. The implementation of this
 core API and its validation via the `gremlin-test` suite is all that is required of a graph system provider wishing to
-provide a TinkerPop3-enabled graph engine. Once a graph system has a valid implementation, then all the applications
+provide a TinkerPop-enabled graph engine. Once a graph system has a valid implementation, then all the applications
 provided by TinkerPop (e.g. Gremlin Console, Gremlin Server, etc.) and 3rd-party developers (e.g. Gremlin-Scala,
 Gremlin-JS, etc.) will integrate properly. Finally, please feel free to use the logo on the left to promote your
-TinkerPop3 implementation.
+TinkerPop implementation.
 
 [[graph-structure-api]]
 === Graph Structure API
 
-The graph structure API of TinkerPop3 provides the interfaces necessary to create a TinkerPop enabled system and
+The graph structure API of TinkerPop provides the interfaces necessary to create a TinkerPop enabled system and
 exposes the basic components of a property graph to include `Graph`, `Vertex`, `Edge`, `VertexProperty` and `Property`.
 The structure API can be used directly as follows:
 
@@ -77,11 +77,7 @@ In the above code all the vertices are created first and then their respective e
 `Graph.addVertex(Object...)` or `Vertex.addEdge(String,Vertex,Object...)`, the respective element is created along
 with the provided key/value pair properties appended to it.
 
-Below is a sequence of basic graph mutation operations represented in Java 8. One of the major differences between
-TinkerPop2 and TinkerPop3 is that in TinkerPop3, the Java convention of using setters and getters has been abandoned
-in favor of a syntax that is more aligned with the syntax of Gremlin-Groovy in TinkerPop2. Given that Gremlin-Java8
-and Gremlin-Groovy are nearly identical due to the inclusion of Java 8 lambdas, a big effort was made to ensure that
-both languages are as similar as possible.
+Below is a sequence of basic graph mutation operations represented in Java 8.
 
 image:basic-mutation.png[width=240,float=right]
 [source,java]
@@ -160,7 +156,7 @@ image:pipes-character-1.png[width=110,float=right] The most important interfaces
 package. These include interfaces like Graph, Vertex, Edge, Property, Transaction, etc. The `StructureStandardSuite`
 will ensure that the semantics of the methods implemented are correct. Moreover, there are numerous `Exceptions`
 classes with static exceptions that should be thrown by the graph system so that all the exceptions and their
-messages are consistent amongst all TinkerPop3 implementations.
+messages are consistent amongst all TinkerPop implementations.
 
 [[olap-implementations]]
 ==== OLAP Implementations
@@ -219,7 +215,7 @@ that will be readable by the receiving vertices in the subsequent round.
 
 ===== Implementing MapReduce Emitters
 
-image:hadoop-logo-notext.png[width=150,float=left] The MapReduce framework in TinkerPop3 is similar to the model
+image:hadoop-logo-notext.png[width=150,float=left] The MapReduce framework in TinkerPop is similar to the model
 popularized by link:http://hadoop.apache.org[Hadoop]. The primary difference is that all Mappers process the vertices
 of the graph, not an arbitrary key/value pair. However, the vertices' edges can not be accessed -- only their
 properties. This greatly reduces the amount of data needed to be pushed through the MapReduce engine as any edge
@@ -274,7 +270,7 @@ public class TinkerMapEmitter<K, V> implements MapReduce.MapEmitter<K, V> {
 <1> If the MapReduce job has a reduce, then use one data structure (`reduceMap`), else use another (`mapList`). The
 difference being that a reduction requires a grouping by key and therefore, the `Map<K,Queue<V>>` definition. If no
 reduction/grouping is required, then a simple `Queue<KeyValue<K,V>>` can be leveraged.
-<2> If reduce is to follow, then increment the Map with a new value for the key. `MapHelper` is a TinkerPop3 class
+<2> If reduce is to follow, then increment the Map with a new value for the key. `MapHelper` is a TinkerPop class
 with static methods for adding data to a Map.
 <3> If no reduce is to follow, then simply append a KeyValue to the queue.
 <4> When the map phase is complete, any map-result sorting required can be executed at this point.
@@ -767,7 +763,7 @@ SureFire Plugin, this is done via the configuration argLine with `-Dbuild.dir=${
 
 === Accessibility via GremlinPlugin
 
-image:gremlin-plugin.png[width=100,float=left] The applications distributed with TinkerPop3 do not distribute with
+image:gremlin-plugin.png[width=100,float=left] The applications distributed with TinkerPop do not distribute with
 any graph system implementations besides TinkerGraph. If your implementation is stored in a Maven repository (e.g.
 Maven Central Repository), then it is best to provide a <<gremlin-plugins,`GremlinPlugin`>> implementation so the respective jars can be
 downloaded according and when required by the user. Neo4j's GremlinPlugin is provided below for reference.
@@ -793,7 +789,7 @@ gremlin> g = Neo4jGraph.open('/tmp/neo4j')
 === In-Depth Implementations
 
 image:gremlin-painting.png[width=200,float=right] The graph system implementation details presented thus far are
-minimum requirements necessary to yield a valid TinkerPop3 implementation. However, there are other areas that a
+minimum requirements necessary to yield a valid TinkerPop implementation. However, there are other areas that a
 graph system provider can tweak to provide an implementation more optimized for their underlying graph engine. Typical
 areas of focus include:
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/849349af/docs/src/reference/gremlin-applications.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc
index 6298d11..c54b290 100644
--- a/docs/src/reference/gremlin-applications.asciidoc
+++ b/docs/src/reference/gremlin-applications.asciidoc
@@ -670,7 +670,7 @@ They are all still evaluated locally.
 </dependency>
 ----
 
-image:gremlin-java.png[width=175,float=left] TinkerPop3 comes equipped with a reference client for Java-based
+image:gremlin-java.png[width=175,float=left] TinkerPop comes equipped with a reference client for Java-based
 applications.  It is referred to as Gremlin Driver, which enables applications to send requests to Gremlin Server
 and get back results.
 
@@ -802,7 +802,7 @@ approach when it configures it's serializers, so using this same model will ensu
 pip install gremlinpython
 ----
 
-TinkerPop3 also includes a client for Python-based applications.  It is referred to as Gremlin-Python Driver.
+TinkerPop also includes a client for Python-based applications.  It is referred to as Gremlin-Python Driver.
 The `Client` class implementation/interface is based on the Java Driver, with some restrictions. Most notably,
 Gremlin-Python does not yet implement the `Cluster` class. Instead, `Client` is instantiated directly.
 Usage is as follows:
@@ -2275,13 +2275,13 @@ installed in conjuction with the <<hadoop-plugin,Hadoop-Plugin>>.
 image:gremlin-sugar.png[width=120,float=left] In previous versions of Gremlin-Groovy, there were numerous
 link:http://en.wikipedia.org/wiki/Syntactic_sugar[syntactic sugars] that users could rely on to make their traversals
 more succinct. Unfortunately, many of these conventions made use of link:http://docs.oracle.com/javase/tutorial/reflect/[Java reflection]
-and thus, were not performant. In TinkerPop3, these conveniences have been removed in support of the standard
+and thus, were not performant. In TinkerPop, these conveniences have been removed in support of the standard
 Gremlin-Groovy syntax being both inline with Gremlin-Java8 syntax as well as always being the most performant
 representation. However, for those users that would like to use the previous syntactic sugars (as well as new ones),
 there is `SugarGremlinPlugin` (a.k.a Gremlin-Groovy-Sugar).
 
 IMPORTANT: It is important that the sugar plugin is loaded in a Gremlin Console session prior to any manipulations of
-the respective TinkerPop3 objects as Groovy will cache unavailable methods and properties.
+the respective TinkerPop objects as Groovy will cache unavailable methods and properties.
 
 [source,groovy]
 ----

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/849349af/docs/src/reference/implementations-hadoop-start.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/implementations-hadoop-start.asciidoc b/docs/src/reference/implementations-hadoop-start.asciidoc
index 8825009..4dcd13b 100644
--- a/docs/src/reference/implementations-hadoop-start.asciidoc
+++ b/docs/src/reference/implementations-hadoop-start.asciidoc
@@ -28,8 +28,8 @@ limitations under the License.
 
 image:hadoop-logo-notext.png[width=100,float=left] link:http://hadoop.apache.org/[Hadoop] is a distributed
 computing framework that is used to process data represented across a multi-machine compute cluster. When the
-data in the Hadoop cluster represents a TinkerPop3 graph, then Hadoop-Gremlin can be used to process the graph
-using both TinkerPop3's OLTP and OLAP graph computing models.
+data in the Hadoop cluster represents a TinkerPop graph, then Hadoop-Gremlin can be used to process the graph
+using both TinkerPop's OLTP and OLAP graph computing models.
 
 IMPORTANT: This section assumes that the user has a Hadoop 2.x cluster functioning. For more information on getting
 started with Hadoop, please see the
@@ -160,10 +160,10 @@ image:hadoop-furnace.png[width=180,float=left] Hadoop-Gremlin was designed to ex
 `GraphComputer`. The OLTP examples presented previously are reproduced below, but using `TraversalVertexProgram`
 for the execution of the Gremlin traversal.
 
-A `Graph` in TinkerPop3 can support any number of `GraphComputer` implementations. Out of the box, Hadoop-Gremlin
+A `Graph` in TinkerPop can support any number of `GraphComputer` implementations. Out of the box, Hadoop-Gremlin
 supports the following two implementations.
 
-* <<sparkgraphcomputer,`SparkGraphComputer`>>: Leverages Apache Spark to execute TinkerPop3 OLAP computations.
+* <<sparkgraphcomputer,`SparkGraphComputer`>>: Leverages Apache Spark to execute TinkerPop OLAP computations.
 ** The graph may fit within the total RAM of the cluster (supports larger graphs). Message passing is coordinated via
 Spark map/reduce/join operations on in-memory and disk-cached data (average speed traversals).
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/849349af/docs/src/reference/implementations-neo4j.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/implementations-neo4j.asciidoc b/docs/src/reference/implementations-neo4j.asciidoc
index 1d156b3..c4541f4 100644
--- a/docs/src/reference/implementations-neo4j.asciidoc
+++ b/docs/src/reference/implementations-neo4j.asciidoc
@@ -62,7 +62,7 @@ configuration file must be edited to include the `Neo4jGremlinPlugin` as shown i
 
 === Indices
 
-Neo4j 2.x indices leverage vertex labels to partition the index space. TinkerPop3 does not provide method interfaces
+Neo4j 2.x indices leverage vertex labels to partition the index space. TinkerPop does not provide method interfaces
 for defining schemas/indices for the underlying graph system. Thus, in order to create indices, it is important to
 call the Neo4j API directly.
 
@@ -175,7 +175,7 @@ by simply placing the Cypher string in `graph.cypher(...)` before submission to
 
 === Multi-Label
 
-TinkerPop3 requires every `Element` to have a single, immutable string label (i.e. a `Vertex`, `Edge`, and
+TinkerPop requires every `Element` to have a single, immutable string label (i.e. a `Vertex`, `Edge`, and
 `VertexProperty`). In Neo4j, a `Node` (vertex) can have an
 link:http://neo4j.com/docs/developer-manual/current/#graphdb-neo4j-labels[arbitrary number of labels] while a `Relationship`
 (edge) can have one and only one. Furthermore, in Neo4j, `Node` labels are mutable while `Relationship` labels are

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/849349af/docs/src/reference/implementations-tinkergraph.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/implementations-tinkergraph.asciidoc b/docs/src/reference/implementations-tinkergraph.asciidoc
index b6b5bf4..5b04126 100644
--- a/docs/src/reference/implementations-tinkergraph.asciidoc
+++ b/docs/src/reference/implementations-tinkergraph.asciidoc
@@ -28,8 +28,8 @@ limitations under the License.
 
 image:tinkerpop-character.png[width=100,float=left] TinkerGraph is a single machine, in-memory (with optional
 persistence), non-transactional graph engine that provides both OLTP and OLAP functionality. It is deployed with
-TinkerPop3 and serves as the reference implementation for other providers to study in order to understand the
-semantics of the various methods of the TinkerPop3 API. Its status as a reference implementation does not however imply
+TinkerPop and serves as the reference implementation for other providers to study in order to understand the
+semantics of the various methods of the TinkerPop API. Its status as a reference implementation does not however imply
 that it is not suitable for production. TinkerGraph has many practical use cases in production applications and their
 development. Some examples of TinkerGraph use cases include:
 
@@ -102,7 +102,7 @@ clock(1000){g.V().has('name','Garcia').iterate()} <2>
 <1> Determine the average runtime of 1000 vertex lookups when no `name`-index is defined.
 <2> Determine the average runtime of 1000 vertex lookups when a `name`-index is defined.
 
-IMPORTANT: Each graph system will have different mechanism by which indices and schemas are defined. TinkerPop3
+IMPORTANT: Each graph system will have different mechanism by which indices and schemas are defined. TinkerPop
 does not require any conformance in this area. In TinkerGraph, the only definitions are around indices. With other
 graph systems, property value types, indices, edge labels, etc. may be required to be defined _a priori_ to adding
 data to the graph.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/849349af/docs/src/reference/intro.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/intro.asciidoc b/docs/src/reference/intro.asciidoc
index 890034d..cc81c90 100644
--- a/docs/src/reference/intro.asciidoc
+++ b/docs/src/reference/intro.asciidoc
@@ -35,9 +35,7 @@ called "TinkerPop Modern" as it is a modern variation of the original demo graph
 in 2009 (i.e. the good ol' days -- it was the best of times and it was the worst of times).
 
 TIP: The TinkerPop graph is available with <<tinkergraph-gremlin,TinkerGraph>> via `TinkerFactory.createModern()`.
-TinkerGraph is the reference implementation of TinkerPop3 and is used in nearly all the examples in this documentation.
-Note that there also exists the classic `TinkerFactory.createClassic()` which is the graph used in TinkerPop2 and does
-not include vertex labels.
+TinkerGraph is the reference implementation of TinkerPop and is used in nearly all the examples in this documentation.
 
 TIP: All of the toy graphs available in TinkerPop are described in
 link:http://tinkerpop.apache.org/docs/x.y.z/tutorials/the-gremlin-console/#toy-graphs[The Gremlin Console] tutorial.
@@ -46,7 +44,7 @@ link:http://tinkerpop.apache.org/docs/x.y.z/tutorials/the-gremlin-console/#toy-g
 .TinkerPop Modern
 image::tinkerpop-modern.png[width=500]
 
-TinkerPop3 is the third incarnation of the TinkerPop graph computing framework. Similar to computing in general, graph
+TinkerPop 3.x is the third incarnation of the TinkerPop graph computing framework. Similar to computing in general, graph
 computing makes a distinction between *structure* (graph) and *process* (traversal). The structure of the graph is the
 data model defined by a vertex/edge/property link:http://en.wikipedia.org/wiki/Network_topology[topology]. The process
 of the graph is the means by which the structure is analyzed. The typical form of graph processing is called a
@@ -58,7 +56,7 @@ who are utilizing a graph system from a graph provider. While the components of
 they are described in greater detail in the link:http://tinkerpop.apache.org/docs/x.y.z/tutorials/gremlins-anatomy/[Gremlin's Anatomy]
 tutorial.
 
-.Primary components of the TinkerPop3 *structure* API 
+.Primary components of the TinkerPop *structure* API
  * `Graph`: maintains a set of vertices and edges, and access to database functions such as transactions.
  * `Element`: maintains a collection of properties and a string label denoting the element type.
   ** `Vertex`: extends Element and maintains a set of incoming and outgoing edges.
@@ -66,7 +64,7 @@ tutorial.
  * `Property<V>`: a string key associated with a `V` value.
   ** `VertexProperty<V>`: a string key associated with a `V` value as well as a collection of `Property<U>` properties (*vertices only*)
 
-.Primary components of the TinkerPop3 *process* API
+.Primary components of the TinkerPop *process* API
  * `TraversalSource`: a generator of traversals for a particular graph, link:http://en.wikipedia.org/wiki/Domain-specific_language[domain specific language] (DSL), and execution engine.
  ** `Traversal<S,E>`: a functional data flow process transforming objects of type `S` into object of type `E`.
  *** `GraphTraversal`: a traversal DSL that is oriented towards the semantics of the raw graph (i.e. vertices, edges, etc.).
@@ -74,20 +72,20 @@ tutorial.
  ** `VertexProgram`: code executed at all vertices in a logically parallel manner with intercommunication via message passing.
  ** `MapReduce`: a computations that analyzes all vertices in the graph in parallel and yields a single reduced result.
 
-IMPORTANT: TinkerPop3 is licensed under the popular link:http://www.apache.org/licenses/LICENSE-2.0.html[Apache2]
-free software license. However, note that the underlying graph engine used with TinkerPop3 may have a different
+IMPORTANT: TinkerPop is licensed under the popular link:http://www.apache.org/licenses/LICENSE-2.0.html[Apache2]
+free software license. However, note that the underlying graph engine used with TinkerPop may have a different
 license. Thus, be sure to respect the license caveats of the graph system product.
 
-image:tinkerpop-enabled.png[width=135,float=left] When a graph system implements the TinkerPop3 structure and process
+image:tinkerpop-enabled.png[width=135,float=left] When a graph system implements the TinkerPop structure and process
 link:http://en.wikipedia.org/wiki/Application_programming_interface[APIs], their technology is considered
-_TinkerPop3-enabled_ and becomes nearly indistinguishable from any other TinkerPop-enabled graph system save for
+_TinkerPop-enabled_ and becomes nearly indistinguishable from any other TinkerPop-enabled graph system save for
 their respective time and space complexity. The purpose of this documentation is to describe the structure/process
-dichotomy at length and in doing so, explain how to leverage TinkerPop3 for the sole purpose of graph system-agnostic
+dichotomy at length and in doing so, explain how to leverage TinkerPop for the sole purpose of graph system-agnostic
 graph computing. Before deep-diving into the various structure/process APIs, a short introductory review of both APIs
 is provided.
 
-NOTE: The TinkerPop3 API rides a fine line between providing concise "query language" method names and respecting
-Java method naming standards. The general convention used throughout TinkerPop3 is that if a method is "user exposed,"
+NOTE: The TinkerPop API rides a fine line between providing concise "query language" method names and respecting
+Java method naming standards. The general convention used throughout TinkerPop is that if a method is "user exposed,"
 then a concise name is provided (e.g. `out()`, `path()`, `repeat()`). If the method is primarily for graph systems
 providers, then the standard Java naming convention is followed (e.g. `getNextStep()`, `getSteps()`,
 `getElementComputeKeys()`).
@@ -107,7 +105,7 @@ more about it in the link:http://tinkerpop.apache.org/docs/x.y.z/dev/provider/[G
 == The Graph Process
 
 image:gremlin-running.png[width=125,float=left] The primary way in which graphs are processed are via graph
-traversals. The TinkerPop3 process API is focused on allowing users to create graph traversals in a
+traversals. The TinkerPop process API is focused on allowing users to create graph traversals in a
 syntactically-friendly way over the structures defined in the previous section. A traversal is an algorithmic walk
 across the elements of a graph according to the referential structure explicit within the graph data structure.
 For example: _"What software does vertex 1's friends work on?"_ This English-statement can be represented in the
@@ -191,8 +189,8 @@ out of the right of the traversal (e.g. "vadas" and "josh").
 
 image::traversal-mechanics.png[width=500]
 
-In TinkerPop3, the objects propagating through the traversal are wrapped in a `Traverser<T>`. The traverser concept
-is new to TinkerPop3 and provides the means by which steps remain stateless. A traverser maintains all the metadata
+In TinkerPop, the objects propagating through the traversal are wrapped in a `Traverser<T>`. The traverser concept
+is new to TinkerPop and provides the means by which steps remain stateless. A traverser maintains all the metadata
 about the traversal -- e.g., how many times the traverser has gone through a loop, the path history of the traverser,
 the current object being traversed, etc. Traverser metadata may be accessed by a step. A classic example is the
 <<path-step,`path()`>>-step.
@@ -215,13 +213,13 @@ g.V(marko).repeat(out()).times(2).values('name')
 ----
 
 WARNING: A Traversal's result are never ordered unless explicitly by means of <<order-step,`order()`>>-step. Thus,
-never rely on the iteration order between TinkerPop3 releases and even within a release (as traversal optimizations
+never rely on the iteration order between TinkerPop releases and even within a release (as traversal optimizations
 may alter the flow).
 
 == On Gremlin Language Variants
 
 Gremlin is written in Java 8. There are various language variants of Gremlin such as Gremlin-Groovy (packaged with
-TinkerPop3), Gremlin-Python (packaged with TinkerPop3), link:https://github.com/mpollmeier/gremlin-scala[Gremlin-Scala],
+TinkerPop), Gremlin-Python (packaged with TinkerPop), link:https://github.com/mpollmeier/gremlin-scala[Gremlin-Scala],
 Gremlin-JavaScript, Gremlin-Clojure (known as link:https://github.com/clojurewerkz/ogre[Ogre]), etc.
 It is best to think of Gremlin as a style of graph traversing that is not bound to a particular programming language per se.
 Within a programming language familiar to the developer, there is a Gremlin variant that they can use that leverages
@@ -232,7 +230,7 @@ variants wishes to offer arbitrary computations beyond the provided Gremlin step
 
 Throughout the documentation, the examples provided are primarily written in Gremlin-Groovy. The reason for this is
 the <<gremlin-console,Gremlin Console>> -- an interactive programming environment exists that does not require
-code compilation. For learning TinkerPop3 and interacting with a live graph system in an ad hoc manner, the Gremlin
+code compilation. For learning TinkerPop and interacting with a live graph system in an ad hoc manner, the Gremlin
 Console is invaluable. However, for developers interested in working with Gremlin-Java, a few Groovy-to-Java patterns
 are presented below.
 
@@ -264,7 +262,7 @@ Please see the <<gremlin-variants, Gremlin Variants>> section for more informati
 == Graph System Integration
 
 image:provider-integration.png[width=395,float=right] TinkerPop is a framework composed of various interoperable
-components. At the foundation there is the <<graph,core TinkerPop3 API>> which defines what a `Graph`, `Vertex`,
+components. At the foundation there is the <<graph,core TinkerPop API>> which defines what a `Graph`, `Vertex`,
 `Edge`, etc. are. At minimum a graph system provider must implement the core API. Once implemented, the Gremlin
 <<traversal,traversal language>> is available to the graph system's users. However, the provider can go further and
 develop specific <<traversalstrategy,`TraversalStrategy`>> optimizations that allow the graph system to inspect a

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/849349af/docs/src/reference/preface.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/preface.asciidoc b/docs/src/reference/preface.asciidoc
index f54e168..4776a75 100644
--- a/docs/src/reference/preface.asciidoc
+++ b/docs/src/reference/preface.asciidoc
@@ -15,7 +15,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 ////
 [[preface]]
-= TinkerPop3 Documentation
+= TinkerPop Documentation
 
 In the beginning...
 
@@ -74,7 +74,7 @@ The machines, simply moving algorithmically through Gremlin's world, endorsed hi
 more efficient, more expressive, better capable of reasoning upon his thoughts. Faster, quickly, now towards the
 world's end, where there would be forever currently, emanatingly engulfing that which is -- The TinkerPop.
 
-== TinkerPop3
+== TinkerPop
 
 image::tinkerpop3-splash.png[width=450]
 
@@ -86,7 +86,5 @@ realized realizations are just as real. For that is -- The TinkerPop.
 
 image::gremlintron.png[width=400]
 
-NOTE: TinkerPop2 and below made a sharp distinction between the various TinkerPop projects: Blueprints, Pipes,
-Gremlin, Frames, Furnace, and Rexster. With TinkerPop3, all of these projects have been merged and are generally
-known as Gremlin. *Blueprints* -> Gremlin Structure API : *Pipes* -> `GraphTraversal` : *Frames* -> `Traversal` :
-*Furnace* -> `GraphComputer` and `VertexProgram` : *Rexster* -> GremlinServer.
+NOTE: For more information about differences between TinkerPop 3.x and earlier versions, please see the
+link:http://tinkerpop.apache.org/docs/x.y.z/upgrade/#appendix

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/849349af/docs/src/reference/the-graph.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/the-graph.asciidoc b/docs/src/reference/the-graph.asciidoc
index cc500af..b735c81 100644
--- a/docs/src/reference/the-graph.asciidoc
+++ b/docs/src/reference/the-graph.asciidoc
@@ -53,7 +53,7 @@ against a `Feature` may not always reflect the behavior exhibited when the `Grap
 [[vertex-properties]]
 == Vertex Properties
 
-image:vertex-properties.png[width=215,float=left] TinkerPop3 introduces the concept of a `VertexProperty<V>`. All the
+image:vertex-properties.png[width=215,float=left] TinkerPop introduces the concept of a `VertexProperty<V>`. All the
 properties of a `Vertex` are a `VertexProperty`. A `VertexProperty` implements `Property` and as such, it has a
 key/value pair. However, `VertexProperty` also implements `Element` and thus, can have a collection of key/value
 pairs. Moreover, while an `Edge` can only have one property of key "name" (for example), a `Vertex` can have multiple
@@ -120,7 +120,7 @@ represent the literal vertex's properties. The "literal vertex" can not have any
 associated vertex).
 
 [[the-crew-toy-graph]]
-TIP: A toy graph demonstrating all of the new TinkerPop3 graph structure features is available at
+TIP: A toy graph demonstrating all of the new TinkerPop graph structure features is available at
 `TinkerFactory.createTheCrew()` and `data/tinkerpop-crew*`. This graph demonstrates multi-properties and meta-properties.
 
 .TinkerPop Crew
@@ -140,9 +140,8 @@ g.V().has('name','gremlin').inE('uses').
 
 == Graph Variables
 
-TinkerPop3 introduces the concept of `Graph.Variables`. Variables are key/value pairs associated with the graph
-itself -- in essence, a `Map<String,Object>`. These variables are intended to store metadata about the graph. Example
-use cases include:
+`Graph.Variables` are key/value pairs associated with the graph itself -- in essence, a `Map<String,Object>`. These
+variables are intended to store metadata about the graph. Example use cases include:
 
  * *Schema information*: What do the namespace prefixes resolve to and when was the schema last modified?
  * *Global permissions*: What are the access rights for particular groups?
@@ -426,37 +425,14 @@ try (final InputStream stream = new FileInputStream("tinkerpop-modern.xml")) {
 }
 ----
 
-GraphML was a supported format in TinkerPop 2.x, but there were several issues that made it inconsistent with the
-specification that were corrected for 3.x. As a result, attempting to read a GraphML file generated by 2.x with the
-3.x `GraphMLReader` will result in error. To help with this problem, an XSLT file is provided as a resource in
-`gremlin-core` which will transform 2.x GraphML to 3.x GraphML. It can be used as follows:
-
-[source,java]
-----
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamSource;
-import javax.xml.transform.stream.StreamResult;
-
-InputStream stylesheet = Thread.currentThread().getContextClassLoader().getResourceAsStream("tp2-to-tp3-graphml.xslt");
-File datafile = new File('/tmp/tp2-graphml.xml');
-File outfile = new File('/tmp/tp3-graphml.xml');
-
-TransformerFactory tFactory = TransformerFactory.newInstance();
-StreamSource stylesource = new StreamSource(stylesheet);
-Transformer transformer = tFactory.newTransformer(stylesource);
-
-StreamSource source = new StreamSource(datafile);
-StreamResult result = new StreamResult(new FileWriter(outfile));
-transformer.transform(source, result);
-----
+NOTE: If using GraphML generated from TinkerPop 2.x,  you can read more about its incompatibilities in the
+link:http://tinkerpop.apache.org/docs/x.y.z/upgrade/#graphml-format[Upgrade Documentation].
 
 [[graphson-reader-writer]]
 === GraphSON Reader/Writer
 
 image:gremlin-graphson.png[width=350,float=left] GraphSON is a link:http://json.org/[JSON]-based format extended
-from earlier versions of TinkerPop. It is important to note that TinkerPop3's GraphSON is not backwards compatible
+from earlier versions of TinkerPop. It is important to note that TinkerPop's GraphSON is not backwards compatible
 with prior TinkerPop GraphSON versions. GraphSON has some support from graph-related application outside of TinkerPop,
 but it is generally best used in two cases:
 
@@ -736,56 +712,8 @@ try (final InputStream stream = new FileInputStream("tinkerpop-modern.kryo")) {
 
 NOTE: The preferred extension for files names produced by Gryo is `.kryo`.
 
-=== TinkerPop2 Data Migration
-
-image:data-migration.png[width=300,float=right] For those using TinkerPop2, migrating to TinkerPop3 will mean a number
-of programming changes, but may also require a migration of the data depending on the graph implementation.  For
-example, trying to open `TinkerGraph` data from TinkerPop2 with TinkerPop3 code will not work, however opening a
-TinkerPop2 `Neo4jGraph` with a TinkerPop3 `Neo4jGraph` should work provided there aren't Neo4j version compatibility
-mismatches preventing the read.
-
-If such a situation arises that a particular TinkerPop2 `Graph` can not be read by TinkerPop3, a "legacy" data
-migration approach exists.  The migration involves writing the TinkerPop2 `Graph` to GraphSON, then reading it to
-TinkerPop3 with the `LegacyGraphSONReader` (a limited implementation of the `GraphReader` interface).
-
-The following represents an example migration of the "classic" toy graph.  In this example, the "classic" graph is
-saved to GraphSON using TinkerPop2.
-
-[source,groovy]
-----
-gremlin> Gremlin.version()
-==>2.5.z
-gremlin> graph = TinkerGraphFactory.createTinkerGraph()
-==>tinkergraph[vertices:6 edges:6]
-gremlin> GraphSONWriter.outputGraph(graph,'/tmp/tp2.json',GraphSONMode.EXTENDED)
-==>null
-----
-
-The above console session uses the `gremlin-groovy` distribution from TinkerPop2.  It is important to generate the
-`tp2.json` file using the `EXTENDED` mode as it will include data types when necessary which will help limit
-"lossiness" on the TinkerPop3 side when imported.  Once `tp2.json` is created, it can then be imported to a TinkerPop3
-`Graph`.
-
-[source,groovy]
-----
-gremlin> Gremlin.version()
-==>x.y.z
-gremlin> graph = TinkerGraph.open()
-==>tinkergraph[vertices:0 edges:0]
-gremlin> r = LegacyGraphSONReader.build().create()
-==>org.apache.tinkerpop.gremlin.structure.io.graphson.LegacyGraphSONReader@64337702
-gremlin> r.readGraph(new FileInputStream('/tmp/tp2.json'), graph)
-==>null
-gremlin> g = graph.traversal()
-==>graphtraversalsource[tinkergraph[vertices:6 edges:6], standard]
-gremlin> g.E()
-==>e[11][4-created->3]
-==>e[12][6-created->3]
-==>e[7][1-knows->2]
-==>e[8][1-knows->4]
-==>e[9][1-created->3]
-==>e[10][4-created->5]
-----
+NOTE: Data migrations from TinkerPop 2.x are discussed in the Appendix of the
+link:http://tinkerpop.apache.org/docs/x.y.z/upgrade/#appendix[Upgrade Documentation].
 
 == Namespace Conventions
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/849349af/docs/src/reference/the-graphcomputer.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/the-graphcomputer.asciidoc b/docs/src/reference/the-graphcomputer.asciidoc
index af599eb..4bf39d0 100644
--- a/docs/src/reference/the-graphcomputer.asciidoc
+++ b/docs/src/reference/the-graphcomputer.asciidoc
@@ -17,7 +17,7 @@ limitations under the License.
 [[graphcomputer]]
 = The GraphComputer
 
-image:graphcomputer-puffers.png[width=350,float=right] TinkerPop3 provides two primary means of interacting with a
+image:graphcomputer-puffers.png[width=350,float=right] TinkerPop provides two primary means of interacting with a
 graph: link:http://en.wikipedia.org/wiki/Online_transaction_processing[online transaction processing] (OLTP) and
 link:http://en.wikipedia.org/wiki/Online_analytical_processing[online analytical processing] (OLAP). OLTP-based
 graph systems allow the user to query the graph in real-time. However, typically, real-time performance is only
@@ -39,7 +39,7 @@ walked by moving from vertex-to-vertex via incident edges. With Gremlin OLAP, al
 `VertexProgram`. The programs send messages to one another with the topological structure of the graph acting as the
 communication network (though random message passing possible). In many respects, the messages passed are like
 the OLTP traversers moving from vertex-to-vertex. However, all messages are moving independent of one another, in
-parallel. Once a vertex program is finished computing, TinkerPop3's OLAP engine supports any number
+parallel. Once a vertex program is finished computing, TinkerPop's OLAP engine supports any number
 link:http://en.wikipedia.org/wiki/MapReduce[`MapReduce`] jobs over the resultant graph.
 
 IMPORTANT: `GraphComputer` was designed from the start to be used within a multi-JVM, distributed environment --
@@ -87,7 +87,7 @@ g.V().valueMap()
 NOTE: This model of "vertex-centric graph computing" was made popular by Google's
 link:http://googleresearch.blogspot.com/2009/06/large-scale-graph-computing-at-google.html[Pregel] graph engine.
 In the open source world, this model is found in OLAP graph computing systems such as link:https://giraph.apache.org/[Giraph],
-link:https://hama.apache.org/[Hama]. TinkerPop3 extends the
+link:https://hama.apache.org/[Hama]. TinkerPop extends the
 popularized model with integrated post-processing <<mapreduce,MapReduce>> jobs over the vertex set.
 
 [[mapreduce]]
@@ -97,7 +97,7 @@ The BSP model proposed by Pregel stores the results of the computation in a dist
 elements in the graph. In many situations, it is necessary to aggregate those resultant properties into a single
 result set (i.e. a statistic). For instance, assume a VertexProgram that computes a nominal cluster for each vertex
 (i.e. link:http://en.wikipedia.org/wiki/Community_structure[a graph clustering algorithm]). At the end of the
-computation, each vertex will have a property denoting the cluster it was assigned to. TinkerPop3 provides the
+computation, each vertex will have a property denoting the cluster it was assigned to. TinkerPop provides the
 ability to answer global questions about the clusters. For instance, in order to answer the following questions,
 `MapReduce` jobs are required:
 
@@ -106,7 +106,7 @@ ability to answer global questions about the clusters. For instance, in order to
  * What is the average age of each vertex in each cluster?
  * What is the degree distribution of the vertices in each cluster?
 
-A compressed representation of the `MapReduce` API in TinkerPop3 is provided below. The key idea is that the
+A compressed representation of the `MapReduce` API in TinkerPop is provided below. The key idea is that the
 `map`-stage processes all vertices to emit key/value pairs. Those values are aggregated on their respective key
 for the `reduce`-stage to do its processing to ultimately yield more key/value pairs.
 
@@ -155,14 +155,15 @@ result.memory().clusterPopulation
 result.memory().clusterCount
 ----
 
-IMPORTANT: The MapReduce model of TinkerPop3 does not support MapReduce chaining. Thus, the order in which the
+IMPORTANT: The MapReduce model of TinkerPop does not support MapReduce chaining. Thus, the order in which the
 MapReduce jobs are executed is irrelevant. This is made apparent when realizing that the `map()`-stage takes a
 `Vertex` as its input and the `reduce()`-stage yields key/value pairs. Thus, the results of reduce can not fed back
 into a `map()`.
 
 == A Collection of VertexPrograms
 
-TinkerPop3 provides a collection of VertexPrograms that implement common algorithms. This section discusses the various implementations.
+TinkerPop provides a collection of VertexPrograms that implement common algorithms. This section discusses the various
+implementations.
 
 IMPORTANT: The vertex programs presented are what are provided as of TinkerPop x.y.z. Over time, with future releases,
 more algorithms will be added.
@@ -416,7 +417,7 @@ is provided in the SparkGraphComputer section.
 image:batch-graph.png[width=220,float=left] The `BulkLoaderVertexProgram` provides a generalized way for loading
 graphs of any size into a persistent `Graph`. It is especially useful for large graphs (i.e. hundreds of millions
 or billions of edges) as it can take advantage of the parallel processing offered by `GraphComputer` instances. The
-input can be any existing `Graph` database supporting TinkerPop3 or any of the Hadoop GraphInputFormats (e.g.
+input can be any existing `Graph` database supporting TinkerPop or any of the Hadoop GraphInputFormats (e.g.
 `GraphSONInputFormat`, `GryoInputFormat` or `ScriptInputFormat`). The following example demonstrates how to load data
 from one TinkerGraph to another:
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/849349af/docs/src/reference/the-traversal.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc
index 0132eab..d61da37 100644
--- a/docs/src/reference/the-traversal.asciidoc
+++ b/docs/src/reference/the-traversal.asciidoc
@@ -44,7 +44,7 @@ image::step-types.png[width=650]
 A `GraphTraversal<S,E>` is spawned from a `GraphTraversalSource`. It can also be spawned anonymously (i.e. empty)
 via `__`. A graph traversal is composed of an ordered list of steps. All the steps provided by `GraphTraversal`
 inherit from the more general forms diagrammed above. A list of all the steps (and their descriptions) are provided
-in the TinkerPop3 link:http://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.html[GraphTraversal JavaDoc].
+in the TinkerPop link:http://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.html[GraphTraversal JavaDoc].
 The following subsections will demonstrate the GraphTraversal steps using the <<gremlin-console,Gremlin Console>>.
 
 IMPORTANT: The basics for starting a traversal are described in <<the-graph-process,The Graph Process>> section as
@@ -1024,8 +1024,8 @@ link:++http://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/grem
 
 image::inject-step.png[width=800]
 
-One of the major features of TinkerPop3 is "injectable steps." This makes it possible to insert objects arbitrarily
-into a traversal stream. In general, `inject()`-step (*sideEffect*) exists and a few examples are provided below.
+The concept of "injectable steps" makes it possible to insert objects arbitrarily into a traversal stream. In general,
+`inject()`-step (*sideEffect*) exists and a few examples are provided below.
 
 [gremlin-groovy,modern]
 ----
@@ -2809,7 +2809,7 @@ g.E().valueMap()
 ----
 
 It is important to note that the map of a vertex maintains a list of values for each key. The map of an edge or
-vertex-property represents a single property (not a list). The reason is that vertices in TinkerPop3 leverage
+vertex-property represents a single property (not a list). The reason is that vertices in TinkerPop leverage
 <<vertex-properties,vertex properties>> which are support multiple values per key. Using the <<the-crew-toy-graph,
 "The Crew">> toy graph, the point is made explicit.
 
@@ -2961,7 +2961,7 @@ g.V().as('a').out('knows').as('b').
 WARNING: The anonymous traversal of `where()` processes the current object "locally". In OLAP, where the atomic unit
 of computing is the vertex and its local "star graph," it is important that the anonymous traversal does not leave
 the confines of the vertex's star graph. In other words, it can not traverse to an adjacent vertex's properties or
-edges. Note that is only a temporary limitation that will be addressed in a future version of TinkerPop3 (see
+edges. Note that is only a temporary limitation that will be addressed in a future version of TinkerPop (see
 link:https://issues.apache.org/jira/browse/TINKERPOP-693[TINKERPOP-693]).
 
 *Additional References*
@@ -3157,7 +3157,7 @@ meets its criteria, can mutate it accordingly. Traversal strategies are executed
 of the Gremlin traversal machine's compiler. There are 5 categories of strategies which are itemized below:
 
  * There is an application-level feature that can be embedded into the traversal logic (*decoration*).
- * There is a more efficient way to express the traversal at the TinkerPop3 level (*optimization*).
+ * There is a more efficient way to express the traversal at the TinkerPop level (*optimization*).
  * There is a more efficient way to express the traversal at the graph system/language/driver level (*provider optimization*).
  * There are some final adjustments/cleanups/analyses required before executing the traversal (*finalization*).
  * There are certain traversals that are not legal for the application or traversal engine (*verification*).
@@ -3257,7 +3257,7 @@ public final class TinkerGraphStepStrategy extends AbstractTraversalStrategy<Tra
 
 The traversal is redefined by simply taking a chain of `has()`-steps after `g.V()` (`TinkerGraphStep`) and providing
 their `HasContainers` to `TinkerGraphStep`. Then its up to `TinkerGraphStep` to determine if an appropriate index exists.
-Given that the strategy uses non-TinkerPop3 provided steps, it should go into the `ProviderOptimizationStrategy` category
+Given that the strategy uses non-TinkerPop provided steps, it should go into the `ProviderOptimizationStrategy` category
 to ensure the added step does not interfere with the assumptions of the `OptimizationStrategy` strategies.
 
 [gremlin-groovy,modern]
@@ -3269,11 +3269,11 @@ t.toString()
 ----
 
 WARNING: The reason that `OptimizationStrategy` and `ProviderOptimizationStrategy` are two different categories is
-that optimization strategies should only rewrite the traversal using TinkerPop3 steps. This ensures that the
-optimizations executed at the end of the optimization strategy round are TinkerPop3 compliant. From there, provider
+that optimization strategies should only rewrite the traversal using TinkerPop steps. This ensures that the
+optimizations executed at the end of the optimization strategy round are TinkerPop compliant. From there, provider
 optimizations can analyze the traversal and rewrite the traversal as desired using graph system specific steps (e.g.
 replacing `GraphStep.HasStep...HasStep` with `TinkerGraphStep`). If provider optimizations use graph system specific
-steps and implement `OptimizationStrategy`, then other TinkerPop3 optimizations may fail to optimize the traversal or
+steps and implement `OptimizationStrategy`, then other TinkerPop optimizations may fail to optimize the traversal or
 mis-understand the graph system specific step behaviors (e.g. `ProviderVertexStep extends VertexStep`) and yield
 incorrect semantics.
 
@@ -3305,7 +3305,7 @@ g.V().hasLabel('person'). <1>
 <8> `PathRetractionStrategy` will remove paths from the traversers and increase the likelihood of bulking as path data is not required after `select('b')`.
 <9> `AdjacentToIncidentStrategy` will turn `out()` into `outE()` to increase data access locality.
 
-A collection of useful `DecorationStrategy` strategies are provided with TinkerPop3 and are generally useful to
+A collection of useful `DecorationStrategy` strategies are provided with TinkerPop and are generally useful to
 end-users.  The following sub-sections detail these strategies:
 
 === ElementIdStrategy

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/849349af/docs/src/tutorials/the-gremlin-console/index.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/tutorials/the-gremlin-console/index.asciidoc b/docs/src/tutorials/the-gremlin-console/index.asciidoc
index da8bac3..c1602e4 100644
--- a/docs/src/tutorials/the-gremlin-console/index.asciidoc
+++ b/docs/src/tutorials/the-gremlin-console/index.asciidoc
@@ -98,8 +98,8 @@ for all TinkerPop examples and test cases.
 * `createModern()` - The TinkerPop 3.x representation of the "classic" graph, where the main difference is that vertex
 labels are defined and the "weight" edge property is a `double` rather than a `float`
 (link:http://tinkerpop.apache.org/docs/x.y.z/images/tinkerpop-modern.png[diagram]).
-* `createTheCrew()` - A graph that demonstrates usage of the new structural features of TinkerPop 3.x (as compared to
-2.x) such as link:http://tinkerpop.apache.org/docs/x.y.z/reference/#vertex-properties[vertex properties and multi-properties]
+* `createTheCrew()` - A graph that demonstrates usage of the new structural features of TinkerPop 3.x such as
+link:http://tinkerpop.apache.org/docs/x.y.z/reference/#vertex-properties[vertex meta-properties and multi-properties]
 (link:http://tinkerpop.apache.org/docs/x.y.z/images/the-crew-graph.png[diagram]).
 
 [gremlin-groovy]

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/849349af/docs/src/upgrade/appendix.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade/appendix.asciidoc b/docs/src/upgrade/appendix.asciidoc
new file mode 100644
index 0000000..a9df0e4
--- /dev/null
+++ b/docs/src/upgrade/appendix.asciidoc
@@ -0,0 +1,113 @@
+////
+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.
+////
+
+[[appendix]]
+= Appendix
+
+== TinkerPop 2.x
+
+This section contains a few notes that reference differences between TinkerPop 2.x and 3.x.
+
+One of the major differences between TinkerPop 2.x and TinkerPop 3.x is that in TinkerPop 3.x, the Java convention of
+using setters and getters was abandoned in favor of a syntax that is more aligned with the syntax of Gremlin-Groovy in
+TinkerPop2. Given that Gremlin-Java8 and Gremlin-Groovy are nearly identical due to the inclusion of Java 8 lambdas, a
+big effort was made to ensure that both languages were as similar as possible.
+
+In addition, TinkerPop2 and below made a sharp distinction between the various TinkerPop projects: Blueprints, Pipes,
+Gremlin, Frames, Furnace, and Rexster. With TinkerPop 3.x, all of these projects have been merged and are generally
+known as Gremlin. *Blueprints* -> Gremlin Structure API : *Pipes* -> `GraphTraversal` : *Frames* -> `Traversal` :
+*Furnace* -> `GraphComputer` and `VertexProgram` : *Rexster* -> GremlinServer.
+
+[[graphml-format]]
+=== GraphML Format
+
+GraphML was a supported format in TinkerPop 2.x, but there were several issues that made it inconsistent with the
+specification that were corrected for 3.x. As a result, attempting to read a GraphML file generated by 2.x with the
+3.x `GraphMLReader` will result in error. To help with this problem, an XSLT file is provided as a resource in
+`gremlin-core` which will transform 2.x GraphML to 3.x GraphML. It can be used as follows:
+
+[source,java]
+----
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.transform.stream.StreamResult;
+
+InputStream stylesheet = Thread.currentThread().getContextClassLoader().getResourceAsStream("tp2-to-tp3-graphml.xslt");
+File datafile = new File('/tmp/tp2-graphml.xml');
+File outfile = new File('/tmp/tp3-graphml.xml');
+
+TransformerFactory tFactory = TransformerFactory.newInstance();
+StreamSource stylesource = new StreamSource(stylesheet);
+Transformer transformer = tFactory.newTransformer(stylesource);
+
+StreamSource source = new StreamSource(datafile);
+StreamResult result = new StreamResult(new FileWriter(outfile));
+transformer.transform(source, result);
+----
+
+=== TinkerPop2 Data Migration
+
+image:data-migration.png[width=300,float=right] For those using TinkerPop 2.x, migrating to TinkerPop 3.x will mean a
+number of programming changes, but may also require a migration of the data depending on the graph implementation.  For
+example, trying to open `TinkerGraph` data from TinkerPop 2.x with TinkerPop 3.x code will not work, however opening a
+TinkerPop2 `Neo4jGraph` with a TinkerPop 3.x `Neo4jGraph` should work provided there aren't Neo4j version compatibility
+mismatches preventing the read.
+
+If such a situation arises that a particular TinkerPop 2.x `Graph` can not be read by TinkerPop 3.x, a "legacy" data
+migration approach exists.  The migration involves writing the TinkerPop2 `Graph` to GraphSON, then reading it to
+TinkerPop 3.x with the `LegacyGraphSONReader` (a limited implementation of the `GraphReader` interface).
+
+The following represents an example migration of the "classic" toy graph.  In this example, the "classic" graph is
+saved to GraphSON using TinkerPop 2.x.
+
+[source,groovy]
+----
+gremlin> Gremlin.version()
+==>2.5.z
+gremlin> graph = TinkerGraphFactory.createTinkerGraph()
+==>tinkergraph[vertices:6 edges:6]
+gremlin> GraphSONWriter.outputGraph(graph,'/tmp/tp2.json',GraphSONMode.EXTENDED)
+==>null
+----
+
+The above console session uses the `gremlin-groovy` distribution from TinkerPop2.  It is important to generate the
+`tp2.json` file using the `EXTENDED` mode as it will include data types when necessary which will help limit
+"lossiness" on the TinkerPop 3.x side when imported.  Once `tp2.json` is created, it can then be imported to a
+TinkerPop 3.x `Graph`.
+
+[source,groovy]
+----
+gremlin> Gremlin.version()
+==>x.y.z
+gremlin> graph = TinkerGraph.open()
+==>tinkergraph[vertices:0 edges:0]
+gremlin> r = LegacyGraphSONReader.build().create()
+==>org.apache.tinkerpop.gremlin.structure.io.graphson.LegacyGraphSONReader@64337702
+gremlin> r.readGraph(new FileInputStream('/tmp/tp2.json'), graph)
+==>null
+gremlin> g = graph.traversal()
+==>graphtraversalsource[tinkergraph[vertices:6 edges:6], standard]
+gremlin> g.E()
+==>e[11][4-created->3]
+==>e[12][6-created->3]
+==>e[7][1-knows->2]
+==>e[8][1-knows->4]
+==>e[9][1-created->3]
+==>e[10][4-created->5]
+----
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/849349af/docs/src/upgrade/index.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade/index.asciidoc b/docs/src/upgrade/index.asciidoc
index 670ce31..65a1c88 100644
--- a/docs/src/upgrade/index.asciidoc
+++ b/docs/src/upgrade/index.asciidoc
@@ -41,3 +41,5 @@ include::release-3.2.x-incubating.asciidoc[]
 include::release-3.1.x-incubating.asciidoc[]
 
 include::release-3.0.x-incubating.asciidoc[]
+
+include::appendix.asciidoc[]

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/849349af/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
index 9952455..bb3d5d8 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
@@ -1676,5 +1676,14 @@ namespace Gremlin.Net.Process.Traversal
             return Wrap<S, E>(this);
         }
 
+        /// <summary>
+        ///     Adds the with step to this <see cref="GraphTraversal{SType, EType}" />.
+        /// </summary>
+        public GraphTraversal<S, E> With (StepConfiguration modulation)
+        {
+            Bytecode.AddStep("with", modulation);
+            return Wrap<S, E>(this);
+        }
+
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/849349af/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/process/graph-traversal.js
----------------------------------------------------------------------
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/process/graph-traversal.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/process/graph-traversal.js
index edeb2cb..901f9b0 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/process/graph-traversal.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/process/graph-traversal.js
@@ -1132,6 +1132,16 @@ class GraphTraversal extends Traversal {
     return this;
   }
   
+  /**
+   * Graph traversal with method.
+   * @param {...Object} args
+   * @returns {GraphTraversal}
+   */
+  with(...args) {
+    this.bytecode.addStep('with', args);
+    return this;
+  }
+  
 }
 
 function callOnEmptyTraversal(fnName, args) {

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/849349af/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py b/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py
index d5630c0..a492f9c 100644
--- a/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py
+++ b/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py
@@ -505,6 +505,10 @@ class GraphTraversal(Traversal):
         self.bytecode.add_step("where", *args)
         return self
 
+    def with(self, *args):
+        self.bytecode.add_step("with", *args)
+        return self
+
 
 class __(object):
     graph_traversal = GraphTraversal


[04/22] tinkerpop git commit: Merge branch 'tp33'

Posted by sp...@apache.org.
Merge branch 'tp33'


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

Branch: refs/heads/TINKERPOP-1975
Commit: f39363347ec09d21475757b45b154b43d05a85d8
Parents: 4f46095 d975e19
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Tue May 22 08:44:31 2018 -0700
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Tue May 22 08:44:31 2018 -0700

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 gremlin-test/features/map/Select.feature        | 20 ++++++++++++++++
 .../process/traversal/step/map/SelectTest.java  | 15 ++++++++++++
 .../optimization/TinkerGraphCountStrategy.java  |  2 +-
 .../TinkerGraphCountStrategyTest.java           | 25 ++++++++++++--------
 5 files changed, 52 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


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

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f3936334/gremlin-test/features/map/Select.feature
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f3936334/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SelectTest.java
----------------------------------------------------------------------


[18/22] tinkerpop git commit: wip

Posted by sp...@apache.org.
wip


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

Branch: refs/heads/TINKERPOP-1975
Commit: 2d4d625bddaa11be74381df1e91427c7fbc8ef96
Parents: 94d0c3c
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed May 23 08:46:34 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed May 30 13:44:59 2018 -0400

----------------------------------------------------------------------
 .../traversal/dsl/graph/GraphTraversal.java     | 19 ++++++++++++++
 .../process/traversal/step/WithModulating.java  | 26 ++++++++++++++++++++
 .../process/traversal/step/WithModulation.java  | 26 ++++++++++++++++++++
 3 files changed, 71 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2d4d625b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
index 0fd3599..b7bf736 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
@@ -40,6 +40,8 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.FromToModulating;
 import org.apache.tinkerpop.gremlin.process.traversal.step.Mutating;
 import org.apache.tinkerpop.gremlin.process.traversal.step.TimesModulating;
 import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalOptionParent;
+import org.apache.tinkerpop.gremlin.process.traversal.step.WithModulating;
+import org.apache.tinkerpop.gremlin.process.traversal.step.WithModulation;
 import org.apache.tinkerpop.gremlin.process.traversal.step.branch.BranchStep;
 import org.apache.tinkerpop.gremlin.process.traversal.step.branch.ChooseStep;
 import org.apache.tinkerpop.gremlin.process.traversal.step.branch.LocalStep;
@@ -2496,6 +2498,22 @@ public interface GraphTraversal<S, E> extends Traversal<S, E> {
         return this.asAdmin().addStep(new LambdaCollectingBarrierStep<>(this.asAdmin(), (Consumer) barrierConsumer, Integer.MAX_VALUE));
     }
 
+    //// WITH-MODULATORS
+
+    /**
+     * Provides a configuration to a step in the form of a {@link WithModulation}. The step configuration must be
+     * step specific and therefore a configuration could be supplied that is not known to be valid until execution.
+     *
+     * @param config the configuration to apply to a step
+     * @return the traversal with a modulated step
+     * @see <a href="http://tinkerpop.apache.org/docs/${project.version}/reference/#with-step" target="_blank">Reference Documentation - With Step</a>
+     * @since 3.4.0
+     */
+    public default GraphTraversal<S,E> with(final WithModulation config) {
+        this.asAdmin().getBytecode().addStep(Symbols.with, config);
+        ((WithModulating) this.asAdmin().getEndStep()).modulateWith(config);
+        return this;
+    }
 
     //// BY-MODULATORS
 
@@ -2804,6 +2822,7 @@ public interface GraphTraversal<S, E> extends Traversal<S, E> {
         public static final String times = "times";
         public static final String as = "as";
         public static final String option = "option";
+        public static final String with = "with";
 
     }
 }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2d4d625b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/WithModulating.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/WithModulating.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/WithModulating.java
new file mode 100644
index 0000000..2a81c45
--- /dev/null
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/WithModulating.java
@@ -0,0 +1,26 @@
+/*
+ * 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;
+
+/**
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+public interface WithModulating {
+    public void modulateWith(final WithModulation configuration);
+}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2d4d625b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/WithModulation.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/WithModulation.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/WithModulation.java
new file mode 100644
index 0000000..404b02f
--- /dev/null
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/WithModulation.java
@@ -0,0 +1,26 @@
+/*
+ * 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;
+
+/**
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+public interface WithModulation {
+    public Object[]
+}


[20/22] tinkerpop git commit: wip

Posted by sp...@apache.org.
wip


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

Branch: refs/heads/TINKERPOP-1975
Commit: 01f18eab07ff726f90047ae486be98a2451d244f
Parents: 02f583e
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed May 30 10:38:14 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed May 30 13:46:14 2018 -0400

----------------------------------------------------------------------
 .../GraphSONMapperPartialEmbeddedTypeTest.java      | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/01f18eab/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONMapperPartialEmbeddedTypeTest.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONMapperPartialEmbeddedTypeTest.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONMapperPartialEmbeddedTypeTest.java
index de4dded..e3a14e5 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONMapperPartialEmbeddedTypeTest.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONMapperPartialEmbeddedTypeTest.java
@@ -22,6 +22,7 @@ import org.apache.tinkerpop.gremlin.process.remote.traversal.DefaultRemoteTraver
 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.gremlin.process.traversal.dsl.graph.__;
 import org.apache.tinkerpop.gremlin.process.traversal.step.util.DefaultStepConfiguration;
 import org.apache.tinkerpop.gremlin.process.traversal.step.util.StepConfigurationProxy;
 import org.apache.tinkerpop.shaded.jackson.databind.JsonMappingException;
@@ -39,6 +40,7 @@ import java.time.ZoneOffset;
 import java.time.ZonedDateTime;
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.LinkedHashMap;
 import java.util.List;
@@ -338,10 +340,20 @@ public class GraphSONMapperPartialEmbeddedTypeTest extends AbstractGraphSONTest
 
     @Test
     public void shouldHandleWithDefaultStepConfiguration() throws Exception {
-        final DefaultStepConfiguration stepConfig = new DefaultStepConfiguration("setInterval", 1000);
-        final StepConfigurationProxy deserStepConfig = serializeDeserializeAuto(mapper, stepConfig);
+        final DefaultStepConfiguration stepConfigSimple = new DefaultStepConfiguration("setInterval", 1000);
+        StepConfigurationProxy deserStepConfig = serializeDeserializeAuto(mapper, stepConfigSimple);
         assertEquals(1000, deserStepConfig.getConfiguration().getInt("setInterval"));
         assertEquals(DefaultStepConfiguration.class, deserStepConfig.getStepConfigurationClass());
+
+        final LinkedHashMap<String,List<Object>> conf = new LinkedHashMap<>();
+        conf.put("setInterval", Collections.singletonList(1000));
+        conf.put("setTraversal", Collections.singletonList(__.out().constant(100)));
+        final DefaultStepConfiguration stepConfigMulti = new DefaultStepConfiguration(conf);
+        deserStepConfig = serializeDeserializeAuto(mapper, stepConfigMulti);
+        assertEquals(1000, deserStepConfig.getConfiguration().getInt("setInterval"));
+        assertEquals(__.out().constant(100).asAdmin().getBytecode(), deserStepConfig.getConfiguration().getList("setTraversal").get(0));
+        assertEquals(DefaultStepConfiguration.class, deserStepConfig.getStepConfigurationClass());
+
     }
 
     // Class needs to be defined as statics as it's a nested class.