You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2016/09/16 11:30:03 UTC

[1/7] tinkerpop git commit: Enclose filter steps and side-effect steps in `RangeByIsCountStrategy` when `NotStep` is used to wrap part of the traversal. [Forced Update!]

Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1442 e7d63381d -> 75baf01e8 (forced update)


Enclose filter steps and side-effect steps in `RangeByIsCountStrategy` when `NotStep` is used to wrap part of the traversal.


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

Branch: refs/heads/TINKERPOP-1442
Commit: 61aaaf3ea82d7481aff1adf2951e7347506b184c
Parents: 7fa75fd
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Mon Sep 12 19:21:19 2016 +0200
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Mon Sep 12 19:21:19 2016 +0200

----------------------------------------------------------------------
 .../optimization/RangeByIsCountStrategy.java    | 20 +++++++++++++++++---
 .../RangeByIsCountStrategyTest.java             |  2 ++
 2 files changed, 19 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/61aaaf3e/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/RangeByIsCountStrategy.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/RangeByIsCountStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/RangeByIsCountStrategy.java
index 451d561..6957abe 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/RangeByIsCountStrategy.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/RangeByIsCountStrategy.java
@@ -32,6 +32,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.filter.IsStep;
 import org.apache.tinkerpop.gremlin.process.traversal.step.filter.NotStep;
 import org.apache.tinkerpop.gremlin.process.traversal.step.filter.RangeGlobalStep;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.CountGlobalStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphStep;
 import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SideEffectStep;
 import org.apache.tinkerpop.gremlin.process.traversal.step.util.EmptyStep;
 import org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy;
@@ -130,12 +131,25 @@ public final class RangeByIsCountStrategy extends AbstractTraversalStrategy<Trav
                             traversal.asAdmin().removeStep(next); // IsStep
                             traversal.asAdmin().removeStep(curr); // CountStep
                             size -= 2;
+                            final Traversal.Admin inner;
+                            if (prev != null) {
+                                inner = __.start().asAdmin();
+                                for (; ; ) {
+                                    final Step pp = prev.getPreviousStep();
+                                    inner.addStep(0, prev);
+                                    if (pp instanceof EmptyStep || pp instanceof GraphStep ||
+                                            !(prev instanceof FilterStep || prev instanceof SideEffectStep)) break;
+                                    traversal.removeStep(prev);
+                                    prev = pp;
+                                    size--;
+                                }
+                            } else {
+                                inner = __.identity().asAdmin();
+                            }
                             if (prev != null) {
-                                final Traversal.Admin inner = __.start().asAdmin();
-                                TraversalHelper.insertAfterStep(prev, inner.getStartStep(), inner);
                                 TraversalHelper.replaceStep(prev, new NotStep<>(traversal, inner), traversal);
                             } else {
-                                traversal.asAdmin().addStep(new NotStep<>(traversal, __.identity()));
+                                traversal.asAdmin().addStep(new NotStep<>(traversal, inner));
                             }
                         } else {
                             TraversalHelper.insertBeforeStep(new RangeGlobalStep<>(traversal, 0L, highRange), curr, traversal);

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/61aaaf3e/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/RangeByIsCountStrategyTest.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/RangeByIsCountStrategyTest.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/RangeByIsCountStrategyTest.java
index 03d5176..a48c0f0 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/RangeByIsCountStrategyTest.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/RangeByIsCountStrategyTest.java
@@ -148,6 +148,8 @@ public class RangeByIsCountStrategyTest {
                     {__.count().is(0).store("x"), __.limit(1).count().is(0).store("x")},
                     {__.repeat(__.out()).until(__.outE().count().is(0)), __.repeat(__.out()).until(__.not(__.outE()))},
                     {__.repeat(__.out()).emit(__.outE().count().is(0)), __.repeat(__.out()).emit(__.not(__.outE()))},
+                    {__.where(__.outE().hasLabel("created").count().is(0)), __.where(__.not(__.outE().hasLabel("created")))},
+                    {__.where(__.out().outE().hasLabel("created").count().is(0)), __.where(__.out().not(__.outE().hasLabel("created")))},
             });
         }
     }


[3/7] tinkerpop git commit: fixed hardcoded link

Posted by sp...@apache.org.
fixed hardcoded link


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

Branch: refs/heads/TINKERPOP-1442
Commit: d3dd2c190722a516812f246ec304938b69583355
Parents: e81f772
Author: Robert Dale <ro...@gmail.com>
Authored: Thu Sep 8 11:38:01 2016 -0400
Committer: Robert Dale <ro...@gmail.com>
Committed: Tue Sep 13 12:17:40 2016 -0400

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


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d3dd2c19/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 146eb01..3ac80ce 100644
--- a/docs/src/tutorials/getting-started/index.asciidoc
+++ b/docs/src/tutorials/getting-started/index.asciidoc
@@ -216,7 +216,7 @@ v1.addEdge("created", v2, id, 9, "weight", 0.4)
 
 NOTE: The fully qualified name for `T` is `org.apache.tinkerpop.gremlin.structure.T`. Another important static import
 that is often seen in Gremlin comes from `org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__`, which allows
-for the creation of link:http://tinkerpop.apache.org/docs/3.1.1-SNAPSHOT/reference/#graph-traversal-steps[anonymous traversals].
+for the creation of link:http://tinkerpop.apache.org/docs/x.y.z/reference/#graph-traversal-steps[anonymous traversals].
 
 Second, don't forget that you are working with TinkerGraph which allows for identifier assignment. That is _not_ the
 case with most graph databases.


[7/7] tinkerpop git commit: Improved session cleanup on client close.

Posted by sp...@apache.org.
Improved session cleanup on client close.

While not a perfect implementation, a long run job blocking a close request from the client will now at least get an attempt at interruption rather thant consuming the thread indefinitely. TINKERPOP-1442


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

