You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by ok...@apache.org on 2016/08/10 13:49:53 UTC

[01/11] tinkerpop git commit: Added new recipe for Traversal Induced Values.

Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1278 dbbd9f148 -> a55bfe1aa


Added new recipe for Traversal Induced Values.


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

Branch: refs/heads/TINKERPOP-1278
Commit: ee50a6fafabeef14b99dee308e71d9cc98619977
Parents: 8f7218d
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Aug 3 18:54:28 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Aug 4 06:10:40 2016 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 docs/src/recipes/index.asciidoc                 |  2 +
 .../recipes/traversal-induced-values.asciidoc   | 83 ++++++++++++++++++++
 3 files changed, 86 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ee50a6fa/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 22d2b32..43f5cc4 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 TinkerPop 3.2.2 (NOT OFFICIALLY RELEASED YET)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+* Added new recipe for "Traversal Induced Values".
 * Fixed a potential leak of a `ReferenceCounted` resource in Gremlin Server.
 * Added class registrations for `Map.Entry` implementations to `GryoMapper`.
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ee50a6fa/docs/src/recipes/index.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/recipes/index.asciidoc b/docs/src/recipes/index.asciidoc
index 18b5c9e..67a7932 100644
--- a/docs/src/recipes/index.asciidoc
+++ b/docs/src/recipes/index.asciidoc
@@ -46,6 +46,8 @@ include::cycle-detection.asciidoc[]
 
 include::centrality.asciidoc[]
 
+include::traversal-induced-values.asciidoc[]
+
 Implementation Recipes
 ======================
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ee50a6fa/docs/src/recipes/traversal-induced-values.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/recipes/traversal-induced-values.asciidoc b/docs/src/recipes/traversal-induced-values.asciidoc
new file mode 100644
index 0000000..6adefc7
--- /dev/null
+++ b/docs/src/recipes/traversal-induced-values.asciidoc
@@ -0,0 +1,83 @@
+////
+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.
+////
+[[traversal-induced-values]]
+Traversal Induced Values
+------------------------
+
+The parameters of a `Traversal` can be known ahead of time as constants or might otherwise be passed in as dynamic
+arguments.
+
+[gremlin-groovy,modern]
+----
+g.V().has('name','marko').out('knows').has('age', gt(29)).values('name')
+----
+
+In plain language, the above Gremlin asks, "What are the names of the people who Marko knows who are over the age of
+29?". In this case, "29" is known as a constant to the traversal. Of course, if the question is changed slightly to
+instead ask, "What are the names of the people who Marko knows who are older than he is?", the hardcoding of "29" will
+no longer suffice. There are multiple ways Gremlin would allow this second question to be answered. The first is
+obvious to any programmer - use a variable:
+
+[gremlin-groovy,modern]
+----
+marko = g.V().has('name','marko').next()
+g.V(marko).out('knows').has('age', gt(marko.value('age'))).values('name')
+----
+
+The downside to this approach is that it takes two separate traversals to answer the question. Ideally, there should
+be a single traversal, that can query "marko" once, determine his `age` and then use that for the value supplied to
+filter the people he knows. In this way the _value_ for the `age` filter is _induced_ from the `Traversal` itself.
+
+[gremlin-groovy,modern]
+----
+g.V().has('name','marko').as('marko').         <1>
+  out('knows').as('friend').                   <2>
+  filter(select('marko','friend').by('age').   <3>
+         where('friend', gt('marko'))).        <4>
+  values('name')
+----
+
+<1> Find the "marko" `Vertex` and label it as "marko".
+<2> Traverse out on the "knows" edges to the adjacent `Vertex` and label it as "person".
+<3> Filter the incoming "person" vertices. It is within this filter, that the traversal induced values are utilized.
+The inner `select` grabs the "marko" vertex and the current "friend". The `by` modulator extracts the "age" from both
+of those vertices which yields a `Map` with two keys, "marko" and "friend", where the value of each is the "age".
+<4> The `Map` produced in the previous step can then be filtered with `where` to only return a result if the "friend"
+age is greater than the "marko" age. If this is successful, then the `filter` step from the previous line will succeed
+and allow the "friend" vertex to pass through.
+
+This traversal could also be written declaratively with `match` step as follows:
+
+[gremlin-groovy,modern]
+----
+g.V().has('name','marko').match(
+    __.as('marko').values('age').as('a'),
+    __.as('marko').out('knows').as('friend'),
+    __.as('friend').values('age').as('b')
+  ).where('b', gt('a')).select('friend').
+  values('name')
+----
+
+Traversal induced values are not just for filtering. They can also be used when writing the values of the properties
+of one `Vertex` to another:
+
+[gremlin-groovy,modern]
+----
+g.V().has('name', 'marko').as('marko').
+  out('created').property('creator', select('marko').by('name'))
+g.V().has('name', 'marko').out('created').valueMap()
+----
\ No newline at end of file


[08/11] tinkerpop git commit: Merge branch 'TINKERPOP-1400'

Posted by ok...@apache.org.
Merge branch 'TINKERPOP-1400'


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

Branch: refs/heads/TINKERPOP-1278
Commit: bce966993ccae31a100fe3cdb45928dbd2f11cd7
Parents: 19d2eee 9d6a495
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Tue Aug 9 05:41:49 2016 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Tue Aug 9 05:41:49 2016 -0600

----------------------------------------------------------------------
 .../strategy/decoration/SubgraphStrategy.java   | 120 +++++++++++++------
 .../decoration/SubgraphStrategyTest.java        |  22 ++++
 .../decoration/SubgraphStrategyProcessTest.java |  58 +++++----
 .../SparkStarBarrierInterceptor.java            |   4 +
 4 files changed, 144 insertions(+), 60 deletions(-)
----------------------------------------------------------------------



[11/11] tinkerpop git commit: Merge branch 'TINKERPOP-1278' of https://git-wip-us.apache.org/repos/asf/tinkerpop into TINKERPOP-1278

Posted by ok...@apache.org.
Merge branch 'TINKERPOP-1278' of https://git-wip-us.apache.org/repos/asf/tinkerpop into TINKERPOP-1278


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

Branch: refs/heads/TINKERPOP-1278
Commit: a55bfe1aa4c3b415dcf10bfa853c2a1726786ba6
Parents: 75da5f6 dbbd9f1
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Wed Aug 10 07:49:44 2016 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Wed Aug 10 07:49:44 2016 -0600

----------------------------------------------------------------------
 docs/src/dev/provider/index.asciidoc            | 88 ++++++++++++++++++--
 .../tinkerpop/gremlin/driver/Handler.java       |  2 +-
 .../op/traversal/TraversalOpProcessor.java      |  4 +-
 3 files changed, 82 insertions(+), 12 deletions(-)
----------------------------------------------------------------------



[09/11] tinkerpop git commit: updated CHANGELOG and renamed a class field name to be consistent with method argument name.

Posted by ok...@apache.org.
updated CHANGELOG and renamed a class field name to be consistent with method argument name.


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

Branch: refs/heads/TINKERPOP-1278
Commit: fc79de813c788ee141175bbf1ea6d0cdefa94a0f
Parents: bce9669
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Tue Aug 9 05:51:57 2016 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Tue Aug 9 05:51:57 2016 -0600

----------------------------------------------------------------------
 CHANGELOG.asciidoc                                      |  2 ++
 .../traversal/strategy/decoration/SubgraphStrategy.java | 12 ++++++------
 2 files changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/fc79de81/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index c5850ba..84b7ca4 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -29,6 +29,8 @@ TinkerPop 3.2.2 (NOT OFFICIALLY RELEASED YET)
 * Added new recipe for "Traversal Induced Values".
 * Fixed a potential leak of a `ReferenceCounted` resource in Gremlin Server.
 * Added class registrations for `Map.Entry` implementations to `GryoMapper`.
+* Fixed a severe bug in `SubgraphStrategy`.
+* Deprecated `SubgraphStrategy.Builder.vertexCriterion()/edgeCriterion()` in favor of `vertices()/edges()`.
 
 [[release-3-2-1]]
 TinkerPop 3.2.1 (Release Date: July 18, 2016)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/fc79de81/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategy.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategy.java
