You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by dk...@apache.org on 2018/07/29 17:21:46 UTC

[01/50] [abbrv] tinkerpop git commit: Expose pick object in module.exports [Forced Update!]

Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1990 823e93541 -> b003528c4 (forced update)


Expose pick object in module.exports


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

Branch: refs/heads/TINKERPOP-1990
Commit: c324002c7d2184b87ef1e90067c318ebf727311f
Parents: 0272a2e
Author: arings <ar...@codingunicorns.com>
Authored: Sun Jul 15 19:51:08 2018 +0200
Committer: Jorge Bay Gondra <jo...@gmail.com>
Committed: Fri Jul 20 10:21:59 2018 +0200

----------------------------------------------------------------------
 .../src/main/javascript/gremlin-javascript/index.js               | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c324002c/gremlin-javascript/src/main/javascript/gremlin-javascript/index.js
----------------------------------------------------------------------
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/index.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/index.js
index 2ebae48..d4c6d88 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/index.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/index.js
@@ -54,6 +54,7 @@ module.exports = {
     direction: t.direction,
     operator: t.operator,
     order: t.order,
+    pick: t.pick,
     pop: t.pop,
     scope: t.scope,
     t: t.t,
@@ -74,4 +75,4 @@ module.exports = {
     VertexProperty: graph.VertexProperty,
     toLong: utils.toLong
   }
-};
\ No newline at end of file
+};


[21/50] [abbrv] tinkerpop git commit: Added warning for postfixes in gremlin-javascript CTR

Posted by dk...@apache.org.
Added warning for postfixes in gremlin-javascript CTR


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

Branch: refs/heads/TINKERPOP-1990
Commit: 9986493baed59c964673460324a5abcd2fbb2e98
Parents: ecd944e
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Jul 25 07:43:28 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Jul 25 07:43:28 2018 -0400

----------------------------------------------------------------------
 docs/src/reference/gremlin-variants.asciidoc | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9986493b/docs/src/reference/gremlin-variants.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/gremlin-variants.asciidoc b/docs/src/reference/gremlin-variants.asciidoc
index 7a85ab1..04090b5 100644
--- a/docs/src/reference/gremlin-variants.asciidoc
+++ b/docs/src/reference/gremlin-variants.asciidoc
@@ -491,6 +491,9 @@ traversal source.
 Since Gremlin-JavaScript currently doesn't support lambda expressions, all traversals can be translated to
 Gremlin-Java on the remote location (e.g. Gremlin Server).
 
+WARNING: In Javascript, `from` and `in` are reserved words. Gremlin-Javascript simply postfixes `_` to the end of
+these terms for their use with graph traversal. For instance: `g.V().in_().out()`
+
 IMPORTANT: Gremlin-JavaScript’s `Traversal` base class supports the standard Gremlin methods such as `next()` and
 `toList()` Such "terminal" methods trigger the evaluation of the traversal.
 


[50/50] [abbrv] tinkerpop git commit: TINKERPOP-1990 Implemented `ShortestPathVertexProgram` and `ShortestPathVertexProgramStep`.

Posted by dk...@apache.org.
TINKERPOP-1990 Implemented `ShortestPathVertexProgram` and `ShortestPathVertexProgramStep`.


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

Branch: refs/heads/TINKERPOP-1990
Commit: b003528c4b27c49fb992d1b9da8035a853af3c54
Parents: 6358715
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Wed May 23 08:46:34 2018 -0400
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Sun Jul 29 10:21:23 2018 -0700

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |   1 +
 docs/src/reference/the-graphcomputer.asciidoc   |  51 ++
 docs/src/reference/the-traversal.asciidoc       |  56 ++
 .../tinkerpop/gremlin/jsr223/CoreImports.java   |   4 +
 .../search/path/ShortestPathVertexProgram.java  | 581 +++++++++++++++++++
 .../traversal/step/map/ShortestPath.java        | 108 ++++
 .../step/map/ShortestPathVertexProgramStep.java | 174 ++++++
 .../gremlin/process/remote/RemoteGraph.java     |   8 +
 .../gremlin/process/traversal/Traversal.java    |  16 +-
 .../traversal/dsl/graph/GraphTraversal.java     |  20 +
 .../traversal/lambda/ColumnTraversal.java       |   8 +
 .../traversal/lambda/ConstantTraversal.java     |   9 +-
 .../traversal/lambda/ElementValueTraversal.java |  10 +-
 .../traversal/lambda/IdentityTraversal.java     |   7 +-
 .../process/traversal/lambda/LoopTraversal.java |   6 +
 .../traversal/lambda/TokenTraversal.java        |   8 +
 .../process/traversal/lambda/TrueTraversal.java |   5 +
 .../structure/io/graphson/GraphSONModule.java   |   2 +-
 .../gremlin/structure/io/gryo/GryoVersion.java  |  12 +-
 .../structure/io/gryo/UtilSerializers.java      |  15 +
 .../gremlin/structure/util/Attachable.java      |   3 +-
 .../traversal/dsl/graph/GraphTraversalTest.java |   2 +-
 .../Process/Traversal/GraphTraversal.cs         |  18 +-
 .../lib/process/graph-traversal.js              |  10 +
 .../gremlin_python/process/graph_traversal.py   |   4 +
 .../tinkerpop/gremlin/AbstractGremlinTest.java  |   6 +-
 .../process/AbstractGremlinProcessTest.java     |  11 +-
 .../gremlin/process/ProcessComputerSuite.java   |   5 +
 .../search/path/ShortestPathTestHelper.java     | 100 ++++
 .../path/ShortestPathVertexProgramTest.java     | 297 ++++++++++
 .../traversal/step/map/ShortestPathTest.java    | 353 +++++++++++
 pom.xml                                         |   3 +
 32 files changed, 1879 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b003528c/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 3054085..1c28d03 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -25,6 +25,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 
 This release also includes changes from <<release-3-3-3, 3.3.3>>.
 
+* Implemented `ShortestPathVertexProgram` and the `shortestPath()` step.
 * Bumped to Netty 4.1.25.
 * Bumped to Spark 2.3.1.
 * Moved `Parameterizing` interface to the `org.apache.tinkerpop.gremlin.process.traversal.step` package with other marker interfaces of its type.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b003528c/docs/src/reference/the-graphcomputer.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/the-graphcomputer.asciidoc b/docs/src/reference/the-graphcomputer.asciidoc
index 1d7586c..3d7ec00 100644
--- a/docs/src/reference/the-graphcomputer.asciidoc
+++ b/docs/src/reference/the-graphcomputer.asciidoc
@@ -403,6 +403,57 @@ g.V().peerPressure().by('cluster').valueMap()
 g.V().peerPressure().by(outE('knows')).by('cluster').valueMap()
 ----
 
+[[shortestpathvertexprogram]]
+=== ShortestPathVertexProgram
+
+The `ShortestPathVertexProram` provides an easy way to find shortest non-cyclic paths in the graph. It provides several options to configure
+the output format, the start- and end-vertices, the direction, a custom distance function, as well as a distance limitation. By default it just
+finds all undirected, shortest paths in the graph.
+
+[gremlin-groovy,modern]
+----
+spvp = ShortestPathVertexProgram.build().create() <1>
+result = graph.compute().program(spvp).submit().get() <2>
+result.memory().get(ShortestPathVertexProgram.SHORTEST_PATHS) <3>
+----
+
+<1> Create a `ShortestPathVertexProgram` with its default configuration.
+<2> Execute the `ShortestPathVertexProgram`.
+<3> Get all shortest paths from the results memory.
+
+[gremlin-groovy,modern]
+----
+spvp = ShortestPathVertexProgram.build().includeEdges(true).create() <1>
+result = graph.compute().program(spvp).submit().get() <2>
+result.memory().get(ShortestPathVertexProgram.SHORTEST_PATHS) <3>
+----
+
+<1> Create a `ShortestPathVertexProgram` as before, but configure it to include edges in the result.
+<2> Execute the `ShortestPathVertexProgram`.
+<3> Get all shortest paths from the results memory.
+
+The `ShortestPathVertexProgram.Builder` provides the following configuration methods:
+
+[width="100%",cols="3,15,5",options="header"]
+|=========================================================
+| Method | Description | Default
+| `source(Traversal)` | Sets a filter traversal for the start vertices (e.g. `__.has('name','marko')`). | all vertices (`__.identity()`)
+| `target(Traversal)` | Sets a filter traversal for the end vertices. | all vertices
+| `edgeDirection(Direction)` | Sets the direction to traverse during the shortest path discovery. | `Direction.BOTH`
+| `edgeTraversal(Traversal)` | Sets a traversal that emits the edges to traverse from the current vertex. | `__.bothE()`
+| `distanceProperty(String)` | Sets the edge property to use for the distance calculations. | none
+| `distanceTraversal(Traversal)` | Sets the traversal that calculates the distance for the current edge. | `__.constant(1)`
+| `maxDistance(Traversal)` | Limits the shortest path distance. | none
+| `includeEdges(Boolean)` | Whether to include edges in shortest paths or not. | `false`
+|=========================================================
+
+IMPORTANT: If a maximum distance is provided, the discovery process will only stop to follow a path at this distance if there was no
+custom distance property or traversal provided. Custom distances can be negative, hence exceeding the maximum distance doesn't mean that there
+can't be any more valid paths. However, paths will be filtered at the end, when no more non-cyclic paths can be found. The bottom line is that
+custom distance properties or traversals can lead to much longer runtimes and a much higher memory consumption.
+
+Note that `GraphTraversal` provides a <<shortestpath-step,`shortestPath()`>>-step.
+
 [[bulkdumpervertexprogram]]
 [[clonevertexprogram]]
 === CloneVertexProgram

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b003528c/docs/src/reference/the-traversal.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc
index 9d2dd49..8b5f202 100644
--- a/docs/src/reference/the-traversal.asciidoc
+++ b/docs/src/reference/the-traversal.asciidoc
@@ -2489,6 +2489,62 @@ link:++http://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/grem
 link:++http://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/gremlin/structure/Column.html++[`Column`],
 link:++http://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/gremlin/process/traversal/Pop.html++[`Pop`]
 
+[[shortestpath-step]]
+=== ShortestPath step
+
+The `shortestPath()`-step provides an easy way to find shortest non-cyclic paths in a graph. It is configurable
+using the `with()`-modulator with the options given below.
+
+[width="100%",cols="3,3,15,5",options="header"]
+|=========================================================
+| Key | Type | Description | Default
+| `target` | `Traversal` | Sets a filter traversal for the end vertices (e.g. `__.has('name','marko')`). | all vertices (`__.identity()`)
+| `edges` | `Traversal` or `Direction` | Sets a `Traversal` that emits the edges to traverse from the current vertex or the `Direction` to traverse during the shortest path discovery. | `Direction.BOTH`
+| `distance` | `Traversal` or `String` | Sets the `Traversal` that calculates the distance for the current edge or the name of an edge property to use for the distance calculations. | `__.constant(1)`
+| `maxDistance` | `Number` | Sets the distance limit for all shortest paths. | none
+| `includeEdges` | `Boolean` | Whether to include edges in the result or not. | `false`
+|=========================================================
+
+[gremlin-groovy,modern]
+----
+a = g.withComputer()
+a.V().shortestPath() <1>
+a.V().has('person','name','marko').shortestPath() <2>
+a.V().shortestPath().with(ShortestPath.target, __.has('name','peter')) <3>
+a.V().shortestPath().
+        with(ShortestPath.edges, Direction.IN).
+        with(ShortestPath.target, __.has('name','josh')) <4>
+a.V().has('person','name','marko').
+      shortestPath().
+        with(ShortestPath.target, __.has('name','josh')) <5>
+a.V().has('person','name','marko').
+      shortestPath().
+        with(ShortestPath.target, __.has('name','josh')).
+        with(ShortestPath.distance, 'weight') <6>
+a.V().has('person','name','marko').
+      shortestPath().
+        with(ShortestPath.target, __.has('name','josh')).
+        with(ShortestPath.includeEdges, true) <7>
+g.inject(a.V().shortestPath().
+           with(ShortestPath.distance, 'weight').
+           with(ShortestPath.includeEdges, true).
+           with(ShortestPath.maxDistance, 1).toList().toArray()).
+  map(unfold().values('name','weight').fold()) <8>
+----
+
+<1> Find all shortest paths.
+<2> Find all shortest paths from `marko`.
+<3> Find all shortest paths to `peter`.
+<4> Find all in-directed paths to `josh`.
+<5> Find all shortest paths from `marko` to `josh`.
+<6> Find all shortest paths from `marko` to `josh` using a custom distance property.
+<7> Find all shortest paths from `marko` to `josh` and include edges in the result.
+<8> Find all shortest paths using a custom distance property and limit the distance to 1. Inject the result into a OLTP GraphTraversal in order to be able to select properties from all elements in all paths.
+
+*Additional References*
+
+link:++http://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.html#shortestPath--++[`shortestPath()`]
+
 [[simplepath-step]]
 === SimplePath Step
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b003528c/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 9d7eb52..b24c886 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
@@ -47,10 +47,12 @@ import org.apache.tinkerpop.gremlin.process.computer.clustering.peerpressure.Clu
 import org.apache.tinkerpop.gremlin.process.computer.clustering.peerpressure.PeerPressureVertexProgram;
 import org.apache.tinkerpop.gremlin.process.computer.ranking.pagerank.PageRankMapReduce;
 import org.apache.tinkerpop.gremlin.process.computer.ranking.pagerank.PageRankVertexProgram;
+import org.apache.tinkerpop.gremlin.process.computer.search.path.ShortestPathVertexProgram;
 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.PageRank;
 import org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.PeerPressure;
+import org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.ShortestPath;
 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;