Branch: refs/heads/TINKERPOP-1442
Commit: 75baf01e83e7db2cfd60850e9facf535cf10d887
Parents: e7e7481
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Sep 13 18:10:09 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Sep 16 07:29:39 2016 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 .../tinkerpop/gremlin/driver/Connection.java    |  2 +-
 .../gremlin/groovy/engine/GremlinExecutor.java  |  2 +-
 .../gremlin/server/op/session/Session.java      | 12 +++++++
 .../server/op/session/SessionOpProcessor.java   |  9 ++++++
 .../server/GremlinDriverIntegrateTest.java      |  2 +-
 .../server/GremlinServerIntegrateTest.java      |  4 +--
 .../GremlinServerSessionIntegrateTest.java      | 33 ++++++++++++++++++++
 8 files changed, 60 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/75baf01e/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 4d990ee..a9dae9d 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 TinkerPop 3.1.5 (Release Date: NOT OFFICIALLY RELEASED YET)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+* Improved session cleanup when a close is triggered by the client.
 * Removed the `appveyor.yml` file as the AppVeyor build is no longer enabled by Apache Infrastructure.
 * Fixed a bug in `RangeByIsCountStrategy` which didn't use the `NotStep` properly.
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/75baf01e/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Connection.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Connection.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Connection.java
index 22e48fe..220ad42 100644
--- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Connection.java
+++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Connection.java
@@ -92,7 +92,7 @@ final class Connection {
 
         connectionLabel = String.format("Connection{host=%s}", pool.host);
 
-        if (cluster.isClosing()) throw new IllegalStateException("Cannot open a connection while the cluster after close() is called");
+        if (cluster.isClosing()) throw new IllegalStateException("Cannot open a connection with the cluster after close() is called");
 
         final Bootstrap b = this.cluster.getFactory().createBootstrap();
         try {

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/75baf01e/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 da12e1e..785442a 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
@@ -312,7 +312,7 @@ public class GremlinExecutor implements AutoCloseable {
                 if (root instanceof InterruptedException) {
                     lifeCycle.getAfterTimeout().orElse(afterTimeout).accept(bindings);
                     evaluationFuture.completeExceptionally(new TimeoutException(
-                            String.format("Script evaluation exceeded the configured 'scriptEvaluationTimeout' threshold of %s ms for request [%s]: %s", scriptEvalTimeOut, script, root.getMessage())));
+                            String.format("Script evaluation exceeded the configured 'scriptEvaluationTimeout' threshold of %s ms or evaluation was otherwise cancelled directly for request [%s]: %s", scriptEvalTimeOut, script, root.getMessage())));
                 } else {
                     lifeCycle.getAfterFailure().orElse(afterFailure).accept(bindings, root);
                     evaluationFuture.completeExceptionally(root);

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/75baf01e/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/Session.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/Session.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/Session.java
index 33b2752..c9bc7c1 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/Session.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/Session.java
@@ -38,6 +38,7 @@ import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.ScheduledFuture;
 import java.util.concurrent.ThreadFactory;
 import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicReference;
 
 /**
@@ -52,6 +53,7 @@ public class Session {
     private final ScheduledExecutorService scheduledExecutorService;
     private final long configuredSessionTimeout;
 
+    private AtomicBoolean killing = new AtomicBoolean(false);
     private AtomicReference<ScheduledFuture> kill = new AtomicReference<>();
 
     /**
@@ -104,6 +106,10 @@ public class Session {
         return session;
     }
 
+    public boolean acceptingRequests() {
+        return !killing.get();
+    }
+
     public void touch() {
         // if the task of killing is cancelled successfully then reset the session monitor. otherwise this session
         // has already been killed and there's nothing left to do with this session.
@@ -134,6 +140,8 @@ public class Session {
      * Kills the session and rollback any uncommitted changes on transactional graphs.
      */
     public synchronized void kill() {
+        killing.set(true);
+
         // if the session has already been removed then there's no need to do this process again.  it's possible that
         // the manuallKill and the kill future could have both called kill at roughly the same time. this prevents
         // kill() from being called more than once
@@ -157,6 +165,10 @@ public class Session {
                 }
             }
         });
+
+        // prevent any additional requests from processing now that the mass rollback has been completed
+        executor.shutdownNow();
+
         sessions.remove(session);
         logger.info("Session {} closed", session);
     }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/75baf01e/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/SessionOpProcessor.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/SessionOpProcessor.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/SessionOpProcessor.java