index 82fffaa..967a19b 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategy.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategy.java
@@ -176,19 +176,19 @@ public final class SubgraphStrategy extends AbstractTraversalStrategy<TraversalS
 
     public final static class Builder {
 
-        private Traversal<Vertex, ?> vertexCriterion = null;
-        private Traversal<Edge, ?> edgeCriterion = null;
+        private Traversal<Vertex, ?> vertexPredicate = null;
+        private Traversal<Edge, ?> edgePredicate = null;
 
         private Builder() {
         }
 
         public Builder vertices(final Traversal<Vertex, ?> vertexPredicate) {
-            this.vertexCriterion = vertexPredicate;
+            this.vertexPredicate = vertexPredicate;
             return this;
         }
 
         public Builder edges(final Traversal<Edge, ?> edgePredicate) {
-            this.edgeCriterion = edgePredicate;
+            this.edgePredicate = edgePredicate;
             return this;
         }
 
@@ -209,9 +209,9 @@ public final class SubgraphStrategy extends AbstractTraversalStrategy<TraversalS
         }
 
         public SubgraphStrategy create() {
-            if (null == this.edgeCriterion && null == this.vertexCriterion)
+            if (null == this.edgePredicate && null == this.vertexPredicate)
                 throw new IllegalStateException("A subgraph must be filtered by an edge or vertex criterion");
-            return new SubgraphStrategy(this.vertexCriterion, this.edgeCriterion);
+            return new SubgraphStrategy(this.vertexPredicate, this.edgePredicate);
         }
     }
 }
\ No newline at end of file


[04/11] tinkerpop git commit: TINKERPOP-1350 was never quite fixed in 3.1.3.

Posted by ok...@apache.org.
TINKERPOP-1350 was never quite fixed in 3.1.3.

Changed response encoding to not use the session executor when the session has an error condition it is trying to serialize. This should be fine as there is no need to serialized an error condition as part of a transaction and thus no need to have the session thread to do it. That in turn frees up the worker executor to serialize and cancel long run jobs in the session. Removed recommendations for submitting parallel requests on a session from docs.


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

Branch: refs/heads/TINKERPOP-1278
Commit: 58d8bade7425c7a7865382990eaaed2b7d90659c
Parents: 87960e7
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Aug 2 15:59:19 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Aug 8 06:49:17 2016 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 .../src/reference/gremlin-applications.asciidoc |  6 +-
 .../upgrade/release-3.1.x-incubating.asciidoc   | 22 +++++-
 .../gremlin/groovy/engine/GremlinExecutor.java  |  2 -
 .../handler/GremlinResponseFrameEncoder.java    | 13 +++-
 .../server/GremlinDriverIntegrateTest.java      | 81 +++++++++++---------
 6 files changed, 75 insertions(+), 50 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/58d8bade/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 306185c..975f6cf 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -28,6 +28,7 @@ TinkerPop 3.1.4 (NOT OFFICIALLY RELEASED YET)
 
 * Fixed a potential leak of a `ReferenceCounted` resource in Gremlin Server.
 * Renamed distributions to make the prefix "apache-tinkerpop-" as opposed to just "apache-".
+* Fixed a problem (previously thought resolved on 3.1.3) causing Gremlin Server to lock up when parallel requests were submitted on the same session if those parallel requests included a script that blocked indefinitely.
 
 [[release-3-1-3]]
 TinkerPop 3.1.3 (Release Date: July 18, 2016)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/58d8bade/docs/src/reference/gremlin-applications.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc
index 9f5121f..cedd98f 100644
--- a/docs/src/reference/gremlin-applications.asciidoc
+++ b/docs/src/reference/gremlin-applications.asciidoc
@@ -1261,7 +1261,7 @@ Tuning
 image:gremlin-handdrawn.png[width=120,float=right] Tuning Gremlin Server for a particular environment may require some simple trial-and-error, but the following represent some basic guidelines that might be useful:
 
 * Gremlin Server defaults to a very modest maximum heap size.  Consider increasing this value for non-trivial uses.  Maximum heap size (`-Xmx`) is defined with the `JAVA_OPTIONS` setting in `gremlin-server.sh`.
-* When configuring the size of `threadPoolWorker` start with the default of `1` and increment by one as needed to a maximum of `2*number of cores`. Note that if using sessions that will accept parallel requests on the same session, then this value should be no less than `2`.
+* When configuring the size of `threadPoolWorker` start with the default of `1` and increment by one as needed to a maximum of `2*number of cores`.
 * The "right" size of the `gremlinPool` setting is somewhat dependent on the type of scripts that will be processed
 by Gremlin Server.  As requests arrive to Gremlin Server they are decoded and queued to be processed by threads in
 this pool.  When this pool is exhausted of threads, Gremlin Server will continue to accept incoming requests, but
@@ -1407,10 +1407,6 @@ request.
 A session is a "heavier" approach to the simple "request/response" approach of sessionless requests, but is sometimes
 necessary for a given use case.
 
-IMPORTANT: If submitting requests in parallel to a single session in Gremlin Server, then the `threadPoolWorker`
-setting can be no less than `2` or else the session may be prone to becoming locked if scripts sent on that session
-tend to block for extended periods of time.
-
 [[considering-transactions]]
 Considering Transactions
 ^^^^^^^^^^^^^^^^^^^^^^^^

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/58d8bade/docs/src/upgrade/release-3.1.x-incubating.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade/release-3.1.x-incubating.asciidoc b/docs/src/upgrade/release-3.1.x-incubating.asciidoc
index 11cdb32..b4a1657 100644
--- a/docs/src/upgrade/release-3.1.x-incubating.asciidoc
+++ b/docs/src/upgrade/release-3.1.x-incubating.asciidoc
@@ -22,6 +22,26 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 
 *A 187 On The Undercover Gremlinz*
 
+TinkerPop 3.1.4
+---------------
+
+*Release Date: NOT OFFICIALLY RELEASED YET*
+
+Please see the link:https://github.com/apache/tinkerpop/blob/3.1.4/CHANGELOG.asciidoc#tinkerpop-314-release-date-XXXXXXX-XX-2016[changelog] for a complete list of all the modifications that are part of this release.
+
+Upgrading for Users
+~~~~~~~~~~~~~~~~~~~
+
+Gremlin Server Workers
+^^^^^^^^^^^^^^^^^^^^^^
+
+In release 3.1.3, a link:http://tinkerpop.apache.org/docs/3.1.3/upgrade/#_tinkerpop_3_1_3[recommendation] was made to
+ensure that the `threadPoolWorker` setting for Gremlin Server was no less than `2` in cases where Gremlin Server was
+being used with sessions that accept parallel requests. In 3.1.4, that is no longer the case and a size of `1` remains
+acceptable even in that specific case.
+
+See: link:https://issues.apache.org/jira/browse/TINKERPOP-1350[TINKERPOP-1350]
+
 TinkerPop 3.1.3
 ---------------
 
@@ -74,8 +94,6 @@ those that block for an extended period of time) may cause Gremlin Server to loc
 
 See: link:https://issues.apache.org/jira/browse/TINKERPOP-1350[TINKERPOP-1350]
 
-
-
 Upgrading for Providers
 ~~~~~~~~~~~~~~~~~~~~~~~
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/58d8bade/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutor.java
----------------------------------------------------------------------
diff --git a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutor.java b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutor.java
index d70ff3d..da12e1e 100644
--- a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutor.java
+++ b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutor.java
@@ -232,8 +232,6 @@ public class GremlinExecutor implements AutoCloseable {
         return eval(script, language, boundVars, lifeCycle);
     }
 