@@ -266,6 +268,8 @@ public final class CoreImports {
         CLASS_IMPORTS.add(PageRank.class);
         CLASS_IMPORTS.add(PageRankMapReduce.class);
         CLASS_IMPORTS.add(PageRankVertexProgram.class);
+        CLASS_IMPORTS.add(ShortestPath.class);
+        CLASS_IMPORTS.add(ShortestPathVertexProgram.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/b003528c/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/search/path/ShortestPathVertexProgram.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/search/path/ShortestPathVertexProgram.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/search/path/ShortestPathVertexProgram.java
new file mode 100644
index 0000000..549dff9
--- /dev/null
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/search/path/ShortestPathVertexProgram.java
@@ -0,0 +1,581 @@
+/*
+ * 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.computer.search.path;
+
+import org.apache.commons.configuration.Configuration;
+import org.apache.tinkerpop.gremlin.process.computer.GraphComputer;
+import org.apache.tinkerpop.gremlin.process.computer.Memory;
+import org.apache.tinkerpop.gremlin.process.computer.MemoryComputeKey;
+import org.apache.tinkerpop.gremlin.process.computer.MessageScope;
+import org.apache.tinkerpop.gremlin.process.computer.Messenger;
+import org.apache.tinkerpop.gremlin.process.computer.VertexComputeKey;
+import org.apache.tinkerpop.gremlin.process.computer.VertexProgram;
+import org.apache.tinkerpop.gremlin.process.computer.traversal.TraversalVertexProgram;
+import org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.ProgramVertexProgramStep;
+import org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.VertexProgramStep;
+import org.apache.tinkerpop.gremlin.process.computer.util.AbstractVertexProgramBuilder;
+import org.apache.tinkerpop.gremlin.process.traversal.Operator;
+import org.apache.tinkerpop.gremlin.process.traversal.Path;
+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.__;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.ImmutablePath;
+import org.apache.tinkerpop.gremlin.process.traversal.traverser.util.IndexedTraverserSet;
+import org.apache.tinkerpop.gremlin.process.traversal.traverser.util.TraverserSet;
+import org.apache.tinkerpop.gremlin.process.traversal.util.PureTraversal;
+import org.apache.tinkerpop.gremlin.structure.Direction;
+import org.apache.tinkerpop.gremlin.structure.Edge;
+import org.apache.tinkerpop.gremlin.structure.Element;
+import org.apache.tinkerpop.gremlin.structure.Graph;
+import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.tinkerpop.gremlin.structure.VertexProperty;
+import org.apache.tinkerpop.gremlin.structure.util.StringFactory;
+import org.apache.tinkerpop.gremlin.structure.util.reference.ReferenceFactory;
+import org.apache.tinkerpop.gremlin.util.NumberHelper;
+import org.javatuples.Pair;
+import org.javatuples.Triplet;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.function.Function;
+
+/**
+ * @author Daniel Kuppitz (http://gremlin.guru)
+ */
+public class ShortestPathVertexProgram implements VertexProgram<Triplet<Path, Edge, Number>> {
+
+    @SuppressWarnings("WeakerAccess")
+    public static final String SHORTEST_PATHS = "gremlin.shortestPathVertexProgram.shortestPaths";
+
+    private static final String SOURCE_VERTEX_FILTER = "gremlin.shortestPathVertexProgram.sourceVertexFilter";
+    private static final String TARGET_VERTEX_FILTER = "gremlin.shortestPathVertexProgram.targetVertexFilter";
+    private static final String EDGE_TRAVERSAL = "gremlin.shortestPathVertexProgram.edgeTraversal";
+    private static final String DISTANCE_TRAVERSAL = "gremlin.shortestPathVertexProgram.distanceTraversal";
+    private static final String MAX_DISTANCE = "gremlin.shortestPathVertexProgram.maxDistance";
+    private static final String INCLUDE_EDGES = "gremlin.shortestPathVertexProgram.includeEdges";
+
+    private static final String STATE = "gremlin.shortestPathVertexProgram.state";
+    private static final String PATHS = "gremlin.shortestPathVertexProgram.paths";
+    private static final String VOTE_TO_HALT = "gremlin.shortestPathVertexProgram.voteToHalt";
+
+    private static final int SEARCH = 0;
+    private static final int COLLECT_PATHS = 1;
+    private static final int UPDATE_HALTED_TRAVERSERS = 2;
+
+    public static final PureTraversal<Vertex, ?> DEFAULT_VERTEX_FILTER_TRAVERSAL = new PureTraversal<>(
+            __.<Vertex> identity().asAdmin()); // todo: new IdentityTraversal<>()
+    public static final PureTraversal<Vertex, Edge> DEFAULT_EDGE_TRAVERSAL = new PureTraversal<>(__.bothE().asAdmin());
+    public static final PureTraversal<Edge, Number> DEFAULT_DISTANCE_TRAVERSAL = new PureTraversal<>(
+            __.<Edge> start().<Number> constant(1).asAdmin()); // todo: new ConstantTraversal<>(1)
+
+    private TraverserSet<Vertex> haltedTraversers;
+    private IndexedTraverserSet<Vertex, Vertex> haltedTraversersIndex;
+    private PureTraversal<?, ?> traversal;
+    private PureTraversal<Vertex, ?> sourceVertexFilterTraversal = DEFAULT_VERTEX_FILTER_TRAVERSAL.clone();
+    private PureTraversal<Vertex, ?> targetVertexFilterTraversal = DEFAULT_VERTEX_FILTER_TRAVERSAL.clone();
+    private PureTraversal<Vertex, Edge> edgeTraversal = DEFAULT_EDGE_TRAVERSAL.clone();
+    private PureTraversal<Edge, Number> distanceTraversal = DEFAULT_DISTANCE_TRAVERSAL.clone();
+    private Step<Vertex, Path> programStep;
+    private Number maxDistance;
+    private boolean distanceEqualsNumberOfHops;
+    private boolean includeEdges;
+    private boolean standalone;
+
+    private static final Set<VertexComputeKey> VERTEX_COMPUTE_KEYS = new HashSet<>(Arrays.asList(
+            VertexComputeKey.of(PATHS, true),
+            VertexComputeKey.of(TraversalVertexProgram.HALTED_TRAVERSERS, false)));
+
+    private final Set<MemoryComputeKey> memoryComputeKeys = new HashSet<>(Arrays.asList(
+            MemoryComputeKey.of(VOTE_TO_HALT, Operator.and, false, true),
+            MemoryComputeKey.of(STATE, Operator.assign, true, true)));
+
+    private ShortestPathVertexProgram() {
+
+    }
+
+    @Override
+    public void loadState(final Graph graph, final Configuration configuration) {
+
+        if (configuration.containsKey(SOURCE_VERTEX_FILTER))
+            this.sourceVertexFilterTraversal = PureTraversal.loadState(configuration, SOURCE_VERTEX_FILTER, graph);
+
+        if (configuration.containsKey(TARGET_VERTEX_FILTER))
+            this.targetVertexFilterTraversal = PureTraversal.loadState(configuration, TARGET_VERTEX_FILTER, graph);
+
+        if (configuration.containsKey(EDGE_TRAVERSAL))
+            this.edgeTraversal = PureTraversal.loadState(configuration, EDGE_TRAVERSAL, graph);
+
+        if (configuration.containsKey(DISTANCE_TRAVERSAL))
+            this.distanceTraversal = PureTraversal.loadState(configuration, DISTANCE_TRAVERSAL, graph);
+
+        if (configuration.containsKey(MAX_DISTANCE))
+            this.maxDistance = (Number) configuration.getProperty(MAX_DISTANCE);
+
+        this.distanceEqualsNumberOfHops = this.distanceTraversal.equals(DEFAULT_DISTANCE_TRAVERSAL);
+        this.includeEdges = configuration.getBoolean(INCLUDE_EDGES, false);
+        this.standalone = !configuration.containsKey(VertexProgramStep.ROOT_TRAVERSAL);
+
+        if (!this.standalone) {
+            this.traversal = PureTraversal.loadState(configuration, VertexProgramStep.ROOT_TRAVERSAL, graph);
+            final String programStepId = configuration.getString(ProgramVertexProgramStep.STEP_ID);
+            for (final Step step : this.traversal.get().getSteps()) {
+                if (step.getId().equals(programStepId)) {
+                    //noinspection unchecked
+                    this.programStep = step;
+                    break;
+                }
+            }
+        }
+
+        this.haltedTraversers = TraversalVertexProgram.loadHaltedTraversers(configuration);
+        this.haltedTraversersIndex = new IndexedTraverserSet<>(v -> v);
+        for (final Traverser.Admin<Vertex> traverser : this.haltedTraversers) {
+            this.haltedTraversersIndex.add(traverser.split());
+        }
+        this.memoryComputeKeys.add(MemoryComputeKey.of(SHORTEST_PATHS, Operator.addAll, true, !standalone));
+    }
+
+    @Override
+    public void storeState(final Configuration configuration) {
+        VertexProgram.super.storeState(configuration);
+        this.sourceVertexFilterTraversal.storeState(configuration, SOURCE_VERTEX_FILTER);
+        this.targetVertexFilterTraversal.storeState(configuration, TARGET_VERTEX_FILTER);
+        this.edgeTraversal.storeState(configuration, EDGE_TRAVERSAL);
+        this.distanceTraversal.storeState(configuration, DISTANCE_TRAVERSAL);
+        configuration.setProperty(INCLUDE_EDGES, this.includeEdges);
+        if (this.maxDistance != null)
+            configuration.setProperty(MAX_DISTANCE, maxDistance);
+        if (this.traversal != null) {
+            this.traversal.storeState(configuration, ProgramVertexProgramStep.ROOT_TRAVERSAL);
+            configuration.setProperty(ProgramVertexProgramStep.STEP_ID, this.programStep.getId());
+        }
+        TraversalVertexProgram.storeHaltedTraversers(configuration, this.haltedTraversers);
+    }
+
+    @Override
+    public Set<VertexComputeKey> getVertexComputeKeys() {
+        return VERTEX_COMPUTE_KEYS;
+    }
+
+    @Override
+    public Set<MemoryComputeKey> getMemoryComputeKeys() {
+        return memoryComputeKeys;
+    }
+
+    @Override
+    public Set<MessageScope> getMessageScopes(final Memory memory) {
+        return Collections.emptySet();
+    }
+
+    @Override
+    public VertexProgram<Triplet<Path, Edge, Number>> clone() {
+        try {
+            final ShortestPathVertexProgram clone = (ShortestPathVertexProgram) super.clone();
+            if (null != this.edgeTraversal)
+                clone.edgeTraversal = this.edgeTraversal.clone();
+            if (null != this.sourceVertexFilterTraversal)
+                clone.sourceVertexFilterTraversal = this.sourceVertexFilterTraversal.clone();
+            if (null != this.targetVertexFilterTraversal)
+                clone.targetVertexFilterTraversal = this.targetVertexFilterTraversal.clone();
+            if (null != this.distanceTraversal)
+                clone.distanceTraversal = this.distanceTraversal.clone();
+            if (null != this.traversal) {
+                clone.traversal = this.traversal.clone();
+                for (final Step step : clone.traversal.get().getSteps()) {
+                    if (step.getId().equals(this.programStep.getId())) {
+                        //noinspection unchecked
+                        clone.programStep = step;
+                        break;
+                    }
+                }
+            }
+            return clone;
+        } catch (final CloneNotSupportedException e) {
+            throw new IllegalStateException(e.getMessage(), e);
+        }
+    }
+
+    @Override
+    public GraphComputer.ResultGraph getPreferredResultGraph() {
+        return GraphComputer.ResultGraph.ORIGINAL;
+    }
+
+    @Override
+    public GraphComputer.Persist getPreferredPersist() {
+        return GraphComputer.Persist.NOTHING;
+    }
+
+    @Override
+    public void setup(final Memory memory) {
+        memory.set(VOTE_TO_HALT, true);
+        memory.set(STATE, SEARCH);
+    }
+
+    @Override
+    public void execute(final Vertex vertex, final Messenger<Triplet<Path, Edge, Number>> messenger, final Memory memory) {
+
+        switch (memory.<Integer>get(STATE)) {
+
+            case COLLECT_PATHS:
+                collectShortestPaths(vertex, memory);
+                return;
+
+            case UPDATE_HALTED_TRAVERSERS:
+                updateHaltedTraversers(vertex, memory);
+                return;
+        }
+
+        boolean voteToHalt = true;
+
+        if (memory.isInitialIteration()) {
+
+            copyHaltedTraversersFromMemory(vertex);
+
+            if (!isStartVertex(vertex)) return;
+
+            final Map<Vertex, Pair<Number, Set<Path>>> paths = new HashMap<>();
+            final Path path;
+            final Set<Path> pathSet = new HashSet<>();
+
+            pathSet.add(path = makePath(vertex));
+            paths.put(vertex, Pair.with(0, pathSet));
+
+            vertex.property(VertexProperty.Cardinality.single, PATHS, paths);
+
+            processEdges(vertex, path, 0, messenger);
+
+            voteToHalt = false;
+
+        } else {
+
+            final Map<Vertex, Pair<Number, Set<Path>>> paths =
+                    vertex.<Map<Vertex, Pair<Number, Set<Path>>>>property(PATHS).orElseGet(HashMap::new);
+            final Iterator<Triplet<Path, Edge, Number>> iterator = messenger.receiveMessages();
+
+            while (iterator.hasNext()) {
+
+                final Triplet<Path, Edge, Number> triplet = iterator.next();
+                final Path sourcePath = triplet.getValue0();
+                final Number distance = triplet.getValue2();
+                final Vertex sourceVertex = sourcePath.get(0);
+
+                Path newPath = null;
+
+                if (paths.containsKey(sourceVertex)) {
+
+                    final Number currentShortestDistance = paths.get(sourceVertex).getValue0();
+                    final int cmp = NumberHelper.compare(distance, currentShortestDistance);
+
+                    if (cmp <= 0) {
+                        newPath = extendPath(sourcePath, triplet.getValue1(), vertex);
+                        if (cmp < 0) {
+                            final Set<Path> pathSet = new HashSet<>();
+                            pathSet.add(newPath);
+                            paths.put(sourceVertex, Pair.with(distance, pathSet));
+                        } else {
+                            paths.get(sourceVertex).getValue1().add(newPath);
+                        }
+                    }
+                } else if (!exceedsMaxDistance(distance)) {
+                    final Set<Path> pathSet = new HashSet<>();
+                    pathSet.add(newPath = extendPath(sourcePath, triplet.getValue1(), vertex));
+                    paths.put(sourceVertex, Pair.with(distance, pathSet));
+                }
+
+                if (newPath != null) {
+                    vertex.property(VertexProperty.Cardinality.single, PATHS, paths);
+                    processEdges(vertex, newPath, distance, messenger);
+                    voteToHalt = false;
+                }
+            }
+        }
+
+        memory.add(VOTE_TO_HALT, voteToHalt);
+    }
+
+    @Override
+    public boolean terminate(final Memory memory) {
+        if (memory.isInitialIteration() && this.haltedTraversersIndex != null) {
+            this.haltedTraversersIndex.clear();
+        }
+        final boolean voteToHalt = memory.get(VOTE_TO_HALT);
+        if (voteToHalt) {
+            final int state = memory.get(STATE);
+            if (state == COLLECT_PATHS) {
+                if (this.standalone) return true;
+                memory.set(STATE, UPDATE_HALTED_TRAVERSERS);
+                return false;
+            }
+            if (state == UPDATE_HALTED_TRAVERSERS) return true;
+            else memory.set(STATE, COLLECT_PATHS);
+            return false;
+        } else {
+            memory.set(VOTE_TO_HALT, true);
+            return false;
+        }
+    }
+
+    @Override
+    public String toString() {
+
+        final List<String> options = new ArrayList<>();
+        final Function<String, String> shortName = name -> name.substring(name.lastIndexOf(".") + 1);
+
+        if (!this.sourceVertexFilterTraversal.equals(DEFAULT_VERTEX_FILTER_TRAVERSAL)) {
+            options.add(shortName.apply(SOURCE_VERTEX_FILTER) + "=" + this.sourceVertexFilterTraversal.get());
+        }
+
+        if (!this.targetVertexFilterTraversal.equals(DEFAULT_VERTEX_FILTER_TRAVERSAL)) {
+            options.add(shortName.apply(TARGET_VERTEX_FILTER) + "=" + this.targetVertexFilterTraversal.get());
+        }
+
+        if (!this.edgeTraversal.equals(DEFAULT_EDGE_TRAVERSAL)) {
+            options.add(shortName.apply(EDGE_TRAVERSAL) + "=" + this.edgeTraversal.get());
+        }
+
+        if (!this.distanceTraversal.equals(DEFAULT_DISTANCE_TRAVERSAL)) {
+            options.add(shortName.apply(DISTANCE_TRAVERSAL) + "=" + this.distanceTraversal.get());
+        }
+
+        options.add(shortName.apply(INCLUDE_EDGES) + "=" + this.includeEdges);
+
+        return StringFactory.vertexProgramString(this, String.join(", ", options));
+    }
+
+    //////////////////////////////
+
+    private void copyHaltedTraversersFromMemory(final Vertex vertex) {
+        final Collection<Traverser.Admin<Vertex>> traversers = this.haltedTraversersIndex.get(vertex);
+        if (traversers != null) {
+            final TraverserSet<Vertex> newHaltedTraversers = new TraverserSet<>();
+            newHaltedTraversers.addAll(traversers);
+            vertex.property(VertexProperty.Cardinality.single, TraversalVertexProgram.HALTED_TRAVERSERS, newHaltedTraversers);
+        }
+    }
+
+
+    private static Path makePath(final Vertex newVertex) {
+        return extendPath(null, newVertex);
+    }
+
+    private static Path extendPath(final Path currentPath, final Element... elements) {
+        Path result = ImmutablePath.make();
+        if (currentPath != null) {
+            for (final Object o : currentPath.objects()) {
+                result = result.extend(o, Collections.emptySet());
+            }
+        }
+        for (final Element element : elements) {
+            if (element != null) {
+                result = result.extend(ReferenceFactory.detach(element), Collections.emptySet());
+            }
+        }
+        return result;
+    }
+
+    private boolean isStartVertex(final Vertex vertex) {
+        if (this.standalone) {
+            final Traversal.Admin<Vertex, ?> filterTraversal = this.sourceVertexFilterTraversal.getPure();
+            filterTraversal.addStart(filterTraversal.getTraverserGenerator().generate(vertex, filterTraversal.getStartStep(), 1));
+            return filterTraversal.hasNext();
+        }
+        return vertex.property(TraversalVertexProgram.HALTED_TRAVERSERS).isPresent();
+    }
+
+    private boolean isEndVertex(final Vertex vertex) {
+        final Traversal.Admin<Vertex, ?> filterTraversal = this.targetVertexFilterTraversal.getPure();
+        //noinspection unchecked
+        final Step<Vertex, Vertex> startStep = (Step<Vertex, Vertex>) filterTraversal.getStartStep();
+        filterTraversal.addStart(filterTraversal.getTraverserGenerator().generate(vertex, startStep, 1));
+        return filterTraversal.hasNext();
+    }
+
+    private void processEdges(final Vertex vertex, final Path currentPath, final Number currentDistance,
+                              final Messenger<Triplet<Path, Edge, Number>> messenger) {
+
+        final Traversal.Admin<Vertex, Edge> edgeTraversal = this.edgeTraversal.getPure();
+        edgeTraversal.addStart(edgeTraversal.getTraverserGenerator().generate(vertex, edgeTraversal.getStartStep(), 1));
+
+        while (edgeTraversal.hasNext()) {
+            final Edge edge = edgeTraversal.next();
+            final Number distance = getDistance(edge);
+
+            Vertex otherV = edge.inVertex();
+            if (otherV.equals(vertex))
+                otherV = edge.outVertex();
+
+            if (!currentPath.objects().contains(otherV)) {
+                messenger.sendMessage(MessageScope.Global.of(otherV),
+                        Triplet.with(currentPath, this.includeEdges ? edge : null,
+                                NumberHelper.add(currentDistance, distance)));
+            }
+        }
+    }
+
+    private void updateHaltedTraversers(final Vertex vertex, final Memory memory) {
+        if (isStartVertex(vertex)) {
+            final List<Path> paths = memory.get(SHORTEST_PATHS);
+            if (vertex.property(TraversalVertexProgram.HALTED_TRAVERSERS).isPresent()) {
+                final TraverserSet<Vertex> haltedTraversers = vertex.value(TraversalVertexProgram.HALTED_TRAVERSERS);
+                final TraverserSet<Path> newHaltedTraversers = new TraverserSet<>();
+                for (final Traverser.Admin<Vertex> traverser : haltedTraversers) {
+                    final Vertex v = traverser.get();
+                    for (final Path path : paths) {
+                        if (path.get(0).equals(v)) {
+                            newHaltedTraversers.add(traverser.split(path, this.programStep));
+                        }
+                    }
+                }
+                vertex.property(VertexProperty.Cardinality.single, TraversalVertexProgram.HALTED_TRAVERSERS, newHaltedTraversers);
+            }
+        }
+    }
+
+    private Number getDistance(final Edge edge) {
+        if (this.distanceEqualsNumberOfHops) return 1;
+        final Traversal.Admin<Edge, Number> traversal = this.distanceTraversal.getPure();
+        traversal.addStart(traversal.getTraverserGenerator().generate(edge, traversal.getStartStep(), 1));
+        return traversal.tryNext().orElse(0);
+    }
+
+    private boolean exceedsMaxDistance(final Number distance) {
+        // This method is used to stop the message sending for paths that exceed the specified maximum distance. Since
+        // custom distances can be negative, this method should only return true if the distance is calculated based on
+        // the number of hops.
+        return this.distanceEqualsNumberOfHops && this.maxDistance != null
+                && NumberHelper.compare(distance, this.maxDistance) > 0;
+    }
+
+    private void collectShortestPaths(final Vertex vertex, final Memory memory) {
+
+        final VertexProperty<Map<Vertex, Pair<Number, Set<Path>>>> pathProperty = vertex.property(PATHS);
+
+        if (pathProperty.isPresent()) {
+
+            final Map<Vertex, Pair<Number, Set<Path>>> paths = pathProperty.value();
+            final List<Path> result = new ArrayList<>();
+
+            for (final Pair<Number, Set<Path>> pair : paths.values()) {
+                for (final Path path : pair.getValue1()) {
+                    if (isEndVertex(vertex)) {
+                        if (this.distanceEqualsNumberOfHops ||
+                                this.maxDistance == null ||
+                                NumberHelper.compare(pair.getValue0(), this.maxDistance) <= 0) {
+                            result.add(path);
+                        }
+                    }
+                }
+            }
+
+            pathProperty.remove();
+
+            memory.add(SHORTEST_PATHS, result);
+        }
+    }
+
+    //////////////////////////////
+
+    public static Builder build() {
+        return new Builder();
+    }
+
+    @SuppressWarnings("WeakerAccess")
+    public static final class Builder extends AbstractVertexProgramBuilder<Builder> {
+
+
+        private Builder() {
+            super(ShortestPathVertexProgram.class);
+        }
+
+        public Builder source(final Traversal<Vertex, ?> sourceVertexFilter) {
+            if (null == sourceVertexFilter) throw Graph.Exceptions.argumentCanNotBeNull("sourceVertexFilter");
+            PureTraversal.storeState(this.configuration, SOURCE_VERTEX_FILTER, sourceVertexFilter.asAdmin());
+            return this;
+        }
+
+        public Builder target(final Traversal<Vertex, ?> targetVertexFilter) {
+            if (null == targetVertexFilter) throw Graph.Exceptions.argumentCanNotBeNull("targetVertexFilter");
+            PureTraversal.storeState(this.configuration, TARGET_VERTEX_FILTER, targetVertexFilter.asAdmin());
+            return this;
+        }
+
+        public Builder edgeDirection(final Direction direction) {
+            if (null == direction) throw Graph.Exceptions.argumentCanNotBeNull("direction");
+            return edgeTraversal(__.toE(direction));
+        }
+
+        public Builder edgeTraversal(final Traversal<Vertex, Edge> edgeTraversal) {
+            if (null == edgeTraversal) throw Graph.Exceptions.argumentCanNotBeNull("edgeTraversal");
+            PureTraversal.storeState(this.configuration, EDGE_TRAVERSAL, edgeTraversal.asAdmin());
+            return this;
+        }
+
+        public Builder distanceProperty(final String distance) {
+            //noinspection unchecked
+            return distance != null
+                    ? distanceTraversal(__.values(distance)) // todo: (Traversal) new ElementValueTraversal<>(distance)
+                    : distanceTraversal(DEFAULT_DISTANCE_TRAVERSAL.getPure());
+        }
+
+        public Builder distanceTraversal(final Traversal<Edge, Number> distanceTraversal) {
+            if (null == distanceTraversal) throw Graph.Exceptions.argumentCanNotBeNull("distanceTraversal");
+            PureTraversal.storeState(this.configuration, DISTANCE_TRAVERSAL, distanceTraversal.asAdmin());
+            return this;
+        }
+
+        public Builder maxDistance(final Number distance) {
+            if (null != distance)
+                this.configuration.setProperty(MAX_DISTANCE, distance);
+            else
+                this.configuration.clearProperty(MAX_DISTANCE);
+            return this;
+        }
+
+        public Builder includeEdges(final boolean include) {
+            this.configuration.setProperty(INCLUDE_EDGES, include);
+            return this;
+        }
+    }
+
+    ////////////////////////////
+
+    @Override
+    public Features getFeatures() {
+        return new Features() {
+            @Override
+            public boolean requiresGlobalMessageScopes() {
+                return true;
+            }
+
+            @Override
+            public boolean requiresVertexPropertyAddition() {
+                return true;
+            }
+        };
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b003528c/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/ShortestPath.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/ShortestPath.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/ShortestPath.java
new file mode 100644
index 0000000..b0d7815
--- /dev/null
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/ShortestPath.java
@@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.process.computer.traversal.step.map;
+
+import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
+import org.apache.tinkerpop.gremlin.structure.Direction;
+import org.apache.tinkerpop.gremlin.structure.Graph;
+
+/**
+ * Configuration options to be passed to the {@link GraphTraversal#with(String, Object)} step.
+ */
+public class ShortestPath {
+
+    /**
+     * Configures the traversal to use to filter the target vertices for all shortest paths.
+     */
+    public static final String target = Graph.Hidden.hide("tinkerpop.shortestPath.target");
+
+    /**
+     * Configures the direction or traversal to use to filter the edges traversed during the shortest path search phase.
+     */
+    public static final String edges = Graph.Hidden.hide("tinkerpop.shortestPath.edges");
+
+    /**
+     * Configures the edge property or traversal to use for shortest path distance calculations.
+     */
+    public static final String distance = Graph.Hidden.hide("tinkerpop.shortestPath.distance");
+
+    /**
+     * Configures the maximum distance for all shortest paths. Any path with a distance greater than the specified
+     * value will not be returned.
+     */
+    public static final String maxDistance = Graph.Hidden.hide("tinkerpop.shortestPath.maxDistance");
+
+    /**
+     * Configures the inclusion of edges in the shortest path computation result.
+     */
+    public static final String includeEdges = Graph.Hidden.hide("tinkerpop.shortestPath.includeEdges");
+
+    static boolean configure(final ShortestPathVertexProgramStep step, final String key, final Object value) {
+
+        if (target.equals(key)) {
+            if (value instanceof Traversal) {
+                step.setTargetVertexFilter((Traversal) value);
+                return true;
+            }
+            else throw new IllegalArgumentException("ShortestPath.target requires a Traversal as its argument");
+        }
+        else if (edges.equals(key)) {
+            if (value instanceof Traversal) {
+                step.setEdgeTraversal((Traversal) value);
+                return true;
+            }
+            else if (value instanceof Direction) {
+                step.setEdgeTraversal(__.toE((Direction) value));
+                return true;
+            }
+            else throw new IllegalArgumentException(
+                    "ShortestPath.edges requires a Traversal or a Direction as its argument");
+        }
+        else if (distance.equals(key)) {
+            if (value instanceof Traversal) {
+                step.setDistanceTraversal((Traversal) value);
+                return true;
+            }
+            else if (value instanceof String) {
+                // todo: new ElementValueTraversal((String) value)
+                step.setDistanceTraversal(__.values((String) value));
+                return true;
+            }
+            else throw new IllegalArgumentException(
+                    "ShortestPath.distance requires a Traversal or a property name as its argument");
+        }
+        else if (maxDistance.equals(key)) {
+            if (value instanceof Number) {
+                step.setMaxDistance((Number) value);
+                return true;
+            }
+            else throw new IllegalArgumentException("ShortestPath.maxDistance requires a Number as its argument");
+        }
+        else if (includeEdges.equals(key)) {
+            if (value instanceof Boolean) {
+                step.setIncludeEdges((Boolean) value);
+                return true;
+            }
+            else throw new IllegalArgumentException("ShortestPath.includeEdges requires a Boolean as its argument");
+        }
+        return false;
+    }
+}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b003528c/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/ShortestPathVertexProgramStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/ShortestPathVertexProgramStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/ShortestPathVertexProgramStep.java
new file mode 100644
index 0000000..692cb6a
--- /dev/null
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/ShortestPathVertexProgramStep.java
@@ -0,0 +1,174 @@
+/*
+ * 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.computer.traversal.step.map;
+
+import org.apache.tinkerpop.gremlin.process.computer.*;
+import org.apache.tinkerpop.gremlin.process.computer.search.path.ShortestPathVertexProgram;
+import org.apache.tinkerpop.gremlin.process.computer.traversal.TraversalVertexProgram;
+import org.apache.tinkerpop.gremlin.process.traversal.*;
+import org.apache.tinkerpop.gremlin.process.traversal.step.*;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.Parameters;
+import org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement;
+import org.apache.tinkerpop.gremlin.process.traversal.traverser.util.TraverserSet;
+import org.apache.tinkerpop.gremlin.process.traversal.util.PureTraversal;
+import org.apache.tinkerpop.gremlin.structure.Edge;
+import org.apache.tinkerpop.gremlin.structure.Graph;
+import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.tinkerpop.gremlin.structure.util.StringFactory;
+import org.apache.tinkerpop.gremlin.util.Serializer;
+
+import java.io.IOException;
+import java.util.*;
+
+/**
+ * @author Daniel Kuppitz (http://gremlin.guru)
+ */
+public final class ShortestPathVertexProgramStep extends VertexProgramStep implements TraversalParent, Configuring {
+
+    private Parameters parameters = new Parameters();
+    private PureTraversal<Vertex, ?> targetVertexFilter = ShortestPathVertexProgram.DEFAULT_VERTEX_FILTER_TRAVERSAL.clone();
+    private PureTraversal<Vertex, Edge> edgeTraversal = ShortestPathVertexProgram.DEFAULT_EDGE_TRAVERSAL.clone();
+    private PureTraversal<Edge, Number> distanceTraversal = ShortestPathVertexProgram.DEFAULT_DISTANCE_TRAVERSAL.clone();
+    private Number maxDistance;
+    private boolean includeEdges;
+
+    public ShortestPathVertexProgramStep(final Traversal.Admin<?, ?> traversal) {
+        super(traversal);
+    }
+
+    void setTargetVertexFilter(final Traversal filterTraversal) {
+        this.targetVertexFilter = new PureTraversal<>(this.integrateChild(filterTraversal.asAdmin()));
+    }
+
+    void setEdgeTraversal(final Traversal edgeTraversal) {
+        this.edgeTraversal = new PureTraversal<>(this.integrateChild(edgeTraversal.asAdmin()));
+    }
+
+    void setDistanceTraversal(final Traversal distanceTraversal) {
+        this.distanceTraversal = new PureTraversal<>(this.integrateChild(distanceTraversal.asAdmin()));
+    }
+
+    void setMaxDistance(final Number maxDistance) {
+        this.maxDistance = maxDistance;
+    }
+
+    void setIncludeEdges(final boolean includeEdges) {
+        this.includeEdges = includeEdges;
+    }
+
+    @Override
+    public void configure(final Object... keyValues) {
+        if (!ShortestPath.configure(this, (String) keyValues[0], keyValues[1])) {
+            this.parameters.set(this, keyValues);
+        }
+    }
+
+    @Override
+    public Parameters getParameters() {
+        return parameters;
+    }
+
+    @Override
+    protected Traverser.Admin<ComputerResult> processNextStart() throws NoSuchElementException {
+        return super.processNextStart();
+    }
+
+    @SuppressWarnings("unchecked")
+    @Override
+    public List<Traversal.Admin<?, ?>> getLocalChildren() {
+        return Arrays.asList(
+                this.targetVertexFilter.get(),
+                this.edgeTraversal.get(),
+                this.distanceTraversal.get());
+    }
+
+    @Override
+    public String toString() {
+        return StringFactory.stepString(this, this.targetVertexFilter.get(), this.edgeTraversal.get(),
+                this.distanceTraversal.get(), this.maxDistance, this.includeEdges, new GraphFilter(this.computer));
+    }
+
+    @Override
+    public ShortestPathVertexProgram generateProgram(final Graph graph, final Memory memory) {
+
+        final ShortestPathVertexProgram.Builder builder = ShortestPathVertexProgram.build()
+                .target(this.targetVertexFilter.getPure())
+                .edgeTraversal(this.edgeTraversal.getPure())
+                .distanceTraversal(this.distanceTraversal.getPure())
+                .maxDistance(this.maxDistance)
+                .includeEdges(this.includeEdges);
+
+        //noinspection unchecked
+        final PureTraversal pureRootTraversal = new PureTraversal<>(this.traversal);
+        Object rootTraversalValue;
+        try {
+            rootTraversalValue = Base64.getEncoder().encodeToString(Serializer.serializeObject(pureRootTraversal));
+        } catch (final IOException ignored) {
+            rootTraversalValue = pureRootTraversal;
+        }
+
+        builder.configure(
+                ProgramVertexProgramStep.ROOT_TRAVERSAL, rootTraversalValue,
+                ProgramVertexProgramStep.STEP_ID, this.id);
+
+        if (memory.exists(TraversalVertexProgram.HALTED_TRAVERSERS)) {
+            final TraverserSet<?> haltedTraversers = memory.get(TraversalVertexProgram.HALTED_TRAVERSERS);
+            if (!haltedTraversers.isEmpty()) {
+                Object haltedTraversersValue;
+                try {
+                    haltedTraversersValue = Base64.getEncoder().encodeToString(Serializer.serializeObject(haltedTraversers));
+                } catch (final IOException ignored) {
+                    haltedTraversersValue = haltedTraversers;
+                }
+                builder.configure(TraversalVertexProgram.HALTED_TRAVERSERS, haltedTraversersValue);
+            }
+        }
+
+        return builder.create(graph);
+    }
+
+    @Override
+    public Set<TraverserRequirement> getRequirements() {
+        return TraversalParent.super.getSelfAndChildRequirements();
+    }
+
+    @Override
+    public ShortestPathVertexProgramStep clone() {
+        final ShortestPathVertexProgramStep clone = (ShortestPathVertexProgramStep) super.clone();
+        clone.targetVertexFilter = this.targetVertexFilter.clone();
+        clone.edgeTraversal = this.edgeTraversal.clone();
+        clone.distanceTraversal = this.distanceTraversal.clone();
+        return clone;
+    }
+
+    @Override
+    public void setTraversal(final Traversal.Admin<?, ?> parentTraversal) {
+        super.setTraversal(parentTraversal);
+        this.integrateChild(this.targetVertexFilter.get());
+        this.integrateChild(this.edgeTraversal.get());
+        this.integrateChild(this.distanceTraversal.get());
+    }
+
+    @Override
+    public int hashCode() {
+        return super.hashCode();
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b003528c/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/RemoteGraph.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/RemoteGraph.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/RemoteGraph.java
index a7564d1..7949c73 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/RemoteGraph.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/RemoteGraph.java
@@ -61,6 +61,10 @@ import java.util.Iterator;
         method = "*",
         reason = "hmmmm")
 @Graph.OptOut(
+        test = "org.apache.tinkerpop.gremlin.process.traversal.step.map.ShortestPathTest",
+        method = "*",
+        reason = "hmmmm")
+@Graph.OptOut(
         test = "org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.TranslationStrategyProcessTest",
         method = "*",
         reason = "hmmmm")
@@ -89,6 +93,10 @@ import java.util.Iterator;
         method = "*",
         reason = "RemoteGraph does not support direct Graph.compute() access")
 @Graph.OptOut(
+        test = "org.apache.tinkerpop.gremlin.process.computer.search.path.ShortestPathVertexProgramTest",
+        method = "*",
+        reason = "RemoteGraph does not support direct Graph.compute() access")
+@Graph.OptOut(
         test = "org.apache.tinkerpop.gremlin.process.computer.bulkloading.BulkLoaderVertexProgramTest",
         method = "*",
         reason = "RemoteGraph does not support direct Graph.compute() access")

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b003528c/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Traversal.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Traversal.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Traversal.java
index 220c995..30435ab 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Traversal.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Traversal.java
@@ -496,15 +496,17 @@ public interface Traversal<S, E> extends Iterator<E>, Serializable, Cloneable, A
         public void setGraph(final Graph graph);
 
         public default boolean equals(final Traversal.Admin<S, E> other) {
-            final List<Step> steps = this.getSteps();
-            final List<Step> otherSteps = other.getSteps();
-            if (steps.size() == otherSteps.size()) {
-                for (int i = 0; i < steps.size(); i++) {
-                    if (!steps.get(i).equals(otherSteps.get(i))) {
-                        return false;
+            if (this.getClass().equals(other.getClass())) {
+                final List<Step> steps = this.getSteps();
+                final List<Step> otherSteps = other.getSteps();
+                if (steps.size() == otherSteps.size()) {
+                    for (int i = 0; i < steps.size(); i++) {
+                        if (!steps.get(i).equals(otherSteps.get(i))) {
+                            return false;
+                        }
                     }
+                    return true;
                 }
-                return true;
             }
             return false;
         }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b003528c/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 63aa65d..8822434 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
@@ -22,6 +22,7 @@ import org.apache.tinkerpop.gremlin.process.computer.VertexProgram;
 import org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.PageRankVertexProgramStep;
 import org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.PeerPressureVertexProgramStep;
 import org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.ProgramVertexProgramStep;
+import org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.ShortestPathVertexProgramStep;
 import org.apache.tinkerpop.gremlin.process.traversal.Order;
 import org.apache.tinkerpop.gremlin.process.traversal.P;
 import org.apache.tinkerpop.gremlin.process.traversal.Path;
@@ -2450,6 +2451,24 @@ public interface GraphTraversal<S, E> extends Traversal<S, E> {
     }
 
     /**
+     * Executes a Shortest Path algorithm over the graph.
+     *
+     * @return the traversal with the appended {@link ShortestPathVertexProgramStep}
+     * @see <a href="http://tinkerpop.apache.org/docs/${project.version}/reference/#shortestpath-step" target="_blank">Reference Documentation - ShortestPath Step</a>
+     */
+    public default GraphTraversal<S, Path> shortestPath() {
+        if (this.asAdmin().getEndStep() instanceof GraphStep) {
+            // This is very unfortunate, but I couldn't find another way to make it work. Without the additional
+            // IdentityStep, TraversalVertexProgram doesn't handle halted traversers as expected (it ignores both:
+            // HALTED_TRAVERSER stored in memory and stored as vertex properties); instead it just emits all vertices.
+            this.identity();
+        }
+        this.asAdmin().getBytecode().addStep(Symbols.shortestPath);
+        return (GraphTraversal<S, Path>) ((Traversal.Admin) this.asAdmin())
+                .addStep(new ShortestPathVertexProgramStep(this.asAdmin()));
+    }
+
+    /**
      * Executes an arbitrary {@link VertexProgram} over the graph.
      *
      * @return the traversal with the appended {@link ProgramVertexProgramStep}
@@ -2845,6 +2864,7 @@ public interface GraphTraversal<S, E> extends Traversal<S, E> {
 
         public static final String pageRank = "pageRank";
         public static final String peerPressure = "peerPressure";
+        public static final String shortestPath = "shortestPath";
         public static final String program = "program";
 
         public static final String by = "by";

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b003528c/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/lambda/ColumnTraversal.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/lambda/ColumnTraversal.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/lambda/ColumnTraversal.java
index 5023805..9e2f31c 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/lambda/ColumnTraversal.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/lambda/ColumnTraversal.java
@@ -22,6 +22,8 @@ package org.apache.tinkerpop.gremlin.process.traversal.lambda;
 import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
 import org.apache.tinkerpop.gremlin.structure.Column;
 
+import java.util.Objects;
+
 /**
  * @author Marko A. Rodriguez (http://markorodriguez.com)
  */
@@ -57,4 +59,10 @@ public final class ColumnTraversal extends AbstractLambdaTraversal {
     public int hashCode() {
         return this.getClass().hashCode() ^ this.column.hashCode();
     }
+
+    @Override
+    public boolean equals(final Object other) {
+        return other instanceof ColumnTraversal
+                && Objects.equals(((ColumnTraversal) other).column, this.column);
+    }
 }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b003528c/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/lambda/ConstantTraversal.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/lambda/ConstantTraversal.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/lambda/ConstantTraversal.java
index 91973b9..bcf82d4 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/lambda/ConstantTraversal.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/lambda/ConstantTraversal.java
@@ -18,6 +18,8 @@
  */
 package org.apache.tinkerpop.gremlin.process.traversal.lambda;
 
+import java.util.Objects;
+
 /**
  * @author Marko A. Rodriguez (http://markorodriguez.com)
  */
@@ -43,5 +45,10 @@ public final class ConstantTraversal<S, E> extends AbstractLambdaTraversal<S, E>
     public int hashCode() {
         return this.getClass().hashCode() ^ this.end.hashCode();
     }
-}
 
+    @Override
+    public boolean equals(final Object other) {
+        return other instanceof ConstantTraversal
+                && Objects.equals(((ConstantTraversal) other).end, this.end);
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b003528c/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/lambda/ElementValueTraversal.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/lambda/ElementValueTraversal.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/lambda/ElementValueTraversal.java
index 2e9b26c..fbfff62 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/lambda/ElementValueTraversal.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/lambda/ElementValueTraversal.java
@@ -22,6 +22,8 @@ import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
 import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalUtil;
 import org.apache.tinkerpop.gremlin.structure.Element;
 
+import java.util.Objects;
+
 /**
  * @author Marko A. Rodriguez (http://markorodriguez.com)
  */
@@ -62,4 +64,10 @@ public final class ElementValueTraversal<V> extends AbstractLambdaTraversal<Elem
     public int hashCode() {
         return super.hashCode() ^ this.propertyKey.hashCode();
     }
-}
+
+    @Override
+    public boolean equals(final Object other) {
+        return other instanceof ElementValueTraversal
+                && Objects.equals(((ElementValueTraversal) other).propertyKey, this.propertyKey);
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b003528c/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/lambda/IdentityTraversal.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/lambda/IdentityTraversal.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/lambda/IdentityTraversal.java
index 98f85c0..1ed5749 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/lambda/IdentityTraversal.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/lambda/IdentityTraversal.java
@@ -41,4 +41,9 @@ public final class IdentityTraversal<S> extends AbstractLambdaTraversal<S, S> {
     public String toString() {
         return "identity";
     }
-}
+
+    @Override
+    public boolean equals(final Object other) {
+        return other instanceof IdentityTraversal;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b003528c/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/lambda/LoopTraversal.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/lambda/LoopTraversal.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/lambda/LoopTraversal.java
index ae03c94..68b6b18 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/lambda/LoopTraversal.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/lambda/LoopTraversal.java
@@ -55,4 +55,10 @@ public final class LoopTraversal<S> extends AbstractLambdaTraversal<S, S> {
     public int hashCode() {
         return this.getClass().hashCode() ^ Long.hashCode(this.maxLoops);
     }
+
+    @Override
+    public boolean equals(final Object other) {
+        return other instanceof LoopTraversal
+                && ((LoopTraversal) other).maxLoops == this.maxLoops;
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b003528c/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/lambda/TokenTraversal.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/lambda/TokenTraversal.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/lambda/TokenTraversal.java
index 4f98a54..d41c402 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/lambda/TokenTraversal.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/lambda/TokenTraversal.java
@@ -22,6 +22,8 @@ import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
 import org.apache.tinkerpop.gremlin.structure.Element;
 import org.apache.tinkerpop.gremlin.structure.T;
 
+import java.util.Objects;
+
 /**
  * @author Marko A. Rodriguez (http://markorodriguez.com)
  */
@@ -57,4 +59,10 @@ public final class TokenTraversal<S extends Element, E> extends AbstractLambdaTr
     public int hashCode() {
         return this.getClass().hashCode() ^ this.t.hashCode();
     }
+
+    @Override
+    public boolean equals(final Object other) {
+        return other instanceof TokenTraversal
+                && Objects.equals(((TokenTraversal) other).t, this.t);
+    }
 }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b003528c/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/lambda/TrueTraversal.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/lambda/TrueTraversal.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/lambda/TrueTraversal.java
index 84c0db6..71580ce 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/lambda/TrueTraversal.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/lambda/TrueTraversal.java
@@ -43,4 +43,9 @@ public final class TrueTraversal<S> extends AbstractLambdaTraversal<S, S> {
     public TrueTraversal<S> clone() {
         return INSTANCE;
     }
+
+    @Override
+    public boolean equals(final Object other) {
+        return other instanceof TrueTraversal;
+    }
 }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b003528c/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..1bccd7c 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
@@ -129,7 +129,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");

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b003528c/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 e7dfd93..6d55704 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
@@ -114,10 +114,10 @@ import org.apache.tinkerpop.gremlin.util.function.MultiComparator;
 import org.apache.tinkerpop.shaded.kryo.ClassResolver;
 import org.apache.tinkerpop.shaded.kryo.KryoSerializable;
 import org.apache.tinkerpop.shaded.kryo.serializers.JavaSerializer;
-import org.javatuples.Pair;
 import org.apache.tinkerpop.gremlin.process.traversal.traverser.util.LabelledCounter;
 import org.apache.commons.collections.map.ReferenceMap;
-import java.util.Stack;
+import org.javatuples.Pair;
+import org.javatuples.Triplet;
 
 import java.math.BigDecimal;
 import java.math.BigInteger;
@@ -154,6 +154,7 @@ import java.util.LinkedList;
 import java.util.List;
 import java.util.Locale;
 import java.util.Optional;
+import java.util.Stack;
 import java.util.TimeZone;
 import java.util.TreeMap;
 import java.util.TreeSet;
@@ -356,6 +357,7 @@ public enum GryoVersion {
             add(GryoTypeReg.of(MapReduce.NullObject.class, 74));
             add(GryoTypeReg.of(AtomicLong.class, 79));
             add(GryoTypeReg.of(Pair.class, 88, new UtilSerializers.PairSerializer()));
+            add(GryoTypeReg.of(Triplet.class, 183, new UtilSerializers.TripletSerializer()));                 // ***LAST ID***
             add(GryoTypeReg.of(TraversalExplanation.class, 106, new JavaSerializer()));
 
             add(GryoTypeReg.of(Duration.class, 93, new JavaTimeSerializers.DurationSerializer()));
@@ -393,8 +395,7 @@ public enum GryoVersion {
             add(GryoTypeReg.of(LP_NL_O_OB_P_S_SE_SL_Traverser.class, 179));
             add(GryoTypeReg.of(LabelledCounter.class, 180));
             add(GryoTypeReg.of(Stack.class, 181));
-            add(GryoTypeReg.of(ReferenceMap.class, 182));                        // ***LAST ID***
-
+            add(GryoTypeReg.of(ReferenceMap.class, 182));
 
             // 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
@@ -520,6 +521,7 @@ public enum GryoVersion {
             add(GryoTypeReg.of(MapReduce.NullObject.class, 74));
             add(GryoTypeReg.of(AtomicLong.class, 79));
             add(GryoTypeReg.of(Pair.class, 88, new UtilSerializers.PairSerializer()));
+            add(GryoTypeReg.of(Triplet.class, 183, new UtilSerializers.TripletSerializer()));                 // ***LAST ID***
             add(GryoTypeReg.of(TraversalExplanation.class, 106, new JavaSerializer()));
 
             add(GryoTypeReg.of(Duration.class, 93, new JavaTimeSerializers.DurationSerializer()));
@@ -583,7 +585,7 @@ public enum GryoVersion {
             add(GryoTypeReg.of(LP_NL_O_OB_P_S_SE_SL_Traverser.class, 179));
             add(GryoTypeReg.of(LabelledCounter.class, 180));
             add(GryoTypeReg.of(Stack.class, 181));
-            add(GryoTypeReg.of(ReferenceMap.class, 182));                        // ***LAST ID***
+            add(GryoTypeReg.of(ReferenceMap.class, 182));
         }};
     }
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b003528c/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/UtilSerializers.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/UtilSerializers.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/UtilSerializers.java
index 5182e6c..aff6059 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/UtilSerializers.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/UtilSerializers.java
@@ -28,6 +28,7 @@ import org.apache.tinkerpop.shaded.kryo.Serializer;
 import org.apache.tinkerpop.shaded.kryo.io.Input;
 import org.apache.tinkerpop.shaded.kryo.io.Output;
 import org.javatuples.Pair;
+import org.javatuples.Triplet;
 
 import java.net.InetAddress;
 import java.net.URI;
@@ -216,6 +217,20 @@ final class UtilSerializers {
         }
     }
 
+    static final class TripletSerializer implements SerializerShim<Triplet> {
+        @Override
+        public <O extends OutputShim> void write(final KryoShim<?, O> kryo, final O output, final Triplet triplet) {
+            kryo.writeClassAndObject(output, triplet.getValue0());
+            kryo.writeClassAndObject(output, triplet.getValue1());
+            kryo.writeClassAndObject(output, triplet.getValue2());
+        }
+
+        @Override
+        public <I extends InputShim> Triplet read(final KryoShim<I, ?> kryo, final I input, final Class<Triplet> tripletClass) {
+            return Triplet.with(kryo.readClassAndObject(input), kryo.readClassAndObject(input), kryo.readClassAndObject(input));
+        }
+    }
+
     static final class EntrySerializer extends Serializer<Map.Entry> {
         @Override
         public void write(final Kryo kryo, final Output output, final Map.Entry entry) {

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b003528c/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/Attachable.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/Attachable.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/Attachable.java
index fa999aa..3cd76f2 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/Attachable.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/Attachable.java
@@ -26,6 +26,7 @@ import org.apache.tinkerpop.gremlin.structure.Property;
 import org.apache.tinkerpop.gremlin.structure.T;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.apache.tinkerpop.gremlin.structure.VertexProperty;
+import org.apache.tinkerpop.gremlin.structure.util.empty.EmptyGraph;
 
 import java.util.Iterator;
 import java.util.Optional;
@@ -70,7 +71,7 @@ public interface Attachable<V> {
      */
     public static class Method {
         public static <V> Function<Attachable<V>, V> get(final Host hostVertexOrGraph) {
-            return (Attachable<V> attachable) -> {
+            return hostVertexOrGraph instanceof EmptyGraph ? Attachable::get : (Attachable<V> attachable) -> {
                 final Object base = attachable.get();
                 if (base instanceof Vertex) {
                     final Optional<Vertex> optional = hostVertexOrGraph instanceof Graph ?

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b003528c/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 9009d0b..d621755 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", "with", "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", "shortestPath", "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/b003528c/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 990bc14..318857b 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
@@ -1377,6 +1377,15 @@ namespace Gremlin.Net.Process.Traversal
         }
 
         /// <summary>
+        ///     Adds the shortestPath step to this <see cref="GraphTraversal{SType, EType}" />.
+        /// </summary>
+        public GraphTraversal<S, Path> ShortestPath ()
+        {
+            Bytecode.AddStep("shortestPath");
+            return Wrap<S, Path>(this);
+        }
+
+        /// <summary>
         ///     Adds the sideEffect step to this <see cref="GraphTraversal{SType, EType}" />.
         /// </summary>
         public GraphTraversal<S, E> SideEffect (IConsumer consumer)
@@ -1703,14 +1712,5 @@ 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 (string key, object value)
-        {
-            Bytecode.AddStep("with", key, value);
-            return Wrap<S, E>(this);
-        }
-
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b003528c/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 f143542..b139c9f 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
@@ -933,6 +933,16 @@ class GraphTraversal extends Traversal {
   }
   
   /**
+   * Graph traversal shortestPath method.
+   * @param {...Object} args
+   * @returns {GraphTraversal}
+   */
+  shortestPath(...args) {
+    this.bytecode.addStep('shortestPath', args);
+    return this;
+  }
+  
+  /**
    * Graph traversal sideEffect method.
    * @param {...Object} args
    * @returns {GraphTraversal}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b003528c/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 bb81d87..518ef13 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
@@ -425,6 +425,10 @@ class GraphTraversal(Traversal):
         self.bytecode.add_step("select", *args)
         return self
 
+    def shortestPath(self, *args):
+        self.bytecode.add_step("shortestPath", *args)
+        return self
+
     def sideEffect(self, *args):
         self.bytecode.add_step("sideEffect", *args)
         return self

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b003528c/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinTest.java
index 7ca44ba..6a2b700 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinTest.java
@@ -180,6 +180,10 @@ public abstract class AbstractGremlinTest {
         return convertToVertex(graph, vertexName).id();
     }
 
+    public Vertex convertToVertex(final String vertexName) {
+        return convertToVertex(graph, vertexName);
+    }
+
     public Vertex convertToVertex(final Graph graph, final String vertexName) {
         // all test graphs have "name" as a unique id which makes it easy to hardcode this...works for now
         return graph.traversal().V().has("name", vertexName).next();
@@ -249,7 +253,7 @@ public abstract class AbstractGremlinTest {
     public void printTraversalForm(final Traversal traversal) {
         logger.info(String.format("Testing: %s", name.getMethodName()));
         logger.info("   pre-strategy:" + traversal);
-        traversal.hasNext();
+        if (!traversal.asAdmin().isLocked()) traversal.asAdmin().applyStrategies();
         logger.info("  post-strategy:" + traversal);
         verifyUniqueStepIds(traversal.asAdmin());
     }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b003528c/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/AbstractGremlinProcessTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/AbstractGremlinProcessTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/AbstractGremlinProcessTest.java
index 2861724..e15fff8 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/AbstractGremlinProcessTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/AbstractGremlinProcessTest.java
@@ -119,7 +119,7 @@ public abstract class AbstractGremlinProcessTest extends AbstractGremlinTest {
 
     public static <T> void checkResults(final List<T> expectedResults, final Traversal<?, T> traversal) {
         final List<T> results = traversal.toList();
-        assertFalse(traversal.hasNext());
+        assertThat(traversal.hasNext(), is(false));
         if (expectedResults.size() != results.size()) {
             logger.error("Expected results: " + expectedResults);
             logger.error("Actual results:   " + results);
@@ -128,20 +128,19 @@ public abstract class AbstractGremlinProcessTest extends AbstractGremlinTest {
 
         for (T t : results) {
             if (t instanceof Map) {
-                assertThat("Checking map result existence: " + t, expectedResults.stream().filter(e -> e instanceof Map).filter(e -> internalCheckMap((Map) e, (Map) t)).findAny().isPresent(), is(true));
+                assertThat("Checking map result existence: " + t, expectedResults.stream().anyMatch(e -> e instanceof Map && internalCheckMap((Map) e, (Map) t)), is(true));
             } else if (t instanceof List) {
-                assertThat("Checking list result existence: " + t, expectedResults.stream().filter(e -> e instanceof List).filter(e -> internalCheckList((List) e, (List) t)).findAny().isPresent(), is(true));
+                assertThat("Checking list result existence: " + t, expectedResults.stream().anyMatch(e -> e instanceof List && internalCheckList((List) e, (List) t)), is(true));
             } else {
                 assertThat("Checking result existence: " + t, expectedResults.contains(t), is(true));
             }
         }
         final Map<T, Long> expectedResultsCount = new HashMap<>();
         final Map<T, Long> resultsCount = new HashMap<>();
+        expectedResults.forEach(t -> MapHelper.incr(expectedResultsCount, t, 1L));
+        results.forEach(t -> MapHelper.incr(resultsCount, t, 1L));
         assertEquals("Checking indexing is equivalent", expectedResultsCount.size(), resultsCount.size());
-        expectedResults.forEach(t -> MapHelper.incr(expectedResultsCount, t, 1l));
-        results.forEach(t -> MapHelper.incr(resultsCount, t, 1l));
         expectedResultsCount.forEach((k, v) -> assertEquals("Checking result group counts", v, resultsCount.get(k)));
-        assertThat(traversal.hasNext(), is(false));
     }
 
     public static <T> void checkResults(final Map<T, Long> expectedResults, final Traversal<?, T> traversal) {


[24/50] [abbrv] tinkerpop git commit: Added GLV specific warnings in the step docs to point out step naming differences CTR

Posted by dk...@apache.org.
Added GLV specific warnings in the step docs to point out step naming differences CTR


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

Branch: refs/heads/TINKERPOP-1990
Commit: f56a3e724e08c33b55b0d131438db66b95c4e54d
Parents: 9986493
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Jul 25 08:58:41 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Jul 25 08:58:41 2018 -0400

----------------------------------------------------------------------
 docs/src/reference/gremlin-variants.asciidoc |  2 +-
 docs/src/reference/the-traversal.asciidoc    | 63 +++++++++++++++++++++++
 2 files changed, 64 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f56a3e72/docs/src/reference/gremlin-variants.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/gremlin-variants.asciidoc b/docs/src/reference/gremlin-variants.asciidoc
index 04090b5..e8b4c21 100644
--- a/docs/src/reference/gremlin-variants.asciidoc
+++ b/docs/src/reference/gremlin-variants.asciidoc
@@ -88,7 +88,7 @@ link:https://en.wikipedia.org/wiki/CPython[CPython] machine. Python's syntax has
 namespaces (`a(b())` vs `a(__.b())`). As such, anyone familiar with Gremlin-Java will immediately be able to work
 with Gremlin-Python. Moreover, there are a few added constructs to Gremlin-Python that make traversals a bit more succinct.
 
-WARNING: In Python, `as`, `in`, `and`, `or`, `is`, `not`, `from`, and `global` are reserved words. Gremlin-Python simply
+WARNING: In Python, `and`, `as`, `from`, `global`, `in`, `is`, `not`, and `or` are reserved words. Gremlin-Python simply
 postfixes `_` to the end of these terms for their use with graph traversal. For instance: `g.V().as_('a').in_().as_('b').select('a','b')`.
 
 To install Gremlin-Python, use Python's link:https://en.wikipedia.org/wiki/Pip_(package_manager)[pip] package manager.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f56a3e72/docs/src/reference/the-traversal.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc
index 8cc6ac0..057ec6a 100644
--- a/docs/src/reference/the-traversal.asciidoc
+++ b/docs/src/reference/the-traversal.asciidoc
@@ -315,6 +315,11 @@ link:++http://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/grem
 
 The `and()`-step ensures that all provided traversals yield a result (*filter*). Please see <<or-step,`or()`>> for or-semantics.
 
+[NOTE, caption=Python]
+====
+The term `and` is a reserved word in Python, and therefore must be referred to in Gremlin with `and_()`.
+====
+
 [gremlin-groovy,modern]
 ----
 g.V().and(
@@ -345,6 +350,17 @@ The `as()`-step is not a real step, but a "step modulator" similar to <<by-step,
 With `as()`, it is possible to provide a label to the step that can later be accessed by steps and data structures
 that make use of such labels -- e.g., <<select-step,`select()`>>, <<match-step,`match()`>>, and path.
 
+[NOTE, caption=Groovy]
+====
+The term `as` is a reserved word in Groovy, and when therefore used as part of an anonymous traversal must be referred
+to in Gremlin with the double underscore `__.as()`.
+====
+
+[NOTE, caption=Python]
+====
+The term `as` is a reserved word in Python, and therefore must be referred to in Gremlin with `as_()`.
+====
+
 [gremlin-groovy,modern]
 ----
 g.V().as('a').out('created').as('b').select('a','b')            <1>
@@ -809,6 +825,16 @@ means by which they are added. The general pattern is `step().from()`. See <<to-
 The list of steps that support `from()`-modulation are: <<simplepath-step,`simplePath()`>>, <<cyclicpath-step,`cyclicPath()`>>,
  <<path-step,`path()`>>, and <<addedge-step,`addE()`>>.
 
+[NOTE, caption=Javasacript]
+====
+The term `from` is a reserved word in Javascript, and therefore must be referred to in Gremlin with `from_()`.
+====
+
+[NOTE, caption=Python]
+====
+The term `from` is a reserved word in Python, and therefore must be referred to in Gremlin with `from_()`.
+====
+
 *Additional References*
 
 link:++http://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.html#from-java.lang.String-++[`from(String)`],
@@ -1045,6 +1071,11 @@ link:++http://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/grem
 
 It is possible to filter scalar values using `is()`-step (*filter*).
 
+[NOTE, caption=Python]
+====
+The term `is` is a reserved word in Python, and therefore must be referred to in Gremlin with `is_()`.
+====
+
 [gremlin-groovy,modern]
 ----
 g.V().values('age').is(32)
@@ -1482,6 +1513,17 @@ link:++http://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/grem
 The `not()`-step (*filter*) removes objects from the traversal stream when the traversal provided as an argument
 returns an object.
 
+[NOTE, caption=Groovy]
+====
+The term `not` is a reserved word in Groovy, and when therefore used as part of an anonymous traversal must be referred
+to in Gremlin with the double underscore `__.not()`.
+====
+
+[NOTE, caption=Python]
+====
+The term `not` is a reserved word in Python, and therefore must be referred to in Gremlin with `not_()`.
+====
+
 [gremlin-groovy,modern]
 ----
 g.V().not(hasLabel('person')).valueMap(true)
@@ -1539,6 +1581,11 @@ link:++http://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/grem
 The `or()`-step ensures that at least one of the provided traversals yield a result (*filter*). Please see
 <<and-step,`and()`>> for and-semantics.
 
+[NOTE, caption=Python]
+====
+The term `or` is a reserved word in Python, and therefore must be referred to in Gremlin with `or_()`.
+====
+
 [gremlin-groovy,modern]
 ----
 g.V().or(
@@ -2773,6 +2820,22 @@ graph -- i.e. traverse.
 * `bothV()`: Move to both vertices.
 * `otherV()` : Move to the vertex that was not the vertex that was moved from.
 
+[NOTE, caption=Groovy]
+====
+The term `in` is a reserved word in Groovy, and when therefore used as part of an anonymous traversal must be referred
+to in Gremlin with the double underscore `__.in()`.
+====
+
+[NOTE, caption=Javascript]
+====
+The term `in` is a reserved word in Python, and therefore must be referred to in Gremlin with `in_()`.
+====
+
+[NOTE, caption=Python]
+====
+The term `in` is a reserved word in Python, and therefore must be referred to in Gremlin with `in_()`.
+====
+
 [gremlin-groovy,modern]
 ----
 g.V(4)


[30/50] [abbrv] tinkerpop git commit: Fixed a problem with writing GraphSON Date in js CTR

Posted by dk...@apache.org.
Fixed a problem with writing GraphSON Date in js CTR


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

Branch: refs/heads/TINKERPOP-1990
Commit: fd643609a8d469130c89dde94d50b66ef0fadf0f
Parents: db46c0f
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Jul 25 11:30:33 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Jul 25 11:30:33 2018 -0400

----------------------------------------------------------------------
 .../gremlin-javascript/lib/structure/io/type-serializers.js   | 2 +-
 .../javascript/gremlin-javascript/test/unit/graphson-test.js  | 7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/fd643609/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js
----------------------------------------------------------------------
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js
index 4bc2935..fdf049f 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js
@@ -65,7 +65,7 @@ class DateSerializer extends TypeSerializer {
   serialize(item) {
     return {
       [typeKey]: 'g:Date',
-      [valueKey]: item.value.getTime()
+      [valueKey]: item.getTime()
     };
   }
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/fd643609/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphson-test.js
----------------------------------------------------------------------
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphson-test.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphson-test.js
index 8f749f7..b459407 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphson-test.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphson-test.js
@@ -50,8 +50,6 @@ describe('GraphSONReader', function () {
     const obj = { "@type" : "g:Date", "@value" : 1481750076295 };
     const reader = new GraphSONReader();
     const result = reader.read(obj);
-    console.log("++++++++++++++++++++++++++" + obj);
-    console.log("++++++++++++++++++++++++++" + result);
     assert.ok(result instanceof Date);
   });
   it('should parse vertices from GraphSON', function () {
@@ -104,6 +102,11 @@ describe('GraphSONWriter', function () {
     const writer = new GraphSONWriter();
     assert.strictEqual(writer.write(2), '2');
   });
+  it('should write Date', function() {
+    const writer = new GraphSONWriter();
+    const expected = JSON.stringify({ "@type" : "g:Date", "@value" : 1481750076295 });
+    assert.strictEqual(writer.write(new Date(1481750076295)), expected);
+  });
   it('should write boolean values', function () {
     const writer = new GraphSONWriter();
     assert.strictEqual(writer.write(true), 'true');


[10/50] [abbrv] tinkerpop git commit: Merge branch 'tp32' into tp33

Posted by dk...@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/05432a79
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/05432a79
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/05432a79

Branch: refs/heads/TINKERPOP-1990
Commit: 05432a79296dd6154233a2b62685dbf60f9eb16f
Parents: b757173 ec561d8
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Sun Jul 22 15:11:05 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Sun Jul 22 15:11:05 2018 -0400

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


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/05432a79/docs/src/recipes/collections.asciidoc
----------------------------------------------------------------------


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

Posted by dk...@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/f9f0112f
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/f9f0112f
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/f9f0112f

Branch: refs/heads/TINKERPOP-1990
Commit: f9f0112f2e0e1899223754a9f0cb1377836dd685
Parents: 398ab9c a7aed51
Author: Jorge Bay Gondra <jo...@gmail.com>
Authored: Fri Jul 20 10:27:20 2018 +0200
Committer: Jorge Bay Gondra <jo...@gmail.com>
Committed: Fri Jul 20 10:27:20 2018 +0200

----------------------------------------------------------------------
 .../src/main/javascript/gremlin-javascript/index.js               | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------



[35/50] [abbrv] tinkerpop git commit: Merge branch 'tp33'

Posted by dk...@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/5f912eab
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/5f912eab
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/5f912eab

Branch: refs/heads/TINKERPOP-1990
Commit: 5f912eab0ff53f7301ff87cef2fd05eb4dda0a34
Parents: c2ffd94 445a8bf
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Jul 25 12:26:00 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Jul 25 12:26:00 2018 -0400

----------------------------------------------------------------------
 .../Gherkin/GherkinTestRunner.cs                       |  3 +--
 .../Gherkin/IgnoreException.cs                         |  3 ---
 .../gremlin-javascript/test/cucumber/feature-steps.js  |  3 +--
 gremlin-python/src/main/jython/radish/feature_steps.py |  2 +-
 gremlin-test/features/map/Select.feature               | 13 +++++--------
 5 files changed, 8 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5f912eab/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
----------------------------------------------------------------------

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


[49/50] [abbrv] tinkerpop git commit: TINKERPOP-1990 Implemented `ShortestPathVertexProgram` and `ShortestPathVertexProgramStep`.

Posted by dk...@apache.org.
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b003528c/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessComputerSuite.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessComputerSuite.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessComputerSuite.java
index b224c8b..57b05bd 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessComputerSuite.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessComputerSuite.java
@@ -26,6 +26,7 @@ import org.apache.tinkerpop.gremlin.process.computer.bulkloading.BulkLoaderVerte
 import org.apache.tinkerpop.gremlin.process.computer.clone.CloneVertexProgramTest;
 import org.apache.tinkerpop.gremlin.process.computer.clustering.peerpressure.PeerPressureVertexProgramTest;
 import org.apache.tinkerpop.gremlin.process.computer.ranking.pagerank.PageRankVertexProgramTest;
+import org.apache.tinkerpop.gremlin.process.computer.search.path.ShortestPathVertexProgramTest;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalInterruptionComputerTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.ComplexTest;
@@ -70,6 +71,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.map.ProfileTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.ProgramTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.ProjectTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.PropertiesTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.ShortestPathTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.SelectTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.SumTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.UnfoldTest;
@@ -163,6 +165,7 @@ public class ProcessComputerSuite extends AbstractGremlinSuite {
             ProjectTest.Traversals.class,
             ProgramTest.Traversals.class,
             PropertiesTest.Traversals.class,
+            ShortestPathTest.Traversals.class,
             SelectTest.Traversals.class,
             UnfoldTest.Traversals.class,
             ValueMapTest.Traversals.class,
@@ -190,6 +193,7 @@ public class ProcessComputerSuite extends AbstractGremlinSuite {
             // algorithms
             PageRankVertexProgramTest.class,
             PeerPressureVertexProgramTest.class,
+            ShortestPathVertexProgramTest.class,
             BulkLoaderVertexProgramTest.class,
             BulkDumperVertexProgramTest.class,
             CloneVertexProgramTest.class,
@@ -254,6 +258,7 @@ public class ProcessComputerSuite extends AbstractGremlinSuite {
             ProjectTest.class,
             ProgramTest.class,
             PropertiesTest.class,
+            ShortestPathTest.class,
             SelectTest.class,
             UnfoldTest.class,
             ValueMapTest.class,

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b003528c/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/search/path/ShortestPathTestHelper.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/search/path/ShortestPathTestHelper.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/search/path/ShortestPathTestHelper.java
new file mode 100644
index 0000000..7f3aa63
--- /dev/null
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/search/path/ShortestPathTestHelper.java
@@ -0,0 +1,100 @@
+/*
+ * 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.computer.search.path;
+
+import org.apache.tinkerpop.gremlin.process.AbstractGremlinProcessTest;
+import org.apache.tinkerpop.gremlin.process.traversal.P;
+import org.apache.tinkerpop.gremlin.process.traversal.Path;
+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.util.ImmutablePath;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.MapHelper;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.MutablePath;
+import org.apache.tinkerpop.gremlin.structure.Edge;
+import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.hamcrest.Matchers;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import static org.hamcrest.Matchers.equalTo;
+import static org.hamcrest.Matchers.is;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThat;
+
+/**
+ * @author Daniel Kuppitz (http://gremlin.guru)
+ */
+public class ShortestPathTestHelper {
+
+    private final AbstractGremlinProcessTest test;
+    private final GraphTraversalSource g;
+    private final Map<String, Vertex> vertexCache;
+    private final Map<Object, Map<Object, Edge>> edgeCache;
+
+    public ShortestPathTestHelper(final AbstractGremlinProcessTest test, final GraphTraversalSource g) {
+        this.test = test;
+        this.g = g;
+        this.vertexCache = new HashMap<>();
+        this.edgeCache = new HashMap<>();
+    }
+
+    public void checkResults(final List<Path> expected, final List<Path> actual) {
+        AbstractGremlinProcessTest.checkResults(expected, __.inject(actual.toArray(new Path[actual.size()])));
+    }
+
+    public Path makePath(final String... names) {
+        return makePath(false, names);
+    }
+
+    public Path makePath(final boolean includeEdges, final String... names) {
+        Path path = ImmutablePath.make();
+        boolean first = true;
+        for (final String name : names) {
+            final Vertex vertex = vertexCache.computeIfAbsent(name, test::convertToVertex);
+            if (!first) {
+                if (includeEdges) {
+                    final Object id1 = ((Vertex) path.get(path.size() - 1)).id();
+                    final Object id2 = vertex.id();
+                    final Edge edge;
+                    if (edgeCache.containsKey(id1)) {
+                        edge = edgeCache.get(id1).computeIfAbsent(id2, id -> getEdge(id1, id));
+                    } else if (edgeCache.containsKey(id2)) {
+                        edge = edgeCache.get(id2).computeIfAbsent(id1, id -> getEdge(id, id2));
+                    } else {
+                        edgeCache.put(id1, new HashMap<>());
+                        edgeCache.get(id1).put(id2, edge = getEdge(id1, id2));
+                    }
+                    path = path.extend(edge, Collections.emptySet());
+                }
+            }
+            path = path.extend(vertex, Collections.emptySet());
+            first = false;
+        }
+        return path;
+    }
+
+    private Edge getEdge(final Object id1, final Object id2) {
+        return g.V(id1)
+                .bothE().filter(__.otherV().hasId(id2))
+                .next();
+    }
+}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b003528c/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/search/path/ShortestPathVertexProgramTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/search/path/ShortestPathVertexProgramTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/search/path/ShortestPathVertexProgramTest.java
new file mode 100644
index 0000000..303299d
--- /dev/null
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/search/path/ShortestPathVertexProgramTest.java
@@ -0,0 +1,297 @@
+/*
+ * 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.computer.search.path;
+
+import org.apache.tinkerpop.gremlin.LoadGraphWith;
+import org.apache.tinkerpop.gremlin.process.AbstractGremlinProcessTest;
+import org.apache.tinkerpop.gremlin.process.computer.ComputerResult;
+import org.apache.tinkerpop.gremlin.process.traversal.Path;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
+import org.apache.tinkerpop.gremlin.structure.Direction;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.util.*;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData.CREW;
+import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData.GRATEFUL;
+import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData.MODERN;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+/**
+ * @author Daniel Kuppitz (http://gremlin.guru)
+ */
+public class ShortestPathVertexProgramTest extends AbstractGremlinProcessTest {
+
+    private ShortestPathTestHelper helper;
+
+    @Before
+    public void initializeHelper() throws Exception {
+        this.helper  = new ShortestPathTestHelper(this, g);
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
+    public void shouldFindAllShortestPathsWithDefaultParameters() throws Exception {
+        final ComputerResult result = graph.compute(graphProvider.getGraphComputer(graph).getClass()).
+                program(ShortestPathVertexProgram.build().create(graph)).submit().get();
+        assertTrue(result.memory().exists(ShortestPathVertexProgram.SHORTEST_PATHS));
+        final List<Path> shortestPaths = result.memory().get(ShortestPathVertexProgram.SHORTEST_PATHS);
+        final List<Path> expected = Arrays.stream(ALL_SHORTEST_PATHS).map(helper::makePath).collect(Collectors.toList());
+        helper.checkResults(expected, shortestPaths);
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
+    public void shouldFindAllShortestPathsWithEdgesIncluded() throws Exception {
+        final ComputerResult result = graph.compute(graphProvider.getGraphComputer(graph).getClass()).
+                program(ShortestPathVertexProgram.build().includeEdges(true).create(graph)).submit().get();
+        assertTrue(result.memory().exists(ShortestPathVertexProgram.SHORTEST_PATHS));
+        final List<Path> shortestPaths = result.memory().get(ShortestPathVertexProgram.SHORTEST_PATHS);
+        final List<Path> expected = Arrays.stream(ALL_SHORTEST_PATHS).map(p -> helper.makePath(true, p))
+                .collect(Collectors.toList());
+        helper.checkResults(expected, shortestPaths);
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
+    public void shouldFindOutDirectedShortestPaths() throws Exception {
+        final List<ShortestPathVertexProgram> programs = Arrays.asList(
+                ShortestPathVertexProgram.build().edgeTraversal(__.outE()).create(graph),
+                ShortestPathVertexProgram.build().edgeDirection(Direction.OUT).create(graph));
+        for (final ShortestPathVertexProgram program : programs) {
+            final ComputerResult result = graph.compute(graphProvider.getGraphComputer(graph).getClass()).
+                    program(program).submit().get();
+            assertTrue(result.memory().exists(ShortestPathVertexProgram.SHORTEST_PATHS));
+            final List<Path> shortestPaths = result.memory().get(ShortestPathVertexProgram.SHORTEST_PATHS);
+            final List<Path> expected = Arrays.stream(ALL_SHORTEST_PATHS)
+                    .filter(p -> (p[0].equals("marko") && !p[p.length - 1].equals("peter"))
+                            || (p[0].equals("vadas") && p.length == 1)
+                            || (p[0].equals("lop") && p.length == 1)
+                            || (p[0].equals("josh") && Arrays.asList("lop", "josh", "ripple").contains(p[p.length - 1]))
+                            || (p[0].equals("ripple") && p.length == 1)
+                            || (p[0].equals("peter") && Arrays.asList("lop", "peter").contains(p[p.length - 1])))
+                    .map(helper::makePath).collect(Collectors.toList());
+            helper.checkResults(expected, shortestPaths);
+        }
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
+    public void shouldFindInDirectedShortestPaths() throws Exception {
+        final List<ShortestPathVertexProgram> programs = Arrays.asList(
+                ShortestPathVertexProgram.build().edgeTraversal(__.inE()).create(graph),
+                ShortestPathVertexProgram.build().edgeDirection(Direction.IN).create(graph));
+        for (final ShortestPathVertexProgram program : programs) {
+            final ComputerResult result = graph.compute(graphProvider.getGraphComputer(graph).getClass()).
+                    program(program).submit().get();
+            assertTrue(result.memory().exists(ShortestPathVertexProgram.SHORTEST_PATHS));
+            final List<Path> shortestPaths = result.memory().get(ShortestPathVertexProgram.SHORTEST_PATHS);
+            final List<Path> expected = Arrays.stream(ALL_SHORTEST_PATHS)
+                    .filter(p -> (p[0].equals("marko") && p.length == 1)
+                            || (p[0].equals("vadas") && Arrays.asList("marko", "vadas").contains(p[p.length - 1]))
+                            || (p[0].equals("lop") && Arrays.asList("marko", "lop", "josh", "peter").contains(p[p.length - 1]))
+                            || (p[0].equals("josh") && Arrays.asList("marko", "josh").contains(p[p.length - 1]))
+                            || (p[0].equals("ripple") && Arrays.asList("marko", "josh", "ripple").contains(p[p.length - 1]))
+                            || (p[0].equals("peter") && p.length == 1))
+                    .map(helper::makePath).collect(Collectors.toList());
+            helper.checkResults(expected, shortestPaths);
+        }
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
+    public void shouldFindDirectedShortestPathsWithEdgesIncluded() throws Exception {
+        final ComputerResult result = graph.compute(graphProvider.getGraphComputer(graph).getClass()).
+                program(ShortestPathVertexProgram.build().edgeTraversal(__.outE()).includeEdges(true).create(graph)).submit().get();
+        assertTrue(result.memory().exists(ShortestPathVertexProgram.SHORTEST_PATHS));
+        final List<Path> shortestPaths = result.memory().get(ShortestPathVertexProgram.SHORTEST_PATHS);
+        final List<Path> expected = Arrays.stream(ALL_SHORTEST_PATHS)
+                .filter(p -> (p[0].equals("marko") && !p[p.length - 1].equals("peter"))
+                        || (p[0].equals("vadas") && p.length == 1)
+                        || (p[0].equals("lop") && p.length == 1)
+                        || (p[0].equals("josh") && Arrays.asList("lop", "josh", "ripple").contains(p[p.length - 1]))
+                        || (p[0].equals("ripple") && p.length == 1)
+                        || (p[0].equals("peter") && Arrays.asList("lop", "peter").contains(p[p.length - 1])))
+                .map(p -> helper.makePath(true, p)).collect(Collectors.toList());
+        helper.checkResults(expected, shortestPaths);
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
+    public void shouldFindShortestPathsWithStartVertexFilter() throws Exception {
+        final ComputerResult result = graph.compute(graphProvider.getGraphComputer(graph).getClass()).
+                program(ShortestPathVertexProgram.build().source(__.has("name", "marko")).create(graph)).submit().get();
+        assertTrue(result.memory().exists(ShortestPathVertexProgram.SHORTEST_PATHS));
+        final List<Path> shortestPaths = result.memory().get(ShortestPathVertexProgram.SHORTEST_PATHS);
+        final List<Path> expected = Arrays.stream(ALL_SHORTEST_PATHS)
+                .filter(p -> p[0].equals("marko")).map(helper::makePath).collect(Collectors.toList());
+        helper.checkResults(expected, shortestPaths);
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
+    public void shouldFindShortestPathsWithEndVertexFilter() throws Exception {
+        final ComputerResult result = graph.compute(graphProvider.getGraphComputer(graph).getClass()).
+                program(ShortestPathVertexProgram.build().target(__.has("name", "marko")).create(graph)).submit().get();
+        assertTrue(result.memory().exists(ShortestPathVertexProgram.SHORTEST_PATHS));
+        final List<Path> shortestPaths = result.memory().get(ShortestPathVertexProgram.SHORTEST_PATHS);
+        final List<Path> expected = Arrays.stream(ALL_SHORTEST_PATHS)
+                .filter(p -> p[p.length - 1].equals("marko")).map(helper::makePath).collect(Collectors.toList());
+        helper.checkResults(expected, shortestPaths);
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
+    public void shouldFindShortestPathsWithStartEndVertexFilter() throws Exception {
+        final ComputerResult result = graph.compute(graphProvider.getGraphComputer(graph).getClass()).
+                program(ShortestPathVertexProgram.build()
+                        .source(__.has("name", "marko"))
+                        .target(__.hasLabel("software")).create(graph)).submit().get();
+        assertTrue(result.memory().exists(ShortestPathVertexProgram.SHORTEST_PATHS));
+        final List<Path> shortestPaths = result.memory().get(ShortestPathVertexProgram.SHORTEST_PATHS);
+        final List<Path> expected = Arrays.stream(ALL_SHORTEST_PATHS)
+                .filter(p ->
+                        p[0].equals("marko") && Arrays.asList("lop", "ripple").contains(p[p.length - 1]))
+                .map(helper::makePath).collect(Collectors.toList());
+        helper.checkResults(expected, shortestPaths);
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
+    public void shouldUseCustomDistanceProperty() throws Exception {
+        final ComputerResult result = graph.compute(graphProvider.getGraphComputer(graph).getClass()).
+                program(ShortestPathVertexProgram.build()
+                        .source(__.has("name", "marko"))
+                        .target(__.has("name", "josh"))
+                        .distanceProperty("weight").create(graph)).submit().get();
+        assertTrue(result.memory().exists(ShortestPathVertexProgram.SHORTEST_PATHS));
+        final List<Path> shortestPaths = result.memory().get(ShortestPathVertexProgram.SHORTEST_PATHS);
+        assertEquals(1, shortestPaths.size());
+        assertEquals(helper.makePath("marko", "lop", "josh"), shortestPaths.get(0));
+    }
+
+    @Test
+    @LoadGraphWith(CREW)
+    public void shouldFindEqualLengthPaths() throws Exception {
+        final ComputerResult result = graph.compute(graphProvider.getGraphComputer(graph).getClass()).
+                program(ShortestPathVertexProgram.build()
+                        .edgeTraversal(__.bothE("uses"))
+                        .source(__.has("name", "daniel"))
+                        .target(__.has("name", "stephen")).create(graph)).submit().get();
+        assertTrue(result.memory().exists(ShortestPathVertexProgram.SHORTEST_PATHS));
+        final List<Path> shortestPaths = result.memory().get(ShortestPathVertexProgram.SHORTEST_PATHS);
+        final List<Path> expected = Arrays.asList(
+                helper.makePath("daniel", "gremlin", "stephen"),
+                helper.makePath("daniel", "tinkergraph", "stephen"));
+        helper.checkResults(expected, shortestPaths);
+    }
+
+    @Test
+    @LoadGraphWith(GRATEFUL)
+    public void shouldFindEqualLengthPathsUsingDistanceProperty() throws Exception {
+        final ComputerResult result = graph.compute(graphProvider.getGraphComputer(graph).getClass()).
+                program(ShortestPathVertexProgram.build()
+                        .edgeTraversal(__.outE("followedBy"))
+                        .source(__.has("song", "name", "MIGHT AS WELL"))
+                        .target(__.has("song", "name", "MAYBE YOU KNOW HOW I FEEL"))
+                        .distanceProperty("weight")
+                        .create(graph)).submit().get();
+        assertTrue(result.memory().exists(ShortestPathVertexProgram.SHORTEST_PATHS));
+        final List<Path> shortestPaths = result.memory().get(ShortestPathVertexProgram.SHORTEST_PATHS);
+        final List<Path> expected = Arrays.asList(
+                helper.makePath("MIGHT AS WELL", "DRUMS", "MAYBE YOU KNOW HOW I FEEL"),
+                helper.makePath("MIGHT AS WELL", "SHIP OF FOOLS", "MAYBE YOU KNOW HOW I FEEL"));
+        helper.checkResults(expected, shortestPaths);
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
+    public void shouldRespectMaxDistance() throws Exception {
+        final ComputerResult result = graph.compute(graphProvider.getGraphComputer(graph).getClass()).
+                program(ShortestPathVertexProgram.build()
+                        .source(__.has("name", "marko"))
+                        .maxDistance(1).create(graph)).submit().get();
+        assertTrue(result.memory().exists(ShortestPathVertexProgram.SHORTEST_PATHS));
+        final List<Path> shortestPaths = result.memory().get(ShortestPathVertexProgram.SHORTEST_PATHS);
+        final List<Path> expected = Arrays.stream(ALL_SHORTEST_PATHS)
+                .filter(p -> p[0].equals("marko") && p.length <= 2).map(helper::makePath).collect(Collectors.toList());
+        helper.checkResults(expected, shortestPaths);
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
+    public void shouldRespectMaxCustomDistance() throws Exception {
+        final ComputerResult result = graph.compute(graphProvider.getGraphComputer(graph).getClass()).
+                program(ShortestPathVertexProgram.build()
+                        .source(__.has("name", "vadas"))
+                        .distanceProperty("weight").maxDistance(1.3).create(graph)).submit().get();
+        assertTrue(result.memory().exists(ShortestPathVertexProgram.SHORTEST_PATHS));
+        final List<Path> shortestPaths = result.memory().get(ShortestPathVertexProgram.SHORTEST_PATHS);
+        final List<Path> expected = Stream.concat(Arrays.stream(ALL_SHORTEST_PATHS)
+                        .filter(p -> p[0].equals("vadas") &&
+                                Arrays.asList("vadas", "marko", "lop", "peter").contains(p[p.length - 1]))
+                        .map(helper::makePath),
+                Stream.of(helper.makePath("vadas", "marko", "lop", "josh")))
+                .collect(Collectors.toList());
+        helper.checkResults(expected, shortestPaths);
+    }
+
+    public static String[][] ALL_SHORTEST_PATHS = new String[][]{
+            new String[]{"marko"},
+            new String[]{"marko", "vadas"},
+            new String[]{"marko", "lop"},
+            new String[]{"marko", "lop", "peter"},
+            new String[]{"marko", "josh"},
+            new String[]{"marko", "josh", "ripple"},
+            new String[]{"vadas"},
+            new String[]{"vadas", "marko"},
+            new String[]{"vadas", "marko", "lop"},
+            new String[]{"vadas", "marko", "lop", "peter"},
+            new String[]{"vadas", "marko", "josh", "ripple"},
+            new String[]{"vadas", "marko", "josh"},
+            new String[]{"lop"},
+            new String[]{"lop", "marko"},
+            new String[]{"lop", "marko", "vadas"},
+            new String[]{"lop", "josh"},
+            new String[]{"lop", "josh", "ripple"},
+            new String[]{"lop", "peter"},
+            new String[]{"josh"},
+            new String[]{"josh", "marko"},
+            new String[]{"josh", "marko", "vadas"},
+            new String[]{"josh", "lop"},
+            new String[]{"josh", "lop", "peter"},
+            new String[]{"josh", "ripple"},
+            new String[]{"ripple"},
+            new String[]{"ripple", "josh"},
+            new String[]{"ripple", "josh", "marko"},
+            new String[]{"ripple", "josh", "marko", "vadas"},
+            new String[]{"ripple", "josh", "lop"},
+            new String[]{"ripple", "josh", "lop", "peter"},
+            new String[]{"peter"},
+            new String[]{"peter", "lop"},
+            new String[]{"peter", "lop", "marko"},
+            new String[]{"peter", "lop", "marko", "vadas"},
+            new String[]{"peter", "lop", "josh"},
+            new String[]{"peter", "lop", "josh", "ripple"}
+    };
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b003528c/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ShortestPathTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ShortestPathTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ShortestPathTest.java
new file mode 100644
index 0000000..bf4a5b7
--- /dev/null
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ShortestPathTest.java
@@ -0,0 +1,353 @@
+/*
+ * 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.map;
+
+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.search.path.ShortestPathTestHelper;
+import org.apache.tinkerpop.gremlin.process.traversal.Path;
+import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
+import org.apache.tinkerpop.gremlin.structure.Direction;
+import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData.CREW;
+import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData.GRATEFUL;
+import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData.MODERN;
+import static org.apache.tinkerpop.gremlin.process.computer.search.path.ShortestPathVertexProgramTest.ALL_SHORTEST_PATHS;
+import static org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.ShortestPath.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+/**
+ * @author Daniel Kuppitz (http://gremlin.guru)
+ */
+@RunWith(GremlinProcessRunner.class)
+public abstract class ShortestPathTest extends AbstractGremlinProcessTest {
+
+    private ShortestPathTestHelper helper;
+
+    @Before
+    public void initializeHelper() throws Exception {
+        this.helper = new ShortestPathTestHelper(this, g);
+    }
+
+    public abstract Traversal<Vertex, Path> get_g_V_shortestPath();
+
+    public abstract Traversal<Vertex, Path> get_g_V_both_dedup_shortestPath();
+
+    public abstract Traversal<Vertex, Path> get_g_V_shortestPath_edgesIncluded();
+
+    public abstract Traversal<Vertex, Path> get_g_V_shortestPath_directionXINX();
+
+    public abstract Traversal<Vertex, Path> get_g_V_shortestPath_edgesXoutEX();
+
+    public abstract Traversal<Vertex, Path> get_g_V_shortestPath_edgesIncluded_edgesXoutEX();
+
+    public abstract Traversal<Vertex, Path> get_g_V_hasXname_markoX_shortestPath();
+
+    public abstract Traversal<Vertex, Path> get_g_V_shortestPath_targetXhasXname_markoXX();
+
+    public abstract Traversal<Vertex, Path> get_g_V_shortestPath_targetXvaluesXnameX_isXmarkoXX();
+
+    public abstract Traversal<Vertex, Path> get_g_V_hasXname_markoX_shortestPath_targetXhasLabelXsoftwareXX();
+
+    public abstract Traversal<Vertex, Path> get_g_V_hasXname_markoX_shortestPath_targetXhasXname_joshXX_distanceXweightX();
+
+    public abstract Traversal<Vertex, Path> get_g_V_hasXname_danielX_shortestPath_targetXhasXname_stephenXX_edgesXbothEXusesXX();
+
+    public abstract Traversal<Vertex, Path> get_g_V_hasXsong_name_MIGHT_AS_WELLX_shortestPath_targetXhasXsong_name_MAYBE_YOU_KNOW_HOW_I_FEELXX_edgesXoutEXfollowedByXX_distanceXweightX();
+
+    public abstract Traversal<Vertex, Path> get_g_V_hasXname_markoX_shortestPath_maxDistanceX1X();
+
+    public abstract Traversal<Vertex, Path> get_g_V_hasXname_vadasX_shortestPath_distanceXweightX_maxDistanceX1_3X();
+
+    @Test
+    @LoadGraphWith(MODERN)
+    public void g_V_shortestPath() {
+        final Traversal<Vertex, Path> traversal = get_g_V_shortestPath();
+        printTraversalForm(traversal);
+        final List<Path> expected = Arrays.stream(ALL_SHORTEST_PATHS).map(helper::makePath)
+                .collect(Collectors.toList());
+        checkResults(expected, traversal);
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
+    public void g_V_both_dedup_shortestPath() {
+        final Traversal<Vertex, Path> traversal = get_g_V_both_dedup_shortestPath();
+        printTraversalForm(traversal);
+        final List<Path> expected = Arrays.stream(ALL_SHORTEST_PATHS).map(helper::makePath)
+                .collect(Collectors.toList());
+        checkResults(expected, traversal);
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
+    public void g_V_shortestPath_edgesIncluded() {
+        final Traversal<Vertex, Path> traversal = get_g_V_shortestPath_edgesIncluded();
+        printTraversalForm(traversal);
+        final List<Path> expected = Arrays.stream(ALL_SHORTEST_PATHS).map(p -> helper.makePath(true, p))
+                .collect(Collectors.toList());
+        checkResults(expected, traversal);
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
+    public void g_V_shortestPath_directionXINX() {
+        final Traversal<Vertex, Path> traversal = get_g_V_shortestPath_directionXINX();
+        printTraversalForm(traversal);
+        final List<Path> expected = Arrays.stream(ALL_SHORTEST_PATHS)
+                .filter(p -> (p[0].equals("marko") && p.length == 1)
+                        || (p[0].equals("vadas") && Arrays.asList("marko", "vadas").contains(p[p.length - 1]))
+                        || (p[0].equals("lop") && Arrays.asList("marko", "lop", "josh", "peter").contains(p[p.length - 1]))
+                        || (p[0].equals("josh") && Arrays.asList("marko", "josh").contains(p[p.length - 1]))
+                        || (p[0].equals("ripple") && Arrays.asList("marko", "josh", "ripple").contains(p[p.length - 1]))
+                        || (p[0].equals("peter") && p.length == 1))
+                .map(helper::makePath).collect(Collectors.toList());
+        checkResults(expected, traversal);
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
+    public void g_V_shortestPath_edgesXoutEX() {
+        final Traversal<Vertex, Path> traversal = get_g_V_shortestPath_edgesXoutEX();
+        printTraversalForm(traversal);
+        checkOutDirectedPaths(false, traversal);
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
+    public void g_V_shortestPath_edgesIncluded_edgesXoutEX() {
+        final Traversal<Vertex, Path> traversal = get_g_V_shortestPath_edgesIncluded_edgesXoutEX();
+        printTraversalForm(traversal);
+        checkOutDirectedPaths(true, traversal);
+    }
+
+    private void checkOutDirectedPaths(final boolean includeEdges, final Traversal<Vertex, Path> traversal) {
+        final List<Path> expected = Arrays.stream(ALL_SHORTEST_PATHS)
+                .filter(p -> (p[0].equals("marko") && !p[p.length - 1].equals("peter"))
+                        || (p[0].equals("vadas") && p.length == 1)
+                        || (p[0].equals("lop") && p.length == 1)
+                        || (p[0].equals("josh") && Arrays.asList("lop", "josh", "ripple").contains(p[p.length - 1]))
+                        || (p[0].equals("ripple") && p.length == 1)
+                        || (p[0].equals("peter") && Arrays.asList("lop", "peter").contains(p[p.length - 1])))
+                .map(names -> helper.makePath(includeEdges, names)).collect(Collectors.toList());
+        checkResults(expected, traversal);
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
+    public void g_V_hasXname_markoX_shortestPath() {
+        final Traversal<Vertex, Path> traversal = get_g_V_hasXname_markoX_shortestPath();
+        printTraversalForm(traversal);
+        final List<Path> expected = Arrays.stream(ALL_SHORTEST_PATHS)
+                .filter(p -> p[0].equals("marko")).map(helper::makePath).collect(Collectors.toList());
+        checkResults(expected, traversal);
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
+    public void g_V_shortestPath_targetXhasXname_markoXX() {
+        final Traversal<Vertex, Path> traversal = get_g_V_shortestPath_targetXhasXname_markoXX();
+        printTraversalForm(traversal);
+        checkPathsToMarko(traversal);
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
+    public void g_V_shortestPath_targetXvaluesXnameX_isXmarkoXX() {
+        final Traversal<Vertex, Path> traversal = get_g_V_shortestPath_targetXvaluesXnameX_isXmarkoXX();
+        printTraversalForm(traversal);
+        checkPathsToMarko(traversal);
+    }
+
+    private void checkPathsToMarko(final Traversal<Vertex, Path> traversal) {
+        final List<Path> expected = Arrays.stream(ALL_SHORTEST_PATHS)
+                .filter(p -> p[p.length - 1].equals("marko")).map(helper::makePath).collect(Collectors.toList());
+        checkResults(expected, traversal);
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
+    public void g_V_hasXname_markoX_shortestPath_targetXhasLabelXsoftwareXX() {
+        final Traversal<Vertex, Path> traversal = get_g_V_hasXname_markoX_shortestPath_targetXhasLabelXsoftwareXX();
+        printTraversalForm(traversal);
+        final List<Path> expected = Arrays.stream(ALL_SHORTEST_PATHS)
+                .filter(p ->
+                        p[0].equals("marko") && Arrays.asList("lop", "ripple").contains(p[p.length - 1]))
+                .map(helper::makePath).collect(Collectors.toList());
+        checkResults(expected, traversal);
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
+    public void g_V_hasXname_markoX_shortestPath_targetXhasXname_joshXX_distanceXweightX() {
+        final Traversal<Vertex, Path> traversal = get_g_V_hasXname_markoX_shortestPath_targetXhasXname_joshXX_distanceXweightX();
+        printTraversalForm(traversal);
+        assertTrue(traversal.hasNext());
+        assertEquals(helper.makePath("marko", "lop", "josh"), traversal.next());
+        assertFalse(traversal.hasNext());
+    }
+
+    @Test
+    @LoadGraphWith(CREW)
+    public void g_V_hasXname_danielX_shortestPath_targetXhasXname_stephenXX_edgesXbothEXusesXX() {
+        final Traversal<Vertex, Path> traversal = get_g_V_hasXname_danielX_shortestPath_targetXhasXname_stephenXX_edgesXbothEXusesXX();
+        printTraversalForm(traversal);
+        final List<Path> expected = Arrays.asList(
+                helper.makePath("daniel", "gremlin", "stephen"),
+                helper.makePath("daniel", "tinkergraph", "stephen"));
+        checkResults(expected, traversal);
+    }
+
+    @Test
+    @LoadGraphWith(GRATEFUL)
+    public void g_V_hasXsong_name_MIGHT_AS_WELLX_shortestPath_targetXhasXsong_name_MAYBE_YOU_KNOW_HOW_I_FEELXX_edgesXoutEXfollowedByXX_distanceXweightX() {
+        final Traversal<Vertex, Path> traversal = get_g_V_hasXsong_name_MIGHT_AS_WELLX_shortestPath_targetXhasXsong_name_MAYBE_YOU_KNOW_HOW_I_FEELXX_edgesXoutEXfollowedByXX_distanceXweightX();
+        printTraversalForm(traversal);
+        final List<Path> expected = Arrays.asList(
+                helper.makePath("MIGHT AS WELL", "DRUMS", "MAYBE YOU KNOW HOW I FEEL"),
+                helper.makePath("MIGHT AS WELL", "SHIP OF FOOLS", "MAYBE YOU KNOW HOW I FEEL"));
+        checkResults(expected, traversal);
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
+    public void g_V_hasXname_markoX_shortestPath_maxDistanceX1X() {
+        final Traversal<Vertex, Path> traversal = get_g_V_hasXname_markoX_shortestPath_maxDistanceX1X();
+        printTraversalForm(traversal);
+        final List<Path> expected = Arrays.stream(ALL_SHORTEST_PATHS)
+                .filter(p -> p[0].equals("marko") && p.length <= 2).map(helper::makePath).collect(Collectors.toList());
+        checkResults(expected, traversal);
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
+    public void g_V_hasXname_vadasX_shortestPath_distanceXweightX_maxDistanceX1_3X() {
+        final Traversal<Vertex, Path> traversal = get_g_V_hasXname_vadasX_shortestPath_distanceXweightX_maxDistanceX1_3X();
+        printTraversalForm(traversal);
+        final List<Path> expected = Stream.concat(Arrays.stream(ALL_SHORTEST_PATHS)
+                        .filter(p -> p[0].equals("vadas") &&
+                                Arrays.asList("vadas", "marko", "lop", "peter").contains(p[p.length - 1]))
+                        .map(helper::makePath),
+                Stream.of(helper.makePath("vadas", "marko", "lop", "josh")))
+                .collect(Collectors.toList());
+        checkResults(expected, traversal);
+    }
+
+    public static class Traversals extends ShortestPathTest {
+
+        @Override
+        public Traversal<Vertex, Path> get_g_V_shortestPath() {
+            return g.V().shortestPath().dedup();
+        }
+
+        @Override
+        public Traversal<Vertex, Path> get_g_V_both_dedup_shortestPath() {
+            return g.V().both().dedup().shortestPath();
+        }
+
+        @Override
+        public Traversal<Vertex, Path> get_g_V_shortestPath_edgesIncluded() {
+            return g.V().shortestPath().with(includeEdges, true);
+        }
+
+        @Override
+        public Traversal<Vertex, Path> get_g_V_shortestPath_directionXINX() {
+            return g.V().shortestPath().with(edges, Direction.IN);
+        }
+
+        @Override
+        public Traversal<Vertex, Path> get_g_V_shortestPath_edgesXoutEX() {
+            return g.V().shortestPath().with(edges, __.outE());
+        }
+
+        @Override
+        public Traversal<Vertex, Path> get_g_V_shortestPath_edgesIncluded_edgesXoutEX() {
+            return g.V().shortestPath().with(includeEdges, true).with(edges, __.outE());
+        }
+
+        @Override
+        public Traversal<Vertex, Path> get_g_V_hasXname_markoX_shortestPath() {
+            return g.V().has("name", "marko").shortestPath();
+        }
+
+        @Override
+        public Traversal<Vertex, Path> get_g_V_shortestPath_targetXhasXname_markoXX() {
+            return g.V().shortestPath().with(target, __.has("name", "marko"));
+        }
+
+        @Override
+        public Traversal<Vertex, Path> get_g_V_shortestPath_targetXvaluesXnameX_isXmarkoXX() {
+            return g.V().shortestPath().with(target, __.<Vertex, String>values("name").is("marko"));
+        }
+
+        @Override
+        public Traversal<Vertex, Path> get_g_V_hasXname_markoX_shortestPath_targetXhasLabelXsoftwareXX() {
+            return g.V().has("name", "marko").shortestPath().with(target, __.hasLabel("software"));
+        }
+
+        @Override
+        public Traversal<Vertex, Path> get_g_V_hasXname_markoX_shortestPath_targetXhasXname_joshXX_distanceXweightX() {
+            return g.V().has("name", "marko").shortestPath()
+                    .with(target, __.has("name","josh"))
+                    .with(distance, "weight");
+        }
+
+        @Override
+        public Traversal<Vertex, Path> get_g_V_hasXname_danielX_shortestPath_targetXhasXname_stephenXX_edgesXbothEXusesXX() {
+            return g.V().has("name", "daniel").shortestPath()
+                    .with(target, __.has("name","stephen"))
+                    .with(edges, __.bothE("uses"));
+        }
+
+        @Override
+        public Traversal<Vertex, Path> get_g_V_hasXsong_name_MIGHT_AS_WELLX_shortestPath_targetXhasXsong_name_MAYBE_YOU_KNOW_HOW_I_FEELXX_edgesXoutEXfollowedByXX_distanceXweightX() {
+            return g.V().has("song", "name", "MIGHT AS WELL")
+                    .shortestPath().
+                            with(target, __.has("song", "name", "MAYBE YOU KNOW HOW I FEEL")).
+                            with(edges, __.outE("followedBy")).
+                            with(distance, "weight");
+        }
+
+        @Override
+        public Traversal<Vertex, Path> get_g_V_hasXname_markoX_shortestPath_maxDistanceX1X() {
+            return g.V().has("name", "marko").shortestPath()
+                    .with(maxDistance, 1);
+        }
+
+        @Override
+        public Traversal<Vertex, Path> get_g_V_hasXname_vadasX_shortestPath_distanceXweightX_maxDistanceX1_3X() {
+            return g.V().has("name", "vadas").shortestPath()
+                    .with(distance, "weight")
+                    .with(maxDistance, 1.3);
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b003528c/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index c279851..6d48391 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1282,6 +1282,9 @@ limitations under the License.
                                             org/apache/tinkerpop/gremlin/process/computer/ranking/pagerank/PageRankVertexProgram.java
                                         </include>
                                         <include>
+                                            org/apache/tinkerpop/gremlin/process/computer/search/path/ShortestPathVertexProgram.java
+                                        </include>
+                                        <include>
                                             org/apache/tinkerpop/gremlin/process/computer/traversal/TraversalVertexProgram.java
                                         </include>
                                         <!-- traversal -->


[33/50] [abbrv] tinkerpop git commit: Redefined gherkin test that was forcing list[list] assertions

Posted by dk...@apache.org.
Redefined gherkin test that was forcing list[list] assertions

Not sure we really needed the original assertion the way that it was. The fact that we get a result means serialization for list[list] worked and we assert correctness of the traversal in a reasonable way without list[list] so there doesn't seem to be much need to complicate the logic of the gherkin runners to support that CTR


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

Branch: refs/heads/TINKERPOP-1990
Commit: 3be3550d191fc894639cfe2aae5447eb7bad3cbf
Parents: fd64360
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Jul 25 12:16:09 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Jul 25 12:16:09 2018 -0400

----------------------------------------------------------------------
 .../Gherkin/GherkinTestRunner.cs                       |  3 +--
 .../Gherkin/IgnoreException.cs                         |  3 ---
 .../gremlin-javascript/test/cucumber/feature-steps.js  |  3 +--
 gremlin-python/src/main/jython/radish/feature_steps.py |  2 +-
 gremlin-test/features/map/Select.feature               | 13 +++++--------
 5 files changed, 8 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3be3550d/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
index 787cca9..3802da5 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
@@ -41,8 +41,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
             new Dictionary<string, IgnoreReason>()
             {
                 { "g_injectX1X_chooseXisX1X__constantX10Xfold__foldX", IgnoreReason.NoReason },
-                { "g_injectX2X_chooseXisX1X__constantX10Xfold__foldX", IgnoreReason.NoReason },
-                { "g_V_asXa_bX_out_asXcX_path_selectXkeysX", IgnoreReason.EmbeddedListAssertion }
+                { "g_injectX2X_chooseXisX1X__constantX10Xfold__foldX", IgnoreReason.NoReason }
             };
         
         private static class Keywords

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3be3550d/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
index 368713d..6198f1d 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
@@ -40,9 +40,6 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
             string reasonSuffix = null;
             switch (reason)
             {
-                case IgnoreReason.EmbeddedListAssertion:
-                    reasonSuffix = "This test returns an embedded list in the result and the Gherkin processor does not parse that correctly";
-                    break;
                 case IgnoreReason.NoReason:
                     reasonSuffix = "";
                     break;

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3be3550d/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
----------------------------------------------------------------------
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
index 53f457d..3976348 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
@@ -55,13 +55,12 @@ const parsers = [
 
 const ignoreReason = {
   lambdaNotSupported: 'Lambdas are not supported on gremlin-javascript',
-  embeddedListAssertion: '"This test returns an embedded list in the result and the Gherkin processor does not parse that correctly"',
   needsFurtherInvestigation: '',
 };
 
 const ignoredScenarios = {
   // An associative array containing the scenario name as key, for example:
-  'g_V_asXa_bX_out_asXcX_path_selectXkeysX': new IgnoreError(ignoreReason.embeddedListAssertion),
+  // 'g_V_asXa_bX_out_asXcX_path_selectXkeysX': new IgnoreError(ignoreReason.embeddedListAssertion),
 };
 
 defineSupportCode(function(methods) {

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3be3550d/gremlin-python/src/main/jython/radish/feature_steps.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/radish/feature_steps.py b/gremlin-python/src/main/jython/radish/feature_steps.py
index 5067d1b..fab35fd 100644
--- a/gremlin-python/src/main/jython/radish/feature_steps.py
+++ b/gremlin-python/src/main/jython/radish/feature_steps.py
@@ -43,7 +43,7 @@ inV = __.inV
 project = __.project
 tail = __.tail
 
-ignores = ["g.V().as(\"a\", \"b\").out().as(\"c\").path().select(Column.keys)"]
+ignores = []
 
 
 @given("the {graph_name:w} graph")

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3be3550d/gremlin-test/features/map/Select.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/map/Select.feature b/gremlin-test/features/map/Select.feature
index 4765f59..8077aaf 100644
--- a/gremlin-test/features/map/Select.feature
+++ b/gremlin-test/features/map/Select.feature
@@ -677,12 +677,9 @@ Feature: Step - select()
       """
       g.V().as("a", "b").out().as("c").path().select(Column.keys)
       """
-    When iterated to list
-    Then the result should be unordered
+    When iterated next
+    Then the result should be ordered
       | result |
-      | l[l[a,b],l[c]] |
-      | l[l[a,b],l[c]] |
-      | l[l[a,b],l[c]] |
-      | l[l[a,b],l[c]] |
-      | l[l[a,b],l[c]] |
-      | l[l[a,b],l[c]] |
\ No newline at end of file
+      | l[a,b] |
+      | l[c]   |
+    And the graph should return 6 for count of "g.V().as(\"a\", \"b\").out().as(\"c\").path().select(Column.keys)"


[42/50] [abbrv] tinkerpop git commit: Merge branch 'tp32' into tp33

Posted by dk...@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/66099fed
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/66099fed
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/66099fed

Branch: refs/heads/TINKERPOP-1990
Commit: 66099fed82e57ef29d1983a5f95725dcd4e5c157
Parents: e55ffc6 dde73e4
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Jul 27 07:17:54 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Jul 27 07:17:54 2018 -0400

----------------------------------------------------------------------
 docs/src/dev/developer/for-committers.asciidoc    |  2 +-
 docs/src/recipes/between-vertices.asciidoc        |  6 +++---
 docs/src/recipes/collections.asciidoc             | 18 +++++++++---------
 docs/src/recipes/pagination.asciidoc              |  2 +-
 .../recipes/traversal-component-reuse.asciidoc    |  4 ++--
 docs/src/recipes/tree.asciidoc                    |  2 +-
 docs/src/reference/the-traversal.asciidoc         |  2 +-
 docs/src/tutorials/getting-started/index.asciidoc | 10 +++++-----
 .../src/tutorials/gremlins-anatomy/index.asciidoc | 16 ++++++++--------
 .../tutorials/the-gremlin-console/index.asciidoc  |  2 +-
 10 files changed, 32 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/66099fed/docs/src/dev/developer/for-committers.asciidoc
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/66099fed/docs/src/recipes/collections.asciidoc
----------------------------------------------------------------------

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

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/66099fed/docs/src/tutorials/getting-started/index.asciidoc
----------------------------------------------------------------------


[28/50] [abbrv] tinkerpop git commit: Merge branch 'tp32' into tp33

Posted by dk...@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/1bd35dcc
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/1bd35dcc
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/1bd35dcc

Branch: refs/heads/TINKERPOP-1990
Commit: 1bd35dcc5383373ed07fb72fdba7da274f982497
Parents: 421839d db46c0f
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Jul 25 09:46:11 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Jul 25 09:46:11 2018 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                                |  1 +
 .../lib/structure/io/graph-serializer.js          |  2 ++
 .../lib/structure/io/type-serializers.js          | 18 ++++++++++++++++++
 .../gremlin-javascript/test/unit/graphson-test.js |  8 ++++++++
 4 files changed, 29 insertions(+)
----------------------------------------------------------------------


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

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1bd35dcc/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/graph-serializer.js
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1bd35dcc/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js
----------------------------------------------------------------------
diff --cc gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js
index 3b2b9e6,4bc2935..5044ee7
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js
@@@ -283,78 -293,9 +300,79 @@@ class TSerializer extends TypeSerialize
    }
  }
  
 +class ArraySerializer extends TypeSerializer {
 +  constructor(typeKey) {
 +    super();
 +    this.typeKey = typeKey;
 +  }
 +
 +  deserialize(obj) {
 +    const value = obj[valueKey];
 +    if (!Array.isArray(value)) {
 +      throw new Error('Expected Array, obtained: ' + value);
 +    }
 +    return value.map(x => this.reader.read(x));
 +  }
 +
 +  /** @param {Array} item */
 +  serialize(item) {
 +    return {
 +      [typeKey]: this.typeKey,
 +      [valueKey]: item.map(x => this.writer.adaptObject(x))
 +    };
 +  }
 +
 +  canBeUsedFor(value) {
 +    return Array.isArray(value);
 +  }
 +}
 +
 +class MapSerializer extends TypeSerializer {
 +  deserialize(obj) {
 +    const value = obj[valueKey];
 +    if (!Array.isArray(value)) {
 +      throw new Error('Expected Array, obtained: ' + value);
 +    }
 +    const result = new Map();
 +    for (let i = 0; i < value.length; i += 2) {
 +      result.set(this.reader.read(value[i]), this.reader.read(value[i + 1]));
 +    }
 +    return result;
 +  }
 +
 +  /** @param {Map} map */
 +  serialize(map) {
 +    const arr = [];
 +    map.forEach((v, k) => {
 +      arr.push(this.writer.adaptObject(k));
 +      arr.push(this.writer.adaptObject(v));
 +    });
 +    return {
 +      [typeKey]: 'g:Map',
 +      [valueKey]: arr
 +    };
 +  }
 +
 +  canBeUsedFor(value) {
 +    return value instanceof Map;
 +  }
 +}
 +
 +class ListSerializer extends ArraySerializer {
 +  constructor() {
 +    super('g:List');
 +  }
 +}
 +
 +class SetSerializer extends ArraySerializer {
 +  constructor() {
 +    super('g:Set');
 +  }
 +}
 +
  module.exports = {
    BytecodeSerializer,
+   DateSerializer,
    EdgeSerializer,
    EnumSerializer,
    LambdaSerializer,


[06/50] [abbrv] tinkerpop git commit: Remove note about Gremlin.Net's history CTR

Posted by dk...@apache.org.
Remove note about Gremlin.Net's history CTR

The note explained that Gremlin.Net was a personal project before it
became part of TinkerPop. Considering that the first official release of
Gremlin.Net as part of TinkerPop was over 6 months ago, it doesn't seem
necessary anymore.


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

Branch: refs/heads/TINKERPOP-1990
Commit: fc36be1b9b269f281fea1ab308c064fb49330854
Parents: a7aed51
Author: Florian Hockmann <fh...@florian-hockmann.de>
Authored: Sun Jul 22 15:53:52 2018 +0200
Committer: Florian Hockmann <fh...@florian-hockmann.de>
Committed: Sun Jul 22 15:53:52 2018 +0200

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


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/fc36be1b/gremlin-dotnet/glv/Gremlin.Net.csproj.template
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/glv/Gremlin.Net.csproj.template b/gremlin-dotnet/glv/Gremlin.Net.csproj.template
index b95bae6..5357e14 100644
--- a/gremlin-dotnet/glv/Gremlin.Net.csproj.template
+++ b/gremlin-dotnet/glv/Gremlin.Net.csproj.template
@@ -36,9 +36,7 @@ Apache TinkerPopâ„¢ is a graph computing framework for both graph databases (OLT
 
 Gremlin.Net implements Gremlin within .NET. C# syntax has the same constructs as Java including "dot notation" for function chaining (a.b.c), round bracket function arguments (a(b,c)), and support for global namespaces (a(b()) vs a(__.b())). As such, anyone familiar with Gremlin-Java will immediately be able to work with Gremlin.Net. Moreover, there are a few added constructs to Gremlin.Net that make traversals a bit more succinct.
 
-Please see the reference documentation at Apache TinkerPop for more information on usage.
-
-NOTE: Gremlin.Net is an extension of the Gremlin.Net driver by Florian Hockmann (versions: 0.y.z) and is now included as part of the Apache TinkerPop project.</Description>
+Please see the reference documentation at Apache TinkerPop for more information on usage.</Description>
     <AssemblyOriginatorKeyFile>../../build/tinkerpop.snk</AssemblyOriginatorKeyFile>
     <SignAssembly>true</SignAssembly>
     <PackageId>Gremlin.Net</PackageId>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/fc36be1b/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj b/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj
index ff3b2a2..7aa5ba0 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj
+++ b/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj
@@ -36,9 +36,7 @@ Apache TinkerPopâ„¢ is a graph computing framework for both graph databases (OLT
 
 Gremlin.Net implements Gremlin within .NET. C# syntax has the same constructs as Java including "dot notation" for function chaining (a.b.c), round bracket function arguments (a(b,c)), and support for global namespaces (a(b()) vs a(__.b())). As such, anyone familiar with Gremlin-Java will immediately be able to work with Gremlin.Net. Moreover, there are a few added constructs to Gremlin.Net that make traversals a bit more succinct.
 
-Please see the reference documentation at Apache TinkerPop for more information on usage.
-
-NOTE: Gremlin.Net is an extension of the Gremlin.Net driver by Florian Hockmann (versions: 0.y.z) and is now included as part of the Apache TinkerPop project.</Description>
+Please see the reference documentation at Apache TinkerPop for more information on usage.</Description>
     <AssemblyOriginatorKeyFile>../../build/tinkerpop.snk</AssemblyOriginatorKeyFile>
     <SignAssembly>true</SignAssembly>
     <PackageId>Gremlin.Net</PackageId>


[19/50] [abbrv] tinkerpop git commit: Merge branch 'tp32' into tp33

Posted by dk...@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/1ca5ef3d
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/1ca5ef3d
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/1ca5ef3d

Branch: refs/heads/TINKERPOP-1990
Commit: 1ca5ef3d15bfc7acc2f53268ec8a60f6f7e956c9
Parents: 3aa6dcf ecd944e
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Jul 25 07:01:05 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Jul 25 07:01:05 2018 -0400

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


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


[34/50] [abbrv] tinkerpop git commit: Merge branch 'tp32' into tp33

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

Conflicts:
	gremlin-test/features/map/Select.feature


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

Branch: refs/heads/TINKERPOP-1990
Commit: 445a8bf0b75f8f6ee246c5bd9277f0e902db246c
Parents: 5eaf312 3be3550
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Jul 25 12:25:51 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Jul 25 12:25:51 2018 -0400

----------------------------------------------------------------------
 .../Gherkin/GherkinTestRunner.cs                       |  3 +--
 .../Gherkin/IgnoreException.cs                         |  3 ---
 .../gremlin-javascript/test/cucumber/feature-steps.js  |  3 +--
 gremlin-python/src/main/jython/radish/feature_steps.py |  2 +-
 gremlin-test/features/map/Select.feature               | 13 +++++--------
 5 files changed, 8 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/445a8bf0/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/445a8bf0/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
----------------------------------------------------------------------

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


[43/50] [abbrv] tinkerpop git commit: Consistent use of hyphen for step references CTR

Posted by dk...@apache.org.
Consistent use of hyphen for step references CTR


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

Branch: refs/heads/TINKERPOP-1990
Commit: 9b693c02c6101b82af0d19bae3252fe022ecb988
Parents: 66099fe
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Jul 27 07:18:25 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Jul 27 07:18:25 2018 -0400

----------------------------------------------------------------------
 docs/src/upgrade/release-3.3.x.asciidoc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9b693c02/docs/src/upgrade/release-3.3.x.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade/release-3.3.x.asciidoc b/docs/src/upgrade/release-3.3.x.asciidoc
index a18075f..f6cade0 100644
--- a/docs/src/upgrade/release-3.3.x.asciidoc
+++ b/docs/src/upgrade/release-3.3.x.asciidoc
@@ -115,7 +115,7 @@ Please see the link:https://github.com/apache/tinkerpop/blob/3.3.1/CHANGELOG.asc
 ==== Gremlin Python path()
 
 There was a bug in GraphSON 3.0 serialization that prevented proper handling of results contain `Path` object. As a
-result, traversals that used and returned results from the `path()` step in Python would return unusable results,
+result, traversals that used and returned results from the `path()`-step in Python would return unusable results,
 but did not actually cause an exception condition. This problem is now resolved.
 
 See: link:https://issues.apache.org/jira/browse/TINKERPOP-1799[TINKERPOP-1799]
@@ -154,7 +154,7 @@ See: link:https://issues.apache.org/jira/browse/TINKERPOP-1632[TINKERPOP-1632]
 
 ==== Changed Typing on `from()` and `to()`
 
-The `from()` and `to()` steps of `GraphTraversal` have a `Traversal<E,Vertex>` overload. The `E` has been changed to `?`
+The `from()` and `to()`-steps of `GraphTraversal` have a `Traversal<E,Vertex>` overload. The `E` has been changed to `?`
 in order to reduce `< >`-based coersion in strongly type Gremlin language variants.
 
 See: link:https://issues.apache.org/jira/browse/TINKERPOP-1793[TINKERPOP-1793]


[05/50] [abbrv] tinkerpop git commit: This closes #890

Posted by dk...@apache.org.
This closes #890


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

Branch: refs/heads/TINKERPOP-1990
Commit: c21aa284212b52fbc4e29b5d8ee081f405e4cbbc
Parents: d6a1426
Author: Jorge Bay Gondra <jo...@gmail.com>
Authored: Fri Jul 20 11:23:40 2018 +0200
Committer: Jorge Bay Gondra <jo...@gmail.com>
Committed: Fri Jul 20 11:23:40 2018 +0200

----------------------------------------------------------------------

----------------------------------------------------------------------



[07/50] [abbrv] tinkerpop git commit: Merge branch 'tp32' into tp33

Posted by dk...@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/b757173b
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/b757173b
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/b757173b

Branch: refs/heads/TINKERPOP-1990
Commit: b757173b1c036e97d58c2abf7584922c0aa6870f
Parents: f9f0112 fc36be1
Author: Florian Hockmann <fh...@florian-hockmann.de>
Authored: Sun Jul 22 15:54:14 2018 +0200
Committer: Florian Hockmann <fh...@florian-hockmann.de>
Committed: Sun Jul 22 15:54:14 2018 +0200

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


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b757173b/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj
----------------------------------------------------------------------


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

Posted by dk...@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/d6a14265
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/d6a14265
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/d6a14265

Branch: refs/heads/TINKERPOP-1990
Commit: d6a14265a10303404efa457794485e65f353c840
Parents: ce73ceb f9f0112
Author: Jorge Bay Gondra <jo...@gmail.com>
Authored: Fri Jul 20 10:27:36 2018 +0200
Committer: Jorge Bay Gondra <jo...@gmail.com>
Committed: Fri Jul 20 10:27:36 2018 +0200

----------------------------------------------------------------------
 .../src/main/javascript/gremlin-javascript/index.js               | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------



[23/50] [abbrv] tinkerpop git commit: Merge branch 'tp33'

Posted by dk...@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/dbbe4482
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/dbbe4482
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/dbbe4482

Branch: refs/heads/TINKERPOP-1990
Commit: dbbe4482ff5b7b892d68528eb5070cb8ca91b834
Parents: e1e15fa ebee26c
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Jul 25 07:43:53 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Jul 25 07:43:53 2018 -0400

----------------------------------------------------------------------
 docs/src/reference/gremlin-variants.asciidoc | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dbbe4482/docs/src/reference/gremlin-variants.asciidoc
----------------------------------------------------------------------


[44/50] [abbrv] tinkerpop git commit: Merge branch 'tp33'

Posted by dk...@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/13ff64c8
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/13ff64c8
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/13ff64c8

Branch: refs/heads/TINKERPOP-1990
Commit: 13ff64c8b1230cb886b28d294f31cce064f4b52d
Parents: a17bb40 9b693c0
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Jul 27 07:18:45 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Jul 27 07:18:45 2018 -0400

----------------------------------------------------------------------
 docs/src/dev/developer/for-committers.asciidoc    |  2 +-
 docs/src/recipes/between-vertices.asciidoc        |  6 +++---
 docs/src/recipes/collections.asciidoc             | 18 +++++++++---------
 docs/src/recipes/pagination.asciidoc              |  2 +-
 .../recipes/traversal-component-reuse.asciidoc    |  4 ++--
 docs/src/recipes/tree.asciidoc                    |  2 +-
 docs/src/reference/the-traversal.asciidoc         |  2 +-
 docs/src/tutorials/getting-started/index.asciidoc | 10 +++++-----
 .../src/tutorials/gremlins-anatomy/index.asciidoc | 16 ++++++++--------
 .../tutorials/the-gremlin-console/index.asciidoc  |  2 +-
 docs/src/upgrade/release-3.3.x.asciidoc           |  4 ++--
 11 files changed, 34 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


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

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/13ff64c8/docs/src/tutorials/getting-started/index.asciidoc
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/13ff64c8/docs/src/tutorials/the-gremlin-console/index.asciidoc
----------------------------------------------------------------------


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

Posted by dk...@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/e0ffa3be
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/e0ffa3be
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/e0ffa3be

Branch: refs/heads/TINKERPOP-1990
Commit: e0ffa3be37b83db50d3f613b4c5777a05e74b9fc
Parents: acc7012 c398100
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Mon Jul 23 10:01:39 2018 -0700
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Mon Jul 23 10:01:39 2018 -0700

----------------------------------------------------------------------
 .gitignore                                      |  1 +
 CHANGELOG.asciidoc                              |  1 +
 docker/hadoop/.gitignore                        |  1 +
 .../traversal/step/branch/BranchStep.java       | 51 +++++++++++++++++---
 gremlin-test/features/branch/Choose.feature     | 15 ++++++
 .../traversal/step/branch/ChooseTest.java       | 24 +++++++++
 6 files changed, 86 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


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


[26/50] [abbrv] tinkerpop git commit: Merge branch 'tp33'

Posted by dk...@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/a14cf28f
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/a14cf28f
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/a14cf28f

Branch: refs/heads/TINKERPOP-1990
Commit: a14cf28f45742f47f15b768a90355ca9e9e89e17
Parents: dbbe448 421839d
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Jul 25 08:59:39 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Jul 25 08:59:39 2018 -0400

----------------------------------------------------------------------
 docs/src/reference/gremlin-variants.asciidoc |  2 +-
 docs/src/reference/the-traversal.asciidoc    | 63 +++++++++++++++++++++++
 2 files changed, 64 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a14cf28f/docs/src/reference/gremlin-variants.asciidoc
----------------------------------------------------------------------

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


[02/50] [abbrv] tinkerpop git commit: Merge pull request #890 from arings/TINKERPOP-1507-JS

Posted by dk...@apache.org.
Merge pull request #890 from arings/TINKERPOP-1507-JS


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

Branch: refs/heads/TINKERPOP-1990
Commit: a7aed51d29dbf9886531b8dddb00b0b74f9e8699
Parents: 0272a2e c324002
Author: Jorge Bay Gondra <jo...@gmail.com>
Authored: Fri Jul 20 10:24:47 2018 +0200
Committer: Jorge Bay Gondra <jo...@gmail.com>
Committed: Fri Jul 20 10:24:47 2018 +0200

----------------------------------------------------------------------
 .../src/main/javascript/gremlin-javascript/index.js               | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------



[41/50] [abbrv] tinkerpop git commit: Consistent format of step references should use a dash CTR

Posted by dk...@apache.org.
Consistent format of step references should use a dash CTR


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

Branch: refs/heads/TINKERPOP-1990
Commit: dde73e42bc1aed1e73b71a38aa51a9c4641ef562
Parents: 0bd9b5a
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Jul 27 07:16:11 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Jul 27 07:16:11 2018 -0400

----------------------------------------------------------------------
 docs/src/dev/developer/for-committers.asciidoc    |  2 +-
 docs/src/recipes/between-vertices.asciidoc        |  6 +++---
 docs/src/recipes/collections.asciidoc             | 18 +++++++++---------
 docs/src/recipes/pagination.asciidoc              |  2 +-
 .../recipes/traversal-component-reuse.asciidoc    |  4 ++--
 docs/src/recipes/tree.asciidoc                    |  2 +-
 docs/src/reference/the-traversal.asciidoc         |  2 +-
 docs/src/tutorials/getting-started/index.asciidoc | 12 ++++++------
 .../src/tutorials/gremlins-anatomy/index.asciidoc | 16 ++++++++--------
 .../tutorials/the-gremlin-console/index.asciidoc  |  2 +-
 10 files changed, 33 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dde73e42/docs/src/dev/developer/for-committers.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/dev/developer/for-committers.asciidoc b/docs/src/dev/developer/for-committers.asciidoc
index 43c9ce3..82b3609 100644
--- a/docs/src/dev/developer/for-committers.asciidoc
+++ b/docs/src/dev/developer/for-committers.asciidoc
@@ -366,7 +366,7 @@ in it
 * "the result should be ordered" - the exact results and should appear in the order presented
 * "the result should be unordered" - the exact results but can appear any order
 * "the result should be of" - results can be any of the specified values and in any order (use when guarantees
-regarding the exact results cannot be pre-determined easily - see the `range()` step tests for examples)
+regarding the exact results cannot be pre-determined easily - see the `range()`-step tests for examples)
 
 These final three types of assertions mentioned above should be followed by a Gherkin table that has one column, where
 each row value in that column represents a value to assert in the result. These values are type notation respected as

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dde73e42/docs/src/recipes/between-vertices.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/recipes/between-vertices.asciidoc b/docs/src/recipes/between-vertices.asciidoc
index a947d3b..b32d323 100644
--- a/docs/src/recipes/between-vertices.asciidoc
+++ b/docs/src/recipes/between-vertices.asciidoc
@@ -33,7 +33,7 @@ g.V(1).out().where(__.in().hasId(6))             <6>
 ----
 
 <1> There are three edges from the vertex with the identifier of "1".
-<2> Filter those three edges using the `where()` step using the identifier of the vertex returned by `otherV()` to
+<2> Filter those three edges using the `where()`-step using the identifier of the vertex returned by `otherV()` to
 ensure it matches on the vertex of concern, which is the one with an identifier of "2".
 <3> Note that the same traversal will work if there are actual `Vertex` instances rather than just vertex identifiers.
 <4> The vertex with identifier "1" has all outgoing edges, so it would also be acceptable to use the directional steps
@@ -43,7 +43,7 @@ vertices with identifiers "2" and "3".
 <6> There's no reason why the same pattern of exclusion used for edges with `where()` can't work for a vertex between
 two vertices.
 
-The basic pattern of using `where()` step to find the "other" known vertex can be applied in far more complex
+The basic pattern of using `where()`-step to find the "other" known vertex can be applied in far more complex
 scenarios. For one such example, consider the following traversal that finds all the paths between a group of defined
 vertices:
 
@@ -113,6 +113,6 @@ g.V(vRexsterJob1, vBlueprintsJob1).as('job').
 ----
 
 While the traversals above are more complex, the pattern for finding "things" between two vertices is largely the same.
-Note the use of the `where()` step to terminate the traversers for a specific user. It is embedded in a `coalesce()`
+Note the use of the `where()`-step to terminate the traversers for a specific user. It is embedded in a `coalesce()`
 step to handle situations where the specified user did not complete an application for the specified job and will
 return `false` in those cases.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dde73e42/docs/src/recipes/collections.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/recipes/collections.asciidoc b/docs/src/recipes/collections.asciidoc
index 257d661..2b1b169 100644
--- a/docs/src/recipes/collections.asciidoc
+++ b/docs/src/recipes/collections.asciidoc
@@ -86,7 +86,7 @@ g.V().
 ----
 
 The call to `local()` executes its anonymous sub-traversal over each individual `List` iterator and as the
-sub-traversal ends with a `fold()` step, the results are reduced back into a `List` to preserve the original structure,
+sub-traversal ends with a `fold()`-step, the results are reduced back into a `List` to preserve the original structure,
 thus maintaining two traverser results.
 
 This pattern for unfolding and folding `List` traversers ends up having other applications:
@@ -112,7 +112,7 @@ g.V().union(limit(3).fold(),tail(3).fold()).   <3>
 with the highest degree (i.e. number of edges). By ending with `fold()` the `List` traverser structure is preserved
 thus returning two `List` objects. Consider this a method for choosing a "max" or a highly ranked vertex. In this case
 the rank was determined by the number of edges, but it could have just as easily been determined by a vertex property,
-edge property, a calculated value, etc. - one simply needs to alter the `by()` step modulator to `order()`.
+edge property, a calculated value, etc. - one simply needs to alter the `by()`-step modulator to `order()`.
 <3> For each `List` of vertices, filter that `List` to only include vertices that have an "age" property with a
 value greater than or equal to "29" and then average the results of each list. More generally, consider how this
 approach performs some kind of reducing calculation on each `List` traverser. In this case, an average was calculated,
@@ -194,11 +194,11 @@ the `mean()` to store in a `List` called "c". Note that `aggregate()` was used h
 the former is an eager collection of the elements in the stream (`store()` is lazy) and will force the traversal to be
 iterated up to that point before moving forward. Without that eager collection, "v" and "e" would not contain the
 complete information required for the production of "b" and "c".
-<6> Adding `fold()` step here is a bit of a trick. To see the trick, copy and paste all lines of Gremlin up to but
-not including this `fold()` step and run them against the "modern" graph. The output is three vertices and if the
-`profile()` step was added one would also see that the traversal contained three traversers. These three traversers
-with a vertex in each one were produced from the `repeat()` step (i.e. those vertices that had the "lang" of "java"
-when traversing away from "marko"). The `aggregate()` steps are side-effects and just allow the traversers to pass
+<6> Adding `fold()`-step here is a bit of a trick. To see the trick, copy and paste all lines of Gremlin up to but
+not including this `fold()`-step and run them against the "modern" graph. The output is three vertices and if the
+`profile()`-step was added one would also see that the traversal contained three traversers. These three traversers
+with a vertex in each one were produced from the `repeat()`-step (i.e. those vertices that had the "lang" of "java"
+when traversing away from "marko"). The `aggregate()`-steps are side-effects and just allow the traversers to pass
 through them unchanged. The `fold()` obviously converts those three traversers to a single `List` to make one
 traverser with a `List` inside. That means that the remaining steps following the `fold()` will only be executed one
 time each instead of three, which, as will be shown, is critical to the proper result.
@@ -212,7 +212,7 @@ presents an override to include "c" into the result.
 All of the above code and explanation show that `store()` can be used to construct `List` objects as side-effects
 which can then be used as a result. Note that `aggregate()` can be used to similar effect, should it make sense that
 lazy `List` creation is not acceptable with respect to the nature of the traversal. An interesting sub-pattern that
-emerges here is that the `by()` step can modulate its step to completely override the current traverser and ignore its
+emerges here is that the `by()`-step can modulate its step to completely override the current traverser and ignore its
 contents for purpose of that step. This ability to override a traverser acts as a powerful and flexible tool as it
 means that each traverser can effectively become a completely different object as determined by a sub-traversal.
 
@@ -361,7 +361,7 @@ g.V().
 
 <1> The `valueMap(true)` of a `Vertex` can be extended with the "degree" of the `Vertex` by performing a `union()` of
 the two traversals that produce that output (both produce `Map` objects).
-<2> The `unfold()` step is used to decompose the `Map` objects into key/value entries that are then constructed back
+<2> The `unfold()`-step is used to decompose the `Map` objects into key/value entries that are then constructed back
 into a single new `Map` given the patterns shown earlier. The `Map` objects of both traversals in the `union()` are
 essentially merged together.
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dde73e42/docs/src/recipes/pagination.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/recipes/pagination.asciidoc b/docs/src/recipes/pagination.asciidoc
index c26a1fc..7e7da8d 100644
--- a/docs/src/recipes/pagination.asciidoc
+++ b/docs/src/recipes/pagination.asciidoc
@@ -64,7 +64,7 @@ NOTE: The first traversal above could also be written as `g.V().hasLabel('person
 In this case, there is no way to know the total count so the only way to know if the end of the results have been
 reached is to count the results from each paged result to see if there's less than the number expected or simply zero
 results. In that case, further requests for additional pages would be unnecessary. Of course, this approach is not
-free of problems either. Most graph databases will not optimize the `range()` step, meaning that the second traversal
+free of problems either. Most graph databases will not optimize the `range()`-step, meaning that the second traversal
 will repeat the iteration of the first two vertices to get to the second set of two vertices. In other words, for the
 second traversal, the graph will still read four vertices even though there was only a request for two.
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dde73e42/docs/src/recipes/traversal-component-reuse.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/recipes/traversal-component-reuse.asciidoc b/docs/src/recipes/traversal-component-reuse.asciidoc
index 3b9b408..c623531 100644
--- a/docs/src/recipes/traversal-component-reuse.asciidoc
+++ b/docs/src/recipes/traversal-component-reuse.asciidoc
@@ -20,7 +20,7 @@ limitations under the License.
 Good software development practices require reuse to keep software maintainable. In Gremlin, there are often bits of
 traversal logic that could be represented as components that might be tested independently and utilized
 as part of other traversals. One approach to doing this would be to extract such logic into an anonymous traversal
-and provide it to a parent traversal through `flatMap()` step.
+and provide it to a parent traversal through `flatMap()`-step.
 
 Using the modern toy graph as an example, assume that there are number of traversals that are interested in filtering
 on edges where the "weight" property is greater than "0.5". A query like that might look like this:
@@ -42,7 +42,7 @@ g.V(1).flatMap(weightFilter).both()
 
 The `weightFilter` is an anonymous traversal and it is created by way `__` class. The `__` is omitted above from
 initalization of `weightFilter` because it is statically imported to the Gremlin Console. The `weightFilter` gets
-passed to the "full" traversal by way for `flatMap()` step and the results are the same. Of course, there is a problem.
+passed to the "full" traversal by way for `flatMap()`-step and the results are the same. Of course, there is a problem.
 If there is an attempt to use that `weightFilter` a second time, the traversal with thrown an exception because both
 the `weightFilter` and parent traversal have been "compiled" which prevents their re-use. A simple fix to this would
 be to clone the `weightFilter`.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dde73e42/docs/src/recipes/tree.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/recipes/tree.asciidoc b/docs/src/recipes/tree.asciidoc
index f87784f..879b26e 100644
--- a/docs/src/recipes/tree.asciidoc
+++ b/docs/src/recipes/tree.asciidoc
@@ -154,7 +154,7 @@ single result.
 
 The previous approaches to calculating the maximum depth use path calculations to achieve the answer. Path calculations
 can be expensive and if possible avoided if they are not needed. Another way to express a traversal that calculates
-the maximum depth is to use the `sack()` step:
+the maximum depth is to use the `sack()`-step:
 
 [gremlin-groovy,existing]
 ----

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dde73e42/docs/src/reference/the-traversal.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc
index 057ec6a..970dfca 100644
--- a/docs/src/reference/the-traversal.asciidoc
+++ b/docs/src/reference/the-traversal.asciidoc
@@ -437,7 +437,7 @@ g.V().both().both().both().count().iterate().toString()  <2>
 ----
 
 <1> `LazyBarrierStrategy` is a default strategy and thus, does not need to be explicitly activated.
-<2> With `LazyBarrierStrategy` activated, `barrier()` steps are automatically inserted where appropriate.
+<2> With `LazyBarrierStrategy` activated, `barrier()`-steps are automatically inserted where appropriate.
 
 *Additional References*
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dde73e42/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 11e2533..5d98c59 100644
--- a/docs/src/tutorials/getting-started/index.asciidoc
+++ b/docs/src/tutorials/getting-started/index.asciidoc
@@ -228,7 +228,7 @@ 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 `as()` steps label the value held at a particular step so that you can reference back to it later in the
+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
@@ -333,7 +333,7 @@ graph = TinkerFactory.createModern()
 g = graph.traversal()
 ----
 
-Earlier we'd used the `has()` step to tell Gremlin how to find the "marko" vertex. Let's look at some other ways to
+Earlier we'd used the `has()`-step to tell Gremlin how to find the "marko" vertex. Let's look at some other ways to
 use `has()`. What if we wanted Gremlin to find the "age" values of both "vadas" and "marko"? In this case we could
 use the `within` comparator with `has()` as follows:
 
@@ -393,13 +393,13 @@ g.V().has('name','marko').as('exclude').
 ----
 
 We made two additions to the traversal to make it exclude "marko" from the results. First, we added the
-link:http://tinkerpop.apache.org/docs/x.y.z/reference/#as-step[as()] step. The `as()` step is not really a "step",
+link:http://tinkerpop.apache.org/docs/x.y.z/reference/#as-step[as()] step. The `as()`-step is not really a "step",
 but a "step modulator" - something that adds features to a step or the traversal. Here, the `as('exclude')` labels
-the `has()` step with the name "exclude" and all values that pass through that step are held in that label for later
+the `has()`-step with the name "exclude" and all values that pass through that step are held in that label for later
 use. In this case, the "marko" vertex is the only vertex to pass through that point, so it is held in "exclude".
 
-The other addition that was made was the `where()` step which is a filter step like `has()`. The `where()` is
-positioned after the `in()` step that has "person" vertices, which means that the `where()` filter is occurring
+The other addition that was made was the `where()`-step which is a filter step like `has()`. The `where()` is
+positioned after the `in()`-step that has "person" vertices, which means that the `where()` filter is occurring
 on the list of "marko" collaborators. The `where()` specifies that the "person" vertices passing through it should
 not equal (i.e. `neq()`) the contents of the "exclude" label. As it just contains the "marko" vertex, the `where()`
 filters out the "marko" that we get when we traverse back _in_ on the "created" edges.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dde73e42/docs/src/tutorials/gremlins-anatomy/index.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/tutorials/gremlins-anatomy/index.asciidoc b/docs/src/tutorials/gremlins-anatomy/index.asciidoc
index b36d881..998ff68 100644
--- a/docs/src/tutorials/gremlins-anatomy/index.asciidoc
+++ b/docs/src/tutorials/gremlins-anatomy/index.asciidoc
@@ -102,11 +102,11 @@ g.V().
     by(label()).next()
 ----
 
-the `GraphTraversal` components are represented by the `has()`, `outE()` and `groupCount()` steps. The key to reading
+the `GraphTraversal` components are represented by the `has()`, `outE()` and `groupCount()`-steps. The key to reading
 this Gremlin is to realize that the output of one step becomes the input to the next. Therefore, if you consider the
 start step of `V()` and realize that it returns vertices in the graph, the input to `has()` is going to be a `Vertex`.
-The `has()` step is a filtering step and will take the vertices that are passed into it and block any that do not
-meet the criteria it has specified. In this case, that means that the output of the `has()` step is vertices that have
+The `has()`-step is a filtering step and will take the vertices that are passed into it and block any that do not
+meet the criteria it has specified. In this case, that means that the output of the `has()`-step is vertices that have
 the label of "person" and the "name" property value of "josh" or "marko". 
 
 image::gremlin-anatomy-filter.png[width=600]
@@ -118,7 +118,7 @@ incoming "marko" and "josh" vertices and traverse their outgoing edges as the ou
 image::gremlin-anatomy-navigate.png[width=600]
 
 Now that it is clear that the output of `outE()` is an edge, you are aware of the input to `groupCount()` - edges.
-The `groupCount()` step requires a bit more discussion of other Gremlin components and will thus be examined in the
+The `groupCount()`-step requires a bit more discussion of other Gremlin components and will thus be examined in the
 following sections. At this point, it is simply worth noting that the output of `groupCount()` is a `Map` and if a
 Gremlin step followed it, the input to that step would therefore be a `Map`.
 
@@ -130,7 +130,7 @@ remaining pieces.
 === Step Modulators
 
 It's been explained in several ways now that the output of one step becomes the input to the next, so surely the `Map`
-produced by `groupCount()` will feed the `by()` step. As alluded to at the end of the previous section, that
+produced by `groupCount()` will feed the `by()`-step. As alluded to at the end of the previous section, that
 expectation is not correct. Technically, `by()` is not a step. It is a step modulator. A step modulator modifies the
 behavior of the previous step. In this case, it is telling Gremlin how the key for the `groupCount()` should be
 determined. Or said another way in the context of the example, it answers this question: What do you want the "marko"
@@ -148,7 +148,7 @@ methods, thus allowing `__.label()` to be referred to simply as `label()`.
 
 NOTE: In Java, the full package name for the `__` is `org.apache.tinkerpop.gremlin.process.traversal.dsl.graph`.
 
-In the context of the example traversal, you can imagine Gremlin getting to the `groupCount()` step with a "marko" or
+In the context of the example traversal, you can imagine Gremlin getting to the `groupCount()`-step with a "marko" or
 "josh" outgoing edge, checking the `by()` modulator to see "what to group by", and then putting edges into buckets
 by their `label()` and incrementing a counter on each bucket.
 
@@ -160,7 +160,7 @@ The output is thus an edge label distribution for the outgoing edges of the "mar
 
 Terminal steps are different from the `GraphTraversal` steps in that terminal steps do not return a `GraphTraversal`
 instance, but instead return the result of the `GraphTraversal`. In the case of the example, `next()` is the terminal
-step and it returns the `Map` constructed in the `groupCount()` step. Other examples of terminal steps include:
+step and it returns the `Map` constructed in the `groupCount()`-step. Other examples of terminal steps include:
 `hasNext()`, `toList()`, and `iterate()`. Without terminal steps, you don't have a result. You only have a
 `GraphTraversal`
 
@@ -169,7 +169,7 @@ link:http://tinkerpop.apache.org/docs/x.y.z/tutorials/the-gremlin-console/#resul
 
 === Expressions
 
-It is worth backing up a moment to re-examine the `has()` step. Now that you have come to understand anonymous
+It is worth backing up a moment to re-examine the `has()`-step. Now that you have come to understand anonymous
 traversals, it would be reasonable to make the assumption that the `within()` argument to `has()` falls into that
 category. It does not. The `within()` option is not a step either, but instead, something called an expression. An
 expression typically refers to anything not mentioned in the previously described Gremlin component categories that

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dde73e42/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 cc090d9..b34be6c 100644
--- a/docs/src/tutorials/the-gremlin-console/index.asciidoc
+++ b/docs/src/tutorials/the-gremlin-console/index.asciidoc
@@ -353,7 +353,7 @@ public final class Traversals {
 ----
 
 Of course, this won't work and you will likely be left wondering why your unit test for "removeByName" is failing, but
-the identical line of code in the console is doing what is expected.  The `drop()` step is not some special form
+the identical line of code in the console is doing what is expected.  The `drop()`-step is not some special form
 of terminating step that iterates the traversal - it is just one more step that vertices will pass through.  Outside
 of the console you must add `iterate()` as follows:
 


[32/50] [abbrv] tinkerpop git commit: Merge branch 'tp33'

Posted by dk...@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/c2ffd946
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/c2ffd946
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/c2ffd946

Branch: refs/heads/TINKERPOP-1990
Commit: c2ffd946e61fb2704314ad5ccee0364318229190
Parents: 7d4fb34 5eaf312
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Jul 25 11:30:59 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Jul 25 11:30:59 2018 -0400

----------------------------------------------------------------------
 .../gremlin-javascript/lib/structure/io/type-serializers.js   | 2 +-
 .../javascript/gremlin-javascript/test/unit/graphson-test.js  | 7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------



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

Posted by dk...@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/c3981000
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/c3981000
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/c3981000

Branch: refs/heads/TINKERPOP-1990
Commit: c3981000234faf03f4ea4bc1da8086bc34fb3140
Parents: 05432a7 f9ad72a
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Mon Jul 23 10:01:23 2018 -0700
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Mon Jul 23 10:01:23 2018 -0700

----------------------------------------------------------------------
 .gitignore                                      |  1 +
 CHANGELOG.asciidoc                              |  1 +
 docker/hadoop/.gitignore                        |  1 +
 docker/hadoop/Dockerfile                        | 25 ----------
 .../traversal/step/branch/BranchStep.java       | 51 +++++++++++++++++---
 gremlin-test/features/branch/Choose.feature     | 15 ++++++
 .../traversal/step/branch/ChooseTest.java       | 24 +++++++++
 7 files changed, 86 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c3981000/.gitignore
----------------------------------------------------------------------

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


[25/50] [abbrv] tinkerpop git commit: Merge branch 'tp32' into tp33

Posted by dk...@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/421839d2
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/421839d2
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/421839d2

Branch: refs/heads/TINKERPOP-1990
Commit: 421839d2744d679afe922e55e814b34fb61cfec5
Parents: ebee26c f56a3e7
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Jul 25 08:59:31 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Jul 25 08:59:31 2018 -0400

----------------------------------------------------------------------
 docs/src/reference/gremlin-variants.asciidoc |  2 +-
 docs/src/reference/the-traversal.asciidoc    | 63 +++++++++++++++++++++++
 2 files changed, 64 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/421839d2/docs/src/reference/gremlin-variants.asciidoc
----------------------------------------------------------------------

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


[29/50] [abbrv] tinkerpop git commit: Merge branch 'tp33'

Posted by dk...@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/7d4fb343
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/7d4fb343
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/7d4fb343

Branch: refs/heads/TINKERPOP-1990
Commit: 7d4fb343e36becfeebc4f08b8cd8a464268b6d24
Parents: a14cf28 1bd35dc
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Jul 25 09:46:23 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Jul 25 09:46:23 2018 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                                |  1 +
 .../lib/structure/io/graph-serializer.js          |  2 ++
 .../lib/structure/io/type-serializers.js          | 18 ++++++++++++++++++
 .../gremlin-javascript/test/unit/graphson-test.js |  8 ++++++++
 4 files changed, 29 insertions(+)
----------------------------------------------------------------------


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


[37/50] [abbrv] tinkerpop git commit: Merge branch 'tp32' into tp33

Posted by dk...@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/ffb8c3e4
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/ffb8c3e4
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/ffb8c3e4

Branch: refs/heads/TINKERPOP-1990
Commit: ffb8c3e4e6e8a87d9fea31f2a2f92deb7f809ac5
Parents: 445a8bf 0bd9b5a
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Jul 26 08:28:33 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Jul 26 08:28:33 2018 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                                |  1 +
 .../traversal/dsl/graph/GraphTraversalSource.java | 18 +++++++-----------
 .../dsl/graph/GraphTraversalSourceTest.java       |  9 ++-------
 3 files changed, 10 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


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

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ffb8c3e4/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java
----------------------------------------------------------------------


[16/50] [abbrv] tinkerpop git commit: Fixed bad merge (NumberHelper package name)

Posted by dk...@apache.org.
Fixed bad merge (NumberHelper package name)


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

Branch: refs/heads/TINKERPOP-1990
Commit: 3aa6dcf413d16feaae4e020b60e029e62521e7a9
Parents: c398100
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Mon Jul 23 11:01:03 2018 -0700
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Mon Jul 23 11:01:03 2018 -0700

----------------------------------------------------------------------
 .../gremlin/process/traversal/step/branch/BranchStep.java          | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3aa6dcf4/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/BranchStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/BranchStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/BranchStep.java
index 1ced91c..e35d51e 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/BranchStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/BranchStep.java
@@ -18,7 +18,6 @@
  */
 package org.apache.tinkerpop.gremlin.process.traversal.step.branch;
 
-import org.apache.tinkerpop.gremlin.process.traversal.NumberHelper;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
 import org.apache.tinkerpop.gremlin.process.traversal.step.Barrier;
@@ -31,6 +30,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.util.FastNoSuchElementExce
 import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper;
 import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalUtil;
 import org.apache.tinkerpop.gremlin.structure.util.StringFactory;
+import org.apache.tinkerpop.gremlin.util.NumberHelper;
 
 import java.util.ArrayList;
 import java.util.Collections;


[13/50] [abbrv] tinkerpop git commit: TINKERPOP-2011 Treat numerical options in `ChooseStep` as in any other numerical comparison (value matters, data type does not).

Posted by dk...@apache.org.
TINKERPOP-2011 Treat numerical options in `ChooseStep` as in any other numerical comparison (value matters, data type does not).


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

Branch: refs/heads/TINKERPOP-1990
Commit: f565345b03b69d06e9770e7acab4435f355df8d0
Parents: ec561d8
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Wed Jul 18 12:34:16 2018 -0700
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Mon Jul 23 09:52:38 2018 -0700

----------------------------------------------------------------------
 .gitignore                                      |  1 +
 CHANGELOG.asciidoc                              |  1 +
 docker/hadoop/.gitignore                        |  1 +
 docker/hadoop/Dockerfile                        | 25 ----------
 .../traversal/step/branch/BranchStep.java       | 51 +++++++++++++++++---
 .../step/branch/GroovyChooseTest.groovy         |  5 ++
 gremlin-test/features/branch/Choose.feature     | 15 ++++++
 .../traversal/step/branch/ChooseTest.java       | 24 +++++++++
 8 files changed, 91 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f565345b/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index a27eb44..fa8dac6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -32,3 +32,4 @@ tools/
 *nupkg
 NuGet.Config
 nuget*.exe
+/Dockerfile

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f565345b/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index f50b9ec..6270880 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)
 
+* Match numbers in `choose()` options using `NumberHelper` (match values, ignore data type).
 * Fixed bug in Java driver where an disorderly shutdown of the server would cause the client to hang.
 * Added a dotnet template project that should make it easier to get started with Gremlin.Net.
 * Removed `ThreadInterruptCustomizerProvider` from documentation as a way to timeout.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f565345b/docker/hadoop/.gitignore
----------------------------------------------------------------------
diff --git a/docker/hadoop/.gitignore b/docker/hadoop/.gitignore
new file mode 100644
index 0000000..9414382
--- /dev/null
+++ b/docker/hadoop/.gitignore
@@ -0,0 +1 @@
+Dockerfile

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f565345b/docker/hadoop/Dockerfile
----------------------------------------------------------------------
diff --git a/docker/hadoop/Dockerfile b/docker/hadoop/Dockerfile
deleted file mode 100644
index 86b2598..0000000
--- a/docker/hadoop/Dockerfile
+++ /dev/null
@@ -1,25 +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.
-
-FROM tinkerpop:base
-
-MAINTAINER Daniel Kuppitz <me...@gremlin.guru>
-
-ENV HADOOP_VERSION 2.7.2
-
-COPY install.sh /usr/local/sbin/install-hadoop.sh
-RUN /usr/local/sbin/install-hadoop.sh

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f565345b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/BranchStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/BranchStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/BranchStep.java
index 0b1a059..6c38351 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/BranchStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/BranchStep.java
@@ -18,6 +18,7 @@
  */
 package org.apache.tinkerpop.gremlin.process.traversal.step.branch;
 
+import org.apache.tinkerpop.gremlin.process.traversal.NumberHelper;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
 import org.apache.tinkerpop.gremlin.process.traversal.step.Barrier;
@@ -46,7 +47,7 @@ import java.util.stream.Collectors;
 public class BranchStep<S, E, M> extends ComputerAwareStep<S, E> implements TraversalOptionParent<M, S, E> {
 
     protected Traversal.Admin<S, M> branchTraversal;
-    protected Map<M, List<Traversal.Admin<S, E>>> traversalOptions = new HashMap<>();
+    protected Map<Object, List<Traversal.Admin<S, E>>> traversalOptions = new HashMap<>();
     private boolean first = true;
     private boolean hasBarrier = false;
 
@@ -60,10 +61,11 @@ public class BranchStep<S, E, M> extends ComputerAwareStep<S, E> implements Trav
 
     @Override
     public void addGlobalChildOption(final M pickToken, final Traversal.Admin<S, E> traversalOption) {
-        if (this.traversalOptions.containsKey(pickToken))
-            this.traversalOptions.get(pickToken).add(traversalOption);
+        final Object pickTokenKey = PickTokenKey.make(pickToken);
+        if (this.traversalOptions.containsKey(pickTokenKey))
+            this.traversalOptions.get(pickTokenKey).add(traversalOption);
         else
-            this.traversalOptions.put(pickToken, new ArrayList<>(Collections.singletonList(traversalOption)));
+            this.traversalOptions.put(pickTokenKey, new ArrayList<>(Collections.singletonList(traversalOption)));
 
         // adding an IdentityStep acts as a placeholder when reducing barriers get in the way - see the
         // standardAlgorithm() method for more information.
@@ -136,7 +138,7 @@ public class BranchStep<S, E, M> extends ComputerAwareStep<S, E> implements Trav
     private void applyCurrentTraverser(final Traverser.Admin<S> start) {
         // first get the value of the choice based on the current traverser and use that to select the right traversal
         // option to which that traverser should be routed
-        final M choice = TraversalUtil.apply(start, this.branchTraversal);
+        final Object choice = PickTokenKey.make(TraversalUtil.apply(start, this.branchTraversal));
         final List<Traversal.Admin<S, E>> branch = this.traversalOptions.containsKey(choice) ?
                 this.traversalOptions.get(choice) : this.traversalOptions.get(Pick.none);
 
@@ -156,7 +158,7 @@ public class BranchStep<S, E, M> extends ComputerAwareStep<S, E> implements Trav
     protected Iterator<Traverser.Admin<E>> computerAlgorithm() {
         final List<Traverser.Admin<E>> ends = new ArrayList<>();
         final Traverser.Admin<S> start = this.starts.next();
-        final M choice = TraversalUtil.apply(start, this.branchTraversal);
+        final Object choice = PickTokenKey.make(TraversalUtil.apply(start, this.branchTraversal));
         final List<Traversal.Admin<S, E>> branch = this.traversalOptions.containsKey(choice) ? this.traversalOptions.get(choice) : this.traversalOptions.get(Pick.none);
         if (null != branch) {
             branch.forEach(traversal -> {
@@ -184,7 +186,7 @@ public class BranchStep<S, E, M> extends ComputerAwareStep<S, E> implements Trav
     public BranchStep<S, E, M> clone() {
         final BranchStep<S, E, M> clone = (BranchStep<S, E, M>) super.clone();
         clone.traversalOptions = new HashMap<>(this.traversalOptions.size());
-        for (final Map.Entry<M, List<Traversal.Admin<S, E>>> entry : this.traversalOptions.entrySet()) {
+        for (final Map.Entry<Object, List<Traversal.Admin<S, E>>> entry : this.traversalOptions.entrySet()) {
             final List<Traversal.Admin<S, E>> traversals = entry.getValue();
             if (traversals.size() > 0) {
                 final List<Traversal.Admin<S, E>> clonedTraversals = clone.traversalOptions.compute(entry.getKey(), (k, v) ->
@@ -226,4 +228,39 @@ public class BranchStep<S, E, M> extends ComputerAwareStep<S, E> implements Trav
         this.getGlobalChildren().forEach(Traversal.Admin::reset);
         this.first = true;
     }
+
+    /**
+     * PickTokenKey is basically a wrapper for numbers that are used as a PickToken. This is
+     * required in order to treat equal numbers of different data types as a match.
+     */
+    private static class PickTokenKey {
+
+        final Number number;
+
+        private PickTokenKey(final Number number) {
+            this.number = number;
+        }
+
+        static Object make(final Object value) {
+            return value instanceof Number ? new PickTokenKey((Number) value) : value;
+        }
+
+        @Override
+        public boolean equals(final Object o) {
+            if (this == o) return true;
+            if (o == null || getClass() != o.getClass()) return false;
+            final PickTokenKey other = (PickTokenKey) o;
+            return 0 == NumberHelper.compare(number, other.number);
+        }
+
+        @Override
+        public int hashCode() {
+            return number.hashCode();
+        }
+
+        @Override
+        public String toString() {
+            return "PickTokenKey(" + number + ")";
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f565345b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/branch/GroovyChooseTest.groovy
----------------------------------------------------------------------
diff --git a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/branch/GroovyChooseTest.groovy b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/branch/GroovyChooseTest.groovy
index b3e9955..d1801c4 100644
--- a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/branch/GroovyChooseTest.groovy
+++ b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/branch/GroovyChooseTest.groovy
@@ -66,6 +66,11 @@ public abstract class GroovyChooseTest {
         }
 
         @Override
+        public Traversal<Vertex, Map<String, Long>> get_g_V_hasLabelXpersonX_chooseXageX__optionX27L__constantXyoungXX_optionXnone__constantXoldXX_groupCount() {
+            new ScriptTraversal<>(g, "gremlin-groovy", "g.V().hasLabel('person').choose(values('age')).option(27L, constant('young')).option(none, constant('old')).groupCount")
+        }
+
+        @Override
         public Traversal<Integer, List<Integer>> get_g_injectX1X_chooseXisX1X__constantX10Xfold__foldX() {
             new ScriptTraversal<>(g, "gremlin-groovy", "g.inject(1).choose(__.is(1), __.constant(10).fold(), __.fold())")
         }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f565345b/gremlin-test/features/branch/Choose.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/branch/Choose.feature b/gremlin-test/features/branch/Choose.feature
index 225e40c..187c96e 100644
--- a/gremlin-test/features/branch/Choose.feature
+++ b/gremlin-test/features/branch/Choose.feature
@@ -123,6 +123,21 @@ Feature: Step - choose()
       | m[{"p1":"josh", "p2":"josh"}] |
       | m[{"p1":"peter", "p2":"peter"}] |
 
+  Scenario: g_V_hasLabelXpersonX_chooseXageX__optionX27L__constantXyoungXX_optionXnone__constantXoldXX_groupCount
+    Given the modern graph
+    And using the parameter d27 defined as "d[27].l"
+    And the traversal of
+      """
+      g.V().hasLabel("person").choose(__.values("age")).
+          option(d27, __.constant("young")).
+          option(Pick.none, __.constant("old")).
+        groupCount()
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"young":"d[1].l", "old":"d[3].l"}] |
+
   Scenario: g_injectX1X_chooseXisX1X__constantX10Xfold__foldX
     Given the empty graph
     And using the parameter d10 defined as "d[10].i"

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f565345b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/ChooseTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/ChooseTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/ChooseTest.java
index 6da38a7..105e307 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/ChooseTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/ChooseTest.java
@@ -49,6 +49,7 @@ import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.core.Is.is;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 /**
  * @author Marko A. Rodriguez (http://markorodriguez.com)
@@ -69,6 +70,8 @@ public abstract class ChooseTest extends AbstractGremlinProcessTest {
 
     public abstract Traversal<Vertex, Map<String, String>> get_g_V_hasLabelXpersonX_asXp1X_chooseXoutEXknowsX__outXknowsXX_asXp2X_selectXp1_p2X_byXnameX();
 
+    public abstract Traversal<Vertex, Map<String, Long>> get_g_V_hasLabelXpersonX_chooseXageX__optionX27L__constantXyoungXX_optionXnone__constantXoldXX_groupCount();
+
     public abstract Traversal<Integer, List<Integer>> get_g_injectX1X_chooseXisX1X__constantX10Xfold__foldX();
 
     public abstract Traversal<Integer, List<Integer>> get_g_injectX2X_chooseXisX1X__constantX10Xfold__foldX();
@@ -138,6 +141,19 @@ public abstract class ChooseTest extends AbstractGremlinProcessTest {
     }
 
     @Test
+    @LoadGraphWith(MODERN)
+    public void g_V_hasLabelXpersonX_chooseXageX__optionX27L__constantXyoungXX_optionXnone__constantXoldXX_groupCount() {
+        final Traversal<Vertex, Map<String, Long>> traversal = get_g_V_hasLabelXpersonX_chooseXageX__optionX27L__constantXyoungXX_optionXnone__constantXoldXX_groupCount();
+        printTraversalForm(traversal);
+        final Map<String, Long> expected = new HashMap<>(2);
+        expected.put("young", 1L);
+        expected.put("old", 3L);
+        assertTrue(traversal.hasNext());
+        checkMap(expected, traversal.next());
+        assertFalse(traversal.hasNext());
+    }
+
+    @Test
     public void g_injectX1X_chooseXisX1X__constantX10Xfold__foldX() {
         final Traversal<Integer, List<Integer>> traversal = get_g_injectX1X_chooseXisX1X__constantX10Xfold__foldX();
         printTraversalForm(traversal);
@@ -191,6 +207,14 @@ public abstract class ChooseTest extends AbstractGremlinProcessTest {
         }
 
         @Override
+        public Traversal<Vertex, Map<String, Long>> get_g_V_hasLabelXpersonX_chooseXageX__optionX27L__constantXyoungXX_optionXnone__constantXoldXX_groupCount() {
+            return g.V().hasLabel("person").choose(values("age"))
+                    .option(27L, __.constant("young"))
+                    .option(TraversalOptionParent.Pick.none, __.constant("old"))
+                    .groupCount();
+        }
+
+        @Override
         public Traversal<Integer, List<Integer>> get_g_injectX1X_chooseXisX1X__constantX10Xfold__foldX() {
             return g.inject(1).choose(__.is(1), __.constant(10).fold(), __.fold());
         }


[11/50] [abbrv] tinkerpop git commit: Merge branch 'tp33'

Posted by dk...@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/acc7012a
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/acc7012a
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/acc7012a

Branch: refs/heads/TINKERPOP-1990
Commit: acc7012a48acaac47fc94f38e260b2048b027b9f
Parents: 2596bcf 05432a7
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Sun Jul 22 15:11:20 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Sun Jul 22 15:11:20 2018 -0400

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



[40/50] [abbrv] tinkerpop git commit: Merge branch 'tp33'

Posted by dk...@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/a17bb406
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/a17bb406
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/a17bb406

Branch: refs/heads/TINKERPOP-1990
Commit: a17bb4066c83b73df7e7c79f6625dc5fd389c836
Parents: 74930a9 e55ffc6
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Jul 26 14:16:21 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Jul 26 14:16:21 2018 -0400

----------------------------------------------------------------------
 .../GremlinServerAuditLogIntegrateTest.java     | 14 +++++++++----
 .../server/GremlinServerAuthIntegrateTest.java  |  1 -
 .../GremlinServerAuthKrb5IntegrateTest.java     | 15 ++++++++++++++
 .../tinkerpop/gremlin/server/KdcFixture.java    | 21 ++++++++++----------
 4 files changed, 35 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a17bb406/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuditLogIntegrateTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a17bb406/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuthIntegrateTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a17bb406/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuthKrb5IntegrateTest.java
----------------------------------------------------------------------


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

Posted by dk...@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/aad01022
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/aad01022
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/aad01022

Branch: refs/heads/TINKERPOP-1990
Commit: aad0102275acde628d1224f6e1ffe498d478f6f6
Parents: e0ffa3b 3aa6dcf
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Mon Jul 23 11:01:20 2018 -0700
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Mon Jul 23 11:01:20 2018 -0700

----------------------------------------------------------------------
 .../gremlin/process/traversal/step/branch/BranchStep.java          | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------



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

Posted by dk...@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/ebee26c4
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/ebee26c4
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/ebee26c4

Branch: refs/heads/TINKERPOP-1990
Commit: ebee26c47fd3ec341d95fcdd6d87190d27e37f27
Parents: 1ca5ef3 9986493
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Jul 25 07:43:46 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Jul 25 07:43:46 2018 -0400

----------------------------------------------------------------------
 docs/src/reference/gremlin-variants.asciidoc | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ebee26c4/docs/src/reference/gremlin-variants.asciidoc
----------------------------------------------------------------------


[08/50] [abbrv] tinkerpop git commit: Merge branch 'tp33'

Posted by dk...@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/2596bcf0
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/2596bcf0
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/2596bcf0

Branch: refs/heads/TINKERPOP-1990
Commit: 2596bcf02680b201ddf1c71b6f74ec2783435331
Parents: c21aa28 b757173
Author: Florian Hockmann <fh...@florian-hockmann.de>
Authored: Sun Jul 22 15:56:33 2018 +0200
Committer: Florian Hockmann <fh...@florian-hockmann.de>
Committed: Sun Jul 22 15:56:33 2018 +0200

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


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2596bcf0/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj
----------------------------------------------------------------------


[27/50] [abbrv] tinkerpop git commit: Added Date GraphSON serialization for Javascript CTR

Posted by dk...@apache.org.
Added Date GraphSON serialization for Javascript CTR


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

Branch: refs/heads/TINKERPOP-1990
Commit: db46c0f67fb1f93b9ea76032dbd2a852c24effd4
Parents: f56a3e7
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Jul 25 09:45:30 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Jul 25 09:45:30 2018 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                                |  1 +
 .../lib/structure/io/graph-serializer.js          |  2 ++
 .../lib/structure/io/type-serializers.js          | 18 ++++++++++++++++++
 .../gremlin-javascript/test/unit/graphson-test.js |  8 ++++++++
 4 files changed, 29 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/db46c0f6/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index f076ba1..0f2b18b 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -24,6 +24,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 === TinkerPop 3.2.10 (Release Date: NOT OFFICIALLY RELEASED YET)
 
 * Match numbers in `choose()` options using `NumberHelper` (match values, ignore data type).
+* Added support for GraphSON serialization of `Date` in Javascript.
 * Fixed bug in Java driver where an disorderly shutdown of the server would cause the client to hang.
 * Added a dotnet template project that should make it easier to get started with Gremlin.Net.
 * Removed `ThreadInterruptCustomizerProvider` from documentation as a way to timeout.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/db46c0f6/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/graph-serializer.js
----------------------------------------------------------------------
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/graph-serializer.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/graph-serializer.js
index df05659..55b0265 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/graph-serializer.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/graph-serializer.js
@@ -155,6 +155,7 @@ const deserializers = {
   'g:Int64':  typeSerializers.NumberSerializer,
   'g:Float':  typeSerializers.NumberSerializer,
   'g:Double': typeSerializers.NumberSerializer,
+  'g:Date': typeSerializers.DateSerializer,
   'g:Vertex': typeSerializers.VertexSerializer,
   'g:Edge': typeSerializers.EdgeSerializer,
   'g:VertexProperty': typeSerializers.VertexPropertySerializer,
@@ -165,6 +166,7 @@ const deserializers = {
 
 const serializers = [
   typeSerializers.NumberSerializer,
+  typeSerializers.DateSerializer,
   typeSerializers.BytecodeSerializer,
   typeSerializers.TraverserSerializer,
   typeSerializers.PSerializer,

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/db46c0f6/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js
----------------------------------------------------------------------
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js
index 304888f..4bc2935 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js
@@ -61,6 +61,23 @@ class NumberSerializer extends TypeSerializer {
   }
 }
 
+class DateSerializer extends TypeSerializer {
+  serialize(item) {
+    return {
+      [typeKey]: 'g:Date',
+      [valueKey]: item.value.getTime()
+    };
+  }
+
+  deserialize(obj) {
+    return new Date(obj[valueKey]);
+  }
+
+  canBeUsedFor(value) {
+    return (value instanceof Date);
+  }
+}
+
 class LongSerializer extends TypeSerializer {
   serialize(item) {
     return {
@@ -278,6 +295,7 @@ class TSerializer extends TypeSerializer {
 
 module.exports = {
   BytecodeSerializer,
+  DateSerializer,
   EdgeSerializer,
   EnumSerializer,
   LambdaSerializer,

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/db46c0f6/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphson-test.js
----------------------------------------------------------------------
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphson-test.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphson-test.js
index 8bc7571..8f749f7 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphson-test.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphson-test.js
@@ -46,6 +46,14 @@ describe('GraphSONReader', function () {
       assert.strictEqual(result, item[1]);
     });
   });
+  it('should parse Date', function() {
+    const obj = { "@type" : "g:Date", "@value" : 1481750076295 };
+    const reader = new GraphSONReader();
+    const result = reader.read(obj);
+    console.log("++++++++++++++++++++++++++" + obj);
+    console.log("++++++++++++++++++++++++++" + result);
+    assert.ok(result instanceof Date);
+  });
   it('should parse vertices from GraphSON', function () {
     const obj = {
       "@type":"g:Vertex", "@value":{"id":{"@type":"g:Int32","@value":1},"label":"person",


[31/50] [abbrv] tinkerpop git commit: Merge branch 'tp32' into tp33

Posted by dk...@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/5eaf312c
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/5eaf312c
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/5eaf312c

Branch: refs/heads/TINKERPOP-1990
Commit: 5eaf312c000d3145707513f20109956f5f97265a
Parents: 1bd35dc fd64360
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Jul 25 11:30:52 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Jul 25 11:30:52 2018 -0400

----------------------------------------------------------------------
 .../gremlin-javascript/lib/structure/io/type-serializers.js   | 2 +-
 .../javascript/gremlin-javascript/test/unit/graphson-test.js  | 7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5eaf312c/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js
----------------------------------------------------------------------


[39/50] [abbrv] tinkerpop git commit: Close server for auth tests prior to assertions

Posted by dk...@apache.org.
Close server for auth tests prior to assertions

Further trying to flush logs to prevent random failure - hoping that killing the server will do it and make these tests more stable CTR


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

Branch: refs/heads/TINKERPOP-1990
Commit: e55ffc6432a188b9629d00177b5e01cfb07c3f9a
Parents: ffb8c3e
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Jul 26 14:15:20 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Jul 26 14:15:20 2018 -0400

----------------------------------------------------------------------
 .../GremlinServerAuditLogIntegrateTest.java     | 14 +++++++++----
 .../server/GremlinServerAuthIntegrateTest.java  |  1 -
 .../GremlinServerAuthKrb5IntegrateTest.java     | 15 ++++++++++++++
 .../tinkerpop/gremlin/server/KdcFixture.java    | 21 ++++++++++----------
 4 files changed, 35 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e55ffc64/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuditLogIntegrateTest.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuditLogIntegrateTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuditLogIntegrateTest.java
index c31ee69..0231bab 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuditLogIntegrateTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuditLogIntegrateTest.java
@@ -23,8 +23,6 @@ import org.apache.http.client.methods.HttpGet;
 import org.apache.http.impl.client.CloseableHttpClient;
 import org.apache.http.impl.client.HttpClients;
 import org.apache.http.util.EntityUtils;
-import org.apache.log4j.Appender;
-import org.apache.log4j.LogManager;
 import org.apache.log4j.Logger;
 import org.apache.log4j.spi.LoggingEvent;
 import static org.apache.log4j.Level.INFO;
@@ -165,6 +163,7 @@ public class GremlinServerAuditLogIntegrateTest extends AbstractGremlinServerInt
         }
 
         // wait for logger to flush - (don't think there is a way to detect this)
+        stopServer();
         Thread.sleep(1000);
 
         // WebSocketChannelizer does not add SaslAuthenticationHandler for AllowAllAuthenticator,
@@ -192,6 +191,10 @@ public class GremlinServerAuditLogIntegrateTest extends AbstractGremlinServerInt
             cluster.close();
         }
 
+        // wait for logger to flush - (don't think there is a way to detect this)
+        stopServer();
+        Thread.sleep(1000);
+
         final String simpleAuthenticatorName = SimpleAuthenticator.class.getSimpleName();
         final String authMsg = recordingAppender.getMessages().stream()
                 .filter(msg -> msg.contains("by " + simpleAuthenticatorName)).iterator().next();
@@ -199,8 +202,6 @@ public class GremlinServerAuditLogIntegrateTest extends AbstractGremlinServerInt
         m.find();
         final String address = m.group(1);
 
-        // wait for logger to flush - (don't think there is a way to detect this)
-        Thread.sleep(1000);
 
         assertTrue(recordingAppender.logContainsAny(AUDIT_LOGGER_NAME, INFO,
                 String.format("User %s with address %s authenticated by %s", username, address, simpleAuthenticatorName)));
@@ -226,6 +227,7 @@ public class GremlinServerAuditLogIntegrateTest extends AbstractGremlinServerInt
         }
 
         // wait for logger to flush - (don't think there is a way to detect this)
+        stopServer();
         Thread.sleep(1000);
 
         final List<LoggingEvent> log = recordingAppender.getEvents();
@@ -260,6 +262,7 @@ public class GremlinServerAuditLogIntegrateTest extends AbstractGremlinServerInt
         }
 
         // wait for logger to flush - (don't think there is a way to detect this)
+        stopServer();
         Thread.sleep(1000);
 
         final List<LoggingEvent> log = recordingAppender.getEvents();
@@ -287,6 +290,7 @@ public class GremlinServerAuditLogIntegrateTest extends AbstractGremlinServerInt
         }
 
         // wait for logger to flush - (don't think there is a way to detect this)
+        stopServer();
         Thread.sleep(1000);
 
         final List<LoggingEvent> log = recordingAppender.getEvents();
@@ -322,6 +326,7 @@ public class GremlinServerAuditLogIntegrateTest extends AbstractGremlinServerInt
         }
 
         // wait for logger to flush - (don't think there is a way to detect this)
+        stopServer();
         Thread.sleep(1000);
 
         final List<LoggingEvent> log = recordingAppender.getEvents();
@@ -359,6 +364,7 @@ public class GremlinServerAuditLogIntegrateTest extends AbstractGremlinServerInt
         }
 
         // wait for logger to flush - (don't think there is a way to detect this)
+        stopServer();
         Thread.sleep(1000);
 
         final List<LoggingEvent> log = recordingAppender.getEvents();

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e55ffc64/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuthIntegrateTest.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuthIntegrateTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuthIntegrateTest.java
index 6dda40b..35acf38 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuthIntegrateTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuthIntegrateTest.java
@@ -40,7 +40,6 @@ import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.core.AnyOf.anyOf;
 import static org.hamcrest.core.IsInstanceOf.instanceOf;
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
 /**

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e55ffc64/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuthKrb5IntegrateTest.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuthKrb5IntegrateTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuthKrb5IntegrateTest.java
index 5a02d0a..10ed834 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuthKrb5IntegrateTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuthKrb5IntegrateTest.java
@@ -180,16 +180,31 @@ public class GremlinServerAuthKrb5IntegrateTest extends AbstractGremlinServerInt
 
     @Test
     public void shouldFailWithNonexistentServerPrincipal() throws Exception {
+
+        // wait for logger to flush - (don't think there is a way to detect this)
+        stopServer();
+        Thread.sleep(1000);
+
         assertTrue(recordingAppender.logContainsAny("WARN - Failed to login to kdc"));
     }
 
     @Test
     public void shouldFailWithEmptyServerKeytab() throws Exception {
+
+        // wait for logger to flush - (don't think there is a way to detect this)
+        stopServer();
+        Thread.sleep(1000);
+
         assertTrue(recordingAppender.logContainsAny("WARN - Failed to login to kdc"));
     }
 
     @Test
     public void shouldFailWithWrongServerKeytab() throws Exception {
+
+        // wait for logger to flush - (don't think there is a way to detect this)
+        stopServer();
+        Thread.sleep(1000);
+
         assertTrue(recordingAppender.logContainsAny("WARN - Failed to login to kdc"));
     }
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e55ffc64/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/KdcFixture.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/KdcFixture.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/KdcFixture.java
index fce29d8..29eaf8d 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/KdcFixture.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/KdcFixture.java
@@ -32,14 +32,14 @@ import java.net.Inet4Address;
 
 
 /**
- * @author Marc de Lignie
- *
  * This class is derived from the following classes from https://github.com/apache/directory-kerby/blob/kerby-all-1.0.0-RC2:
  *  - org.apache.kerby.kerberos.kerb.server.TestKdcServer
  *  - org.apache.kerby.kerberos.kerb.server.KdcTestBase
  *  - org.apache.kerby.kerberos.kerb.server.LoginTestBase
  *
  * See also: gremlin-server/src/main/static/NOTICE
+ *
+ * @author Marc de Lignie
  */
 public class KdcFixture {
 
@@ -65,8 +65,7 @@ public class KdcFixture {
     final String hostname;
     private SimpleKdcServer kdcServer;
 
-
-    public KdcFixture(String authConfigName)  throws Exception {
+    public KdcFixture(final String authConfigName) {
         System.setProperty("java.security.auth.login.config", authConfigName);
         hostname = findHostname();
         serverPrincipal = serverPrincipalName + "/" + hostname + "@" + KdcFixture.TestKdcServer.KDC_REALM;
@@ -92,9 +91,9 @@ public class KdcFixture {
     }
 
     private File createTestDir() {
-        String basedir = System.getProperty("basedir");
-        File targetdir = new File(basedir, "target");
-        File testDir = new File(targetdir, "tmp");
+        final String basedir = System.getProperty("basedir");
+        final File targetdir = new File(basedir, "target");
+        final File testDir = new File(targetdir, "tmp");
         testDir.mkdirs();
         return testDir;
     }
@@ -110,8 +109,8 @@ public class KdcFixture {
             setAllowUdp(false);    // There are still udp issues in Apache Directory-Kerby 1.0.0-RC2
             setKdcTcpPort(NetworkUtil.getServerPort());
 
-            KrbClient krbClnt = getKrbClient();
-            KrbConfig krbConfig = krbClnt.getKrbConfig();
+            final KrbClient krbClnt = getKrbClient();
+            final KrbConfig krbConfig = krbClnt.getKrbConfig();
             krbConfig.setString(KrbConfigKey.PERMITTED_ENCTYPES,
                     "aes128-cts-hmac-sha1-96 des-cbc-crc des-cbc-md5 des3-cbc-sha1");
             krbClnt.setTimeout(10 * 1000);
@@ -135,11 +134,11 @@ public class KdcFixture {
         kdcServer.exportPrincipal(serverPrincipal, serviceKeytabFile);
 
         kdcServer.createPrincipal(clientPrincipal, clientPassword);
-        TgtTicket tgt = kdcServer.getKrbClient().requestTgt(clientPrincipal, clientPassword);
+        final TgtTicket tgt = kdcServer.getKrbClient().requestTgt(clientPrincipal, clientPassword);
         kdcServer.getKrbClient().storeTicket(tgt, ticketCacheFile);
 
         kdcServer.createPrincipal(clientPrincipal2, clientPassword2);
-        TgtTicket tgt2 = kdcServer.getKrbClient().requestTgt(clientPrincipal2, clientPassword2);
+        final TgtTicket tgt2 = kdcServer.getKrbClient().requestTgt(clientPrincipal2, clientPassword2);
         kdcServer.getKrbClient().storeTicket(tgt2, ticketCacheFile2);
     }
 


[38/50] [abbrv] tinkerpop git commit: Merge branch 'tp33'

Posted by dk...@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/74930a99
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/74930a99
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/74930a99

Branch: refs/heads/TINKERPOP-1990
Commit: 74930a998c5de9dfd58ad8023dceac4ffcad6b60
Parents: 5f912ea ffb8c3e
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Jul 26 08:28:40 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Jul 26 08:28:40 2018 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                                |  1 +
 .../traversal/dsl/graph/GraphTraversalSource.java | 18 +++++++-----------
 .../dsl/graph/GraphTraversalSourceTest.java       |  9 ++-------
 3 files changed, 10 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


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


[47/50] [abbrv] tinkerpop git commit: Merge branch 'tp32' into tp33

Posted by dk...@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/79851067
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/79851067
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/79851067

Branch: refs/heads/TINKERPOP-1990
Commit: 798510679b5af84ffc1ecdfa5ef86d52229cbc99
Parents: 9b693c0 3b8c828
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Jul 27 16:29:37 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Jul 27 16:29:37 2018 -0400

----------------------------------------------------------------------
 docs/src/recipes/element-existence.asciidoc | 91 ++++++++++++++++++++++++
 docs/src/recipes/index.asciidoc             |  2 +
 2 files changed, 93 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/79851067/docs/src/recipes/index.asciidoc
----------------------------------------------------------------------


[36/50] [abbrv] tinkerpop git commit: Throw exception if withRemote() is called multiple times during configuration

Posted by dk...@apache.org.
Throw exception if withRemote() is called multiple times during configuration

This is a change in behavior. Prior to this we would have quietly closed the connection, but that's a little too sneaky. Also, the connection was being assigned to the current TraversalSource as well as the clone. Not sure why that was happening as the clone was really the only thing that would use it after the call to withRemote(), so the construction was also corrected. CTR


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

Branch: refs/heads/TINKERPOP-1990
Commit: 0bd9b5ae7a1bcfda27541399996a2eaf4e421908
Parents: 3be3550
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Jul 26 08:25:02 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Jul 26 08:25:02 2018 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                                |  1 +
 .../traversal/dsl/graph/GraphTraversalSource.java | 18 +++++++-----------
 .../dsl/graph/GraphTraversalSourceTest.java       |  9 ++-------
 3 files changed, 10 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0bd9b5ae/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 0f2b18b..b6e85ce 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -28,6 +28,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 * Fixed bug in Java driver where an disorderly shutdown of the server would cause the client to hang.
 * Added a dotnet template project that should make it easier to get started with Gremlin.Net.
 * Removed `ThreadInterruptCustomizerProvider` from documentation as a way to timeout.
+* Changed behavior of `withRemote()` if called multiple times so as to simply throw an exception and not perform the side-effect of auto-closing.
 * Added Docker images for Gremlin Console and Gremlin Server.
 * Fixed bug in `branch()` where reducing steps as options would produce incorrect results.
 * Removed recursive handling of streaming results from Gremlin-Python driver to avoid max recursion depth errors.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0bd9b5ae/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java
index baba19c..faf9459 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java
@@ -302,19 +302,15 @@ public class GraphTraversalSource implements TraversalSource {
      */
     @Override
     public GraphTraversalSource withRemote(final RemoteConnection connection) {
-        try {
-            // check if someone called withRemote() more than once, so just release resources on the initial
-            // connection as you can't have more than one. maybe better to toss IllegalStateException??
-            if (this.connection != null)
-                this.connection.close();
-        } catch (Exception ignored) {
-            // not sure there's anything to do here
-        }
+        // check if someone called withRemote() more than once, so just release resources on the initial
+        // connection as you can't have more than one. maybe better to toss IllegalStateException??
+        if (this.connection != null)
+            throw new IllegalStateException(String.format("TraversalSource already configured with a RemoteConnection [%s]", connection));
 
-        this.connection = connection;
-        final TraversalSource clone = this.clone();
+        final GraphTraversalSource clone = this.clone();
+        clone.connection = connection;
         clone.getStrategies().addStrategies(new RemoteStrategy(connection));
-        return (GraphTraversalSource) clone;
+        return clone;
     }
 
     //// SPAWNS

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0bd9b5ae/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSourceTest.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSourceTest.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSourceTest.java
index 7e7d777..a645089 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSourceTest.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSourceTest.java
@@ -47,16 +47,11 @@ public class GraphTraversalSourceTest {
         verify(mock, times(1)).close();
     }
 
-    @Test
+    @Test(expected = IllegalStateException.class)
     public void shouldNotAllowLeakRemoteConnectionsIfMultipleAreCreated() throws Exception {
-
         final RemoteConnection mock1 = mock(RemoteConnection.class);
         final RemoteConnection mock2 = mock(RemoteConnection.class);
-        final GraphTraversalSource g = EmptyGraph.instance().traversal().withRemote(mock1).withRemote(mock2);
-        g.close();
-
-        verify(mock1, times(1)).close();
-        verify(mock2, times(1)).close();
+        EmptyGraph.instance().traversal().withRemote(mock1).withRemote(mock2);
     }
 
     @Test


[20/50] [abbrv] tinkerpop git commit: Merge branch 'tp33'

Posted by dk...@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/e1e15fa1
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/e1e15fa1
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/e1e15fa1

Branch: refs/heads/TINKERPOP-1990
Commit: e1e15fa10a5a7f183be81143bfb8a902b483610a
Parents: aad0102 1ca5ef3
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Jul 25 07:01:18 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Jul 25 07:01:18 2018 -0400

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


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


[48/50] [abbrv] tinkerpop git commit: Merge branch 'tp33'

Posted by dk...@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/6358715e
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/6358715e
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/6358715e

Branch: refs/heads/TINKERPOP-1990
Commit: 6358715e9dfa69627a425e4b930636f271141022
Parents: 9ab5efa 7985106
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Jul 27 16:29:50 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Jul 27 16:29:50 2018 -0400

----------------------------------------------------------------------
 docs/src/recipes/element-existence.asciidoc | 91 ++++++++++++++++++++++++
 docs/src/recipes/index.asciidoc             |  2 +
 2 files changed, 93 insertions(+)
----------------------------------------------------------------------



[45/50] [abbrv] tinkerpop git commit: Consistent use of hyphen in step references CTR

Posted by dk...@apache.org.
Consistent use of hyphen in step references CTR


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

Branch: refs/heads/TINKERPOP-1990
Commit: 9ab5efa6772bb831238f6c9a4e46fc925a45ddaa
Parents: 13ff64c
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Jul 27 07:19:12 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Jul 27 07:19:12 2018 -0400

----------------------------------------------------------------------
 docs/src/upgrade/release-3.4.x.asciidoc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9ab5efa6/docs/src/upgrade/release-3.4.x.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade/release-3.4.x.asciidoc b/docs/src/upgrade/release-3.4.x.asciidoc
index 97e14e3..2d699dc 100644
--- a/docs/src/upgrade/release-3.4.x.asciidoc
+++ b/docs/src/upgrade/release-3.4.x.asciidoc
@@ -31,9 +31,9 @@ Please see the link:https://github.com/apache/tinkerpop/blob/3.4.0/CHANGELOG.asc
 
 ==== with() Step
 
-This version of TinkerPop introduces the `with()` step to Gremlin. It isn't really a step but is instead a step
+This version of TinkerPop introduces the `with()`-step to Gremlin. It isn't really a step but is instead a step
 modulator. This modulator allows the step it is modifying to accept configurations that can be used to alter the
-behavior of the step itself. A good example of its usage is shown with the revised syntax of the `pageRank()` step
+behavior of the step itself. A good example of its usage is shown with the revised syntax of the `pageRank()`-step
 which now uses `with()` to replace the old `by()` options:
 
 [groovy]
@@ -47,7 +47,7 @@ g.V().hasLabel('person').
   valueMap('name','friendRank')
 ----
 
-A similar change was made for `peerPressure()` step:
+A similar change was made for `peerPressure()`-step:
 
 [groovy]
 ----
@@ -306,7 +306,7 @@ See: link:https://issues.apache.org/jira/browse/TINKERPOP-1518[TINKERPOP-1518]
 ===== Configuring Interface
 
 There were some changes to interfaces that were related to `Step`. A new `Configuring` interface was added that was
-helpful in the implementation of the `with()` step modulator. This new interface extends the `Parameterizing` interface
+helpful in the implementation of the `with()`-step modulator. This new interface extends the `Parameterizing` interface
 (which moved to the `org.apache.tinkerpop.gremlin.process.traversal.step` package with the other step interfaces) and
 in turn is extended by the `Mutating` interface. Making this change meant that the `Mutating.addPropertyMutations()`
 method could be removed in favor of the new `Configuring.configure()` method.


[18/50] [abbrv] tinkerpop git commit: Minor fix in formatting CTR

Posted by dk...@apache.org.
Minor fix in formatting CTR


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

Branch: refs/heads/TINKERPOP-1990
Commit: ecd944e6018ddd87a917cde82541d2068a267ae4
Parents: f9ad72a
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Jul 25 07:00:45 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Jul 25 07:00:45 2018 -0400

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


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ecd944e6/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 6270880..f076ba1 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -33,7 +33,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 * Improved performance of `TraversalVertexProgram` and related infrastructure.
 * Deprecated `BulkLoaderVertexProgram` and related infrastructure.
 * Deprecated `BulkDumperVertexProgram` with the more aptly named `CloneVertexProgram`.
-* Added `createGratefulDead()`to `TinkerFactory` to help make it easier to try to instantiate that toy graph.
+* Added `createGratefulDead()` to `TinkerFactory` to help make it easier to try to instantiate that toy graph.
 * Added identifiers to edges in the Kitchen Sink toy graph.
 * Ordered the loading of plugins in the Gremlin Console by their position in the configuration file.
 * Refactored the Gremlin Server integration testing framework and streamlined that infrastructure.


[12/50] [abbrv] tinkerpop git commit: Simpler PickTokenKey::toString() implementation

Posted by dk...@apache.org.
Simpler PickTokenKey::toString() implementation


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

Branch: refs/heads/TINKERPOP-1990
Commit: f9ad72a2526908ec00435d26407ebd183b6f7de5
Parents: f565345
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Mon Jul 23 09:52:02 2018 -0700
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Mon Jul 23 09:52:38 2018 -0700

----------------------------------------------------------------------
 .../gremlin/process/traversal/step/branch/BranchStep.java          | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f9ad72a2/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/BranchStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/BranchStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/BranchStep.java
index 6c38351..1ced91c 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/BranchStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/BranchStep.java
@@ -260,7 +260,7 @@ public class BranchStep<S, E, M> extends ComputerAwareStep<S, E> implements Trav
 
         @Override
         public String toString() {
-            return "PickTokenKey(" + number + ")";
+            return number.toString();
         }
     }
 }


[09/50] [abbrv] tinkerpop git commit: Minor spelling error CTR

Posted by dk...@apache.org.
Minor spelling error CTR


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

Branch: refs/heads/TINKERPOP-1990
Commit: ec561d8d51c92b3f97aa9de4eace756d83018932
Parents: fc36be1
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Sun Jul 22 15:10:40 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Sun Jul 22 15:10:40 2018 -0400

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


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ec561d8d/docs/src/recipes/collections.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/recipes/collections.asciidoc b/docs/src/recipes/collections.asciidoc
index d027376..257d661 100644
--- a/docs/src/recipes/collections.asciidoc
+++ b/docs/src/recipes/collections.asciidoc
@@ -21,7 +21,7 @@ image:gremlin-collections.png[width=400]
 
 Lists and maps form the basis for much of the processing in Gremlin traversals. They are core to how side-effects
 are typically held and how results are generally produced. Being able to pick them apart and reformat them is sometimes
-required. This need to shape the date within a traversal may arise both at the
+required. This need to shape the data within a traversal may arise both at the
 link:http://tinkerpop.apache.org/docs/current/reference/#terminal-steps[terminal step] of the traversal (technically
 just prior to the terminal step) or in the middle of a traversal. Considering the former, a transformation just prior
 to iteration will get the result into the form required by the application which would remove the need for additional


[46/50] [abbrv] tinkerpop git commit: Added "get or create" or "upsert" recipe CTR

Posted by dk...@apache.org.
Added "get or create" or "upsert" recipe CTR


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

Branch: refs/heads/TINKERPOP-1990
Commit: 3b8c8280cab1e7a6fd3b273ef0d2cf2c6d00f650
Parents: dde73e4
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Jul 27 16:29:11 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Jul 27 16:29:11 2018 -0400

----------------------------------------------------------------------
 docs/src/recipes/element-existence.asciidoc | 91 ++++++++++++++++++++++++
 docs/src/recipes/index.asciidoc             |  2 +
 2 files changed, 93 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3b8c8280/docs/src/recipes/element-existence.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/recipes/element-existence.asciidoc b/docs/src/recipes/element-existence.asciidoc
new file mode 100644
index 0000000..be6e517
--- /dev/null
+++ b/docs/src/recipes/element-existence.asciidoc
@@ -0,0 +1,91 @@
+////
+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.
+////
+[[element-existence]]
+== Element Existence
+
+Checking for whether or not a graph element is present in the graph is simple:
+
+[gremlin-groovy,modern]
+----
+g.V().has('person','name','marko').hasNext()
+g.V().has('person','name','stephen').hasNext()
+----
+
+Knowing that an element exists or not is usually a common point of decision in determining the appropriate path of code
+to take. In the example above, the check is for vertex existence and a typical reason to check for existence is to
+determine whether or not to add a new vertex or to return the one that exists (i.e. "get or create" pattern). This
+entire operation can occur in a single traversal.
+
+[gremlin-groovy,modern]
+----
+g.V().has('person','name','marko').
+  fold().
+  coalesce(unfold(),
+           addV('person').
+             property('name','marko').
+             property('age',29))
+g.V().has('person','name','stephen').
+  fold().
+  coalesce(unfold(), 
+           addV('person').
+             property('name','stephen').
+             property('age',34))
+----
+
+This use of `coalesce()` shown above is the basis for this pattern. Note that at the end of `has()`-step there is
+either a vertex or not. By using `fold()`, "existence" or "not existence" is reduced to a `List` with the vertex or
+a `List` with no values. With a `List` as the traverser flowing into `coalesce()` the first child traversal to return
+something will execute. If the `List` has a vertex then it will `unfold()` and return the existing one. If it is empty,
+then the vertex does not exist and it is added and returned.
+
+This "get or create" logic can be expanded to be "upsert" like functionality as follows:
+
+[gremlin-groovy,modern]
+----
+g.V().has('person','name','marko').
+  fold().
+  coalesce(unfold(),
+           addV('person').property('name','marko')).
+  property('age',29)
+g.V().has('person','name','stephen').
+  fold().
+  coalesce(unfold(),
+           addV('person').property('name','stephen')).
+  property('age',34)
+----
+
+By moving the `property()`-step that set the "age" value outside of `coalesce()`, the property is then set for both
+newly created vertices and for existing ones.
+
+WARNING: Always consider the specific nature of the graph implementation in use when considering these patterns. Some
+graph databases may not treat these traversals as true "upsert" operations and may do a "read before write" in their
+execution.
+
+It is possible to do similar sorts of operations with edges using the same pattern:
+
+[gremlin-groovy,modern]
+----
+g.V().has('person','name','vadas').as('v').
+  V().has('software','name','ripple').
+  coalesce(__.inE('created').where(outV().as('v')),
+           addE('created').from('v').property('weight',0.5))
+----
+
+In this case, the adjacent vertices of the edge are retrieved first and within the `coalesce()`, the existence of
+the edge is checked with `where()` using a matching pattern on the "v" label and returned if found. If the edge is not
+found between these two vertices, then it is created as part of the second traversal given to `coalesce()`.
+

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3b8c8280/docs/src/recipes/index.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/recipes/index.asciidoc b/docs/src/recipes/index.asciidoc
index c59cc89..8886289 100644
--- a/docs/src/recipes/index.asciidoc
+++ b/docs/src/recipes/index.asciidoc
@@ -50,6 +50,8 @@ include::duplicate-vertex.asciidoc[]
 
 include::edge-move.asciidoc[]
 
+include::element-existence.asciidoc[]
+
 include::if-then-based-grouping.asciidoc[]
 
 include::pagination.asciidoc[]