index 3497169..bec0c55 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/SessionOpProcessor.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/SessionOpProcessor.java
@@ -147,6 +147,15 @@ public class SessionOpProcessor extends AbstractEvalOpProcessor {
         final RequestMessage msg = context.getRequestMessage();
         final Session session = getSession(context, msg);
 
+        // check if the session is still accepting requests - if not block further requests
+        if (!session.acceptingRequests()) {
+            final String sessionClosedMessage = String.format("Session %s is no longer accepting requests as it has been closed",
+                    session.getSessionId());
+            final ResponseMessage response = ResponseMessage.build(msg).code(ResponseStatusCode.SERVER_ERROR)
+                    .statusMessage(sessionClosedMessage).create();
+            throw new OpProcessorException(sessionClosedMessage, response);
+        }
+
         // place the session on the channel context so that it can be used during serialization.  in this way
         // the serialization can occur on the same thread used to execute the gremlin within the session.  this
         // is important given the threadlocal nature of Graph implementation transactions.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/75baf01e/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 7314243..1a04b6b 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
@@ -1258,7 +1258,7 @@ public class GremlinDriverIntegrateTest extends AbstractGremlinServerIntegration
         {
             final Throwable root = ExceptionUtils.getRootCause(ex);
             assertThat(root, instanceOf(ResponseException.class));
-            assertThat(root.getMessage(), startsWith("Script evaluation exceeded the configured 'scriptEvaluationTimeout' threshold of 250 ms for request"));
+            assertThat(root.getMessage(), startsWith("Script evaluation exceeded the configured 'scriptEvaluationTimeout' threshold of 250 ms"));
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/75baf01e/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
index 2f091d9..0f0cdae 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
@@ -543,7 +543,7 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration
     public void shouldReceiveFailureTimeOutOnScriptEval() throws Exception {
         try (SimpleClient client = new WebSocketClient()){
             final List<ResponseMessage> responses = client.submit("Thread.sleep(3000);'some-stuff-that-should not return'");
-            assertThat(responses.get(0).getStatus().getMessage(), startsWith("Script evaluation exceeded the configured 'scriptEvaluationTimeout' threshold of 200 ms for request"));
+            assertThat(responses.get(0).getStatus().getMessage(), startsWith("Script evaluation exceeded the configured 'scriptEvaluationTimeout' threshold of 200 ms"));
 
             // validate that we can still send messages to the server
             assertEquals(2, ((List<Integer>) client.submit("1+1").get(0).getResult().getData()).get(0).intValue());
@@ -559,7 +559,7 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration
                     .addArg(Tokens.ARGS_GREMLIN, "Thread.sleep(3000);'some-stuff-that-should not return'")
                     .create();
             final List<ResponseMessage> responses = client.submit(msg);
-            assertThat(responses.get(0).getStatus().getMessage(), startsWith("Script evaluation exceeded the configured 'scriptEvaluationTimeout' threshold of 100 ms for request"));
+            assertThat(responses.get(0).getStatus().getMessage(), startsWith("Script evaluation exceeded the configured 'scriptEvaluationTimeout' threshold of 100 ms"));
 
             // validate that we can still send messages to the server
             assertEquals(2, ((List<Integer>) client.submit("1+1").get(0).getResult().getData()).get(0).intValue());

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/75baf01e/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerSessionIntegrateTest.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerSessionIntegrateTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerSessionIntegrateTest.java
index 8b34038..99b3a1b 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerSessionIntegrateTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerSessionIntegrateTest.java
@@ -50,6 +50,7 @@ import java.util.stream.IntStream;
 
 import static org.hamcrest.CoreMatchers.instanceOf;
 import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.core.StringStartsWith.startsWith;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.fail;
@@ -109,6 +110,38 @@ public class GremlinServerSessionIntegrateTest  extends AbstractGremlinServerInt
     }
 
     @Test
+    public void shouldBlockAdditionalRequestsDuringClose() throws Exception {
+        // this is sorta cobbled together a bit given limits/rules about how you can use Cluster/Client instances.
+        // basically, we need one to submit the long run job and one to do the close operation that will cancel the
+        // long run job. it is probably possible to do this with some low-level message manipulation but that's
+        // probably not necessary
+        final Cluster cluster1 = Cluster.build().create();
+        final Client client1 = cluster1.connect(name.getMethodName());
+        client1.submit("1+1").all().join();
+        final Cluster cluster2 = Cluster.build().create();
+        final Client client2 = cluster2.connect(name.getMethodName());
+        client2.submit("1+1").all().join();
+
+        final ResultSet rs = client1.submit("Thread.sleep(10000);1+1");
+
+        client2.close();
+
+        try {
+            rs.all().join();
+            fail("The close of the session on client2 should have interrupted the script sent on client1");
+        } catch (Exception ex) {
+            final Throwable root = ExceptionUtils.getRootCause(ex);
+            assertThat(root.getMessage(), startsWith("Script evaluation exceeded the configured 'scriptEvaluationTimeout' threshold of 30000 ms or evaluation was otherwise cancelled directly for request"));
+        }
+
+        client1.close();
+
+        cluster1.close();
+        cluster2.close();
+    }
+
+
+    @Test
     public void shouldRollbackOnEvalExceptionForManagedTransaction() throws Exception {
         assumeNeo4jIsPresent();
 


[2/7] tinkerpop git commit: Updated CHANGELOG

Posted by sp...@apache.org.
Updated CHANGELOG


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

Branch: refs/heads/TINKERPOP-1442
Commit: 5ff97ef41135d1e96552265f5e3519bf044109f2
Parents: 61aaaf3
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Tue Sep 13 02:01:17 2016 +0200
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Tue Sep 13 02:01:17 2016 +0200

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


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5ff97ef4/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 6e43233..f01966d 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 TinkerPop 3.1.5 (Release Date: NOT OFFICIALLY RELEASED YET)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+* Fixed a bug in `RangeByIsCountStrategy` which didn't use the `NotStep` properly.
 
 
 [[release-3-1-4]]


[5/7] tinkerpop git commit: Deleted accidentally added files

Posted by sp...@apache.org.
Deleted accidentally added files


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

Branch: refs/heads/TINKERPOP-1442
Commit: 146f36f2fa679f48e520c9f33e833147e407cb74
Parents: 6cdc5a0
Author: Mark Hoekstra <ma...@web-iq.eu>
Authored: Thu Sep 15 16:11:16 2016 +0200
Committer: Mark Hoekstra <ma...@web-iq.eu>
Committed: Thu Sep 15 16:11:16 2016 +0200

----------------------------------------------------------------------
 .../traversal/step/map/VertexProgramStep.java   | 135 -------------------
 .../process/remote/RemoteConnection.java        |  51 -------
 2 files changed, 186 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/146f36f2/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/VertexProgramStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/VertexProgramStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/VertexProgramStep.java
deleted file mode 100644
index d005940..0000000
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/VertexProgramStep.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.tinkerpop.gremlin.process.computer.traversal.step.map;
-
-import org.apache.tinkerpop.gremlin.process.computer.Computer;
-import org.apache.tinkerpop.gremlin.process.computer.ComputerResult;
-import org.apache.tinkerpop.gremlin.process.computer.GraphComputer;
-import org.apache.tinkerpop.gremlin.process.computer.Memory;
-import org.apache.tinkerpop.gremlin.process.computer.traversal.TraversalVertexProgram;
-import org.apache.tinkerpop.gremlin.process.computer.traversal.step.VertexComputing;
-import org.apache.tinkerpop.gremlin.process.computer.util.EmptyMemory;
-import org.apache.tinkerpop.gremlin.process.traversal.Step;
-import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
-import org.apache.tinkerpop.gremlin.process.traversal.TraversalSideEffects;
-import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
-import org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep;
-import org.apache.tinkerpop.gremlin.process.traversal.step.util.EmptyStep;
-import org.apache.tinkerpop.gremlin.process.traversal.step.util.ProfileStep;
-import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalInterruptedException;
-import org.apache.tinkerpop.gremlin.structure.Graph;
-
-import java.util.NoSuchElementException;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.Future;
-
-/**
- * @author Marko A. Rodriguez (http://markorodriguez.com)
- * @author Stephen Mallette (http://stephen.genoprime.com)
- */
-public abstract class VertexProgramStep extends AbstractStep<ComputerResult, ComputerResult> implements VertexComputing {
-
-    public static final String ROOT_TRAVERSAL = "gremlin.vertexProgramStep.rootTraversal";
-    public static final String STEP_ID = "gremlin.vertexProgramStep.stepId";
-
-    protected Computer computer = Computer.compute();
-
-    protected boolean first = true;
-
-    public VertexProgramStep(final Traversal.Admin traversal) {
-        super(traversal);
-    }
-
-    @Override
-    protected Traverser.Admin<ComputerResult> processNextStart() throws NoSuchElementException {
-        Future<ComputerResult> future = null;
-        try {
-            if (this.first && this.getPreviousStep() instanceof EmptyStep) {
-                this.first = false;
-                final Graph graph = this.getTraversal().getGraph().get();
-                future = this.getComputer().apply(graph).program(this.generateProgram(graph, EmptyMemory.instance())).submit();
-                final ComputerResult result = future.get();
-                this.processMemorySideEffects(result.memory());
-                return this.getTraversal().getTraverserGenerator().generate(result, this, 1l);
-            } else {
-                final Traverser.Admin<ComputerResult> traverser = this.starts.next();
-                final Graph graph = traverser.get().graph();
-                final Memory memory = traverser.get().memory();
-                future = this.generateComputer(graph).program(this.generateProgram(graph, memory)).submit();
-                final ComputerResult result = future.get();
-                this.processMemorySideEffects(result.memory());
-                return traverser.split(result, this);
-            }
-        } catch (final InterruptedException ie) {
-            // the thread running the traversal took an interruption while waiting on the call the future.get().
-            // the future should then be cancelled with interruption so that the GraphComputer that created
-            // the future knows we don't care about it anymore. The GraphComputer should attempt to respect this
-            // cancellation request.
-            if (future != null) future.cancel(true);
-            throw new TraversalInterruptedException();
-        } catch (ExecutionException e) {
-            throw new IllegalStateException(e.getMessage(), e);
-        }
-    }
-
-    @Override
-    public Computer getComputer() {
-        Computer tempComputer = this.computer;
-        if (!this.isEndStep()) {
-            if (null == tempComputer.getPersist())
-                tempComputer = tempComputer.persist(GraphComputer.Persist.EDGES);
-            if (null == tempComputer.getResultGraph())
-                tempComputer = tempComputer.result(GraphComputer.ResultGraph.NEW);
-        }
-        return tempComputer;
-    }
-
-    @Override
-    public void setComputer(final Computer computer) {
-        this.computer = computer;
-    }
-
-    protected boolean previousTraversalVertexProgram() {
-        Step<?, ?> currentStep = this;
-        while (!(currentStep instanceof EmptyStep)) {
-            if (currentStep instanceof TraversalVertexProgramStep)
-                return true;
-            currentStep = currentStep.getPreviousStep();
-        }
-        return false;
-    }
-
-    private void processMemorySideEffects(final Memory memory) {
-        // update the traversal side-effects with the state of the memory after the OLAP job execution
-        final TraversalSideEffects sideEffects = this.getTraversal().getSideEffects();
-        for (final String key : memory.keys()) {
-            if (sideEffects.exists(key)) {
-                // halted traversers should never be propagated through sideEffects
-                assert !key.equals(TraversalVertexProgram.HALTED_TRAVERSERS);
-                sideEffects.set(key, memory.get(key));
-            }
-        }
-    }
-
-    protected boolean isEndStep() {
-        return this.getNextStep() instanceof ComputerResultStep || (this.getNextStep() instanceof ProfileStep && this.getNextStep().getNextStep() instanceof ComputerResultStep);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/146f36f2/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/RemoteConnection.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/RemoteConnection.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/RemoteConnection.java
deleted file mode 100644
index 8506ad7..0000000
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/RemoteConnection.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tinkerpop.gremlin.process.remote;
-
-import org.apache.tinkerpop.gremlin.process.remote.traversal.RemoteTraversal;
-import org.apache.tinkerpop.gremlin.process.traversal.Bytecode;
-import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
-import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
-
-import java.util.Iterator;
-
-/**
- * A simple abstraction of a "connection" to a "server" that is capable of processing a {@link Traversal} and
- * returning results. Results refer to both the {@link Iterator} of results from the submitted {@link Traversal}
- * as well as the side-effects produced by that {@link Traversal}. Those results together are wrapped in a
- * {@link Traversal}.
- *
- * @author Stephen Mallette (http://stephen.genoprime.com)
- * @author Marko A. Rodriguez (http://markorodriguez.com)
- */
-public interface RemoteConnection extends AutoCloseable {
-
-    /**
-     * @deprecated As of release 3.2.2, replaced by {@link #submit(Bytecode)}.
-     */
-    @Deprecated
-    public <E> Iterator<Traverser.Admin<E>> submit(final Traversal<?, E> traversal) throws RemoteConnectionException;
-
-    /**
-     * Submits {@link Traversal} {@link Bytecode} to a server and returns a {@link Traversal}.
-     * The {@link Traversal} is an abstraction over two types of results that can be returned as part of the
-     * response from the server: the results of the {@link Traversal} itself and the side-effects that it produced.
-     */
-    public <E> RemoteTraversal<?,E> submit(final Bytecode bytecode) throws RemoteConnectionException;
-}


[6/7] tinkerpop git commit: Merge branch 'TINKERPOP-1391' into tp31

Posted by sp...@apache.org.
Merge branch 'TINKERPOP-1391' into tp31


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

Branch: refs/heads/TINKERPOP-1442
Commit: e7e748151da513850567395d376e02e4cda864a2
Parents: 146f36f 5ff97ef
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Thu Sep 15 20:08:39 2016 +0200
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Thu Sep 15 20:08:39 2016 +0200

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  3 ++-
 .../optimization/RangeByIsCountStrategy.java    | 20 +++++++++++++++++---
 .../RangeByIsCountStrategyTest.java             |  2 ++
 3 files changed, 21 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e7e74815/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --cc CHANGELOG.asciidoc
index 646e496,f01966d..4d990ee
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@@ -26,8 -26,9 +26,9 @@@ image::https://raw.githubusercontent.co
  TinkerPop 3.1.5 (Release Date: NOT OFFICIALLY RELEASED YET)
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
- + Removed the `appveyor.yml` file as the AppVeyor build is no longer enabled by Apache Infrastructure.
++* Removed the `appveyor.yml` file as the AppVeyor build is no longer enabled by Apache Infrastructure.
+ * Fixed a bug in `RangeByIsCountStrategy` which didn't use the `NotStep` properly.
  
 -
  [[release-3-1-4]]
  TinkerPop 3.1.4 (Release Date: September 6, 2016)
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


[4/7] tinkerpop git commit: Fix multiple occurrences of 'the'

Posted by sp...@apache.org.
Fix multiple occurrences of 'the'


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

Branch: refs/heads/TINKERPOP-1442
Commit: 6cdc5a03f6f649bc11f396f97ca6737788079a4a
Parents: d3dd2c1
Author: Mark Hoekstra <ma...@web-iq.eu>
Authored: Thu Sep 15 13:52:47 2016 +0200
Committer: Mark Hoekstra <ma...@web-iq.eu>
Committed: Thu Sep 15 14:02:24 2016 +0200

----------------------------------------------------------------------
 docs/src/dev/developer/contributing.asciidoc    |   4 +-
 .../reference/implementations-hadoop.asciidoc   |   2 +-
 .../implementations-tinkergraph.asciidoc        |   2 +-
 docs/src/reference/intro.asciidoc               |   2 +-
 docs/src/reference/the-traversal.asciidoc       |  10 +-
 docs/src/upgrade/index.asciidoc                 |   2 +-
 .../gremlin/process/computer/MapReduce.java     |   2 +-
 .../traversal/step/map/VertexProgramStep.java   | 135 +++++++++++++++++++
 .../process/remote/RemoteConnection.java        |  51 +++++++
 .../tinkerpop/gremlin/driver/Cluster.java       |   2 +-
 .../gremlin/driver/LoadBalancingStrategy.java   |   2 +-
 .../jsr223/GremlinGroovyScriptEngine.java       |   2 +-
 .../gremlin/server/AbstractChannelizer.java     |   2 +-
 .../computer/util/ComputerSubmissionHelper.java |   2 +-
 .../gremlin/neo4j/structure/Neo4jGraph.java     |   2 +-
 15 files changed, 204 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6cdc5a03/docs/src/dev/developer/contributing.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/dev/developer/contributing.asciidoc b/docs/src/dev/developer/contributing.asciidoc
index 0c121c8..36124f1 100644
--- a/docs/src/dev/developer/contributing.asciidoc
+++ b/docs/src/dev/developer/contributing.asciidoc
@@ -27,7 +27,7 @@ Ways to Contribute
 image:gremlin-apache.png[width=250,float=left] While the concept of an open source contribution can refer to doing
 development work on the code base, there are many other ways outside of coding to contribute to Apache TinkerPop.
 Participating on the various mailing lists, offering ideas, reporting bugs, writing documentation are all welcome
-contributions to the project that help improve the The TinkerPop. This section of the document is designed to help
+contributions to the project that help improve the TinkerPop. This section of the document is designed to help
 provide some structure for potential contributors and to give them ideas for how they could get started becoming more
 involved in the TinkerPop community.
 
@@ -112,7 +112,7 @@ Before proceeding, contributors should evaluate if the proposed change is likely
 
 * Is it clear that code must change? Proposing a JIRA issue and pull request is appropriate only when a clear problem
 or change has been identified. When in doubt, email dev@tinkerpop.apache.org first about the possible change.
-* Search the the mailing list archives for related discussions. Often, the problem has been discussed before, with
+* Search the mailing list archives for related discussions. Often, the problem has been discussed before, with
 a resolution that doesn't require a code change, or recording what kinds of changes will not be accepted as a
 resolution.
 * Search link:https://issues.apache.org/jira/browse/TINKERPOP[JIRA] for existing issues.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6cdc5a03/docs/src/reference/implementations-hadoop.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/implementations-hadoop.asciidoc b/docs/src/reference/implementations-hadoop.asciidoc
index b89c0a1..6e95c6e 100644
--- a/docs/src/reference/implementations-hadoop.asciidoc
+++ b/docs/src/reference/implementations-hadoop.asciidoc
@@ -280,7 +280,7 @@ specified in `HADOOP_GREMLIN_LIBS`.
 export HADOOP_GREMLIN_LIBS=$HADOOP_GREMLIN_LIBS:/usr/local/gremlin-console/ext/spark-gremlin/lib
 
 Furthermore the `lib/` directory should be distributed across all machines in the SparkServer cluster. For this purpose TinkerPop
-provides a helper script, which takes the Spark installation directory and the the Spark machines as input:
+provides a helper script, which takes the Spark installation directory and the Spark machines as input:
 
 [source,shell]
 bin/hadoop/init-tp-spark.sh /usr/local/spark spark@10.0.0.1 spark@10.0.0.2 spark@10.0.0.3

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6cdc5a03/docs/src/reference/implementations-tinkergraph.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/implementations-tinkergraph.asciidoc b/docs/src/reference/implementations-tinkergraph.asciidoc
index aadec06..33c4dbf 100644
--- a/docs/src/reference/implementations-tinkergraph.asciidoc
+++ b/docs/src/reference/implementations-tinkergraph.asciidoc
@@ -96,7 +96,7 @@ TinkerGraph has several settings that can be provided on creation via `Configura
 |gremlin.tinkergraph.vertexPropertyIdManager |The `IdManager` implementation to use for vertex properties.
 |gremlin.tinkergraph.defaultVertexPropertyCardinality |The default `VertexProperty.Cardinality` to use when `Vertex.property(k,v)` is called.
 |gremlin.tinkergraph.graphLocation |The path and file name for where TinkerGraph should persist the graph data. If a
-value is specified here, the the `gremlin.tinkergraph.graphFormat` should also be specified.  If this value is not
+value is specified here, the `gremlin.tinkergraph.graphFormat` should also be specified.  If this value is not
 included (default), then the graph will stay in-memory and not be loaded/persisted to disk.
 |gremlin.tinkergraph.graphFormat |The format to use to serialize the graph which may be one of the following:
 `graphml`, `graphson`, `gryo`, or a fully qualified class name that implements Io.Builder interface (which allows for

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6cdc5a03/docs/src/reference/intro.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/intro.asciidoc b/docs/src/reference/intro.asciidoc
index a8c6a1a..0817630 100644
--- a/docs/src/reference/intro.asciidoc
+++ b/docs/src/reference/intro.asciidoc
@@ -298,7 +298,7 @@ g.V(marko).out('knows') <2>
 g.V(marko).out('knows').values('name') <3>
 ----
 
-<1> Set the variable `marko` to the the vertex in the graph `g` named "marko".
+<1> Set the variable `marko` to the vertex in the graph `g` named "marko".
 <2> Get the vertices that are outgoing adjacent to the marko-vertex via knows-edges.
 <3> Get the names of the marko-vertex's friends.
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6cdc5a03/docs/src/reference/the-traversal.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc
index f300e98..9309e23 100644
--- a/docs/src/reference/the-traversal.asciidoc
+++ b/docs/src/reference/the-traversal.asciidoc
@@ -307,7 +307,7 @@ g.V().hasLabel('software').as('a','b','c').
 Barrier Step
 ~~~~~~~~~~~~
 
-The `barrier()`-step (*barrier*) turns the the lazy traversal pipeline into a bulk-synchronous pipeline. This step is
+The `barrier()`-step (*barrier*) turns the lazy traversal pipeline into a bulk-synchronous pipeline. This step is
 useful in the following situations:
 
   * When everything prior to `barrier()` needs to be executed before moving onto the steps after the `barrier()` (i.e. ordering).
@@ -742,7 +742,7 @@ g.V().has('name',not(within('josh','marko'))).valueMap() <5>
 
 <1> Find all vertices whose ages are between 20 (inclusive) and 30 (exclusive).
 <2> Find all vertices whose ages are not between 20 (inclusive) and 30 (exclusive).
-<3> Find all vertices whose names are exact matches to any names in the the collection `[josh,marko]`, display all
+<3> Find all vertices whose names are exact matches to any names in the collection `[josh,marko]`, display all
 the key,value pairs for those verticies.
 <4> Find all vertices whose names are not in the collection `[josh,marko]`, display all the key,value pairs for those vertices.
 <5> Same as the prior example save using `not` on `within` to yield `without`.
@@ -851,7 +851,7 @@ in a object-local traversal. As such, the `order().by()` and the `limit()` refer
 stream as a whole.
 
 WARNING: The anonymous traversal of `local()` processes the current object "locally." In OLAP, where the atomic unit
-of computing is the the vertex and its local "star graph," it is important that the anonymous traversal does not leave
+of computing is the vertex and its local "star graph," it is important that the anonymous traversal does not leave
 the confines of the vertex's star graph. In other words, it can not traverse to an adjacent vertex's properties or edges.
 
 [[match-step]]
@@ -1430,7 +1430,7 @@ g.V(1).repeat(out()).until(outE().count().is(0)).path().by('name') <3>
 <3> Starting from vertex 1, keep taking outgoing edges until a vertex is reached that has no more outgoing edges.
 
 WARNING: The anonymous traversal of `emit()` and `until()` (not `repeat()`) process their current objects "locally."
-In OLAP, where the atomic unit of computing is the the vertex and its local "star graph," it is important that the
+In OLAP, where the atomic unit of computing is the vertex and its local "star graph," it is important that the
 anonymous traversals do not leave the confines of the vertex's star graph. In other words, they can not traverse to
 an adjacent vertex's properties or edges.
 
@@ -2002,7 +2002,7 @@ g.V().where(__.not(out('created')).and().in('knows')).values('name') <6>
 <6> The concatenation of `where()`-steps is the same as a single `where()`-step with an and'd clause.
 
 WARNING: The anonymous traversal of `where()` processes the current object "locally". In OLAP, where the atomic unit
-of computing is the the vertex and its local "star graph," it is important that the anonymous traversal does not leave
+of computing is the vertex and its local "star graph," it is important that the anonymous traversal does not leave
 the confines of the vertex's star graph. In other words, it can not traverse to an adjacent vertex's properties or
 edges. Note that is only a temporary limitation that will be addressed in a future version of TinkerPop3 (see
 link:https://issues.apache.org/jira/browse/TINKERPOP-693[TINKERPOP-693]).

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6cdc5a03/docs/src/upgrade/index.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade/index.asciidoc b/docs/src/upgrade/index.asciidoc
index e1d07db..ac4762e 100644
--- a/docs/src/upgrade/index.asciidoc
+++ b/docs/src/upgrade/index.asciidoc
@@ -24,7 +24,7 @@ TinkerPop Upgrade Information
 This document helps users of TinkerPop to understand the changes that come with each software release.  It outlines
 new features, how to resolve breaking changes and other information specific to a release.  This document is useful
 to end-users who are building applications on TinkerPop, but it is equally useful to TinkerPop providers, who
-build libraries and other systems on the the core APIs and protocols that TinkerPop exposes.
+build libraries and other systems on the core APIs and protocols that TinkerPop exposes.
 
 These providers include:
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6cdc5a03/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/MapReduce.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/MapReduce.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/MapReduce.java
index 3e1eae6..b1763e0 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/MapReduce.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/MapReduce.java
@@ -33,7 +33,7 @@ import java.util.Optional;
  * The map() stage processes the vertices of the {@link org.apache.tinkerpop.gremlin.structure.Graph} in a logically parallel manner.
  * The combine() stage aggregates the values of a particular map emitted key prior to sending across the cluster.
  * The reduce() stage aggregates the values of the combine/map emitted keys for the keys that hash to the current machine in the cluster.
- * The interface presented here is nearly identical to the interface popularized by Hadoop save the the map() is over the vertices of the graph.
+ * The interface presented here is nearly identical to the interface popularized by Hadoop save the map() is over the vertices of the graph.
  *
  * @author Marko A. Rodriguez (http://markorodriguez.com)
  */

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6cdc5a03/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/VertexProgramStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/VertexProgramStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/VertexProgramStep.java
new file mode 100644
index 0000000..d005940
--- /dev/null
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/VertexProgramStep.java
@@ -0,0 +1,135 @@
+/*
+ * 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.Computer;
+import org.apache.tinkerpop.gremlin.process.computer.ComputerResult;
+import org.apache.tinkerpop.gremlin.process.computer.GraphComputer;
+import org.apache.tinkerpop.gremlin.process.computer.Memory;
+import org.apache.tinkerpop.gremlin.process.computer.traversal.TraversalVertexProgram;
+import org.apache.tinkerpop.gremlin.process.computer.traversal.step.VertexComputing;
+import org.apache.tinkerpop.gremlin.process.computer.util.EmptyMemory;
+import org.apache.tinkerpop.gremlin.process.traversal.Step;
+import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
+import org.apache.tinkerpop.gremlin.process.traversal.TraversalSideEffects;
+import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.EmptyStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.ProfileStep;
+import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalInterruptedException;
+import org.apache.tinkerpop.gremlin.structure.Graph;
+
+import java.util.NoSuchElementException;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+
+/**
+ * @author Marko A. Rodriguez (http://markorodriguez.com)
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+public abstract class VertexProgramStep extends AbstractStep<ComputerResult, ComputerResult> implements VertexComputing {
+
+    public static final String ROOT_TRAVERSAL = "gremlin.vertexProgramStep.rootTraversal";
+    public static final String STEP_ID = "gremlin.vertexProgramStep.stepId";
+
+    protected Computer computer = Computer.compute();
+
+    protected boolean first = true;
+
+    public VertexProgramStep(final Traversal.Admin traversal) {
+        super(traversal);
+    }
+
+    @Override
+    protected Traverser.Admin<ComputerResult> processNextStart() throws NoSuchElementException {
+        Future<ComputerResult> future = null;
+        try {
+            if (this.first && this.getPreviousStep() instanceof EmptyStep) {
+                this.first = false;
+                final Graph graph = this.getTraversal().getGraph().get();
+                future = this.getComputer().apply(graph).program(this.generateProgram(graph, EmptyMemory.instance())).submit();
+                final ComputerResult result = future.get();
+                this.processMemorySideEffects(result.memory());
+                return this.getTraversal().getTraverserGenerator().generate(result, this, 1l);
+            } else {
+                final Traverser.Admin<ComputerResult> traverser = this.starts.next();
+                final Graph graph = traverser.get().graph();
+                final Memory memory = traverser.get().memory();
+                future = this.generateComputer(graph).program(this.generateProgram(graph, memory)).submit();
+                final ComputerResult result = future.get();
+                this.processMemorySideEffects(result.memory());
+                return traverser.split(result, this);
+            }
+        } catch (final InterruptedException ie) {
+            // the thread running the traversal took an interruption while waiting on the call the future.get().
+            // the future should then be cancelled with interruption so that the GraphComputer that created
+            // the future knows we don't care about it anymore. The GraphComputer should attempt to respect this
+            // cancellation request.
+            if (future != null) future.cancel(true);
+            throw new TraversalInterruptedException();
+        } catch (ExecutionException e) {
+            throw new IllegalStateException(e.getMessage(), e);
+        }
+    }
+
+    @Override
+    public Computer getComputer() {
+        Computer tempComputer = this.computer;
+        if (!this.isEndStep()) {
+            if (null == tempComputer.getPersist())
+                tempComputer = tempComputer.persist(GraphComputer.Persist.EDGES);
+            if (null == tempComputer.getResultGraph())
+                tempComputer = tempComputer.result(GraphComputer.ResultGraph.NEW);
+        }
+        return tempComputer;
+    }
+
+    @Override
+    public void setComputer(final Computer computer) {
+        this.computer = computer;
+    }
+
+    protected boolean previousTraversalVertexProgram() {
+        Step<?, ?> currentStep = this;
+        while (!(currentStep instanceof EmptyStep)) {
+            if (currentStep instanceof TraversalVertexProgramStep)
+                return true;
+            currentStep = currentStep.getPreviousStep();
+        }
+        return false;
+    }
+
+    private void processMemorySideEffects(final Memory memory) {
+        // update the traversal side-effects with the state of the memory after the OLAP job execution
+        final TraversalSideEffects sideEffects = this.getTraversal().getSideEffects();
+        for (final String key : memory.keys()) {
+            if (sideEffects.exists(key)) {
+                // halted traversers should never be propagated through sideEffects
+                assert !key.equals(TraversalVertexProgram.HALTED_TRAVERSERS);
+                sideEffects.set(key, memory.get(key));
+            }
+        }
+    }
+
+    protected boolean isEndStep() {
+        return this.getNextStep() instanceof ComputerResultStep || (this.getNextStep() instanceof ProfileStep && this.getNextStep().getNextStep() instanceof ComputerResultStep);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6cdc5a03/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/RemoteConnection.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/RemoteConnection.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/RemoteConnection.java
new file mode 100644
index 0000000..8506ad7
--- /dev/null
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/RemoteConnection.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.process.remote;
+
+import org.apache.tinkerpop.gremlin.process.remote.traversal.RemoteTraversal;
+import org.apache.tinkerpop.gremlin.process.traversal.Bytecode;
+import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
+import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
+
+import java.util.Iterator;
+
+/**
+ * A simple abstraction of a "connection" to a "server" that is capable of processing a {@link Traversal} and
+ * returning results. Results refer to both the {@link Iterator} of results from the submitted {@link Traversal}
+ * as well as the side-effects produced by that {@link Traversal}. Those results together are wrapped in a
+ * {@link Traversal}.
+ *
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ * @author Marko A. Rodriguez (http://markorodriguez.com)
+ */
+public interface RemoteConnection extends AutoCloseable {
+
+    /**
+     * @deprecated As of release 3.2.2, replaced by {@link #submit(Bytecode)}.
+     */
+    @Deprecated
+    public <E> Iterator<Traverser.Admin<E>> submit(final Traversal<?, E> traversal) throws RemoteConnectionException;
+
+    /**
+     * Submits {@link Traversal} {@link Bytecode} to a server and returns a {@link Traversal}.
+     * The {@link Traversal} is an abstraction over two types of results that can be returned as part of the
+     * response from the server: the results of the {@link Traversal} itself and the side-effects that it produced.
+     */
+    public <E> RemoteTraversal<?,E> submit(final Bytecode bytecode) throws RemoteConnectionException;
+}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6cdc5a03/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Cluster.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Cluster.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Cluster.java
index f033dc3..6a6a2e3 100644
--- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Cluster.java
+++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Cluster.java
@@ -232,7 +232,7 @@ public final class Cluster {
 
     /**
      * Gets the list of hosts that the {@code Cluster} was able to connect to.  A {@link Host} is assumed unavailable
-     * until a connection to it is proven to be present.  This will not happen until the the {@link Client} submits
+     * until a connection to it is proven to be present.  This will not happen until the {@link Client} submits
      * requests that succeed in reaching a server at the {@link Host} or {@link Client#init()} is called which
      * initializes the {@link ConnectionPool} for the {@link Client} itself.  The number of available hosts returned
      * from this method will change as different servers come on and offline.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6cdc5a03/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/LoadBalancingStrategy.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/LoadBalancingStrategy.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/LoadBalancingStrategy.java
index b485911..c6ad4bd 100644
--- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/LoadBalancingStrategy.java
+++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/LoadBalancingStrategy.java
@@ -41,7 +41,7 @@ public interface LoadBalancingStrategy extends Host.Listener {
     public void initialize(final Cluster cluster, final Collection<Host> hosts);
 
     /**
-     * Provide an ordered list of hosts to send the the given {@link RequestMessage} to.
+     * Provide an ordered list of hosts to send the given {@link RequestMessage} to.
      */
     public Iterator<Host> select(final RequestMessage msg);
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6cdc5a03/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
----------------------------------------------------------------------
diff --git a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
index 23240cb..ca129c6 100644
--- a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
+++ b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
@@ -343,7 +343,7 @@ public class GremlinGroovyScriptEngine extends GroovyScriptEngineImpl implements
     private void internalReset() {
         createClassLoader();
 
-        // must clear the local cache here because the the classloader has been reset.  therefore, classes previously
+        // must clear the local cache here because the classloader has been reset.  therefore, classes previously
         // referenced before that might not have evaluated might cleanly evaluate now.
         classMap.clear();
         globalClosures.clear();

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6cdc5a03/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java
index 829a3ee..ce3d050 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java
@@ -50,7 +50,7 @@ import java.util.concurrent.ScheduledExecutorService;
 import java.util.stream.Stream;
 
 /**
- * A base implementation for the {@code Channelizer} which does a basic configuration of the the pipeline, one that
+ * A base implementation for the {@code Channelizer} which does a basic configuration of the pipeline, one that
  * is generally common to virtually any Gremlin Server operation (i.e. where the server's purpose is to process
  * Gremlin scripts).
  * <p/>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6cdc5a03/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/process/computer/util/ComputerSubmissionHelper.java
----------------------------------------------------------------------
diff --git a/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/process/computer/util/ComputerSubmissionHelper.java b/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/process/computer/util/ComputerSubmissionHelper.java
index daad7ef..75ca4cf 100644
--- a/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/process/computer/util/ComputerSubmissionHelper.java
+++ b/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/process/computer/util/ComputerSubmissionHelper.java
@@ -39,7 +39,7 @@ public class ComputerSubmissionHelper {
      * <p>
      * This is intended to serve as an alternative to {@link ForkJoinPool#commonPool()},
      * which is used by {@link CompletableFuture#supplyAsync(Supplier)} (among other methods).
-     * The the single threaded executor created by this method contains a thread
+     * The single threaded executor created by this method contains a thread
      * with the same context classloader and thread group as the thread that called
      * this method.  Threads created in this method also have predictable behavior when
      * {@link Thread#setContextClassLoader(ClassLoader)} is invoked; threads in the

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6cdc5a03/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jGraph.java
----------------------------------------------------------------------
diff --git a/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jGraph.java b/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jGraph.java
index 6f896af..d5460c7 100644
--- a/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jGraph.java
+++ b/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jGraph.java
@@ -270,7 +270,7 @@ public final class Neo4jGraph implements Graph, WrappedGraph<Neo4jGraphAPI> {
     }
 
     /**
-     * This implementation of {@code close} will also close the current transaction on the the thread, but it
+     * This implementation of {@code close} will also close the current transaction on the thread, but it
      * is up to the caller to deal with dangling transactions in other threads prior to calling this method.
      */
     @Override