-    private static final AtomicInteger ugh = new AtomicInteger(0);
-
     /**
      * Evaluate a script and allow for the submission of alteration to the entire evaluation execution lifecycle.
      *

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/58d8bade/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/GremlinResponseFrameEncoder.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/GremlinResponseFrameEncoder.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/GremlinResponseFrameEncoder.java
index 50c177b..d0f9d76 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/GremlinResponseFrameEncoder.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/GremlinResponseFrameEncoder.java
@@ -61,8 +61,12 @@ public class GremlinResponseFrameEncoder extends MessageToMessageEncoder<Respons
             if (useBinary) {
                 final Frame serialized;
 
-                // if the request came in on a session then the serialization must occur in that same thread.
-                if (null == session)
+                // if the request came in on a session then the serialization must occur in that same thread, except
+                // in the case of an error where we can free the session executor from having to do that job. the
+                // problem here is that if the session executor is used in the case of an error and the executor is
+                // blocked by parallel requests then there is no thread available to serialize the result and send
+                // back the response as the workers get all tied up behind the session executor.
+                if (null == session || !o.getStatus().getCode().isSuccess())
                     serialized = new Frame(serializer.serializeResponseAsBinary(o, ctx.alloc()));
                 else
                     serialized = new Frame(session.getExecutor().submit(() -> serializer.serializeResponseAsBinary(o, ctx.alloc())).get());
@@ -75,8 +79,9 @@ public class GremlinResponseFrameEncoder extends MessageToMessageEncoder<Respons
 
                 final Frame serialized;
 
-                // if the request came in on a session then the serialization must occur in that same thread.
-                if (null == session)
+                // if the request came in on a session then the serialization must occur that same thread except
+                // in the case of errors for reasons described above.
+                if (null == session || !o.getStatus().getCode().isSuccess())
                     serialized = new Frame(textSerializer.serializeResponseAsString(o));
                 else
                     serialized = new Frame(session.getExecutor().submit(() -> textSerializer.serializeResponseAsString(o)).get());

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/58d8bade/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java
index 7f74e03..7314243 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java
@@ -125,8 +125,8 @@ public class GremlinDriverIntegrateTest extends AbstractGremlinServerIntegration
                 settings.graphs.put("graph", "conf/neo4j-empty.properties");
                 break;
             case "shouldProcessSessionRequestsInOrderAfterTimeout":
-                settings.scriptEvaluationTimeout = 1000;
-                settings.threadPoolWorker = 2;
+                settings.scriptEvaluationTimeout = 250;
+                settings.threadPoolWorker = 1;
                 break;
         }
 
@@ -1210,48 +1210,55 @@ public class GremlinDriverIntegrateTest extends AbstractGremlinServerIntegration
         final Cluster cluster = Cluster.open();
         final Client client = cluster.connect(name.getMethodName());
 
-        final ResultSet first = client.submit(
-                "Object mon1 = 'mon1';\n" +
-                        "synchronized (mon1) {\n" +
-                        "    mon1.wait();\n" +
-                        "} ");
-
-        final ResultSet second = client.submit(
-                "Object mon2 = 'mon2';\n" +
-                        "synchronized (mon2) {\n" +
-                        "    mon2.wait();\n" +
-                        "}");
-
-        final CompletableFuture<List<Result>> futureFirst = first.all();
-        final CompletableFuture<List<Result>> futureSecond = second.all();
-
-        final AtomicBoolean hit = new AtomicBoolean(false);
-        while (!futureFirst.isDone()) {
-            // futureSecond can't finish before futureFirst - racy business here?
-            assertThat(futureSecond.isDone(), is(false));
-            hit.set(true);
+        for(int index = 0; index < 50; index++)
+        {
+            final CompletableFuture<ResultSet> first = client.submitAsync(
+                    "Object mon1 = 'mon1';\n" +
+                            "synchronized (mon1) {\n" +
+                            "    mon1.wait();\n" +
+                            "} ");
+
+            final CompletableFuture<ResultSet> second = client.submitAsync(
+                    "Object mon2 = 'mon2';\n" +
+                            "synchronized (mon2) {\n" +
+                            "    mon2.wait();\n" +
+                            "}");
+
+            final CompletableFuture<ResultSet> third = client.submitAsync(
+                    "Object mon3 = 'mon3';\n" +
+                            "synchronized (mon3) {\n" +
+                            "    mon3.wait();\n" +
+                            "}");
+
+            final CompletableFuture<ResultSet> fourth = client.submitAsync(
+                    "Object mon4 = 'mon4';\n" +
+                            "synchronized (mon4) {\n" +
+                            "    mon4.wait();\n" +
+                            "}");
+
+            final CompletableFuture<List<Result>> futureFirst = first.get().all();
+            final CompletableFuture<List<Result>> futureSecond = second.get().all();
+            final CompletableFuture<List<Result>> futureThird = third.get().all();
+            final CompletableFuture<List<Result>> futureFourth = fourth.get().all();
+
+            assertFutureTimeout(futureFirst);
+            assertFutureTimeout(futureSecond);
+            assertFutureTimeout(futureThird);
+            assertFutureTimeout(futureFourth);
         }
+    }
 
-        // should have entered the loop at least once and thus proven that futureSecond didn't return ahead of
-        // futureFirst
-        assertThat(hit.get(), is(true));
-
-        try {
+    private void assertFutureTimeout(final CompletableFuture<List<Result>> futureFirst) {
+        try
+        {
             futureFirst.get();
             fail("Should have timed out");
-        } catch (Exception ex) {
-            final Throwable root = ExceptionUtils.getRootCause(ex);
-            assertThat(root, instanceOf(ResponseException.class));
-            assertThat(root.getMessage(), startsWith("Script evaluation exceeded the configured 'scriptEvaluationTimeout' threshold of 1000 ms for request"));
         }
-
-        try {
-            futureSecond.get();
-            fail("Should have timed out");
-        } catch (Exception ex) {
+        catch (Exception ex)
+        {
             final Throwable root = ExceptionUtils.getRootCause(ex);
             assertThat(root, instanceOf(ResponseException.class));
-            assertThat(root.getMessage(), startsWith("Script evaluation exceeded the configured 'scriptEvaluationTimeout' threshold of 1000 ms for request"));
+            assertThat(root.getMessage(), startsWith("Script evaluation exceeded the configured 'scriptEvaluationTimeout' threshold of 250 ms for request"));
         }
     }
 }


[07/11] tinkerpop git commit: Merge remote-tracking branch 'origin/tp31'

Posted by ok...@apache.org.
Merge remote-tracking branch 'origin/tp31'

Conflicts:
	docs/src/dev/developer/development-environment.asciidoc


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

Branch: refs/heads/TINKERPOP-1278
Commit: 19d2eee152a9cec02f09c32e5d4dee5f30f16f3f
Parents: 31f79ea 4571061
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Aug 8 07:57:36 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Aug 8 07:57:36 2016 -0400

----------------------------------------------------------------------
 docs/src/dev/developer/development-environment.asciidoc |  2 +-
 docs/src/dev/developer/for-committers.asciidoc          |  4 ++--
 docs/src/dev/developer/release.asciidoc                 |  8 ++++----
 docs/src/tutorials/getting-started/index.asciidoc       | 12 ++++++------
 gremlin-console/bin/gremlin.sh                          |  4 ++--
 gremlin-driver/pom.xml                                  |  2 +-
 6 files changed, 16 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/19d2eee1/docs/src/dev/developer/development-environment.asciidoc
----------------------------------------------------------------------
diff --cc docs/src/dev/developer/development-environment.asciidoc
index 23df9ee,2369133..da6dc16
--- a/docs/src/dev/developer/development-environment.asciidoc
+++ b/docs/src/dev/developer/development-environment.asciidoc
@@@ -41,7 -41,7 +41,7 @@@ mvn -Dmaven.javadoc.skip=true --project
  ** Build AsciiDocs (but don't evaluate code blocks): `bin/process-docs.sh --dryRun`
  ** Build AsciiDocs (but don't evaluate code blocks in specific files): `bin/process-docs.sh --dryRun docs/src/reference/the-graph.asciidoc,docs/src/tutorial/getting-started,...`
  ** Build AsciiDocs (but evaluate code blocks only in specific files): `bin/process-docs.sh --fullRun docs/src/reference/the-graph.asciidoc,docs/src/tutorial/getting-started,...`
- ** Process a single AsciiDoc file: +pass:[docs/preprocessor/preprocess-file.sh `pwd`/gremlin-console/target/apache-gremlin-console-*-standalone "" "*" `pwd`/docs/src/xyz.asciidoc]+
 -** Process a single AsciiDoc file: +pass:[docs/preprocessor/preprocess-file.sh `pwd`/gremlin-console/target/apache-tinkerpop-gremlin-console-*-standalone `pwd`/docs/src/xyz.asciidoc]+
++** Process a single AsciiDoc file: +pass:[docs/preprocessor/preprocess-file.sh `pwd`/gremlin-console/target/apache-tinkerpop-gremlin-console-*-standalone "" "*" `pwd`/docs/src/xyz.asciidoc]+
  * Build JavaDocs: `mvn process-resources -Djavadoc`
  * Check for Apache License headers: `mvn apache-rat:check`
  * Check for newer dependencies: `mvn versions:display-dependency-updates` or `mvn versions:display-plugin-updates`

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

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

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/19d2eee1/gremlin-driver/pom.xml
----------------------------------------------------------------------


[03/11] tinkerpop git commit: Finished renaming distribution from 'apache-' to 'apache-tinkerpop-'

Posted by ok...@apache.org.
Finished renaming distribution from 'apache-' to 'apache-tinkerpop-'

Fixed gremlin.sh and assembly descriptor, updated documentation


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

Branch: refs/heads/TINKERPOP-1278
Commit: 6732921299af12894d130faece2269a59dbeb180
Parents: 87960e7
Author: Joshua Shinavier <jo...@cisco.com>
Authored: Fri Aug 5 16:17:57 2016 -0700
Committer: Joshua Shinavier <jo...@cisco.com>
Committed: Fri Aug 5 16:17:57 2016 -0700

----------------------------------------------------------------------
 docs/src/dev/developer/development-environment.asciidoc |  2 +-
 docs/src/dev/developer/for-committers.asciidoc          |  4 ++--
 docs/src/dev/developer/release.asciidoc                 |  8 ++++----
 docs/src/tutorials/getting-started/index.asciidoc       | 12 ++++++------
 gremlin-console/bin/gremlin.sh                          |  4 ++--
 gremlin-driver/pom.xml                                  |  2 +-
 6 files changed, 16 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/67329212/docs/src/dev/developer/development-environment.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/dev/developer/development-environment.asciidoc b/docs/src/dev/developer/development-environment.asciidoc
index 3bb6613..2369133 100644
--- a/docs/src/dev/developer/development-environment.asciidoc
+++ b/docs/src/dev/developer/development-environment.asciidoc
@@ -41,7 +41,7 @@ mvn -Dmaven.javadoc.skip=true --projects tinkergraph-gremlin test
 ** Build AsciiDocs (but don't evaluate code blocks): `bin/process-docs.sh --dryRun`
 ** Build AsciiDocs (but don't evaluate code blocks in specific files): `bin/process-docs.sh --dryRun docs/src/reference/the-graph.asciidoc,docs/src/tutorial/getting-started,...`
 ** Build AsciiDocs (but evaluate code blocks only in specific files): `bin/process-docs.sh --fullRun docs/src/reference/the-graph.asciidoc,docs/src/tutorial/getting-started,...`
-** Process a single AsciiDoc file: +pass:[docs/preprocessor/preprocess-file.sh `pwd`/gremlin-console/target/apache-gremlin-console-*-standalone `pwd`/docs/src/xyz.asciidoc]+
+** Process a single AsciiDoc file: +pass:[docs/preprocessor/preprocess-file.sh `pwd`/gremlin-console/target/apache-tinkerpop-gremlin-console-*-standalone `pwd`/docs/src/xyz.asciidoc]+
 * Build JavaDocs: `mvn process-resources -Djavadoc`
 * Check for Apache License headers: `mvn apache-rat:check`
 * Check for newer dependencies: `mvn versions:display-dependency-updates` or `mvn versions:display-plugin-updates`

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/67329212/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 5f0713d..64e43ce 100644
--- a/docs/src/dev/developer/for-committers.asciidoc
+++ b/docs/src/dev/developer/for-committers.asciidoc
@@ -310,8 +310,8 @@ The binary LICENSE/NOTICE is perhaps most impacted by changes to the various `po
 `pom.xml` file of any module, build both Gremlin Console and Gremlin Server and examine the contents of both binary
 distributions, either:
 
-* target/apache-gremlin-console-x.y.z-distribution.zip
-* target/apache-gremlin-server-x.y.z-distribution.zip
+* target/apache-tinkerpop-gremlin-console-x.y.z-distribution.zip
+* target/apache-tinkerpop-gremlin-server-x.y.z-distribution.zip
 
 Apache licensed software does not need to be included in LICENSE, but if the new dependency is an Apache-approved
 license (e.g. BSD, MIT) then it should be added in the pattern already defined. A copy of the LICENSE should be

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/67329212/docs/src/dev/developer/release.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/dev/developer/release.asciidoc b/docs/src/dev/developer/release.asciidoc
index 0c21bb6..70390cf 100644
--- a/docs/src/dev/developer/release.asciidoc
+++ b/docs/src/dev/developer/release.asciidoc
@@ -174,8 +174,8 @@ The source distribution is provided by:
 	apache-tinkerpop-xx.yy.zz-src.zip
 
 Two binary distributions are provided for user convenience:
-	apache-gremlin-console-xx.yy.zz-bin.zip
-	apache-gremlin-server-xx.yy.zz-bin.zip
+	apache-tinkerpop-gremlin-console-xx.yy.zz-bin.zip
+	apache-tinkerpop-gremlin-server-xx.yy.zz-bin.zip
 
 The GPG key used to sign the release artifacts is available at:
     https://dist.apache.org/repos/dist/dev/tinkerpop/KEYS
@@ -236,8 +236,8 @@ there is breaking change, an important game-changing feature or two, etc.]
 
 The release artifacts can be found at this location:
 
-https://www.apache.org/dyn/closer.lua/tinkerpop/xx.yy.zz/apache-gremlin-console-xx.yy.zz-bin.zip
-https://www.apache.org/dyn/closer.lua/tinkerpop/xx.yy.zz/apache-gremlin-server-xx.yy.zz-bin.zip
+https://www.apache.org/dyn/closer.lua/tinkerpop/xx.yy.zz/apache-tinkerpop-gremlin-console-xx.yy.zz-bin.zip
+https://www.apache.org/dyn/closer.lua/tinkerpop/xx.yy.zz/apache-tinkerpop-gremlin-server-xx.yy.zz-bin.zip
 
 The online docs can be found here:
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/67329212/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 0893188..b6fcbfa 100644
--- a/docs/src/tutorials/getting-started/index.asciidoc
+++ b/docs/src/tutorials/getting-started/index.asciidoc
@@ -51,13 +51,13 @@ NOTE: Are you unsure of what a vertex or edge is? That topic is covered in the <
 but please allow the tutorial to get you oriented with the Gremlin Console first, so that you have an understanding of
 the tool that will help you with your learning experience.
 
-link:https://www.apache.org/dyn/closer.lua/tinkerpop/x.y.z/apache-gremlin-console-x.y.z-bin.zip[Download the console],
+link:https://www.apache.org/dyn/closer.lua/tinkerpop/x.y.z/apache-tinkerpop-gremlin-console-x.y.z-bin.zip[Download the console],
 unpackage it and start it:
 
 [source,text]
 ----
-$ unzip apache-gremlin-console-x.y.z-bin.zip
-$ cd apache-gremlin-console-x.y.z-bin.zip
+$ unzip apache-tinkerpop-gremlin-console-x.y.z-bin.zip
+$ cd apache-tinkerpop-gremlin-console-x.y.z-bin.zip
 $ bin/gremlin.sh
 
          \,,,/
@@ -532,9 +532,9 @@ containing a Gremlin script to be processed with results returned.
 
 [source,text]
 ----
-$ curl -L -O https://www.apache.org/dist/tinkerpop/x.y.z/apache-gremlin-server-x.y.z-bin.zip
-$ unzip apache-gremlin-server-x.y.z-bin.zip
-$ cd apache-gremlin-server-x.y.z-bin.zip
+$ curl -L -O https://www.apache.org/dist/tinkerpop/x.y.z/apache-tinkerpop-gremlin-server-x.y.z-bin.zip
+$ unzip apache-tinkerpop-gremlin-server-x.y.z-bin.zip
+$ cd apache-tinkerpop-gremlin-server-x.y.z-bin.zip
 $ bin/gremlin-server.sh conf/gremlin-server-modern.yaml
 [INFO] GremlinServer -
          \,,,/

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/67329212/gremlin-console/bin/gremlin.sh
----------------------------------------------------------------------
diff --git a/gremlin-console/bin/gremlin.sh b/gremlin-console/bin/gremlin.sh
index 5fb65ac..d0d3240 100755
--- a/gremlin-console/bin/gremlin.sh
+++ b/gremlin-console/bin/gremlin.sh
@@ -20,5 +20,5 @@
 #
 
 OPTS=$@
-set JAVA_OPTIONS="-Dtinkerpop.ext=/../target/apache-gremlin-*-standalone/ext -Dlog4j.configuration=conf/log4j-console.properties -Dgremlin.log4j.level=$GREMLIN_LOG_LEVEL"
-`dirname $0`/../target/apache-gremlin-*-standalone/bin/gremlin.sh $OPTS
+set JAVA_OPTIONS="-Dtinkerpop.ext=/../target/apache-tinkerpop-gremlin-*-standalone/ext -Dlog4j.configuration=conf/log4j-console.properties -Dgremlin.log4j.level=$GREMLIN_LOG_LEVEL"
+`dirname $0`/../target/apache-tinkerpop-gremlin-*-standalone/bin/gremlin.sh $OPTS

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/67329212/gremlin-driver/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-driver/pom.xml b/gremlin-driver/pom.xml
index 184a73a..22864e0 100644
--- a/gremlin-driver/pom.xml
+++ b/gremlin-driver/pom.xml
@@ -116,7 +116,7 @@ limitations under the License.
                     <descriptors>
                         <descriptor>src/assembly/standalone.xml</descriptor>
                     </descriptors>
-                    <finalName>apache-${project.artifactId}-${project.version}</finalName>
+                    <finalName>apache-tinkerpop-${project.artifactId}-${project.version}</finalName>
                     <outputDirectory>target</outputDirectory>
                     <workDirectory>target/assembly/work</workDirectory>
                     <tarLongFileMode>warn</tarLongFileMode>


[06/11] tinkerpop git commit: Merge branch 'pr-376' into tp31

Posted by ok...@apache.org.
Merge branch 'pr-376' into tp31


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

Branch: refs/heads/TINKERPOP-1278
Commit: 4571061dbb386d4aaaebd55efca2078703b95153
Parents: 58d8bad 6732921
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Aug 8 07:50:16 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Aug 8 07:50:16 2016 -0400

----------------------------------------------------------------------
 docs/src/dev/developer/development-environment.asciidoc |  2 +-
 docs/src/dev/developer/for-committers.asciidoc          |  4 ++--
 docs/src/dev/developer/release.asciidoc                 |  8 ++++----
 docs/src/tutorials/getting-started/index.asciidoc       | 12 ++++++------
 gremlin-console/bin/gremlin.sh                          |  4 ++--
 gremlin-driver/pom.xml                                  |  2 +-
 6 files changed, 16 insertions(+), 16 deletions(-)
----------------------------------------------------------------------



[02/11] tinkerpop git commit: Fixed a severe bug in SubgraphStrategy where infinite recurssion occurs if the strategy is not smart about how child traverals with Vertex/EdgeSteps are analyzed. Also Deprecated vertexCriteria() method with vertices() likew

Posted by ok...@apache.org.
Fixed a severe bug in SubgraphStrategy where infinite recurssion occurs if the strategy is not smart about how child traverals with Vertex/EdgeSteps are analyzed. Also Deprecated vertexCriteria() method with vertices() likewise for edgeCritera() in SubGraphStrategy.Builder to be consistent with GraphFilter style (same concept). In fact, moving forward, SubGraphStrategy could take a GraphFilter.


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

Branch: refs/heads/TINKERPOP-1278
Commit: 9d6a4957468a65d15180ddc31f5020255ad14f20
Parents: 8f7218d
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Fri Aug 5 13:16:58 2016 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Fri Aug 5 13:16:58 2016 -0600

----------------------------------------------------------------------
 .../strategy/decoration/SubgraphStrategy.java   | 120 +++++++++++++------
 .../decoration/SubgraphStrategyTest.java        |  22 ++++
 .../decoration/SubgraphStrategyProcessTest.java |  58 +++++----
 .../SparkStarBarrierInterceptor.java            |   4 +
 4 files changed, 144 insertions(+), 60 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9d6a4957/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategy.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategy.java
index d328168..82fffaa 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategy.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategy.java
@@ -22,23 +22,26 @@ import org.apache.tinkerpop.gremlin.process.traversal.Step;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
+import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent;
 import org.apache.tinkerpop.gremlin.process.traversal.step.filter.TraversalFilterStep;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.AddEdgeStep;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.AddVertexStartStep;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.AddVertexStep;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.EdgeOtherVertexStep;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.EdgeVertexStep;
-import org.apache.tinkerpop.gremlin.process.traversal.step.map.VertexStep;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.VertexStep;
 import org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper;
 import org.apache.tinkerpop.gremlin.structure.Direction;
 import org.apache.tinkerpop.gremlin.structure.Edge;
 import org.apache.tinkerpop.gremlin.structure.Element;
+import org.apache.tinkerpop.gremlin.structure.Graph;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
 
 import java.util.ArrayList;
 import java.util.List;
+import java.util.UUID;
 import java.util.stream.Collectors;
 
 /**
@@ -48,75 +51,98 @@ import java.util.stream.Collectors;
  * it traverses and returns.
  *
  * @author Stephen Mallette (http://stephen.genoprime.com)
+ * @author Marko A. Rodriguez (http://markorodriguez.com)
  */
 public final class SubgraphStrategy extends AbstractTraversalStrategy<TraversalStrategy.DecorationStrategy>
         implements TraversalStrategy.DecorationStrategy {
 
-    private final Traversal<Vertex, ?> vertexCriterion;
-    private final Traversal<Edge, ?> edgeCriterion;
+    private final Traversal.Admin<Vertex, ?> vertexCriterion;
+    private final Traversal.Admin<Edge, ?> edgeCriterion;
+    private final String MARKER = Graph.Hidden.hide(UUID.randomUUID().toString());
 
     private SubgraphStrategy(final Traversal<Vertex, ?> vertexCriterion, final Traversal<Edge, ?> edgeCriterion) {
-        this.vertexCriterion = vertexCriterion;
+        this.vertexCriterion = null == vertexCriterion ? null : vertexCriterion.asAdmin();
 
         // if there is no vertex predicate there is no need to test either side of the edge
-        if (null == vertexCriterion) {
-            this.edgeCriterion = edgeCriterion;
+        if (null == this.vertexCriterion) {
+            this.edgeCriterion = null == edgeCriterion ? null : edgeCriterion.asAdmin();
         } else {
-            final Traversal<Object, Vertex> inVertexPredicate = __.inV().filter(vertexCriterion);
-            final Traversal<Object, Vertex> outVertexPredicate = __.outV().filter(vertexCriterion);
+            final Traversal.Admin<Edge, ?> vertexPredicate = __.<Edge>and(
+                    __.inV().filter(this.vertexCriterion.clone()),
+                    __.outV().filter(this.vertexCriterion.clone())).asAdmin();
 
             // if there is a vertex predicate then there is an implied edge filter on vertices even if there is no
             // edge predicate provided by the user.
             if (null == edgeCriterion)
-                this.edgeCriterion = __.and(inVertexPredicate.asAdmin(), outVertexPredicate.asAdmin());
+                this.edgeCriterion = vertexPredicate;
             else
-                this.edgeCriterion = edgeCriterion.asAdmin().addStep(new TraversalFilterStep<>(edgeCriterion.asAdmin(), __.and(inVertexPredicate.asAdmin(), outVertexPredicate.asAdmin())));
+                this.edgeCriterion = edgeCriterion.asAdmin().addStep(new TraversalFilterStep<>(edgeCriterion.asAdmin(), vertexPredicate));
+        }
+
+        if (null != this.vertexCriterion)
+            this.metadataLabelStartStep(this.vertexCriterion);
+        if (null != this.edgeCriterion)
+            this.metadataLabelStartStep(this.edgeCriterion);
+    }
+
+    private final void metadataLabelStartStep(final Traversal.Admin<?, ?> traversal) {
+        traversal.getStartStep().addLabel(MARKER);
+        for (final Step<?, ?> step : traversal.getSteps()) {
+            if (step instanceof TraversalParent) {
+                ((TraversalParent) step).getLocalChildren().forEach(this::metadataLabelStartStep);
+                ((TraversalParent) step).getGlobalChildren().forEach(this::metadataLabelStartStep);
+            }
         }
     }
 
     @Override
     public void apply(final Traversal.Admin<?, ?> traversal) {
+        // do not apply subgraph strategy to already created subgraph filter branches (or else you get infinite recursion)
+        if (traversal.getStartStep().getLabels().contains(MARKER)) {
+            traversal.getStartStep().removeLabel(MARKER);
+            return;
+        }
+        //
         final List<GraphStep> graphSteps = TraversalHelper.getStepsOfAssignableClass(GraphStep.class, traversal);
         final List<VertexStep> vertexSteps = TraversalHelper.getStepsOfAssignableClass(VertexStep.class, traversal);
-
-        if (vertexCriterion != null) {
+        if (null != this.vertexCriterion) {
             final List<Step> vertexStepsToInsertFilterAfter = new ArrayList<>();
             vertexStepsToInsertFilterAfter.addAll(TraversalHelper.getStepsOfAssignableClass(EdgeOtherVertexStep.class, traversal));
             vertexStepsToInsertFilterAfter.addAll(TraversalHelper.getStepsOfAssignableClass(EdgeVertexStep.class, traversal));
             vertexStepsToInsertFilterAfter.addAll(TraversalHelper.getStepsOfAssignableClass(AddVertexStep.class, traversal));
             vertexStepsToInsertFilterAfter.addAll(TraversalHelper.getStepsOfAssignableClass(AddVertexStartStep.class, traversal));
             vertexStepsToInsertFilterAfter.addAll(graphSteps.stream().filter(GraphStep::returnsVertex).collect(Collectors.toList()));
-
-            applyCriterion(vertexStepsToInsertFilterAfter, traversal, vertexCriterion.asAdmin());
+            applyCriterion(vertexStepsToInsertFilterAfter, traversal, this.vertexCriterion);
         }
 
-        if (edgeCriterion != null) {
+        if (null != this.edgeCriterion) {
             final List<Step> edgeStepsToInsertFilterAfter = new ArrayList<>();
             edgeStepsToInsertFilterAfter.addAll(TraversalHelper.getStepsOfAssignableClass(AddEdgeStep.class, traversal));
             edgeStepsToInsertFilterAfter.addAll(graphSteps.stream().filter(GraphStep::returnsEdge).collect(Collectors.toList()));
             edgeStepsToInsertFilterAfter.addAll(vertexSteps.stream().filter(VertexStep::returnsEdge).collect(Collectors.toList()));
-
-            applyCriterion(edgeStepsToInsertFilterAfter, traversal, edgeCriterion.asAdmin());
+            applyCriterion(edgeStepsToInsertFilterAfter, traversal, this.edgeCriterion);
         }
 
         // explode g.V().out() to g.V().outE().inV() only if there is an edge predicate otherwise
-        vertexSteps.stream().filter(VertexStep::returnsVertex).forEach(s -> {
-            if (null == edgeCriterion)
-                TraversalHelper.insertAfterStep(new TraversalFilterStep<>(traversal, vertexCriterion.asAdmin().clone()), s, traversal);
-            else {
-                final VertexStep someEStep = new VertexStep(traversal, Edge.class, s.getDirection(), s.getEdgeLabels());
-                final Step someVStep = (s.getDirection() == Direction.BOTH) ?
-                        new EdgeOtherVertexStep(traversal) : new EdgeVertexStep(traversal, s.getDirection().opposite());
-
-                // if s was labelled then propagate those labels to the new step that will return the vertex
-                transferLabels(s, someVStep);
-
-                TraversalHelper.replaceStep(s, someEStep, traversal);
+        vertexSteps.stream().filter(VertexStep::returnsVertex).forEach(step -> {
+            if (null != this.vertexCriterion && null == edgeCriterion) {
+                TraversalHelper.insertAfterStep(new TraversalFilterStep<>(traversal, this.vertexCriterion.clone()), step, traversal);
+            } else {
+                final VertexStep someEStep = new VertexStep<>(traversal, Edge.class, step.getDirection(), step.getEdgeLabels());
+                final Step someVStep = step.getDirection() == Direction.BOTH ?
+                        new EdgeOtherVertexStep(traversal) :
+                        new EdgeVertexStep(traversal, step.getDirection().opposite());
+
+                // if step was labeled then propagate those labels to the new step that will return the vertex
+                transferLabels(step, someVStep);
+
+                TraversalHelper.replaceStep(step, someEStep, traversal);
                 TraversalHelper.insertAfterStep(someVStep, someEStep, traversal);
-                TraversalHelper.insertAfterStep(new TraversalFilterStep<>(traversal, edgeCriterion.asAdmin().clone()), someEStep, traversal);
 
-                if (vertexCriterion != null)
-                    TraversalHelper.insertAfterStep(new TraversalFilterStep<>(traversal, vertexCriterion.asAdmin().clone()), someVStep, traversal);
+                if (null != this.edgeCriterion)
+                    TraversalHelper.insertAfterStep(new TraversalFilterStep<>(traversal, this.edgeCriterion.clone()), someEStep, traversal);
+                if (null != this.vertexCriterion)
+                    TraversalHelper.insertAfterStep(new TraversalFilterStep<>(traversal, this.vertexCriterion.clone()), someVStep, traversal);
             }
         });
     }
@@ -156,20 +182,36 @@ public final class SubgraphStrategy extends AbstractTraversalStrategy<TraversalS
         private Builder() {
         }
 
-        public Builder vertexCriterion(final Traversal<Vertex, ?> predicate) {
-            vertexCriterion = predicate;
+        public Builder vertices(final Traversal<Vertex, ?> vertexPredicate) {
+            this.vertexCriterion = vertexPredicate;
             return this;
         }
 
-        public Builder edgeCriterion(final Traversal<Edge, ?> predicate) {
-            edgeCriterion = predicate;
+        public Builder edges(final Traversal<Edge, ?> edgePredicate) {
+            this.edgeCriterion = edgePredicate;
             return this;
         }
 
+        @Deprecated
+        /**
+         * @deprecated Since 3.2.2, use {@code Builder#vertices} instead.
+         */
+        public Builder vertexCriterion(final Traversal<Vertex, ?> predicate) {
+            return this.vertices(predicate);
+        }
+
+        /**
+         * @deprecated Since 3.2.2, use {@code Builder#edges} instead.
+         */
+        @Deprecated
+        public Builder edgeCriterion(final Traversal<Edge, ?> predicate) {
+            return this.edges(predicate);
+        }
+
         public SubgraphStrategy create() {
-            if (null == edgeCriterion && null == vertexCriterion)
+            if (null == this.edgeCriterion && null == this.vertexCriterion)
                 throw new IllegalStateException("A subgraph must be filtered by an edge or vertex criterion");
-            return new SubgraphStrategy(vertexCriterion, edgeCriterion);
+            return new SubgraphStrategy(this.vertexCriterion, this.edgeCriterion);
         }
     }
-}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9d6a4957/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategyTest.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategyTest.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategyTest.java
index 47a4fbc..86fdb67 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategyTest.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategyTest.java
@@ -18,18 +18,23 @@
  */
 package org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration;
 
+import org.apache.tinkerpop.gremlin.process.traversal.Step;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.DefaultGraphTraversal;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.AndStep;
 import org.apache.tinkerpop.gremlin.process.traversal.step.filter.TraversalFilterStep;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.EdgeVertexStep;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.VertexStep;
 import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.IdentityStep;
+import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper;
+import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.hamcrest.CoreMatchers;
 import org.junit.Test;
 
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 
 /**
  * @author Stephen Mallette (http://stephen.genoprime.com)
@@ -71,4 +76,21 @@ public class SubgraphStrategyTest {
         assertEquals(1, h.getLocalChildren().size());
         assertThat(((DefaultGraphTraversal) h.getLocalChildren().get(0)).getEndStep(), CoreMatchers.instanceOf(TraversalFilterStep.class));
     }
+
+    @Test
+    public void shouldNotRetainMetadataLabelMarkers() {
+        final SubgraphStrategy strategy = SubgraphStrategy.build().vertices(__.<Vertex>out().hasLabel("person")).create();
+        final Traversal.Admin<?, ?> t = __.out().inE().asAdmin();
+        t.setStrategies(t.getStrategies().clone().addStrategies(strategy));
+        t.applyStrategies();
+        assertEquals(t.getSteps().get(0).getClass(), VertexStep.class);
+        assertEquals(t.getSteps().get(1).getClass(), TraversalFilterStep.class);
+        assertEquals(AndStep.class, ((TraversalFilterStep<?>) t.getSteps().get(1)).getLocalChildren().get(0).getStartStep().getClass());
+        assertEquals(0, ((TraversalFilterStep<?>) t.getSteps().get(1)).getLocalChildren().get(0).getStartStep().getLabels().size());
+        assertEquals(t.getSteps().get(2).getClass(), EdgeVertexStep.class);
+        assertEquals(t.getSteps().get(3).getClass(), TraversalFilterStep.class);
+        assertEquals(VertexStep.class, ((TraversalFilterStep<?>) t.getSteps().get(3)).getLocalChildren().get(0).getStartStep().getClass());
+        assertEquals(0, ((TraversalFilterStep<?>) t.getSteps().get(3)).getLocalChildren().get(0).getStartStep().getLabels().size());
+        TraversalHelper.getStepsOfAssignableClassRecursively(Step.class, t).forEach(step -> assertTrue(step.getLabels().isEmpty()));
+    }
 }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9d6a4957/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategyProcessTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategyProcessTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategyProcessTest.java
index 81ea296..41a730a 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategyProcessTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategyProcessTest.java
@@ -22,26 +22,28 @@ 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.IgnoreEngine;
+import org.apache.tinkerpop.gremlin.process.traversal.P;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
 import org.apache.tinkerpop.gremlin.structure.Edge;
-import org.apache.tinkerpop.gremlin.process.traversal.P;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import java.util.Arrays;
 import java.util.List;
 import java.util.NoSuchElementException;
 
 import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData.MODERN;
+import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.both;
 import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.bothE;
+import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.has;
+import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.out;
 import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.outE;
 import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.core.IsCollectionContaining.hasItem;
 import static org.hamcrest.core.IsCollectionContaining.hasItems;
-import static org.hamcrest.core.IsNot.not;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
@@ -54,9 +56,8 @@ public class SubgraphStrategyProcessTest extends AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
-    @IgnoreEngine(TraversalEngine.Type.COMPUTER)
     public void shouldFilterVertexCriterion() throws Exception {
-        final Traversal<Vertex,?> vertexCriterion = __.has("name", P.within("josh", "lop", "ripple"));
+        final Traversal<Vertex, ?> vertexCriterion = has("name", P.within("josh", "lop", "ripple"));
 
         final SubgraphStrategy strategy = SubgraphStrategy.build().vertexCriterion(vertexCriterion).create();
         final GraphTraversalSource sg = create(strategy);
@@ -139,10 +140,10 @@ public class SubgraphStrategyProcessTest extends AbstractGremlinProcessTest {
     @Test
     @LoadGraphWith(MODERN)
     public void shouldFilterEdgeCriterion() throws Exception {
-        final Traversal<Edge,?> edgeCriterion = __.or(
-            __.has("weight", 1.0d).hasLabel("knows"), // 8
-            __.has("weight", 0.4d).hasLabel("created").outV().has("name", "marko"), // 9
-            __.has("weight", 1.0d).hasLabel("created") // 10
+        final Traversal<Edge, ?> edgeCriterion = __.or(
+                has("weight", 1.0d).hasLabel("knows"), // 8
+                has("weight", 0.4d).hasLabel("created").outV().has("name", "marko"), // 9
+                has("weight", 1.0d).hasLabel("created") // 10
         );
 
         final SubgraphStrategy strategy = SubgraphStrategy.build().edgeCriterion(edgeCriterion).create();
@@ -227,14 +228,30 @@ public class SubgraphStrategyProcessTest extends AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
-    @IgnoreEngine(TraversalEngine.Type.COMPUTER)
+    public void shouldFilterComplexVertexCriterion() throws Exception {
+        checkResults(Arrays.asList("vadas", "josh"), g.withStrategies(SubgraphStrategy.build().vertices(__.<Vertex>in("knows").has("name", "marko")).create()).
+                V().values("name"));
+        checkResults(Arrays.asList("vadas", "josh", "lop"), g.withStrategies(SubgraphStrategy.build().vertices(__.<Vertex>in().has("name", "marko")).create()).
+                V().values("name"));
+
+        checkResults(Arrays.asList("vadas", "josh"), g.withStrategies(SubgraphStrategy.build().vertices(__.<Vertex>in("knows").where(out("created").has("name", "lop"))).create()).
+                V().values("name"));
+        checkResults(Arrays.asList("vadas", "josh", "lop"), g.withStrategies(SubgraphStrategy.build().vertices(__.<Vertex>in().where(has("name", "marko").out("created").has("name", "lop"))).create()).
+                V().values("name"));
+
+        checkResults(Arrays.asList("marko", "vadas", "josh", "lop"), g.withStrategies(SubgraphStrategy.build().vertices(__.or(both().has("name", "marko"), has("name", "marko"))).create()).
+                V().where(bothE().count().is(P.neq(0))).values("name"));
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
     public void shouldFilterMixedCriteria() throws Exception {
-        final Traversal<Vertex,?> vertexCriterion = __.has("name", P.within("josh", "lop", "ripple"));
+        final Traversal<Vertex, ?> vertexCriterion = has("name", P.within("josh", "lop", "ripple"));
 
         // 9 isn't present because marko is not in the vertex list
         final Traversal<Edge, ?> edgeCriterion = __.or(
-                __.has("weight", 0.4d).hasLabel("created"), // 11
-                __.has("weight", 1.0d).hasLabel("created") // 10
+                has("weight", 0.4d).hasLabel("created"), // 11
+                has("weight", 1.0d).hasLabel("created") // 10
         );
 
         final SubgraphStrategy strategy = SubgraphStrategy.build().edgeCriterion(edgeCriterion).vertexCriterion(vertexCriterion).create();
@@ -309,10 +326,9 @@ public class SubgraphStrategyProcessTest extends AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
-    @IgnoreEngine(TraversalEngine.Type.COMPUTER)
     public void shouldFilterVertexCriterionAndKeepLabels() throws Exception {
         // this will exclude "peter"
-        final Traversal<Vertex, ?> vertexCriterion = __.has("name", P.within("ripple", "josh", "marko"));
+        final Traversal<Vertex, ?> vertexCriterion = has("name", P.within("ripple", "josh", "marko"));
 
         final SubgraphStrategy strategy = SubgraphStrategy.build().vertexCriterion(vertexCriterion).create();
         final GraphTraversalSource sg = create(strategy);
@@ -327,7 +343,7 @@ public class SubgraphStrategyProcessTest extends AbstractGremlinProcessTest {
     @Test(expected = NoSuchElementException.class)
     @LoadGraphWith(MODERN)
     public void shouldGetExcludedVertex() throws Exception {
-        final Traversal<Vertex,?> vertexCriterion = __.has("name", P.within("josh", "lop", "ripple"));
+        final Traversal<Vertex, ?> vertexCriterion = has("name", P.within("josh", "lop", "ripple"));
 
         final SubgraphStrategy strategy = SubgraphStrategy.build().vertexCriterion(vertexCriterion).create();
         final GraphTraversalSource sg = create(strategy);
@@ -338,10 +354,10 @@ public class SubgraphStrategyProcessTest extends AbstractGremlinProcessTest {
     @Test(expected = NoSuchElementException.class)
     @LoadGraphWith(MODERN)
     public void shouldGetExcludedEdge() throws Exception {
-        final Traversal<Edge,?> edgeCriterion = __.or(
-                __.has("weight", 1.0d).hasLabel("knows"), // 8
-                __.has("weight", 0.4d).hasLabel("created").outV().has("name", "marko"), // 9
-                __.has("weight", 1.0d).hasLabel("created") // 10
+        final Traversal<Edge, ?> edgeCriterion = __.or(
+                has("weight", 1.0d).hasLabel("knows"), // 8
+                has("weight", 0.4d).hasLabel("created").outV().has("name", "marko"), // 9
+                has("weight", 1.0d).hasLabel("created") // 10
         );
 
         final SubgraphStrategy strategy = SubgraphStrategy.build().edgeCriterion(edgeCriterion).create();
@@ -349,7 +365,7 @@ public class SubgraphStrategyProcessTest extends AbstractGremlinProcessTest {
 
         sg.E(sg.E(convertToEdgeId("marko", "knows", "vadas")).next()).next();
     }
-    
+
     private GraphTraversalSource create(final SubgraphStrategy strategy) {
         return graphProvider.traversal(graph, strategy);
     }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9d6a4957/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/traversal/strategy/optimization/interceptor/SparkStarBarrierInterceptor.java
----------------------------------------------------------------------
diff --git a/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/traversal/strategy/optimization/interceptor/SparkStarBarrierInterceptor.java b/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/traversal/strategy/optimization/interceptor/SparkStarBarrierInterceptor.java
index 4149ba7..8585e0d 100644
--- a/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/traversal/strategy/optimization/interceptor/SparkStarBarrierInterceptor.java
+++ b/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/traversal/strategy/optimization/interceptor/SparkStarBarrierInterceptor.java
@@ -41,6 +41,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.map.MeanGlobalStep;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.MinGlobalStep;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.SumGlobalStep;
 import org.apache.tinkerpop.gremlin.process.traversal.step.util.ReducingBarrierStep;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SubgraphStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.ComputerVerificationStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement;
 import org.apache.tinkerpop.gremlin.process.traversal.traverser.util.TraverserSet;
@@ -158,6 +159,9 @@ public final class SparkStarBarrierInterceptor implements SparkVertexProgramInte
     public static boolean isLegal(final Traversal.Admin<?, ?> traversal) {
         final Step<?, ?> startStep = traversal.getStartStep();
         final Step<?, ?> endStep = traversal.getEndStep();
+        // right now this is not supported because of how the SparkStarBarrierInterceptor mutates the traversal prior to local evaluation
+        if (traversal.getStrategies().toList().stream().filter(strategy -> strategy instanceof SubgraphStrategy).findAny().isPresent())
+            return false;
         if (!startStep.getClass().equals(GraphStep.class) || ((GraphStep) startStep).returnsEdge())
             return false;
         if (!endStep.getClass().equals(CountGlobalStep.class) &&


[10/11] tinkerpop git commit: updated CHANGELOG with as much as I could remember that we have done in this crazy branch.

Posted by ok...@apache.org.
updated CHANGELOG with as much as I could remember that we have done in this crazy branch.


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

Branch: refs/heads/TINKERPOP-1278
Commit: 75da5f6d08fe0189490f8f5d00fdeb93340f3297
Parents: 891981c fc79de8
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Wed Aug 10 07:49:37 2016 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Wed Aug 10 07:49:37 2016 -0600

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  15 +++
 .../developer/development-environment.asciidoc  |   2 +-
 docs/src/dev/developer/for-committers.asciidoc  |   4 +-
 docs/src/dev/developer/release.asciidoc         |   8 +-
 docs/src/recipes/index.asciidoc                 |   2 +
 .../recipes/traversal-induced-values.asciidoc   |  83 +++++++++++++
 .../src/reference/gremlin-applications.asciidoc |   6 +-
 .../tutorials/getting-started/index.asciidoc    |  12 +-
 .../upgrade/release-3.1.x-incubating.asciidoc   |  22 +++-
 .../strategy/decoration/SubgraphStrategy.java   | 124 +++++++++++++------
 .../decoration/SubgraphStrategyTest.java        |  22 ++++
 gremlin-driver/pom.xml                          |   2 +-
 .../gremlin/groovy/engine/GremlinExecutor.java  |   2 -
 .../handler/GremlinResponseFrameEncoder.java    |  13 +-
 .../server/GremlinDriverIntegrateTest.java      |  81 ++++++------
 .../decoration/SubgraphStrategyProcessTest.java |  58 +++++----
 .../SparkStarBarrierInterceptor.java            |   4 +
 17 files changed, 334 insertions(+), 126 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/75da5f6d/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --cc CHANGELOG.asciidoc
index a9a615c,84b7ca4..6be1f48
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@@ -26,11 -26,11 +26,25 @@@ image::https://raw.githubusercontent.co
  TinkerPop 3.2.2 (NOT OFFICIALLY RELEASED YET)
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
++* Added `gremlin-python` package as a Gremlin language variant in Python.
++* Added `Bytecode` which specifies the instructions and arguments used to construct a traversal.
++* Created an experimental GraphSON representation of `Bytecode` that will be considered unstable until 3.3.0.
++* Added `Translator` which allows from the translation of `Bytecode` into some other form (e.g. script, `Traversal`, etc.).
++* Added `JavaTranslator`, `GroovyTranslator`, and `PythonTranslator` for translating `Bytecode` into the respective languages.
++* Added `TranslationStrategy` to `gremlin-test` so translators can be tested against the the process test suite.
++* Added `Traversal.Admin.nextTraverser()` to get the next result in bulk-form (w/ default implementation).
++* Added `TraversalSource.getAnonymousTraversalClass()` (w/ default implementation).
++* Added `GremlinScriptEngine` interface which specifies a `eval(Bytecode, Bindings)` method.
++* `GremlinGroovyScriptEngine` implements `GremlinScriptEngine`.
++* Added `GremlinJythonScriptEngine` which implements `GremlinScriptEngine`.
 +* Removed support for submitting a Java serialized `Traversal` to Gremlin Server.
 +* Removed a largely internal feature that supported automatic unrolling of traversers in the Gremlin Driver.
 +* Made it possible to directly initialize `OpProcessor` implementations with server `Settings`.
+ * Added new recipe for "Traversal Induced Values".
  * Fixed a potential leak of a `ReferenceCounted` resource in Gremlin Server.
  * Added class registrations for `Map.Entry` implementations to `GryoMapper`.
+ * Fixed a severe bug in `SubgraphStrategy`.
+ * Deprecated `SubgraphStrategy.Builder.vertexCriterion()/edgeCriterion()` in favor of `vertices()/edges()`.
  
  [[release-3-2-1]]
  TinkerPop 3.2.1 (Release Date: July 18, 2016)

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

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/75da5f6d/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutor.java
----------------------------------------------------------------------


[05/11] tinkerpop git commit: Merge remote-tracking branch 'origin/tp31'

Posted by ok...@apache.org.
Merge remote-tracking branch 'origin/tp31'


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

Branch: refs/heads/TINKERPOP-1278
Commit: 31f79ea86cb5cc19de4c67c935eb8995e4709e00
Parents: ee50a6f 58d8bad
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Aug 8 06:50:59 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Aug 8 06:50:59 2016 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 .../src/reference/gremlin-applications.asciidoc |  6 +-
 .../upgrade/release-3.1.x-incubating.asciidoc   | 22 +++++-
 .../gremlin/groovy/engine/GremlinExecutor.java  |  2 -
 .../handler/GremlinResponseFrameEncoder.java    | 13 +++-
 .../server/GremlinDriverIntegrateTest.java      | 81 +++++++++++---------
 6 files changed, 75 insertions(+), 50 deletions(-)
----------------------------------------------------------------------


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

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