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/02/13 13:30:48 UTC

[01/37] incubator-tinkerpop git commit: Better handled commit and serialization errors in Gremlin Server.

Repository: incubator-tinkerpop
Updated Branches:
  refs/heads/master be3ebc194 -> ddf609b8f


Better handled commit and serialization errors in Gremlin Server.

Both types of errors were causing problems.  For commit errors, the last message from iteration was already sent back to the client as a terminating message so failure on commit after that was ignored by the driver because it had already received the terminator for that request.  Serialization errors didn't break the result iteration loop - they were being handled, but the result iteration was allowed to continue. I'm not so sure that those types of failures weren't leaking transactions either - that should be fixed now too.

This stuff is hard to write tests for with Gremlin Server as I dont' know how to force raise a commit exception for Neo4j.  I was able to test externally with graphs that were easier to force that condition.


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

Branch: refs/heads/master
Commit: 9f85d3ed73e41313fc5f7981a1899ed0f8482fa6
Parents: 94ca074
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Feb 3 15:28:25 2016 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 3 15:28:25 2016 -0500

----------------------------------------------------------------------
 .../server/op/AbstractEvalOpProcessor.java      | 38 ++++++++++++--------
 1 file changed, 23 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/9f85d3ed/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java
index aab9950..ca2e055 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java
@@ -57,7 +57,6 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 import java.util.function.Supplier;
 import java.util.regex.Pattern;
-import java.util.stream.Collectors;
 
 import static com.codahale.metrics.MetricRegistry.name;
 
@@ -291,7 +290,15 @@ public abstract class AbstractEvalOpProcessor implements OpProcessor {
                     // serialize here because in sessionless requests the serialization must occur in the same
                     // thread as the eval.  as eval occurs in the GremlinExecutor there's no way to get back to the
                     // thread that processed the eval of the script so, we have to push serialization down into that
-                    serializeResponseMessage(ctx, msg, serializer, useBinary, aggregate, code);
+                    Frame frame;
+                    try {
+                        frame = makeFrame(ctx, msg, serializer, useBinary, aggregate, code);
+                    } catch (Exception ex) {
+                        // exception is handled in makeFrame() - serialization error gets written back to driver
+                        // at that point
+                        if (manageTransactions) attemptRollback(msg, context.getGraphManager(), settings.strictTransactionManagement);
+                        break;
+                    }
 
                     // only need to reset the aggregation list if there's more stuff to write
                     if (toIterate.hasNext())
@@ -311,8 +318,10 @@ public abstract class AbstractEvalOpProcessor implements OpProcessor {
                     }
 
                     // the flush is called after the commit has potentially occurred.  in this way, if a commit was
-                    // required then it will be 100% complete before the client receives it.
-                    ctx.flush();
+                    // required then it will be 100% complete before the client receives it. the "frame" at this point
+                    // should have completely detached objects from the transaction (i.e. serialization has occurred)
+                    // so a new one should not be opened on the flush down the netty pipeline
+                    ctx.writeAndFlush(frame);
                 }
             } else {
                 // don't keep triggering this warning over and over again for the same request
@@ -339,23 +348,21 @@ public abstract class AbstractEvalOpProcessor implements OpProcessor {
         stopWatch.stop();
     }
 
-    private static void serializeResponseMessage(final ChannelHandlerContext ctx, final RequestMessage msg,
-                                                 final MessageSerializer serializer, final boolean useBinary, List<Object> aggregate,
-                                                 final ResponseStatusCode code) {
+    private static Frame makeFrame(final ChannelHandlerContext ctx, final RequestMessage msg,
+                                   final MessageSerializer serializer, final boolean useBinary, List<Object> aggregate,
+                                   final ResponseStatusCode code) throws Exception {
         try {
             if (useBinary) {
-                ctx.write(new Frame(
-                        serializer.serializeResponseAsBinary(ResponseMessage.build(msg)
-                        .code(code)
-                        .result(aggregate).create(), ctx.alloc())));
+                return new Frame(serializer.serializeResponseAsBinary(ResponseMessage.build(msg)
+                                .code(code)
+                                .result(aggregate).create(), ctx.alloc()));
             } else {
                 // the expectation is that the GremlinTextRequestDecoder will have placed a MessageTextSerializer
                 // instance on the channel.
                 final MessageTextSerializer textSerializer = (MessageTextSerializer) serializer;
-                ctx.write(new Frame(
-                        textSerializer.serializeResponseAsString(ResponseMessage.build(msg)
-                        .code(code)
-                        .result(aggregate).create())));
+                return new Frame(textSerializer.serializeResponseAsString(ResponseMessage.build(msg)
+                                .code(code)
+                                .result(aggregate).create()));
             }
         } catch (Exception ex) {
             logger.warn("The result [{}] in the request {} could not be serialized and returned.", aggregate, msg.getRequestId(), ex);
@@ -365,6 +372,7 @@ public abstract class AbstractEvalOpProcessor implements OpProcessor {
                     .statusMessage(errorMessage)
                     .code(ResponseStatusCode.SERVER_ERROR_SERIALIZATION).create();
             ctx.writeAndFlush(error);
+            throw ex;
         }
     }
 


[20/37] incubator-tinkerpop git commit: Removed superflous text from NOTICE.

Posted by sp...@apache.org.
Removed superflous text from NOTICE.

Feedback from VOTE on 3.1.1-incubating - http://mail-archives.apache.org/mod_mbox/incubator-general/201602.mbox/%3C8997E0D3-F844-44B1-B19A-955E246D6ABD%40classsoftware.com%3E


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

Branch: refs/heads/master
Commit: 0567c6bc1f4ebe73850a83b82039104b13845021
Parents: e157514
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Feb 12 09:35:22 2016 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Feb 12 09:35:22 2016 -0500

----------------------------------------------------------------------
 NOTICE                          | 18 ++----------------
 gremlin-console/src/main/NOTICE | 18 ++----------------
 gremlin-server/src/main/NOTICE  | 18 ++----------------
 3 files changed, 6 insertions(+), 48 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/0567c6bc/NOTICE
----------------------------------------------------------------------
diff --git a/NOTICE b/NOTICE
index abfebfd..38cc440 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,23 +1,9 @@
-Apache TinkerPop
-Copyright 2015 The Apache Software Foundation.
+Apache TinkerPop (incubating)
+Copyright 2015-2016 The Apache Software Foundation.
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
 
-=======================================================================
-
-Apache TinkerPop contains subcomponents with separate copyright notices and
-license terms. Your use of the source code for the these subcomponents
-is subject to the terms and conditions of their respective licenses.
-
-See the LICENSE file for a list of subcomponents and dependencies and
-their respective licenses.
-
-========================================================================
- NOTICE files corresponding to section 4(d) of the Apache License,
- for bundled components and dependencies
-========================================================================
-
 ------------------------------------------------------------------------
 Activiti
 ------------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/0567c6bc/gremlin-console/src/main/NOTICE
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/NOTICE b/gremlin-console/src/main/NOTICE
index 856d8fd..51d06c8 100644
--- a/gremlin-console/src/main/NOTICE
+++ b/gremlin-console/src/main/NOTICE
@@ -1,23 +1,9 @@
-Apache TinkerPop
-Copyright 2015 The Apache Software Foundation.
+Apache TinkerPop (incubating)
+Copyright 2015-2016 The Apache Software Foundation.
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
 
-=======================================================================
-
-Apache TinkerPop contains subcomponents with separate copyright notices and
-license terms. Your use of the source code for the these subcomponents
-is subject to the terms and conditions of their respective licenses.
-
-See the LICENSE file for a list of subcomponents and dependencies and
-their respective licenses.
-
-========================================================================
- NOTICE files corresponding to section 4(d) of the Apache License,
- for bundled components and dependencies
-========================================================================
-
 ------------------------------------------------------------------------
 Apache Commons Codec (AL ASF)
 ------------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/0567c6bc/gremlin-server/src/main/NOTICE
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/NOTICE b/gremlin-server/src/main/NOTICE
index 8147661..b9b9a2e 100644
--- a/gremlin-server/src/main/NOTICE
+++ b/gremlin-server/src/main/NOTICE
@@ -1,23 +1,9 @@
-Apache TinkerPop
-Copyright 2015 The Apache Software Foundation.
+Apache TinkerPop (incubating)
+Copyright 2015-2016 The Apache Software Foundation.
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
 
-=======================================================================
-
-Apache TinkerPop contains subcomponents with separate copyright notices and
-license terms. Your use of the source code for the these subcomponents
-is subject to the terms and conditions of their respective licenses.
-
-See the LICENSE file for a list of subcomponents and dependencies and
-their respective licenses.
-
-========================================================================
- NOTICE files corresponding to section 4(d) of the Apache License,
- for bundled components and dependencies
-========================================================================
-
 ------------------------------------------------------------------------
 Apache Commons Lang (AL ASF)
 ------------------------------------------------------------------------


[37/37] incubator-tinkerpop git commit: Merge remote-tracking branch 'origin/tp31'

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

Conflicts:
	gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinTest.java


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

Branch: refs/heads/master
Commit: ddf609b8f5adbc29e247a41f9fa2a7609cccf72e
Parents: be3ebc1 890131e
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Sat Feb 13 07:30:12 2016 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Sat Feb 13 07:30:12 2016 -0500

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  11 +
 LICENSE                                         |  23 +-
 NOTICE                                          |  18 +-
 docs/src/dev/developer/contributing.asciidoc    |   9 +-
 docs/src/dev/developer/release.asciidoc         |  50 ++-
 .../src/reference/gremlin-applications.asciidoc | 103 ++++--
 .../upgrade/release-3.1.x-incubating.asciidoc   |  62 ++++
 gremlin-console/src/assembly/distribution.xml   |   8 +-
 gremlin-console/src/main/LICENSE                | 273 ----------------
 gremlin-console/src/main/NOTICE                 |  76 -----
 gremlin-console/src/main/static/LICENSE         | 238 ++++++++++++++
 gremlin-console/src/main/static/NOTICE          |  62 ++++
 .../src/main/static/licenses/foundation         |  22 ++
 .../src/main/static/licenses/jbcrypt            |  17 +
 .../src/main/static/licenses/jcabi-log          |  27 ++
 .../src/main/static/licenses/jcabi-manifests    |  27 ++
 gremlin-console/src/main/static/licenses/jline2 |  34 ++
 gremlin-console/src/main/static/licenses/kryo   |  10 +
 gremlin-console/src/main/static/licenses/minlog |  10 +
 .../src/main/static/licenses/normalize          |   7 +
 gremlin-console/src/main/static/licenses/slf4j  |  21 ++
 .../structure/io/graphson/GraphSONModule.java   |  47 ++-
 .../io/graphson/GraphSONSerializers.java        |  50 +--
 .../io/graphson/JavaTimeSerializers.java        | 326 +++++++++++++++++++
 .../io/graphson/JavaUtilSerializers.java        |  86 +++++
 .../GraphSONMapperEmbeddedTypeTest.java         | 134 ++++++++
 .../io/graphson/GraphSONMapperTest.java         | 133 ++++++++
 .../structure/io/gryo/GryoMapperTest.java       |   1 -
 .../apache/tinkerpop/gremlin/driver/Client.java |   7 +-
 .../tinkerpop/gremlin/driver/Cluster.java       |  24 +-
 .../gremlin/driver/ConnectionPool.java          |   3 +
 .../apache/tinkerpop/gremlin/driver/Host.java   |  23 +-
 .../apache/tinkerpop/gremlin/driver/Tokens.java |  11 +-
 .../groovy/engine/ConcurrentBindings.java       |  42 +++
 .../gremlin/groovy/engine/GremlinExecutor.java  |   9 +-
 .../TimedInterruptCustomizerProvider.java       |   1 +
 .../TimedInterruptTimeoutException.java         |  34 ++
 .../groovy/engine/GremlinExecutorTest.java      |  87 ++++-
 .../jsr223/GremlinGroovyScriptEngineTest.java   |  13 +-
 ...linGroovyScriptEngineTimedInterruptTest.java |   7 +-
 gremlin-server/src/assembly/distribution.xml    |   8 +-
 gremlin-server/src/main/LICENSE                 | 274 ----------------
 gremlin-server/src/main/NOTICE                  |  77 -----
 .../handler/HttpGremlinEndpointHandler.java     |  18 +-
 .../server/op/AbstractEvalOpProcessor.java      |  79 +++--
 gremlin-server/src/main/static/LICENSE          | 242 ++++++++++++++
 gremlin-server/src/main/static/NOTICE           |  63 ++++
 .../src/main/static/licenses/foundation         |  22 ++
 .../src/main/static/licenses/gmetric4j          |  31 ++
 gremlin-server/src/main/static/licenses/jbcrypt |  17 +
 .../src/main/static/licenses/jcabi-log          |  27 ++
 .../src/main/static/licenses/jcabi-manifests    |  27 ++
 gremlin-server/src/main/static/licenses/jline2  |  34 ++
 gremlin-server/src/main/static/licenses/kryo    |  10 +
 gremlin-server/src/main/static/licenses/minlog  |  10 +
 .../src/main/static/licenses/normalize          |   7 +
 gremlin-server/src/main/static/licenses/slf4j   |  21 ++
 .../AbstractGremlinServerIntegrationTest.java   |   4 +
 .../server/GremlinDriverIntegrateTest.java      |  57 +++-
 .../server/GremlinServerHttpIntegrateTest.java  |  23 +-
 .../server/GremlinServerIntegrateTest.java      | 132 +++++++-
 .../gremlin/AbstractGraphProvider.java          |  18 +
 .../tinkerpop/gremlin/AbstractGremlinTest.java  |   4 +-
 .../apache/tinkerpop/gremlin/GraphManager.java  |  26 +-
 .../apache/tinkerpop/gremlin/GraphProvider.java |   3 +
 .../tinkerpop/gremlin/structure/io/IoTest.java  |   7 +-
 licenses/normalize                              |   7 +
 .../neo4j/AbstractNeo4jGraphProvider.java       |   8 +-
 .../neo4j/MultiMetaNeo4jGraphProvider.java      |   8 +-
 .../neo4j/NoMultiNoMetaNeo4jGraphProvider.java  |   8 +-
 pom.xml                                         |   1 +
 71 files changed, 2459 insertions(+), 960 deletions(-)
----------------------------------------------------------------------


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

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

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/ddf609b8/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/ddf609b8/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/GraphManager.java
----------------------------------------------------------------------
diff --cc gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/GraphManager.java
index fa34dd0,55ffcf8..4f43a08
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/GraphManager.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/GraphManager.java
@@@ -102,15 -107,10 +108,15 @@@ public class GraphManager 
          }
  
          @Override
 +        public GraphComputer getGraphComputer(final Graph graph) {
 +            return innerGraphProvider.getGraphComputer(graph);
 +        }
 +
 +        @Override
          public Graph standardTestGraph(final Class<?> test, final String testMethodName, final LoadGraphWith.GraphData loadGraphWith) {
-             final Graph graph = innerGraphProvider.standardTestGraph(test, testMethodName, loadGraphWith);
-             openGraphs.add(graph);
-             return graph;
+             // call the ManagedGraphProvider.openTestGraph() so that the created Graph/Configuration instances
+             // are tracked
+             return openTestGraph(standardGraphConfiguration(test, testMethodName, loadGraphWith));
          }
  
          @Override

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/ddf609b8/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/GraphProvider.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/ddf609b8/pom.xml
----------------------------------------------------------------------


[36/37] incubator-tinkerpop git commit: Merge remote-tracking branch 'origin/TINKERPOP-1148' into tp31

Posted by sp...@apache.org.
Merge remote-tracking branch 'origin/TINKERPOP-1148' into tp31


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

Branch: refs/heads/master
Commit: 890131e331befe9214a21517a02195fa525f0045
Parents: c1c6d60 232b187
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Feb 12 18:58:37 2016 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Feb 12 18:58:37 2016 -0500

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 .../groovy/engine/ConcurrentBindings.java       | 42 ++++++++++
 .../gremlin/groovy/engine/GremlinExecutor.java  |  7 +-
 .../groovy/engine/GremlinExecutorTest.java      | 84 +++++++++++++++++---
 .../jsr223/GremlinGroovyScriptEngineTest.java   |  8 +-
 5 files changed, 126 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/890131e3/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --cc CHANGELOG.asciidoc
index 98a184e,dd5b51b..bf74b50
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@@ -26,13 -26,8 +26,14 @@@ image::https://raw.githubusercontent.co
  TinkerPop 3.1.2 (NOT OFFICIALLY RELEASED YET)
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
 +* Fixed bug in "round robin" load balancing in `gremlin-driver` where requests were wrongly being sent to the same host.
 +* Prevented the spawning of unneeded reconnect tasks in `gremlin-driver` when a host goes offline.
 +* Fixed bug preventing `gremlin-driver` from reconnecting to Gremlin Server when it was restarted.
 +* Better handled errors that occurred on commits and serialization in Gremlin Server to first break the result iteration loop and to ensure commit errors were reported to the client.
 +* Added GraphSON serializers for the `java.time.*` classes.
 +* Improved the logging of the Gremlin Server REST endpoint as it pertained to script execution failures.
  * `TraversalExplanation` is now `Serializable` and registered with `GryoMapper`.
+ * Fixed a problem with global bindings in Gremlin Server which weren't properly designed to handle concurrent modification.
  * Deprecated `ScriptElementFactory` and made the local `StarGraph` globally available for `ScriptInputFormat`'s `parse()` method.
  * Improved reusability of unique test directory creation in `/target` for `AbstractGraphProvider`, which was formerly only available to Neo4j, by adding `makeTestDirectory()`.
  * Optimized memory-usage in `TraversalVertexProgram`.

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

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/890131e3/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutorTest.java
----------------------------------------------------------------------
diff --cc gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutorTest.java
index 3f346e7,54e185a..b5f186b
--- a/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutorTest.java
+++ b/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutorTest.java
@@@ -22,10 -22,12 +22,13 @@@ import org.apache.commons.lang3.concurr
  import org.apache.tinkerpop.gremlin.TestHelper;
  import org.apache.tinkerpop.gremlin.groovy.jsr223.customizer.ThreadInterruptCustomizerProvider;
  import org.apache.tinkerpop.gremlin.groovy.jsr223.customizer.TimedInterruptCustomizerProvider;
 +import org.apache.tinkerpop.gremlin.groovy.jsr223.customizer.TimedInterruptTimeoutException;
  import org.javatuples.Pair;
- import org.javatuples.Triplet;
+ import org.junit.Rule;
  import org.junit.Test;
+ import org.junit.rules.TestName;
+ import org.slf4j.Logger;
+ import org.slf4j.LoggerFactory;
  
  import javax.script.Bindings;
  import javax.script.CompiledScript;


[35/37] incubator-tinkerpop git commit: Merge remote-tracking branch 'origin/TINKERPOP-1039' into tp31

Posted by sp...@apache.org.
Merge remote-tracking branch 'origin/TINKERPOP-1039' into tp31


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

Branch: refs/heads/master
Commit: c1c6d6076fa88d041e8c7de4ef683ba6c873725e
Parents: f06cf66 e9966b3
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Feb 12 18:43:23 2016 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Feb 12 18:43:23 2016 -0500

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |   1 +
 .../src/reference/gremlin-applications.asciidoc | 103 +++++++++++++------
 .../upgrade/release-3.1.x-incubating.asciidoc   |  36 +++++++
 .../apache/tinkerpop/gremlin/driver/Client.java |   5 +-
 .../tinkerpop/gremlin/driver/Cluster.java       |  24 ++++-
 .../apache/tinkerpop/gremlin/driver/Tokens.java |  11 +-
 .../server/op/AbstractEvalOpProcessor.java      |  29 +++---
 .../server/GremlinDriverIntegrateTest.java      |  57 ++++++++--
 .../server/GremlinServerIntegrateTest.java      |  62 +++++++++++
 9 files changed, 273 insertions(+), 55 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/c1c6d607/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --cc CHANGELOG.asciidoc
index f4d02f7,de5bc67..98a184e
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@@ -26,19 -26,12 +26,20 @@@ image::https://raw.githubusercontent.co
  TinkerPop 3.1.2 (NOT OFFICIALLY RELEASED YET)
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
 +* Fixed bug in "round robin" load balancing in `gremlin-driver` where requests were wrongly being sent to the same host.
 +* Prevented the spawning of unneeded reconnect tasks in `gremlin-driver` when a host goes offline.
 +* Fixed bug preventing `gremlin-driver` from reconnecting to Gremlin Server when it was restarted.
 +* Better handled errors that occurred on commits and serialization in Gremlin Server to first break the result iteration loop and to ensure commit errors were reported to the client.
 +* Added GraphSON serializers for the `java.time.*` classes.
 +* Improved the logging of the Gremlin Server REST endpoint as it pertained to script execution failures.
  * `TraversalExplanation` is now `Serializable` and registered with `GryoMapper`.
  * Deprecated `ScriptElementFactory` and made the local `StarGraph` globally available for `ScriptInputFormat`'s `parse()` method.
 +* Improved reusability of unique test directory creation in `/target` for `AbstractGraphProvider`, which was formerly only available to Neo4j, by adding `makeTestDirectory()`.
  * Optimized memory-usage in `TraversalVertexProgram`.
  * `Graph` instances are not merely "closed" at the end of tests, they are "cleared" via `GraphProvider.clear()`, which should in turn cleans up old data for an implementation.
+ * Expanded the Gremlin Server protocol to allow for transaction management on in-session requests and updated the `gremlin-driver` to take advantage of that.
  * Greatly reduced the amount of objects required in OLAP for the `ReducingBarrierStep` steps.
 +* Improved messages for the different distinct "timeouts" that a user can encounter with Gremlin Server.
  
  [[release-3.1.1-incubating]]
  TinkerPop 3.1.1 (Release Date: February 8, 2016)

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/c1c6d607/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/c1c6d607/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java
----------------------------------------------------------------------
diff --cc gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java
index 3e0c93e,e6cf2e6..1e37fa0
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java
@@@ -296,18 -295,10 +301,18 @@@ public abstract class AbstractEvalOpPro
                      // serialize here because in sessionless requests the serialization must occur in the same
                      // thread as the eval.  as eval occurs in the GremlinExecutor there's no way to get back to the
                      // thread that processed the eval of the script so, we have to push serialization down into that
 -                    serializeResponseMessage(ctx, msg, serializer, useBinary, aggregate, code);
 +                    Frame frame;
 +                    try {
 +                        frame = makeFrame(ctx, msg, serializer, useBinary, aggregate, code);
 +                    } catch (Exception ex) {
 +                        // exception is handled in makeFrame() - serialization error gets written back to driver
 +                        // at that point
 +                        if (manageTransactions) attemptRollback(msg, context.getGraphManager(), settings.strictTransactionManagement);
 +                        break;
 +                    }
  
                      // only need to reset the aggregation list if there's more stuff to write
-                     if (toIterate.hasNext())
+                     if (itty.hasNext())
                          aggregate = new ArrayList<>(resultIterationBatchSize);
                      else {
                          // iteration and serialization are both complete which means this finished successfully. note that

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/c1c6d607/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
----------------------------------------------------------------------


[30/37] incubator-tinkerpop git commit: Renamed the various /deps directories to /licenses CTR

Posted by sp...@apache.org.
Renamed the various /deps directories to /licenses CTR


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

Branch: refs/heads/master
Commit: 1de73e53d84de385123f737cc57dd0c91ee58d64
Parents: f683d95
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Feb 12 17:57:28 2016 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Feb 12 17:57:28 2016 -0500

----------------------------------------------------------------------
 LICENSE                                         |  2 +-
 deps/normalize                                  |  7 ----
 docs/src/dev/developer/contributing.asciidoc    |  4 +--
 gremlin-console/src/assembly/distribution.xml   |  4 +--
 gremlin-console/src/main/static/LICENSE         | 22 ++++++-------
 gremlin-console/src/main/static/deps/foundation | 22 -------------
 gremlin-console/src/main/static/deps/jbcrypt    | 17 ----------
 gremlin-console/src/main/static/deps/jcabi-log  | 27 ----------------
 .../src/main/static/deps/jcabi-manifests        | 27 ----------------
 gremlin-console/src/main/static/deps/jline2     | 34 --------------------
 gremlin-console/src/main/static/deps/kryo       | 10 ------
 gremlin-console/src/main/static/deps/minlog     | 10 ------
 gremlin-console/src/main/static/deps/normalize  |  7 ----
 gremlin-console/src/main/static/deps/slf4j      | 21 ------------
 .../src/main/static/licenses/foundation         | 22 +++++++++++++
 .../src/main/static/licenses/jbcrypt            | 17 ++++++++++
 .../src/main/static/licenses/jcabi-log          | 27 ++++++++++++++++
 .../src/main/static/licenses/jcabi-manifests    | 27 ++++++++++++++++
 gremlin-console/src/main/static/licenses/jline2 | 34 ++++++++++++++++++++
 gremlin-console/src/main/static/licenses/kryo   | 10 ++++++
 gremlin-console/src/main/static/licenses/minlog | 10 ++++++
 .../src/main/static/licenses/normalize          |  7 ++++
 gremlin-console/src/main/static/licenses/slf4j  | 21 ++++++++++++
 gremlin-server/src/assembly/distribution.xml    |  4 +--
 gremlin-server/src/main/static/deps/foundation  | 22 -------------
 gremlin-server/src/main/static/deps/gmetric4j   | 31 ------------------
 gremlin-server/src/main/static/deps/jbcrypt     | 17 ----------
 gremlin-server/src/main/static/deps/jcabi-log   | 27 ----------------
 .../src/main/static/deps/jcabi-manifests        | 27 ----------------
 gremlin-server/src/main/static/deps/jline2      | 34 --------------------
 gremlin-server/src/main/static/deps/kryo        | 10 ------
 gremlin-server/src/main/static/deps/minlog      | 10 ------
 gremlin-server/src/main/static/deps/normalize   |  7 ----
 gremlin-server/src/main/static/deps/slf4j       | 21 ------------
 .../src/main/static/licenses/foundation         | 22 +++++++++++++
 .../src/main/static/licenses/gmetric4j          | 31 ++++++++++++++++++
 gremlin-server/src/main/static/licenses/jbcrypt | 17 ++++++++++
 .../src/main/static/licenses/jcabi-log          | 27 ++++++++++++++++
 .../src/main/static/licenses/jcabi-manifests    | 27 ++++++++++++++++
 gremlin-server/src/main/static/licenses/jline2  | 34 ++++++++++++++++++++
 gremlin-server/src/main/static/licenses/kryo    | 10 ++++++
 gremlin-server/src/main/static/licenses/minlog  | 10 ++++++
 .../src/main/static/licenses/normalize          |  7 ++++
 gremlin-server/src/main/static/licenses/slf4j   | 21 ++++++++++++
 licenses/normalize                              |  7 ++++
 45 files changed, 406 insertions(+), 406 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/LICENSE
----------------------------------------------------------------------
diff --git a/LICENSE b/LICENSE
index 05f4a6e..d9f4154 100644
--- a/LICENSE
+++ b/LICENSE
@@ -207,4 +207,4 @@ MIT Licenses
 
 The Apache TinkerPop project bundles the following components under the MIT License:
 
-     normalize.css 2.1.2 (http://necolas.github.io/normalize.css/) - for details, see deps/normalize
\ No newline at end of file
+     normalize.css 2.1.2 (http://necolas.github.io/normalize.css/) - for details, see licenses/normalize
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/deps/normalize
----------------------------------------------------------------------
diff --git a/deps/normalize b/deps/normalize
deleted file mode 100644
index 4e3a191..0000000
--- a/deps/normalize
+++ /dev/null
@@ -1,7 +0,0 @@
-Copyright (c) Nicolas Gallagher and Jonathan Neal
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/docs/src/dev/developer/contributing.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/dev/developer/contributing.asciidoc b/docs/src/dev/developer/contributing.asciidoc
index 6186c51..730e7f1 100644
--- a/docs/src/dev/developer/contributing.asciidoc
+++ b/docs/src/dev/developer/contributing.asciidoc
@@ -387,7 +387,7 @@ likely come from the addition of a source file from another library.
 
 * If the file being bundled is Apache licensed, then add an entry to NOTICE.
 * If the file being bundled is under a different approved license, then add an entry to LICENSE and include a copy of
-that LICENSE in the root `/deps` directory of the code repository.
+that LICENSE in the root `/licenses` directory of the code repository.
 
 Binary LICENSE and NOTICE
 ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -401,7 +401,7 @@ distributions, either:
 
 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
-added to the `<project>/static/deps` directory of the code repository.
+added to the `<project>/static/licenses` directory of the code repository.
 
 To determine if changes are required to the NOTICE, first check if the bundled jar has a NOTICE file in it (typically
 found in `/META-INF` directory of the jar).

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/gremlin-console/src/assembly/distribution.xml
----------------------------------------------------------------------
diff --git a/gremlin-console/src/assembly/distribution.xml b/gremlin-console/src/assembly/distribution.xml
index 0f5932e..bb3e77d 100644
--- a/gremlin-console/src/assembly/distribution.xml
+++ b/gremlin-console/src/assembly/distribution.xml
@@ -30,8 +30,8 @@ limitations under the License.
             </includes>
         </fileSet>
         <fileSet>
-            <directory>src/main/static/deps</directory>
-            <outputDirectory>deps</outputDirectory>
+            <directory>src/main/static/licenses</directory>
+            <outputDirectory>licenses</outputDirectory>
         </fileSet>
         <fileSet>
             <directory>target/apache-${project.artifactId}-${project.version}-standalone/conf</directory>

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/gremlin-console/src/main/static/LICENSE
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/static/LICENSE b/gremlin-console/src/main/static/LICENSE
index 2116ef4..db0c2a7 100644
--- a/gremlin-console/src/main/static/LICENSE
+++ b/gremlin-console/src/main/static/LICENSE
@@ -207,15 +207,15 @@ BSD-style Licenses
 
 The Apache TinkerPop project bundles the following components under the BSD License:
 
-     jcabi-log (com.jcabi:jcabi-log:0.14 - http://www.jcabi.com/jcabi-log) - for details, see deps/jcabi-log
-     jcabi-manifests 1.1 (com.jcabi:jcabi-manifests:1.1 - http://www.jcabi.com/jcabi-manifests) - for details, see deps/jcabi-manifests
-     JLine (jline:jline:2.12 - https://github.com/jline/jline2) - for details, see deps/jline2
+     jcabi-log (com.jcabi:jcabi-log:0.14 - http://www.jcabi.com/jcabi-log) - for details, see licenses/jcabi-log
+     jcabi-manifests 1.1 (com.jcabi:jcabi-manifests:1.1 - http://www.jcabi.com/jcabi-manifests) - for details, see licenses/jcabi-manifests
+     JLine (jline:jline:2.12 - https://github.com/jline/jline2) - for details, see licenses/jline2
      Kryo (com.esotericsoftware:kryo-shaded:3.0.1 - https://github.com/EsotericSoftware/kryo)
        - shaded in gremlin-shaded to org.apache.tinkerpop.shaded.kryo
-       - for details, see deps/kryo
+       - for details, see licenses/kryo
      minlog (com.esotericsoftware:minlog:1.3.0 - https://github.com/EsotericSoftware/minlog)
        - shaded in gremlin-shaded to org.apache.tinkerpop.shaded.minlog
-       - for details, see deps/minlog
+       - for details, see licenses/minlog
 
 ========================================================================
 MIT Licenses
@@ -223,11 +223,11 @@ MIT Licenses
 
 The Apache TinkerPop project bundles the following components under the MIT License:
 
-     JCL 1.1.1 implemented over SLF4J (org.slf4j:jcl-over-slf4j:1.7.12 - http://www.slf4j.org) - for details, see deps/slf4j
-     SLF4J API Module (org.slf4j:slf4j-api:1.7.12 - http://www.slf4j.org) - for details, see deps/slf4j
-     SLF4J LOG4J-12 Binding (org.slf4j:slf4j-log4j12:1.7.12 - http://www.slf4j.org) - for details, see deps/slf4j
-     Foundation stylesheet for CodeRay (http://foundation.zurb.com) - for details, see deps/foundation
-     normalize.css 2.1.2 (http://necolas.github.io/normalize.css/) - for details, see deps/normalize
+     JCL 1.1.1 implemented over SLF4J (org.slf4j:jcl-over-slf4j:1.7.12 - http://www.slf4j.org) - for details, see licenses/slf4j
+     SLF4J API Module (org.slf4j:slf4j-api:1.7.12 - http://www.slf4j.org) - for details, see licenses/slf4j
+     SLF4J LOG4J-12 Binding (org.slf4j:slf4j-log4j12:1.7.12 - http://www.slf4j.org) - for details, see licenses/slf4j
+     Foundation stylesheet for CodeRay (http://foundation.zurb.com) - for details, see licenses/foundation
+     normalize.css 2.1.2 (http://necolas.github.io/normalize.css/) - for details, see licenses/normalize
 
 ========================================================================
 Other Licenses
@@ -235,4 +235,4 @@ Other Licenses
 
 The Apache TinkerPop project bundles the following components under the ISC License:
 
-     jBCrypt (org.mindrot:jbcrypt:0.3m - https://github.com/jeremyh/jBCrypt) - for details, see deps/jbcrypt
\ No newline at end of file
+     jBCrypt (org.mindrot:jbcrypt:0.3m - https://github.com/jeremyh/jBCrypt) - for details, see licenses/jbcrypt
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/gremlin-console/src/main/static/deps/foundation
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/static/deps/foundation b/gremlin-console/src/main/static/deps/foundation
deleted file mode 100644
index a54868c..0000000
--- a/gremlin-console/src/main/static/deps/foundation
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright (c) 2013-2016 ZURB, inc.
-
-MIT License
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/gremlin-console/src/main/static/deps/jbcrypt
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/static/deps/jbcrypt b/gremlin-console/src/main/static/deps/jbcrypt
deleted file mode 100644
index e0e23ed..0000000
--- a/gremlin-console/src/main/static/deps/jbcrypt
+++ /dev/null
@@ -1,17 +0,0 @@
-jBCrypt is subject to the following license:
-
-/*
- * Copyright (c) 2006 Damien Miller <dj...@mindrot.org>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/gremlin-console/src/main/static/deps/jcabi-log
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/static/deps/jcabi-log b/gremlin-console/src/main/static/deps/jcabi-log
deleted file mode 100644
index ece789e..0000000
--- a/gremlin-console/src/main/static/deps/jcabi-log
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c) 2012-2015, jcabi.com
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met: 1) Redistributions of source code must retain the above
-copyright notice, this list of conditions and the following
-disclaimer. 2) Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following
-disclaimer in the documentation and/or other materials provided
-with the distribution. 3) Neither the name of the jcabi.com nor
-the names of its contributors may be used to endorse or promote
-products derived from this software without specific prior written
-permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
-NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
-THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
-OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/gremlin-console/src/main/static/deps/jcabi-manifests
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/static/deps/jcabi-manifests b/gremlin-console/src/main/static/deps/jcabi-manifests
deleted file mode 100644
index ece789e..0000000
--- a/gremlin-console/src/main/static/deps/jcabi-manifests
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c) 2012-2015, jcabi.com
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met: 1) Redistributions of source code must retain the above
-copyright notice, this list of conditions and the following
-disclaimer. 2) Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following
-disclaimer in the documentation and/or other materials provided
-with the distribution. 3) Neither the name of the jcabi.com nor
-the names of its contributors may be used to endorse or promote
-products derived from this software without specific prior written
-permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
-NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
-THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
-OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/gremlin-console/src/main/static/deps/jline2
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/static/deps/jline2 b/gremlin-console/src/main/static/deps/jline2
deleted file mode 100644
index 112aabf..0000000
--- a/gremlin-console/src/main/static/deps/jline2
+++ /dev/null
@@ -1,34 +0,0 @@
-Copyright (c) 2002-2012, the original author or authors.
-All rights reserved.
-
-http://www.opensource.org/licenses/bsd-license.php
-
-Redistribution and use in source and binary forms, with or
-without modification, are permitted provided that the following
-conditions are met:
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with
-the distribution.
-
-Neither the name of JLine nor the names of its contributors
-may be used to endorse or promote products derived from this
-software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
-BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
-AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
-OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
-IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
-OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/gremlin-console/src/main/static/deps/kryo
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/static/deps/kryo b/gremlin-console/src/main/static/deps/kryo
deleted file mode 100644
index 3f6a160..0000000
--- a/gremlin-console/src/main/static/deps/kryo
+++ /dev/null
@@ -1,10 +0,0 @@
-Copyright (c) 2008, Nathan Sweet
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-    * Neither the name of Esoteric Software nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/gremlin-console/src/main/static/deps/minlog
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/static/deps/minlog b/gremlin-console/src/main/static/deps/minlog
deleted file mode 100644
index 3f6a160..0000000
--- a/gremlin-console/src/main/static/deps/minlog
+++ /dev/null
@@ -1,10 +0,0 @@
-Copyright (c) 2008, Nathan Sweet
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-    * Neither the name of Esoteric Software nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/gremlin-console/src/main/static/deps/normalize
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/static/deps/normalize b/gremlin-console/src/main/static/deps/normalize
deleted file mode 100644
index 4e3a191..0000000
--- a/gremlin-console/src/main/static/deps/normalize
+++ /dev/null
@@ -1,7 +0,0 @@
-Copyright (c) Nicolas Gallagher and Jonathan Neal
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/gremlin-console/src/main/static/deps/slf4j
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/static/deps/slf4j b/gremlin-console/src/main/static/deps/slf4j
deleted file mode 100644
index d32467b..0000000
--- a/gremlin-console/src/main/static/deps/slf4j
+++ /dev/null
@@ -1,21 +0,0 @@
- Copyright (c) 2004-2013 QOS.ch
- All rights reserved.
-
- Permission is hereby granted, free  of charge, to any person obtaining
- a  copy  of this  software  and  associated  documentation files  (the
- "Software"), to  deal in  the Software without  restriction, including
- without limitation  the rights to  use, copy, modify,  merge, publish,
- distribute,  sublicense, and/or sell  copies of  the Software,  and to
- permit persons to whom the Software  is furnished to do so, subject to
- the following conditions:
-
- The  above  copyright  notice  and  this permission  notice  shall  be
- included in all copies or substantial portions of the Software.
-
- THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
- EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
- MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/gremlin-console/src/main/static/licenses/foundation
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/static/licenses/foundation b/gremlin-console/src/main/static/licenses/foundation
new file mode 100644
index 0000000..a54868c
--- /dev/null
+++ b/gremlin-console/src/main/static/licenses/foundation
@@ -0,0 +1,22 @@
+Copyright (c) 2013-2016 ZURB, inc.
+
+MIT License
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/gremlin-console/src/main/static/licenses/jbcrypt
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/static/licenses/jbcrypt b/gremlin-console/src/main/static/licenses/jbcrypt
new file mode 100644
index 0000000..e0e23ed
--- /dev/null
+++ b/gremlin-console/src/main/static/licenses/jbcrypt
@@ -0,0 +1,17 @@
+jBCrypt is subject to the following license:
+
+/*
+ * Copyright (c) 2006 Damien Miller <dj...@mindrot.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/gremlin-console/src/main/static/licenses/jcabi-log
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/static/licenses/jcabi-log b/gremlin-console/src/main/static/licenses/jcabi-log
new file mode 100644
index 0000000..ece789e
--- /dev/null
+++ b/gremlin-console/src/main/static/licenses/jcabi-log
@@ -0,0 +1,27 @@
+Copyright (c) 2012-2015, jcabi.com
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met: 1) Redistributions of source code must retain the above
+copyright notice, this list of conditions and the following
+disclaimer. 2) Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following
+disclaimer in the documentation and/or other materials provided
+with the distribution. 3) Neither the name of the jcabi.com nor
+the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written
+permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
+NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/gremlin-console/src/main/static/licenses/jcabi-manifests
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/static/licenses/jcabi-manifests b/gremlin-console/src/main/static/licenses/jcabi-manifests
new file mode 100644
index 0000000..ece789e
--- /dev/null
+++ b/gremlin-console/src/main/static/licenses/jcabi-manifests
@@ -0,0 +1,27 @@
+Copyright (c) 2012-2015, jcabi.com
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met: 1) Redistributions of source code must retain the above
+copyright notice, this list of conditions and the following
+disclaimer. 2) Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following
+disclaimer in the documentation and/or other materials provided
+with the distribution. 3) Neither the name of the jcabi.com nor
+the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written
+permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
+NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/gremlin-console/src/main/static/licenses/jline2
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/static/licenses/jline2 b/gremlin-console/src/main/static/licenses/jline2
new file mode 100644
index 0000000..112aabf
--- /dev/null
+++ b/gremlin-console/src/main/static/licenses/jline2
@@ -0,0 +1,34 @@
+Copyright (c) 2002-2012, the original author or authors.
+All rights reserved.
+
+http://www.opensource.org/licenses/bsd-license.php
+
+Redistribution and use in source and binary forms, with or
+without modification, are permitted provided that the following
+conditions are met:
+
+Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+
+Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with
+the distribution.
+
+Neither the name of JLine nor the names of its contributors
+may be used to endorse or promote products derived from this
+software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
+BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/gremlin-console/src/main/static/licenses/kryo
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/static/licenses/kryo b/gremlin-console/src/main/static/licenses/kryo
new file mode 100644
index 0000000..3f6a160
--- /dev/null
+++ b/gremlin-console/src/main/static/licenses/kryo
@@ -0,0 +1,10 @@
+Copyright (c) 2008, Nathan Sweet
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+    * Neither the name of Esoteric Software nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/gremlin-console/src/main/static/licenses/minlog
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/static/licenses/minlog b/gremlin-console/src/main/static/licenses/minlog
new file mode 100644
index 0000000..3f6a160
--- /dev/null
+++ b/gremlin-console/src/main/static/licenses/minlog
@@ -0,0 +1,10 @@
+Copyright (c) 2008, Nathan Sweet
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+    * Neither the name of Esoteric Software nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/gremlin-console/src/main/static/licenses/normalize
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/static/licenses/normalize b/gremlin-console/src/main/static/licenses/normalize
new file mode 100644
index 0000000..4e3a191
--- /dev/null
+++ b/gremlin-console/src/main/static/licenses/normalize
@@ -0,0 +1,7 @@
+Copyright (c) Nicolas Gallagher and Jonathan Neal
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/gremlin-console/src/main/static/licenses/slf4j
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/static/licenses/slf4j b/gremlin-console/src/main/static/licenses/slf4j
new file mode 100644
index 0000000..d32467b
--- /dev/null
+++ b/gremlin-console/src/main/static/licenses/slf4j
@@ -0,0 +1,21 @@
+ Copyright (c) 2004-2013 QOS.ch
+ All rights reserved.
+
+ Permission is hereby granted, free  of charge, to any person obtaining
+ a  copy  of this  software  and  associated  documentation files  (the
+ "Software"), to  deal in  the Software without  restriction, including
+ without limitation  the rights to  use, copy, modify,  merge, publish,
+ distribute,  sublicense, and/or sell  copies of  the Software,  and to
+ permit persons to whom the Software  is furnished to do so, subject to
+ the following conditions:
+
+ The  above  copyright  notice  and  this permission  notice  shall  be
+ included in all copies or substantial portions of the Software.
+
+ THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
+ EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
+ MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/gremlin-server/src/assembly/distribution.xml
----------------------------------------------------------------------
diff --git a/gremlin-server/src/assembly/distribution.xml b/gremlin-server/src/assembly/distribution.xml
index 64d6fde..4eb5129 100644
--- a/gremlin-server/src/assembly/distribution.xml
+++ b/gremlin-server/src/assembly/distribution.xml
@@ -33,8 +33,8 @@ limitations under the License.
             <directory>conf</directory>
         </fileSet>
         <fileSet>
-            <directory>src/main/static/deps</directory>
-            <outputDirectory>deps</outputDirectory>
+            <directory>src/main/static/licenses</directory>
+            <outputDirectory>licenses</outputDirectory>
         </fileSet>
         <fileSet>
             <directory>target/apache-${project.artifactId}-${project.version}-standalone/data</directory>

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/gremlin-server/src/main/static/deps/foundation
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/static/deps/foundation b/gremlin-server/src/main/static/deps/foundation
deleted file mode 100644
index a54868c..0000000
--- a/gremlin-server/src/main/static/deps/foundation
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright (c) 2013-2016 ZURB, inc.
-
-MIT License
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/gremlin-server/src/main/static/deps/gmetric4j
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/static/deps/gmetric4j b/gremlin-server/src/main/static/deps/gmetric4j
deleted file mode 100644
index fb3227f..0000000
--- a/gremlin-server/src/main/static/deps/gmetric4j
+++ /dev/null
@@ -1,31 +0,0 @@
-Title:		gmetric4j
-
-Copyright:
-
-Copyright (C) 2012 Daniel Pocock <da...@pocock.com.au>
-Copyright (c) 2008-2011 Jasper Humphrey <ja...@gmail.com>
-
-Based on:	jmxetric by Jasper Humphrey (BSD style license)
-
-License:             BSD terms
-
-    Copyright (C) 2010-2012 Daniel Pocock <da...@pocock.com.au>
-    Copyright (c) 2008-2011 Jasper Humphrey <ja...@gmail.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/gremlin-server/src/main/static/deps/jbcrypt
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/static/deps/jbcrypt b/gremlin-server/src/main/static/deps/jbcrypt
deleted file mode 100644
index e0e23ed..0000000
--- a/gremlin-server/src/main/static/deps/jbcrypt
+++ /dev/null
@@ -1,17 +0,0 @@
-jBCrypt is subject to the following license:
-
-/*
- * Copyright (c) 2006 Damien Miller <dj...@mindrot.org>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/gremlin-server/src/main/static/deps/jcabi-log
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/static/deps/jcabi-log b/gremlin-server/src/main/static/deps/jcabi-log
deleted file mode 100644
index ece789e..0000000
--- a/gremlin-server/src/main/static/deps/jcabi-log
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c) 2012-2015, jcabi.com
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met: 1) Redistributions of source code must retain the above
-copyright notice, this list of conditions and the following
-disclaimer. 2) Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following
-disclaimer in the documentation and/or other materials provided
-with the distribution. 3) Neither the name of the jcabi.com nor
-the names of its contributors may be used to endorse or promote
-products derived from this software without specific prior written
-permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
-NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
-THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
-OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/gremlin-server/src/main/static/deps/jcabi-manifests
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/static/deps/jcabi-manifests b/gremlin-server/src/main/static/deps/jcabi-manifests
deleted file mode 100644
index ece789e..0000000
--- a/gremlin-server/src/main/static/deps/jcabi-manifests
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c) 2012-2015, jcabi.com
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met: 1) Redistributions of source code must retain the above
-copyright notice, this list of conditions and the following
-disclaimer. 2) Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following
-disclaimer in the documentation and/or other materials provided
-with the distribution. 3) Neither the name of the jcabi.com nor
-the names of its contributors may be used to endorse or promote
-products derived from this software without specific prior written
-permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
-NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
-THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
-OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/gremlin-server/src/main/static/deps/jline2
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/static/deps/jline2 b/gremlin-server/src/main/static/deps/jline2
deleted file mode 100644
index 112aabf..0000000
--- a/gremlin-server/src/main/static/deps/jline2
+++ /dev/null
@@ -1,34 +0,0 @@
-Copyright (c) 2002-2012, the original author or authors.
-All rights reserved.
-
-http://www.opensource.org/licenses/bsd-license.php
-
-Redistribution and use in source and binary forms, with or
-without modification, are permitted provided that the following
-conditions are met:
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with
-the distribution.
-
-Neither the name of JLine nor the names of its contributors
-may be used to endorse or promote products derived from this
-software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
-BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
-AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
-OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
-IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
-OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/gremlin-server/src/main/static/deps/kryo
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/static/deps/kryo b/gremlin-server/src/main/static/deps/kryo
deleted file mode 100644
index 3f6a160..0000000
--- a/gremlin-server/src/main/static/deps/kryo
+++ /dev/null
@@ -1,10 +0,0 @@
-Copyright (c) 2008, Nathan Sweet
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-    * Neither the name of Esoteric Software nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/gremlin-server/src/main/static/deps/minlog
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/static/deps/minlog b/gremlin-server/src/main/static/deps/minlog
deleted file mode 100644
index 3f6a160..0000000
--- a/gremlin-server/src/main/static/deps/minlog
+++ /dev/null
@@ -1,10 +0,0 @@
-Copyright (c) 2008, Nathan Sweet
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-    * Neither the name of Esoteric Software nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/gremlin-server/src/main/static/deps/normalize
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/static/deps/normalize b/gremlin-server/src/main/static/deps/normalize
deleted file mode 100644
index 4e3a191..0000000
--- a/gremlin-server/src/main/static/deps/normalize
+++ /dev/null
@@ -1,7 +0,0 @@
-Copyright (c) Nicolas Gallagher and Jonathan Neal
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/gremlin-server/src/main/static/deps/slf4j
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/static/deps/slf4j b/gremlin-server/src/main/static/deps/slf4j
deleted file mode 100644
index d32467b..0000000
--- a/gremlin-server/src/main/static/deps/slf4j
+++ /dev/null
@@ -1,21 +0,0 @@
- Copyright (c) 2004-2013 QOS.ch
- All rights reserved.
-
- Permission is hereby granted, free  of charge, to any person obtaining
- a  copy  of this  software  and  associated  documentation files  (the
- "Software"), to  deal in  the Software without  restriction, including
- without limitation  the rights to  use, copy, modify,  merge, publish,
- distribute,  sublicense, and/or sell  copies of  the Software,  and to
- permit persons to whom the Software  is furnished to do so, subject to
- the following conditions:
-
- The  above  copyright  notice  and  this permission  notice  shall  be
- included in all copies or substantial portions of the Software.
-
- THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
- EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
- MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/gremlin-server/src/main/static/licenses/foundation
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/static/licenses/foundation b/gremlin-server/src/main/static/licenses/foundation
new file mode 100644
index 0000000..a54868c
--- /dev/null
+++ b/gremlin-server/src/main/static/licenses/foundation
@@ -0,0 +1,22 @@
+Copyright (c) 2013-2016 ZURB, inc.
+
+MIT License
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/gremlin-server/src/main/static/licenses/gmetric4j
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/static/licenses/gmetric4j b/gremlin-server/src/main/static/licenses/gmetric4j
new file mode 100644
index 0000000..fb3227f
--- /dev/null
+++ b/gremlin-server/src/main/static/licenses/gmetric4j
@@ -0,0 +1,31 @@
+Title:		gmetric4j
+
+Copyright:
+
+Copyright (C) 2012 Daniel Pocock <da...@pocock.com.au>
+Copyright (c) 2008-2011 Jasper Humphrey <ja...@gmail.com>
+
+Based on:	jmxetric by Jasper Humphrey (BSD style license)
+
+License:             BSD terms
+
+    Copyright (C) 2010-2012 Daniel Pocock <da...@pocock.com.au>
+    Copyright (c) 2008-2011 Jasper Humphrey <ja...@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/gremlin-server/src/main/static/licenses/jbcrypt
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/static/licenses/jbcrypt b/gremlin-server/src/main/static/licenses/jbcrypt
new file mode 100644
index 0000000..e0e23ed
--- /dev/null
+++ b/gremlin-server/src/main/static/licenses/jbcrypt
@@ -0,0 +1,17 @@
+jBCrypt is subject to the following license:
+
+/*
+ * Copyright (c) 2006 Damien Miller <dj...@mindrot.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/gremlin-server/src/main/static/licenses/jcabi-log
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/static/licenses/jcabi-log b/gremlin-server/src/main/static/licenses/jcabi-log
new file mode 100644
index 0000000..ece789e
--- /dev/null
+++ b/gremlin-server/src/main/static/licenses/jcabi-log
@@ -0,0 +1,27 @@
+Copyright (c) 2012-2015, jcabi.com
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met: 1) Redistributions of source code must retain the above
+copyright notice, this list of conditions and the following
+disclaimer. 2) Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following
+disclaimer in the documentation and/or other materials provided
+with the distribution. 3) Neither the name of the jcabi.com nor
+the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written
+permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
+NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/gremlin-server/src/main/static/licenses/jcabi-manifests
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/static/licenses/jcabi-manifests b/gremlin-server/src/main/static/licenses/jcabi-manifests
new file mode 100644
index 0000000..ece789e
--- /dev/null
+++ b/gremlin-server/src/main/static/licenses/jcabi-manifests
@@ -0,0 +1,27 @@
+Copyright (c) 2012-2015, jcabi.com
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met: 1) Redistributions of source code must retain the above
+copyright notice, this list of conditions and the following
+disclaimer. 2) Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following
+disclaimer in the documentation and/or other materials provided
+with the distribution. 3) Neither the name of the jcabi.com nor
+the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written
+permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
+NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/gremlin-server/src/main/static/licenses/jline2
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/static/licenses/jline2 b/gremlin-server/src/main/static/licenses/jline2
new file mode 100644
index 0000000..112aabf
--- /dev/null
+++ b/gremlin-server/src/main/static/licenses/jline2
@@ -0,0 +1,34 @@
+Copyright (c) 2002-2012, the original author or authors.
+All rights reserved.
+
+http://www.opensource.org/licenses/bsd-license.php
+
+Redistribution and use in source and binary forms, with or
+without modification, are permitted provided that the following
+conditions are met:
+
+Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+
+Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with
+the distribution.
+
+Neither the name of JLine nor the names of its contributors
+may be used to endorse or promote products derived from this
+software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
+BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/gremlin-server/src/main/static/licenses/kryo
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/static/licenses/kryo b/gremlin-server/src/main/static/licenses/kryo
new file mode 100644
index 0000000..3f6a160
--- /dev/null
+++ b/gremlin-server/src/main/static/licenses/kryo
@@ -0,0 +1,10 @@
+Copyright (c) 2008, Nathan Sweet
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+    * Neither the name of Esoteric Software nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/gremlin-server/src/main/static/licenses/minlog
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/static/licenses/minlog b/gremlin-server/src/main/static/licenses/minlog
new file mode 100644
index 0000000..3f6a160
--- /dev/null
+++ b/gremlin-server/src/main/static/licenses/minlog
@@ -0,0 +1,10 @@
+Copyright (c) 2008, Nathan Sweet
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+    * Neither the name of Esoteric Software nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/gremlin-server/src/main/static/licenses/normalize
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/static/licenses/normalize b/gremlin-server/src/main/static/licenses/normalize
new file mode 100644
index 0000000..4e3a191
--- /dev/null
+++ b/gremlin-server/src/main/static/licenses/normalize
@@ -0,0 +1,7 @@
+Copyright (c) Nicolas Gallagher and Jonathan Neal
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/gremlin-server/src/main/static/licenses/slf4j
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/static/licenses/slf4j b/gremlin-server/src/main/static/licenses/slf4j
new file mode 100644
index 0000000..d32467b
--- /dev/null
+++ b/gremlin-server/src/main/static/licenses/slf4j
@@ -0,0 +1,21 @@
+ Copyright (c) 2004-2013 QOS.ch
+ All rights reserved.
+
+ Permission is hereby granted, free  of charge, to any person obtaining
+ a  copy  of this  software  and  associated  documentation files  (the
+ "Software"), to  deal in  the Software without  restriction, including
+ without limitation  the rights to  use, copy, modify,  merge, publish,
+ distribute,  sublicense, and/or sell  copies of  the Software,  and to
+ permit persons to whom the Software  is furnished to do so, subject to
+ the following conditions:
+
+ The  above  copyright  notice  and  this permission  notice  shall  be
+ included in all copies or substantial portions of the Software.
+
+ THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
+ EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
+ MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1de73e53/licenses/normalize
----------------------------------------------------------------------
diff --git a/licenses/normalize b/licenses/normalize
new file mode 100644
index 0000000..4e3a191
--- /dev/null
+++ b/licenses/normalize
@@ -0,0 +1,7 @@
+Copyright (c) Nicolas Gallagher and Jonathan Neal
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file


[09/37] incubator-tinkerpop git commit: Extend GremlinServerIntegrateTest::shouldFailOnDeadHost to restart and reconnect.

Posted by sp...@apache.org.
Extend GremlinServerIntegrateTest::shouldFailOnDeadHost to restart and reconnect.

TINKERPOP-1126


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

Branch: refs/heads/master
Commit: 457ef48e464f5122daccf29ff8dd991c54d16d06
Parents: a326464
Author: Kieran Sherlock <ki...@identitymind.com>
Authored: Tue Feb 9 20:43:36 2016 -0800
Committer: Kieran Sherlock <ki...@identitymind.com>
Committed: Tue Feb 9 20:53:10 2016 -0800

----------------------------------------------------------------------
 .../AbstractGremlinServerIntegrationTest.java    |  4 ++++
 .../server/GremlinServerIntegrateTest.java       | 19 +++++++++++++++----
 2 files changed, 19 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/457ef48e/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/AbstractGremlinServerIntegrationTest.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/AbstractGremlinServerIntegrationTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/AbstractGremlinServerIntegrationTest.java
index fd8762a..ba47218 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/AbstractGremlinServerIntegrationTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/AbstractGremlinServerIntegrationTest.java
@@ -58,6 +58,10 @@ public abstract class AbstractGremlinServerIntegrationTest {
         logger.info("* Testing: " + name.getMethodName());
         logger.info("* Epoll option enabled:" + GREMLIN_SERVER_EPOLL);
 
+        startServer();
+    }
+
+    public void startServer() throws Exception {
         final InputStream stream = getSettingsInputStream();
         final Settings settings = Settings.read(stream);
         final Settings overridenSettings = overrideSettings(settings);

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/457ef48e/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 df515bd..c64cf8b 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
@@ -21,10 +21,7 @@ package org.apache.tinkerpop.gremlin.server;
 import java.io.File;
 import org.apache.commons.lang.exception.ExceptionUtils;
 import org.apache.log4j.Logger;
-import org.apache.tinkerpop.gremlin.driver.Client;
-import org.apache.tinkerpop.gremlin.driver.Cluster;
-import org.apache.tinkerpop.gremlin.driver.ResultSet;
-import org.apache.tinkerpop.gremlin.driver.Tokens;
+import org.apache.tinkerpop.gremlin.driver.*;
 import org.apache.tinkerpop.gremlin.driver.exception.ResponseException;
 import org.apache.tinkerpop.gremlin.driver.message.RequestMessage;
 import org.apache.tinkerpop.gremlin.driver.message.ResponseStatusCode;
@@ -551,6 +548,20 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration
             fail();
         } catch (RuntimeException re) {
             assertTrue(re.getCause().getCause() instanceof ClosedChannelException);
+
+            //
+            // should recover when the server comes back
+            //
+
+            // restart server
+            this.startServer();
+            // the retry interval is 1 second, wait a bit longer
+            TimeUnit.SECONDS.sleep(5);
+
+            List<Result> results = client.submit("1+1").all().join();
+            assertEquals(1, results.size());
+            assertEquals(2, results.get(0).getInt());
+
         } finally {
             cluster.close();
         }


[21/37] incubator-tinkerpop git commit: Improved reusability of unique test directory creation in /target

Posted by sp...@apache.org.
Improved reusability of unique test directory creation in /target

These features were formerly only available to Neo4j. Added `AbstractGraphProvider.makeTestDirectory()`. CTR


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

Branch: refs/heads/master
Commit: 1f058465801dbb5ba24503d62e1b4bddd18f74c6
Parents: 0567c6b
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Feb 12 09:41:14 2016 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Feb 12 09:41:14 2016 -0500

----------------------------------------------------------------------
 CHANGELOG.asciidoc                                |  1 +
 .../tinkerpop/gremlin/AbstractGraphProvider.java  | 18 ++++++++++++++++++
 .../gremlin/neo4j/AbstractNeo4jGraphProvider.java |  5 -----
 .../neo4j/MultiMetaNeo4jGraphProvider.java        |  8 +-------
 .../neo4j/NoMultiNoMetaNeo4jGraphProvider.java    |  8 +-------
 5 files changed, 21 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1f058465/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index caccb0f..9e197c2 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -28,6 +28,7 @@ TinkerPop 3.1.2 (NOT OFFICIALLY RELEASED YET)
 
 * `TraversalExplanation` is now `Serializable` and registered with `GryoMapper`.
 * Deprecated `ScriptElementFactory` and made the local `StarGraph` globally available for `ScriptInputFormat`'s `parse()` method.
+* Improved reusability of unique test directory creation in `/target` for `AbstractGraphProvider`, which was formerly only available to Neo4j, by adding `makeTestDirectory()`.
 * Optimized memory-usage in `TraversalVertexProgram`.
 * `Graph` instances are not merely "closed" at the end of tests, they are "cleared" via `GraphProvider.clear()`, which should in turn cleans up old data for an implementation.
 * Greatly reduced the amount of objects required in OLAP for the `ReducingBarrierStep` steps.

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1f058465/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGraphProvider.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGraphProvider.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGraphProvider.java
index 62ddb3f..95c6b57 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGraphProvider.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGraphProvider.java
@@ -113,6 +113,24 @@ public abstract class AbstractGraphProvider implements GraphProvider {
         if (directory.exists()) logger.error("unable to delete directory " + directory.getAbsolutePath());
     }
 
+    /**
+     * Utility method to help produce an appropriate unique directory for a test. Designed to be called from
+     * {@link #getBaseConfiguration(String, Class, String, LoadGraphWith.GraphData)} for those graph providers that
+     * need a data directory for their {@link Graph} implementations.
+     */
+    protected String makeTestDirectory(final String graphName, final Class<?> test, final String testMethodName) {
+        return getWorkingDirectory() + File.separator
+                + TestHelper.cleanPathSegment(this.getClass().getSimpleName()) + File.separator
+                + TestHelper.cleanPathSegment(test.getSimpleName()) + File.separator
+                + TestHelper.cleanPathSegment(graphName) + File.separator
+                + cleanParameters(TestHelper.cleanPathSegment(testMethodName));
+    }
+
+    protected String cleanParameters(String methodName) {
+        int random = (int) (Math.random() * Integer.MAX_VALUE);
+        return methodName.replaceAll("[0-9, -]+$", String.valueOf(random));
+    }
+
     protected void readIntoGraph(final Graph g, final String path) throws IOException {
         final GraphReader reader = GryoReader.build()
                 .mapper(g.io(GryoIo.build()).mapper().create())

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1f058465/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/AbstractNeo4jGraphProvider.java
----------------------------------------------------------------------
diff --git a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/AbstractNeo4jGraphProvider.java b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/AbstractNeo4jGraphProvider.java
index ebe8099..9226822 100644
--- a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/AbstractNeo4jGraphProvider.java
+++ b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/AbstractNeo4jGraphProvider.java
@@ -49,11 +49,6 @@ public abstract class AbstractNeo4jGraphProvider extends AbstractGraphProvider {
         add(Neo4jVertexProperty.class);
     }};
 
-    protected String cleanParameters(String methodName) {
-        int random = (int) (Math.random() * Integer.MAX_VALUE);
-        return methodName.replaceAll("[0-9, -]+$", String.valueOf(random));
-    }
-
     @Override
     public void clear(final Graph graph, final Configuration configuration) throws Exception {
         if (null != graph) {

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1f058465/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/MultiMetaNeo4jGraphProvider.java
----------------------------------------------------------------------
diff --git a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/MultiMetaNeo4jGraphProvider.java b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/MultiMetaNeo4jGraphProvider.java
index b3572ae..8bd89d2 100644
--- a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/MultiMetaNeo4jGraphProvider.java
+++ b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/MultiMetaNeo4jGraphProvider.java
@@ -19,11 +19,9 @@
 package org.apache.tinkerpop.gremlin.neo4j;
 
 import org.apache.tinkerpop.gremlin.LoadGraphWith;
-import org.apache.tinkerpop.gremlin.TestHelper;
 import org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jGraph;
 import org.apache.tinkerpop.gremlin.structure.Graph;
 
-import java.io.File;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -33,11 +31,7 @@ import java.util.Map;
 public class MultiMetaNeo4jGraphProvider extends AbstractNeo4jGraphProvider {
     @Override
     public Map<String, Object> getBaseConfiguration(final String graphName, final Class<?> test, final String testMethodName, final LoadGraphWith.GraphData graphData) {
-        final String directory = getWorkingDirectory() + File.separator
-                + TestHelper.cleanPathSegment(this.getClass().getSimpleName()) + File.separator
-                + TestHelper.cleanPathSegment(test.getSimpleName()) + File.separator
-                + TestHelper.cleanPathSegment(graphName) + File.separator
-                + cleanParameters(TestHelper.cleanPathSegment(testMethodName));
+        final String directory = makeTestDirectory(graphName, test, testMethodName);
 
         return new HashMap<String, Object>() {{
             put(Graph.GRAPH, Neo4jGraph.class.getName());

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1f058465/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/NoMultiNoMetaNeo4jGraphProvider.java
----------------------------------------------------------------------
diff --git a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/NoMultiNoMetaNeo4jGraphProvider.java b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/NoMultiNoMetaNeo4jGraphProvider.java
index 233d681..22ae0ce 100644
--- a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/NoMultiNoMetaNeo4jGraphProvider.java
+++ b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/NoMultiNoMetaNeo4jGraphProvider.java
@@ -19,11 +19,9 @@
 package org.apache.tinkerpop.gremlin.neo4j;
 
 import org.apache.tinkerpop.gremlin.LoadGraphWith;
-import org.apache.tinkerpop.gremlin.TestHelper;
 import org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jGraph;
 import org.apache.tinkerpop.gremlin.structure.Graph;
 
-import java.io.File;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -33,11 +31,7 @@ import java.util.Map;
 public class NoMultiNoMetaNeo4jGraphProvider extends AbstractNeo4jGraphProvider {
     @Override
     public Map<String, Object> getBaseConfiguration(final String graphName, final Class<?> test, final String testMethodName, final LoadGraphWith.GraphData graphData) {
-        final String directory = getWorkingDirectory() + File.separator
-                + TestHelper.cleanPathSegment(this.getClass().getSimpleName()) + File.separator
-                + TestHelper.cleanPathSegment(test.getSimpleName()) + File.separator
-                + TestHelper.cleanPathSegment(graphName) + File.separator
-                + cleanParameters(TestHelper.cleanPathSegment(testMethodName));
+        final String directory = makeTestDirectory(graphName, test, testMethodName);
 
         return new HashMap<String, Object>() {{
             put(Graph.GRAPH, Neo4jGraph.class.getName());


[31/37] incubator-tinkerpop git commit: Merge remote-tracking branch 'origin/TINKERPOP-1125-to-1127' into tp31

Posted by sp...@apache.org.
Merge remote-tracking branch 'origin/TINKERPOP-1125-to-1127' into tp31


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

Branch: refs/heads/master
Commit: 71ed3134dd1fb6eb6edb156e49938912a0472051
Parents: 1de73e5 ec6499f
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Feb 12 17:58:37 2016 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Feb 12 17:58:37 2016 -0500

----------------------------------------------------------------------
 .../apache/tinkerpop/gremlin/driver/Client.java |  2 +-
 .../gremlin/driver/ConnectionPool.java          |  3 +++
 .../apache/tinkerpop/gremlin/driver/Host.java   | 23 ++++++++++++--------
 .../AbstractGremlinServerIntegrationTest.java   |  4 ++++
 .../server/GremlinServerIntegrateTest.java      | 19 ++++++++++++----
 5 files changed, 37 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/71ed3134/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
----------------------------------------------------------------------
diff --cc gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
index 7e6330f,c64cf8b..6990fde
--- 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
@@@ -21,13 -21,9 +21,10 @@@ package org.apache.tinkerpop.gremlin.se
  import java.io.File;
  import org.apache.commons.lang.exception.ExceptionUtils;
  import org.apache.log4j.Logger;
- import org.apache.tinkerpop.gremlin.driver.Client;
- import org.apache.tinkerpop.gremlin.driver.Cluster;
- import org.apache.tinkerpop.gremlin.driver.ResultSet;
- import org.apache.tinkerpop.gremlin.driver.Tokens;
+ import org.apache.tinkerpop.gremlin.driver.*;
  import org.apache.tinkerpop.gremlin.driver.exception.ResponseException;
  import org.apache.tinkerpop.gremlin.driver.message.RequestMessage;
 +import org.apache.tinkerpop.gremlin.driver.message.ResponseMessage;
  import org.apache.tinkerpop.gremlin.driver.message.ResponseStatusCode;
  import org.apache.tinkerpop.gremlin.driver.ser.Serializers;
  import org.apache.tinkerpop.gremlin.driver.simple.NioClient;


[22/37] incubator-tinkerpop git commit: Should not use GraphFactory to create graphs in tests.

Posted by sp...@apache.org.
Should not use GraphFactory to create graphs in tests.

GraphFactory will create Graph instances unmanaged by the test suite.  They won't be able to be shutdown and cleaned up by the GraphManager in that case after a test is complete. Must use GraphProvider.openTestGraph() instead. CTR


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

Branch: refs/heads/master
Commit: e982a0c1b018604e13755ccad65e308b77018fc3
Parents: 1f05846
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Feb 12 10:40:32 2016 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Feb 12 10:42:16 2016 -0500

----------------------------------------------------------------------
 .../org/apache/tinkerpop/gremlin/structure/io/IoTest.java     | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/e982a0c1/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/IoTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/IoTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/IoTest.java
index 75b6253..2bf0485 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/IoTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/IoTest.java
@@ -42,7 +42,6 @@ import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONTokens;
 import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONWriter;
 import org.apache.tinkerpop.gremlin.structure.io.graphson.LegacyGraphSONReader;
 import org.apache.tinkerpop.gremlin.structure.io.util.CustomId;
-import org.apache.tinkerpop.gremlin.structure.util.GraphFactory;
 import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;
 import org.apache.tinkerpop.shaded.jackson.databind.JsonNode;
 import org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper;
@@ -263,7 +262,7 @@ public class IoTest {
             v1.addEdge("SELF-LOOP", v1);
 
             final Configuration targetConf = graphProvider.newGraphConfiguration("target", this.getClass(), name.getMethodName(), null);
-            final Graph target = GraphFactory.open(targetConf);
+            final Graph target = graphProvider.openTestGraph(targetConf);
             try (ByteArrayOutputStream os = new ByteArrayOutputStream()) {
                 source.io(IoCore.graphml()).writer().create().writeGraph(os, source);
                 try (ByteArrayInputStream is = new ByteArrayInputStream(os.toByteArray())) {
@@ -292,7 +291,7 @@ public class IoTest {
             v1.addEdge("SELF-LOOP", v1);
 
             final Configuration targetConf = graphProvider.newGraphConfiguration("target", this.getClass(), name.getMethodName(), null);
-            final Graph target = GraphFactory.open(targetConf);
+            final Graph target = graphProvider.openTestGraph(targetConf);;
             try (ByteArrayOutputStream os = new ByteArrayOutputStream()) {
                 source.io(IoCore.gryo()).writer().create().writeGraph(os, source);
                 try (ByteArrayInputStream is = new ByteArrayInputStream(os.toByteArray())) {
@@ -437,7 +436,7 @@ public class IoTest {
             v1.addEdge("SELF-LOOP", v1);
 
             final Configuration targetConf = graphProvider.newGraphConfiguration("target", this.getClass(), name.getMethodName(), null);
-            final Graph target = GraphFactory.open(targetConf);
+            final Graph target = graphProvider.openTestGraph(targetConf);
             try (ByteArrayOutputStream os = new ByteArrayOutputStream()) {
                 source.io(IoCore.graphson()).writer().create().writeGraph(os, source);
                 try (ByteArrayInputStream is = new ByteArrayInputStream(os.toByteArray())) {


[08/37] incubator-tinkerpop git commit: Use an AtomicReference to protect the reconnect task, rather than synchronizing on it.

Posted by sp...@apache.org.
Use an AtomicReference<Boolean> to protect the reconnect task, rather than synchronizing on it.

TINKERPOP-1126


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

Branch: refs/heads/master
Commit: a3264648a41e4db95cc95d5425a61ea8e07b7e64
Parents: cced242
Author: Kieran Sherlock <ki...@identitymind.com>
Authored: Tue Feb 9 17:10:59 2016 -0800
Committer: Kieran Sherlock <ki...@identitymind.com>
Committed: Tue Feb 9 20:42:41 2016 -0800

----------------------------------------------------------------------
 .../apache/tinkerpop/gremlin/driver/Host.java   | 24 +++++++++++---------
 1 file changed, 13 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/a3264648/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Host.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Host.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Host.java
index c060b18..34ee719 100644
--- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Host.java
+++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Host.java
@@ -42,7 +42,8 @@ public final class Host {
     private final Cluster cluster;
     private final String hostLabel;
 
-    final AtomicReference<ScheduledFuture<?>> reconnectionAttempt = new AtomicReference<>(null);
+    final AtomicReference<Boolean> retryInProgress = new AtomicReference<>(Boolean.FALSE);
+    ScheduledFuture<?> retryThread = null;
 
     Host(final InetSocketAddress address, final Cluster cluster) {
         this.cluster = cluster;
@@ -71,20 +72,21 @@ public final class Host {
         isAvailable = false;
 
         // only do a connection re-attempt if one is not already in progress
-        synchronized (reconnectionAttempt) {
-            if (reconnectionAttempt.get() == null) {
-                reconnectionAttempt.set(this.cluster.executor().scheduleAtFixedRate(() -> {
-                    logger.debug("Trying to reconnect to dead host at {}", this);
-                    if (reconnect.apply(this))
-                        reconnected();
-                }, cluster.connectionPoolSettings().reconnectInitialDelay, cluster.connectionPoolSettings().reconnectInterval, TimeUnit.MILLISECONDS));
-            }
+        if (retryInProgress.compareAndSet(Boolean.FALSE, Boolean.TRUE)) {
+            retryThread = this.cluster.executor().scheduleAtFixedRate(() -> {
+                                                                          logger.debug("Trying to reconnect to dead host at {}", this);
+                                                                          if (reconnect.apply(this)) reconnected();
+                                                                      }, cluster.connectionPoolSettings().reconnectInitialDelay,
+                                                                      cluster.connectionPoolSettings().reconnectInterval, TimeUnit.MILLISECONDS);
         }
     }
 
     private void reconnected() {
-        reconnectionAttempt.get().cancel(false);
-        reconnectionAttempt.set(null);
+        // race condition!  retry boolean could be set to false, a new retryThread created above
+        // and then cancelled here.   But we're only executing this at all because we *have* reconnected
+        retryThread.cancel(false);
+        retryThread = null;
+        retryInProgress.set(Boolean.FALSE);
         makeAvailable();
     }
 


[07/37] incubator-tinkerpop git commit: Update changelog.

Posted by sp...@apache.org.
Update changelog.


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

Branch: refs/heads/master
Commit: 330c521dc652582d2525419cedb2748ec0291be4
Parents: bad3af7
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Feb 9 12:00:35 2016 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Feb 9 12:00:35 2016 -0500

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


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/330c521d/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 6b51ba8..0de6caa 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,7 +26,7 @@ image::https://raw.githubusercontent.com/apache/incubator-tinkerpop/master/docs/
 TinkerPop 3.1.2 (NOT OFFICIALLY RELEASED YET)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-
+* Improved messages for the different distinct "timeouts" that a user can encounter with Gremlin Server.
 
 [[release-3.1.1-incubating]]
 TinkerPop 3.1.1 (Release Date: February 8, 2016)


[02/37] incubator-tinkerpop git commit: Use the existing Host iterator

Posted by sp...@apache.org.
Use the existing Host iterator

TINKERPOP-1125
Rather than creating a new iterator so skipping over a host in the pool.


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

Branch: refs/heads/master
Commit: c5b242126131edbe7e87300fc34a54a4dcb9fce9
Parents: 93f430e
Author: Kieran Sherlock <ki...@identitymind.com>
Authored: Fri Feb 5 06:25:32 2016 -0800
Committer: Kieran Sherlock <ki...@identitymind.com>
Committed: Fri Feb 5 06:25:32 2016 -0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/c5b24212/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java
index 8c80b8a..17c9a99 100644
--- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java
+++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java
@@ -341,7 +341,7 @@ public abstract class Client {
             final Iterator<Host> possibleHosts = this.cluster.loadBalancingStrategy().select(msg);
             if (!possibleHosts.hasNext()) throw new TimeoutException("Timed out waiting for an available host.");
 
-            final Host bestHost = this.cluster.loadBalancingStrategy().select(msg).next();
+            final Host bestHost = possibleHosts.next();
             final ConnectionPool pool = hostConnectionPools.get(bestHost);
             return pool.borrowConnection(cluster.connectionPoolSettings().maxWaitForConnection, TimeUnit.MILLISECONDS);
         }


[04/37] incubator-tinkerpop git commit: Check the value of reconnectionAttempt and create scheduled task as a 2 step process.

Posted by sp...@apache.org.
Check the value of reconnectionAttempt and create scheduled task as a 2 step process.

TINKERPOP-1126


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

Branch: refs/heads/master
Commit: cced24238fa5a0e3c8f03294e42bac7674faf154
Parents: 93f430e
Author: Kieran Sherlock <ki...@identitymind.com>
Authored: Fri Feb 5 10:44:59 2016 -0800
Committer: Kieran Sherlock <ki...@identitymind.com>
Committed: Fri Feb 5 10:44:59 2016 -0800

----------------------------------------------------------------------
 .../org/apache/tinkerpop/gremlin/driver/Host.java    | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/cced2423/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Host.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Host.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Host.java
index bd628c8..c060b18 100644
--- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Host.java
+++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Host.java
@@ -71,12 +71,15 @@ public final class Host {
         isAvailable = false;
 
         // only do a connection re-attempt if one is not already in progress
-        reconnectionAttempt.compareAndSet(null,
-                this.cluster.executor().scheduleAtFixedRate(() -> {
-                            logger.debug("Trying to reconnect to dead host at {}", this);
-                            if (reconnect.apply(this)) reconnected();
-                        }, cluster.connectionPoolSettings().reconnectInitialDelay,
-                        cluster.connectionPoolSettings().reconnectInterval, TimeUnit.MILLISECONDS));
+        synchronized (reconnectionAttempt) {
+            if (reconnectionAttempt.get() == null) {
+                reconnectionAttempt.set(this.cluster.executor().scheduleAtFixedRate(() -> {
+                    logger.debug("Trying to reconnect to dead host at {}", this);
+                    if (reconnect.apply(this))
+                        reconnected();
+                }, cluster.connectionPoolSettings().reconnectInitialDelay, cluster.connectionPoolSettings().reconnectInterval, TimeUnit.MILLISECONDS));
+            }
+        }
     }
 
     private void reconnected() {


[23/37] incubator-tinkerpop git commit: Use synchronizedList for a script engine test that multithreads.

Posted by sp...@apache.org.
Use synchronizedList for a script engine test that multithreads.

ArrayList isn't thread-safe and may have been causing random test failures. CTR


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

Branch: refs/heads/master
Commit: ec4f489dafe920b28a43a6a65eba1f92b8745877
Parents: e982a0c
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Feb 12 11:04:34 2016 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Feb 12 11:11:09 2016 -0500

----------------------------------------------------------------------
 .../gremlin/groovy/jsr223/GremlinGroovyScriptEngineTest.java    | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/ec4f489d/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTest.java
----------------------------------------------------------------------
diff --git a/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTest.java b/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTest.java
index cddea53..3765d42 100644
--- a/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTest.java
+++ b/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTest.java
@@ -25,7 +25,6 @@ import org.apache.tinkerpop.gremlin.groovy.NoImportCustomizerProvider;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;
 import org.javatuples.Pair;
-import org.javatuples.Triplet;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -38,9 +37,11 @@ import javax.script.SimpleBindings;
 import java.awt.*;
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
+import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
@@ -336,7 +337,7 @@ public class GremlinGroovyScriptEngineTest {
         final GremlinGroovyScriptEngine scriptEngine = new GremlinGroovyScriptEngine();
 
         final int max = 256;
-        final List<Pair<Integer, List<Integer>>> futures = new ArrayList<>(max);
+        final List<Pair<Integer, List<Integer>>> futures = Collections.synchronizedList(new ArrayList<>(max));
         IntStream.range(0, max).forEach(i -> {
             final int yValue = i * 2;
             final int zValue = i * -1;


[34/37] incubator-tinkerpop git commit: Updated changelog.

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


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

Branch: refs/heads/master
Commit: f06cf664737c2009d55cba27417a4d218e5082a5
Parents: f3ef0e0
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Feb 12 18:42:03 2016 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Feb 12 18:42:03 2016 -0500

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


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/f06cf664/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index ef8c606..f4d02f7 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -29,6 +29,7 @@ TinkerPop 3.1.2 (NOT OFFICIALLY RELEASED YET)
 * Fixed bug in "round robin" load balancing in `gremlin-driver` where requests were wrongly being sent to the same host.
 * Prevented the spawning of unneeded reconnect tasks in `gremlin-driver` when a host goes offline.
 * Fixed bug preventing `gremlin-driver` from reconnecting to Gremlin Server when it was restarted.
+* Better handled errors that occurred on commits and serialization in Gremlin Server to first break the result iteration loop and to ensure commit errors were reported to the client.
 * Added GraphSON serializers for the `java.time.*` classes.
 * Improved the logging of the Gremlin Server REST endpoint as it pertained to script execution failures.
 * `TraversalExplanation` is now `Serializable` and registered with `GryoMapper`.


[28/37] incubator-tinkerpop git commit: Merge remote-tracking branch 'origin/TINKERPOP-1135' into tp31

Posted by sp...@apache.org.
Merge remote-tracking branch 'origin/TINKERPOP-1135' into tp31


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

Branch: refs/heads/master
Commit: dea93278adf8089c51bd0444f6edbbeafbaa9d9d
Parents: d5d78c7 cee96fd
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Feb 12 15:05:07 2016 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Feb 12 15:05:07 2016 -0500

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |   2 +
 .../structure/io/graphson/GraphSONModule.java   |  47 ++-
 .../io/graphson/GraphSONSerializers.java        |  50 +--
 .../io/graphson/JavaTimeSerializers.java        | 326 +++++++++++++++++++
 .../io/graphson/JavaUtilSerializers.java        |  86 +++++
 .../GraphSONMapperEmbeddedTypeTest.java         | 134 ++++++++
 .../io/graphson/GraphSONMapperTest.java         | 133 ++++++++
 .../structure/io/gryo/GryoMapperTest.java       |   1 -
 .../handler/HttpGremlinEndpointHandler.java     |  18 +-
 .../server/GremlinServerHttpIntegrateTest.java  |  23 +-
 10 files changed, 764 insertions(+), 56 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/dea93278/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --cc CHANGELOG.asciidoc
index 9e197c2,106639e..0238a47
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@@ -26,9 -26,10 +26,11 @@@ image::https://raw.githubusercontent.co
  TinkerPop 3.1.2 (NOT OFFICIALLY RELEASED YET)
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
+ * Added GraphSON serializers for the `java.time.*` classes.
+ * Improved the logging of the Gremlin Server REST endpoint as it pertained to script execution failures.
  * `TraversalExplanation` is now `Serializable` and registered with `GryoMapper`.
  * Deprecated `ScriptElementFactory` and made the local `StarGraph` globally available for `ScriptInputFormat`'s `parse()` method.
 +* Improved reusability of unique test directory creation in `/target` for `AbstractGraphProvider`, which was formerly only available to Neo4j, by adding `makeTestDirectory()`.
  * Optimized memory-usage in `TraversalVertexProgram`.
  * `Graph` instances are not merely "closed" at the end of tests, they are "cleared" via `GraphProvider.clear()`, which should in turn cleans up old data for an implementation.
  * Greatly reduced the amount of objects required in OLAP for the `ReducingBarrierStep` steps.


[10/37] incubator-tinkerpop git commit: Merge branch 'tp31' of https://github.com/kieransherlock/incubator-tinkerpop into TINKERPOP-1125-to-1127

Posted by sp...@apache.org.
Merge branch 'tp31' of https://github.com/kieransherlock/incubator-tinkerpop into TINKERPOP-1125-to-1127


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

Branch: refs/heads/master
Commit: bf90af02ea2128d4461c9eca952b1c90257e6834
Parents: b07400c f1800bd
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Feb 10 07:27:34 2016 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 10 07:27:34 2016 -0500

----------------------------------------------------------------------
 .../src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java | 2 +-
 .../java/org/apache/tinkerpop/gremlin/driver/ConnectionPool.java  | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------



[03/37] incubator-tinkerpop git commit: Keep the value of open counter in sync when connections fail.

Posted by sp...@apache.org.
Keep the value of open counter in sync when connections fail.

TINKERPOP-1127


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

Branch: refs/heads/master
Commit: f1800bd65ea0393b59254a94aaed3fc22ac71f4f
Parents: c5b2421
Author: Kieran Sherlock <ki...@identitymind.com>
Authored: Fri Feb 5 09:54:57 2016 -0800
Committer: Kieran Sherlock <ki...@identitymind.com>
Committed: Fri Feb 5 09:54:57 2016 -0800

----------------------------------------------------------------------
 .../java/org/apache/tinkerpop/gremlin/driver/ConnectionPool.java  | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/f1800bd6/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ConnectionPool.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ConnectionPool.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ConnectionPool.java
index 96c151c..19a29e4 100644
--- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ConnectionPool.java
+++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ConnectionPool.java
@@ -301,6 +301,7 @@ final class ConnectionPool {
             connections.add(new Connection(host.getHostUri(), this, settings().maxInProcessPerConnection));
         } catch (ConnectionException ce) {
             logger.debug("Connections were under max, but there was an error creating the connection.", ce);
+            open.decrementAndGet();
             considerUnavailable();
             return false;
         }
@@ -326,6 +327,7 @@ final class ConnectionPool {
     private void definitelyDestroyConnection(final Connection connection) {
         bin.add(connection);
         connections.remove(connection);
+        open.decrementAndGet();
 
         if (connection.borrowed.get() == 0 && bin.remove(connection))
             connection.closeAsync();
@@ -413,6 +415,7 @@ final class ConnectionPool {
             this.cluster.loadBalancingStrategy().onAvailable(host);
             return true;
         } catch (Exception ex) {
+            logger.debug("Failed reconnect attempt on {}", host);
             if (connection != null) definitelyDestroyConnection(connection);
             return false;
         }


[16/37] incubator-tinkerpop git commit: Merge remote-tracking branch 'origin/TINKERPOP-1146' into tp31

Posted by sp...@apache.org.
Merge remote-tracking branch 'origin/TINKERPOP-1146' into tp31


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

Branch: refs/heads/master
Commit: 4a6f9a26c05f4a4343285785e99cfc1c5ba7d4df
Parents: c590e7a 597c350
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Feb 11 11:44:05 2016 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Feb 11 11:44:05 2016 -0500

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 .../upgrade/release-3.1.x-incubating.asciidoc   | 26 ++++++++++++++++++++
 .../tinkerpop/gremlin/AbstractGremlinTest.java  |  2 +-
 .../apache/tinkerpop/gremlin/GraphManager.java  | 26 ++++++++++++--------
 .../apache/tinkerpop/gremlin/GraphProvider.java |  3 +++
 .../neo4j/AbstractNeo4jGraphProvider.java       |  3 +--
 6 files changed, 48 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4a6f9a26/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --cc CHANGELOG.asciidoc
index 86e9229,fc53b72..caccb0f
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@@ -26,9 -26,8 +26,10 @@@ image::https://raw.githubusercontent.co
  TinkerPop 3.1.2 (NOT OFFICIALLY RELEASED YET)
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
 +* `TraversalExplanation` is now `Serializable` and registered with `GryoMapper`.
 +* Deprecated `ScriptElementFactory` and made the local `StarGraph` globally available for `ScriptInputFormat`'s `parse()` method.
  * Optimized memory-usage in `TraversalVertexProgram`.
+ * `Graph` instances are not merely "closed" at the end of tests, they are "cleared" via `GraphProvider.clear()`, which should in turn cleans up old data for an implementation.
  * Greatly reduced the amount of objects required in OLAP for the `ReducingBarrierStep` steps.
  
  [[release-3.1.1-incubating]]


[19/37] incubator-tinkerpop git commit: Improved GraphSON support of java.time.* packages.

Posted by sp...@apache.org.
Improved GraphSON support of java.time.* packages.

Serialized all classes currently serialized by Gryo using ISO-8061 format.  Using the embedded type option actually allow serialization back to java.time.* classes rather than coercing them to other types.


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

Branch: refs/heads/master
Commit: cee96fdb29fe354837845da961c0f6252e007b5a
Parents: e157514
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Feb 12 08:11:42 2016 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Feb 12 08:11:42 2016 -0500

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |   2 +
 .../structure/io/graphson/GraphSONModule.java   |  47 ++-
 .../io/graphson/GraphSONSerializers.java        |  50 +--
 .../io/graphson/JavaTimeSerializers.java        | 326 +++++++++++++++++++
 .../io/graphson/JavaUtilSerializers.java        |  86 +++++
 .../GraphSONMapperEmbeddedTypeTest.java         | 134 ++++++++
 .../io/graphson/GraphSONMapperTest.java         | 133 ++++++++
 .../structure/io/gryo/GryoMapperTest.java       |   1 -
 .../handler/HttpGremlinEndpointHandler.java     |  18 +-
 .../server/GremlinServerHttpIntegrateTest.java  |  23 +-
 10 files changed, 764 insertions(+), 56 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/cee96fdb/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index caccb0f..106639e 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,8 @@ image::https://raw.githubusercontent.com/apache/incubator-tinkerpop/master/docs/
 TinkerPop 3.1.2 (NOT OFFICIALLY RELEASED YET)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+* Added GraphSON serializers for the `java.time.*` classes.
+* Improved the logging of the Gremlin Server REST endpoint as it pertained to script execution failures.
 * `TraversalExplanation` is now `Serializable` and registered with `GryoMapper`.
 * Deprecated `ScriptElementFactory` and made the local `StarGraph` globally available for `ScriptInputFormat`'s `parse()` method.
 * Optimized memory-usage in `TraversalVertexProgram`.

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/cee96fdb/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONModule.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONModule.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONModule.java
index dba774e..ba9d9ac 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONModule.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONModule.java
@@ -27,6 +27,19 @@ import org.apache.tinkerpop.gremlin.structure.VertexProperty;
 import org.apache.tinkerpop.gremlin.structure.util.star.StarGraphGraphSONSerializer;
 import org.apache.tinkerpop.shaded.jackson.databind.module.SimpleModule;
 
+import java.time.Duration;
+import java.time.Instant;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.LocalTime;
+import java.time.MonthDay;
+import java.time.OffsetDateTime;
+import java.time.OffsetTime;
+import java.time.Period;
+import java.time.Year;
+import java.time.YearMonth;
+import java.time.ZoneOffset;
+import java.time.ZonedDateTime;
 import java.util.Map;
 
 /**
@@ -55,6 +68,7 @@ abstract class GraphSONModule extends SimpleModule {
          */
         protected GraphSONModuleV1d0(final boolean normalize) {
             super("graphson-1.0");
+            // graph
             addSerializer(Edge.class, new GraphSONSerializers.EdgeJacksonSerializer(normalize));
             addSerializer(Vertex.class, new GraphSONSerializers.VertexJacksonSerializer(normalize));
             addSerializer(VertexProperty.class, new GraphSONSerializers.VertexPropertyJacksonSerializer(normalize));
@@ -62,7 +76,38 @@ abstract class GraphSONModule extends SimpleModule {
             addSerializer(TraversalMetrics.class, new GraphSONSerializers.TraversalMetricsJacksonSerializer());
             addSerializer(Path.class, new GraphSONSerializers.PathJacksonSerializer());
             addSerializer(StarGraphGraphSONSerializer.DirectionalStarGraph.class, new StarGraphGraphSONSerializer(normalize));
-            addSerializer(Map.Entry.class, new GraphSONSerializers.MapEntryJacksonSerializer());
+
+            // java.util
+            addSerializer(Map.Entry.class, new JavaUtilSerializers.MapEntryJacksonSerializer());
+
+            // java.time
+            addSerializer(Duration.class, new JavaTimeSerializers.DurationJacksonSerializer());
+            addSerializer(Instant.class, new JavaTimeSerializers.InstantJacksonSerializer());
+            addSerializer(LocalDate.class, new JavaTimeSerializers.LocalDateJacksonSerializer());
+            addSerializer(LocalDateTime.class, new JavaTimeSerializers.LocalDateTimeJacksonSerializer());
+            addSerializer(LocalTime.class, new JavaTimeSerializers.LocalTimeJacksonSerializer());
+            addSerializer(MonthDay.class, new JavaTimeSerializers.MonthDayJacksonSerializer());
+            addSerializer(OffsetDateTime.class, new JavaTimeSerializers.OffsetDateTimeJacksonSerializer());
+            addSerializer(OffsetTime.class, new JavaTimeSerializers.OffsetTimeJacksonSerializer());
+            addSerializer(Period.class, new JavaTimeSerializers.PeriodJacksonSerializer());
+            addSerializer(Year.class, new JavaTimeSerializers.YearJacksonSerializer());
+            addSerializer(YearMonth.class, new JavaTimeSerializers.YearMonthJacksonSerializer());
+            addSerializer(ZonedDateTime.class, new JavaTimeSerializers.ZonedDateTimeJacksonSerializer());
+            addSerializer(ZoneOffset.class, new JavaTimeSerializers.ZoneOffsetJacksonSerializer());
+
+            addDeserializer(Duration.class, new JavaTimeSerializers.DurationJacksonDeserializer());
+            addDeserializer(Instant.class, new JavaTimeSerializers.InstantJacksonDeserializer());
+            addDeserializer(LocalDate.class, new JavaTimeSerializers.LocalDateJacksonDeserializer());
+            addDeserializer(LocalDateTime.class, new JavaTimeSerializers.LocalDateTimeJacksonDeserializer());
+            addDeserializer(LocalTime.class, new JavaTimeSerializers.LocalTimeJacksonDeserializer());
+            addDeserializer(MonthDay.class, new JavaTimeSerializers.MonthDayJacksonDeserializer());
+            addDeserializer(OffsetDateTime.class, new JavaTimeSerializers.OffsetDateTimeJacksonDeserializer());
+            addDeserializer(OffsetTime.class, new JavaTimeSerializers.OffsetTimeJacksonDeserializer());
+            addDeserializer(Period.class, new JavaTimeSerializers.PeriodJacksonDeserializer());
+            addDeserializer(Year.class, new JavaTimeSerializers.YearJacksonDeserializer());
+            addDeserializer(YearMonth.class, new JavaTimeSerializers.YearMonthJacksonDeserializer());
+            addDeserializer(ZonedDateTime.class, new JavaTimeSerializers.ZonedDateTimeJacksonDeserializer());
+            addDeserializer(ZoneOffset.class, new JavaTimeSerializers.ZoneOffsetJacksonDeserializer());
         }
 
         public static Builder build() {

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/cee96fdb/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializers.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializers.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializers.java
index 010ca74..5b2a8b7 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializers.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializers.java
@@ -32,7 +32,6 @@ import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;
 import org.apache.tinkerpop.shaded.jackson.core.JsonGenerationException;
 import org.apache.tinkerpop.shaded.jackson.core.JsonGenerator;
 import org.apache.tinkerpop.shaded.jackson.core.JsonProcessingException;
-import org.apache.tinkerpop.shaded.jackson.databind.SerializationFeature;
 import org.apache.tinkerpop.shaded.jackson.databind.SerializerProvider;
 import org.apache.tinkerpop.shaded.jackson.databind.jsontype.TypeSerializer;
 import org.apache.tinkerpop.shaded.jackson.databind.ser.std.StdKeySerializer;
@@ -41,7 +40,6 @@ import org.apache.tinkerpop.shaded.jackson.databind.ser.std.StdSerializer;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Comparator;
-import java.util.Date;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
@@ -49,7 +47,7 @@ import java.util.Map;
 import java.util.concurrent.TimeUnit;
 
 /**
- * Class used to serialize graph-based objects such as vertices, edges, properties, and paths. These serializers
+ * GraphSON serializers for graph-based objects such as vertices, edges, properties, and paths. These serializers
  * present a generalized way to serialize the implementations of core interfaces.
  *
  * @author Stephen Mallette (http://stephen.genoprime.com)
@@ -328,52 +326,6 @@ final class GraphSONSerializers {
         }
     }
 
-    final static class MapEntryJacksonSerializer extends StdSerializer<Map.Entry> {
-
-        public MapEntryJacksonSerializer() {
-            super(Map.Entry.class);
-        }
-
-        @Override
-        public void serialize(final Map.Entry entry, final JsonGenerator jsonGenerator, final SerializerProvider serializerProvider)
-                throws IOException {
-            ser(entry, jsonGenerator, serializerProvider, null);
-        }
-        @Override
-        public void serializeWithType(final Map.Entry entry, final JsonGenerator jsonGenerator,
-                                      final SerializerProvider serializerProvider, final TypeSerializer typeSerializer) throws IOException {
-            ser(entry, jsonGenerator, serializerProvider, typeSerializer);
-        }
-
-        private static void ser(final Map.Entry entry, final JsonGenerator jsonGenerator,
-                                final SerializerProvider serializerProvider, final TypeSerializer typeSerializer) throws IOException {
-            jsonGenerator.writeStartObject();
-            if (typeSerializer != null) jsonGenerator.writeStringField(GraphSONTokens.CLASS, HashMap.class.getName());
-
-            // this treatment of keys is consistent with the current GraphSONKeySerializer which extends the
-            // StdKeySerializer
-            final Object key = entry.getKey();
-            final Class cls = key.getClass();
-            String k;
-            if (cls == String.class)
-                k = (String) key;
-            else if (Element.class.isAssignableFrom(cls))
-                k = ((Element) key).id().toString();
-            else if(Date.class.isAssignableFrom(cls)) {
-                if (serializerProvider.isEnabled(SerializationFeature.WRITE_DATE_KEYS_AS_TIMESTAMPS))
-                    k = String.valueOf(((Date) key).getTime());
-                else
-                    k = serializerProvider.getConfig().getDateFormat().format((Date) key);
-            } else if(cls == Class.class)
-                k = ((Class) key).getName();
-            else
-                k = key.toString();
-
-            serializerProvider.defaultSerializeField(k, entry.getValue(), jsonGenerator);
-            jsonGenerator.writeEndObject();
-        }
-    }
-
     private static void serializerVertexProperty(final VertexProperty property, final JsonGenerator jsonGenerator,
                                                  final SerializerProvider serializerProvider,
                                                  final TypeSerializer typeSerializer, final boolean normalize,

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/cee96fdb/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/JavaTimeSerializers.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/JavaTimeSerializers.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/JavaTimeSerializers.java
new file mode 100644
index 0000000..7ceae94
--- /dev/null
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/JavaTimeSerializers.java
@@ -0,0 +1,326 @@
+/*
+ * 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.structure.io.graphson;
+
+import org.apache.tinkerpop.shaded.jackson.core.JsonGenerator;
+import org.apache.tinkerpop.shaded.jackson.core.JsonParser;
+import org.apache.tinkerpop.shaded.jackson.databind.DeserializationContext;
+import org.apache.tinkerpop.shaded.jackson.databind.SerializerProvider;
+import org.apache.tinkerpop.shaded.jackson.databind.deser.std.StdDeserializer;
+import org.apache.tinkerpop.shaded.jackson.databind.jsontype.TypeSerializer;
+import org.apache.tinkerpop.shaded.jackson.databind.ser.std.StdSerializer;
+
+import java.io.IOException;
+import java.time.Duration;
+import java.time.Instant;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.LocalTime;
+import java.time.MonthDay;
+import java.time.OffsetDateTime;
+import java.time.OffsetTime;
+import java.time.Period;
+import java.time.Year;
+import java.time.YearMonth;
+import java.time.ZoneOffset;
+import java.time.ZonedDateTime;
+
+/**
+ * GraphSON serializers for classes in {@code java.time.*}.
+ */
+final class JavaTimeSerializers {
+
+    private JavaTimeSerializers() {}
+
+    /**
+     * Base class for serializing the {@code java.time.*} to ISO-8061 formats.
+     */
+    static abstract class AbstractJavaTimeSerializer<T> extends StdSerializer<T> {
+
+        public AbstractJavaTimeSerializer(final Class<T> clazz) {
+            super(clazz);
+        }
+
+        @Override
+        public void serialize(final T value, final JsonGenerator gen,
+                              final SerializerProvider serializerProvider) throws IOException {
+            gen.writeString(value.toString());
+        }
+
+        @Override
+        public void serializeWithType(final T value, final JsonGenerator gen,
+                                      final SerializerProvider serializers, final TypeSerializer typeSer) throws IOException {
+            typeSer.writeTypePrefixForObject(value, gen);
+            gen.writeStringField(GraphSONTokens.VALUE, value.toString());
+            typeSer.writeTypeSuffixForObject(value, gen);
+        }
+    }
+    /**
+     * Base class for serializing the {@code java.time.*} from ISO-8061 formats.
+     */
+    abstract static class AbstractJavaTimeJacksonDeserializer<T> extends StdDeserializer<T> {
+        public AbstractJavaTimeJacksonDeserializer(final Class<T> clazz) {
+            super(clazz);
+        }
+
+        public abstract T parse(final String val);
+
+        @Override
+        public T deserialize(final JsonParser jsonParser, final DeserializationContext deserializationContext) throws IOException {
+            if (!jsonParser.getText().equals(GraphSONTokens.VALUE))
+                throw new IOException(String.format("Invalid format for %s - expecting '%s' with a text value in ISO-8061 format", _valueClass.getSimpleName(), GraphSONTokens.VALUE));
+
+            return parse(jsonParser.nextTextValue());
+        }
+    }
+
+    final static class DurationJacksonSerializer extends AbstractJavaTimeSerializer<Duration> {
+
+        public DurationJacksonSerializer() {
+            super(Duration.class);
+        }
+    }
+
+    final static class DurationJacksonDeserializer extends AbstractJavaTimeJacksonDeserializer<Duration> {
+        public DurationJacksonDeserializer() {
+            super(Duration.class);
+        }
+
+        @Override
+        public Duration parse(final String val) {
+            return Duration.parse(val);
+        }
+    }
+
+    final static class InstantJacksonSerializer extends AbstractJavaTimeSerializer<Instant> {
+
+        public InstantJacksonSerializer() {
+            super(Instant.class);
+        }
+    }
+
+    final static class InstantJacksonDeserializer extends AbstractJavaTimeJacksonDeserializer<Instant> {
+        public InstantJacksonDeserializer() {
+            super(Instant.class);
+        }
+
+        @Override
+        public Instant parse(final String val) {
+            return Instant.parse(val);
+        }
+    }
+
+    final static class LocalDateJacksonSerializer extends AbstractJavaTimeSerializer<LocalDate> {
+
+        public LocalDateJacksonSerializer() {
+            super(LocalDate.class);
+        }
+    }
+
+    final static class LocalDateJacksonDeserializer extends AbstractJavaTimeJacksonDeserializer<LocalDate> {
+        public LocalDateJacksonDeserializer() {
+            super(LocalDate.class);
+        }
+
+        @Override
+        public LocalDate parse(final String val) {
+            return LocalDate.parse(val);
+        }
+    }
+
+    final static class LocalDateTimeJacksonSerializer extends AbstractJavaTimeSerializer<LocalDateTime> {
+
+        public LocalDateTimeJacksonSerializer() {
+            super(LocalDateTime.class);
+        }
+    }
+
+    final static class LocalDateTimeJacksonDeserializer extends AbstractJavaTimeJacksonDeserializer<LocalDateTime> {
+        public LocalDateTimeJacksonDeserializer() {
+            super(LocalDateTime.class);
+        }
+
+        @Override
+        public LocalDateTime parse(final String val) {
+            return LocalDateTime.parse(val);
+        }
+    }
+
+    final static class LocalTimeJacksonSerializer extends AbstractJavaTimeSerializer<LocalTime> {
+
+        public LocalTimeJacksonSerializer() {
+            super(LocalTime.class);
+        }
+    }
+
+    final static class LocalTimeJacksonDeserializer extends AbstractJavaTimeJacksonDeserializer<LocalTime> {
+        public LocalTimeJacksonDeserializer() {
+            super(LocalTime.class);
+        }
+
+        @Override
+        public LocalTime parse(final String val) {
+            return LocalTime.parse(val);
+        }
+    }
+
+    final static class MonthDayJacksonSerializer extends AbstractJavaTimeSerializer<MonthDay> {
+
+        public MonthDayJacksonSerializer() {
+            super(MonthDay.class);
+        }
+    }
+
+    final static class MonthDayJacksonDeserializer extends AbstractJavaTimeJacksonDeserializer<MonthDay> {
+        public MonthDayJacksonDeserializer() {
+            super(MonthDay.class);
+        }
+
+        @Override
+        public MonthDay parse(final String val) {
+            return MonthDay.parse(val);
+        }
+    }
+
+    final static class OffsetDateTimeJacksonSerializer extends AbstractJavaTimeSerializer<OffsetDateTime> {
+
+        public OffsetDateTimeJacksonSerializer() {
+            super(OffsetDateTime.class);
+        }
+    }
+
+    final static class OffsetDateTimeJacksonDeserializer extends AbstractJavaTimeJacksonDeserializer<OffsetDateTime> {
+        public OffsetDateTimeJacksonDeserializer() {
+            super(OffsetDateTime.class);
+        }
+
+        @Override
+        public OffsetDateTime parse(final String val) {
+            return OffsetDateTime.parse(val);
+        }
+    }
+
+    final static class OffsetTimeJacksonSerializer extends AbstractJavaTimeSerializer<OffsetTime> {
+
+        public OffsetTimeJacksonSerializer() {
+            super(OffsetTime.class);
+        }
+    }
+
+    final static class OffsetTimeJacksonDeserializer extends AbstractJavaTimeJacksonDeserializer<OffsetTime> {
+        public OffsetTimeJacksonDeserializer() {
+            super(OffsetTime.class);
+        }
+
+        @Override
+        public OffsetTime parse(final String val) {
+            return OffsetTime.parse(val);
+        }
+    }
+
+    final static class PeriodJacksonSerializer extends AbstractJavaTimeSerializer<Period> {
+
+        public PeriodJacksonSerializer() {
+            super(Period.class);
+        }
+    }
+
+    final static class PeriodJacksonDeserializer extends AbstractJavaTimeJacksonDeserializer<Period> {
+        public PeriodJacksonDeserializer() {
+            super(Period.class);
+        }
+
+        @Override
+        public Period parse(final String val) {
+            return Period.parse(val);
+        }
+    }
+
+    final static class YearJacksonSerializer extends AbstractJavaTimeSerializer<Year> {
+
+        public YearJacksonSerializer() {
+            super(Year.class);
+        }
+    }
+
+    final static class YearJacksonDeserializer extends AbstractJavaTimeJacksonDeserializer<Year> {
+        public YearJacksonDeserializer() {
+            super(Year.class);
+        }
+
+        @Override
+        public Year parse(final String val) {
+            return Year.parse(val);
+        }
+    }
+
+    final static class YearMonthJacksonSerializer extends AbstractJavaTimeSerializer<YearMonth> {
+
+        public YearMonthJacksonSerializer() {
+            super(YearMonth.class);
+        }
+    }
+
+    final static class YearMonthJacksonDeserializer extends AbstractJavaTimeJacksonDeserializer<YearMonth> {
+        public YearMonthJacksonDeserializer() {
+            super(YearMonth.class);
+        }
+
+        @Override
+        public YearMonth parse(final String val) {
+            return YearMonth.parse(val);
+        }
+    }
+
+    final static class ZonedDateTimeJacksonSerializer extends AbstractJavaTimeSerializer<ZonedDateTime> {
+
+        public ZonedDateTimeJacksonSerializer() {
+            super(ZonedDateTime.class);
+        }
+    }
+
+    final static class ZonedDateTimeJacksonDeserializer extends AbstractJavaTimeJacksonDeserializer<ZonedDateTime> {
+        public ZonedDateTimeJacksonDeserializer() {
+            super(ZonedDateTime.class);
+        }
+
+        @Override
+        public ZonedDateTime parse(final String val) {
+            return ZonedDateTime.parse(val);
+        }
+    }
+
+    final static class ZoneOffsetJacksonSerializer extends AbstractJavaTimeSerializer<ZoneOffset> {
+
+        public ZoneOffsetJacksonSerializer() {
+            super(ZoneOffset.class);
+        }
+    }
+
+    final static class ZoneOffsetJacksonDeserializer extends AbstractJavaTimeJacksonDeserializer<ZoneOffset> {
+        public ZoneOffsetJacksonDeserializer() {
+            super(ZoneOffset.class);
+        }
+
+        @Override
+        public ZoneOffset parse(final String val) {
+            return ZoneOffset.of(val);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/cee96fdb/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/JavaUtilSerializers.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/JavaUtilSerializers.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/JavaUtilSerializers.java
new file mode 100644
index 0000000..4f2f5da
--- /dev/null
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/JavaUtilSerializers.java
@@ -0,0 +1,86 @@
+/*
+ * 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.structure.io.graphson;
+
+import org.apache.tinkerpop.gremlin.structure.Element;
+import org.apache.tinkerpop.shaded.jackson.core.JsonGenerator;
+import org.apache.tinkerpop.shaded.jackson.databind.SerializationFeature;
+import org.apache.tinkerpop.shaded.jackson.databind.SerializerProvider;
+import org.apache.tinkerpop.shaded.jackson.databind.jsontype.TypeSerializer;
+import org.apache.tinkerpop.shaded.jackson.databind.ser.std.StdSerializer;
+
+import java.io.IOException;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * GraphSON serializers for classes in {@code java.util.*}.
+ */
+final class JavaUtilSerializers {
+
+    private JavaUtilSerializers() {}
+
+    final static class MapEntryJacksonSerializer extends StdSerializer<Map.Entry> {
+
+        public MapEntryJacksonSerializer() {
+            super(Map.Entry.class);
+        }
+
+        @Override
+        public void serialize(final Map.Entry entry, final JsonGenerator jsonGenerator, final SerializerProvider serializerProvider)
+                throws IOException {
+            ser(entry, jsonGenerator, serializerProvider, null);
+        }
+
+        @Override
+        public void serializeWithType(final Map.Entry entry, final JsonGenerator jsonGenerator,
+                                      final SerializerProvider serializerProvider, final TypeSerializer typeSerializer) throws IOException {
+            ser(entry, jsonGenerator, serializerProvider, typeSerializer);
+        }
+
+        private static void ser(final Map.Entry entry, final JsonGenerator jsonGenerator,
+                                final SerializerProvider serializerProvider, final TypeSerializer typeSerializer) throws IOException {
+            jsonGenerator.writeStartObject();
+            if (typeSerializer != null) jsonGenerator.writeStringField(GraphSONTokens.CLASS, HashMap.class.getName());
+
+            // this treatment of keys is consistent with the current GraphSONKeySerializer which extends the
+            // StdKeySerializer
+            final Object key = entry.getKey();
+            final Class cls = key.getClass();
+            String k;
+            if (cls == String.class)
+                k = (String) key;
+            else if (Element.class.isAssignableFrom(cls))
+                k = ((Element) key).id().toString();
+            else if(Date.class.isAssignableFrom(cls)) {
+                if (serializerProvider.isEnabled(SerializationFeature.WRITE_DATE_KEYS_AS_TIMESTAMPS))
+                    k = String.valueOf(((Date) key).getTime());
+                else
+                    k = serializerProvider.getConfig().getDateFormat().format((Date) key);
+            } else if(cls == Class.class)
+                k = ((Class) key).getName();
+            else
+                k = key.toString();
+
+            serializerProvider.defaultSerializeField(k, entry.getValue(), jsonGenerator);
+            jsonGenerator.writeEndObject();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/cee96fdb/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONMapperEmbeddedTypeTest.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONMapperEmbeddedTypeTest.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONMapperEmbeddedTypeTest.java
new file mode 100644
index 0000000..c7549f9
--- /dev/null
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONMapperEmbeddedTypeTest.java
@@ -0,0 +1,134 @@
+/*
+ * 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.structure.io.graphson;
+
+import org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper;
+import org.apache.tinkerpop.shaded.kryo.io.Input;
+import org.apache.tinkerpop.shaded.kryo.io.Output;
+import org.junit.Test;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
+import java.time.Duration;
+import java.time.Instant;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.LocalTime;
+import java.time.MonthDay;
+import java.time.OffsetDateTime;
+import java.time.OffsetTime;
+import java.time.Period;
+import java.time.Year;
+import java.time.YearMonth;
+import java.time.ZoneOffset;
+import java.time.ZonedDateTime;
+
+import static org.junit.Assert.assertEquals;
+
+public class GraphSONMapperEmbeddedTypeTest {
+    private final ObjectMapper mapper = GraphSONMapper.build().embedTypes(true).create().createMapper();
+
+    @Test
+    public void shouldHandleDuration()throws Exception  {
+        final Duration o = Duration.ZERO;
+        assertEquals(o, serializeDeserialize(o, Duration.class));
+    }
+    @Test
+    public void shouldHandleInstant()throws Exception  {
+        final Instant o = Instant.ofEpochMilli(System.currentTimeMillis());
+        assertEquals(o, serializeDeserialize(o, Instant.class));
+    }
+
+    @Test
+    public void shouldHandleLocalDate()throws Exception  {
+        final LocalDate o = LocalDate.now();
+        assertEquals(o, serializeDeserialize(o, LocalDate.class));
+    }
+
+    @Test
+    public void shouldHandleLocalDateTime()throws Exception  {
+        final LocalDateTime o = LocalDateTime.now();
+        assertEquals(o, serializeDeserialize(o, LocalDateTime.class));
+    }
+
+    @Test
+    public void shouldHandleLocalTime()throws Exception  {
+        final LocalTime o = LocalTime.now();
+        assertEquals(o, serializeDeserialize(o, LocalTime.class));
+    }
+
+    @Test
+    public void shouldHandleMonthDay()throws Exception  {
+        final MonthDay o = MonthDay.now();
+        assertEquals(o, serializeDeserialize(o, MonthDay.class));
+    }
+
+    @Test
+    public void shouldHandleOffsetDateTime()throws Exception  {
+        final OffsetDateTime o = OffsetDateTime.now();
+        assertEquals(o, serializeDeserialize(o, OffsetDateTime.class));
+    }
+
+    @Test
+    public void shouldHandleOffsetTime()throws Exception  {
+        final OffsetTime o = OffsetTime.now();
+        assertEquals(o, serializeDeserialize(o, OffsetTime.class));
+    }
+
+    @Test
+    public void shouldHandlePeriod()throws Exception  {
+        final Period o = Period.ofDays(3);
+        assertEquals(o, serializeDeserialize(o, Period.class));
+    }
+
+    @Test
+    public void shouldHandleYear()throws Exception  {
+        final Year o = Year.now();
+        assertEquals(o, serializeDeserialize(o, Year.class));
+    }
+
+    @Test
+    public void shouldHandleYearMonth()throws Exception  {
+        final YearMonth o = YearMonth.now();
+        assertEquals(o, serializeDeserialize(o, YearMonth.class));
+    }
+
+    @Test
+    public void shouldHandleZonedDateTime()throws Exception  {
+        final ZonedDateTime o = ZonedDateTime.now();
+        assertEquals(o, serializeDeserialize(o, ZonedDateTime.class));
+    }
+
+    @Test
+    public void shouldHandleZonedOffset()throws Exception  {
+        final ZoneOffset o  = ZonedDateTime.now().getOffset();
+        assertEquals(o, serializeDeserialize(o, ZoneOffset.class));
+    }
+
+    public <T> T serializeDeserialize(final Object o, final Class<T> clazz) throws Exception {
+        try (final ByteArrayOutputStream stream = new ByteArrayOutputStream()) {
+            mapper.writeValue(stream, o);
+
+            try (final InputStream inputStream = new ByteArrayInputStream(stream.toByteArray())) {
+                return mapper.readValue(inputStream, clazz);
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/cee96fdb/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONMapperTest.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONMapperTest.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONMapperTest.java
new file mode 100644
index 0000000..0a16a4e
--- /dev/null
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONMapperTest.java
@@ -0,0 +1,133 @@
+/*
+ * 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.structure.io.graphson;
+
+import org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper;
+import org.junit.Test;
+
+import java.time.Duration;
+import java.time.Instant;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.LocalTime;
+import java.time.MonthDay;
+import java.time.OffsetDateTime;
+import java.time.OffsetTime;
+import java.time.Period;
+import java.time.Year;
+import java.time.YearMonth;
+import java.time.ZoneOffset;
+import java.time.ZonedDateTime;
+
+import static org.junit.Assert.assertEquals;
+
+public class GraphSONMapperTest {
+    private final ObjectMapper mapper = GraphSONMapper.build().embedTypes(false).create().createMapper();
+
+    @Test
+    public void shouldHandleDuration()throws Exception  {
+        final Duration o = Duration.ZERO;
+        final String json = mapper.writeValueAsString(o);
+        assertEquals("\"" + o.toString() + "\"", json);
+    }
+
+    @Test
+    public void shouldHandleInstant()throws Exception  {
+        final Instant o = Instant.ofEpochMilli(System.currentTimeMillis());
+        final String json = mapper.writeValueAsString(o);
+        assertEquals("\"" + o.toString() + "\"", json);
+    }
+
+    @Test
+    public void shouldHandleLocalDate()throws Exception  {
+        final LocalDate o = LocalDate.now();
+        final String json = mapper.writeValueAsString(o);
+        assertEquals("\"" + o.toString() + "\"", json);
+    }
+
+    @Test
+    public void shouldHandleLocalDateTime()throws Exception  {
+        final LocalDateTime o = LocalDateTime.now();
+        final String json = mapper.writeValueAsString(o);
+        assertEquals("\"" + o.toString() + "\"", json);
+    }
+
+    @Test
+    public void shouldHandleLocalTime()throws Exception  {
+        final LocalTime o = LocalTime.now();
+        final String json = mapper.writeValueAsString(o);
+        assertEquals("\"" + o.toString() + "\"", json);
+    }
+
+    @Test
+    public void shouldHandleMonthDay()throws Exception  {
+        final MonthDay o = MonthDay.now();
+        final String json = mapper.writeValueAsString(o);
+        assertEquals("\"" + o.toString() + "\"", json);
+    }
+
+    @Test
+    public void shouldHandleOffsetDateTime()throws Exception  {
+        final OffsetDateTime o = OffsetDateTime.now();
+        final String json = mapper.writeValueAsString(o);
+        assertEquals("\"" + o.toString() + "\"", json);
+    }
+
+    @Test
+    public void shouldHandleOffsetTime()throws Exception  {
+        final OffsetTime o = OffsetTime.now();
+        final String json = mapper.writeValueAsString(o);
+        assertEquals("\"" + o.toString() + "\"", json);
+    }
+
+    @Test
+    public void shouldHandlePeriod()throws Exception  {
+        final Period o = Period.ofDays(3);
+        final String json = mapper.writeValueAsString(o);
+        assertEquals("\"" + o.toString() + "\"", json);
+    }
+
+    @Test
+    public void shouldHandleYear()throws Exception  {
+        final Year o = Year.now();
+        final String json = mapper.writeValueAsString(o);
+        assertEquals("\"" + o.toString() + "\"", json);
+    }
+
+    @Test
+    public void shouldHandleYearMonth()throws Exception  {
+        final YearMonth o = YearMonth.now();
+        final String json = mapper.writeValueAsString(o);
+        assertEquals("\"" + o.toString() + "\"", json);
+    }
+
+    @Test
+    public void shouldHandleZonedDateTime()throws Exception  {
+        final ZonedDateTime o = ZonedDateTime.now();
+        final String json = mapper.writeValueAsString(o);
+        assertEquals("\"" + o.toString() + "\"", json);
+    }
+
+    @Test
+    public void shouldHandleZoneOffset()throws Exception  {
+        final ZoneOffset o = ZonedDateTime.now().getOffset();
+        final String json = mapper.writeValueAsString(o);
+        assertEquals("\"" + o.toString() + "\"", json);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/cee96fdb/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoMapperTest.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoMapperTest.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoMapperTest.java
index a915797..e92eaf9 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoMapperTest.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoMapperTest.java
@@ -47,7 +47,6 @@ import java.time.OffsetTime;
 import java.time.Period;
 import java.time.Year;
 import java.time.YearMonth;
-import java.time.ZoneId;
 import java.time.ZoneOffset;
 import java.time.ZonedDateTime;
 import java.util.ArrayList;

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/cee96fdb/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/HttpGremlinEndpointHandler.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/HttpGremlinEndpointHandler.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/HttpGremlinEndpointHandler.java
index f03f9c2..d37a1bc 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/HttpGremlinEndpointHandler.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/HttpGremlinEndpointHandler.java
@@ -253,7 +253,8 @@ public class HttpGremlinEndpointHandler extends ChannelInboundHandlerAdapter {
                         }));
 
                 evalFuture.exceptionally(t -> {
-                    sendError(ctx, INTERNAL_SERVER_ERROR, String.format("Error encountered evaluating script: %s", requestArguments.getValue0()));
+                    sendError(ctx, INTERNAL_SERVER_ERROR,
+                            String.format("Error encountered evaluating script: %s", requestArguments.getValue0()), Optional.of(t));
                     promise.setFailure(t);
                     return null;
                 });
@@ -437,8 +438,19 @@ public class HttpGremlinEndpointHandler extends ChannelInboundHandlerAdapter {
             return node.asText();
     }
 
-    private static void sendError(final ChannelHandlerContext ctx, final HttpResponseStatus status, final String message) {
-        logger.warn("Invalid request - responding with {} and {}", status, message);
+
+    private static void sendError(final ChannelHandlerContext ctx, final HttpResponseStatus status,
+                                  final String message) {
+        sendError(ctx, status, message, Optional.empty());
+    }
+
+    private static void sendError(final ChannelHandlerContext ctx, final HttpResponseStatus status,
+                                  final String message, final Optional<Throwable> t) {
+        if (t.isPresent())
+            logger.warn(String.format("Invalid request - responding with %s and %s", status, message), t.get());
+        else
+            logger.warn(String.format("Invalid request - responding with %s and %s", status, message));
+
         errorMeter.mark();
         final ObjectNode node = mapper.createObjectNode();
         node.put("message", message);

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/cee96fdb/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerHttpIntegrateTest.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerHttpIntegrateTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerHttpIntegrateTest.java
index 00e757c..f8efda9 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerHttpIntegrateTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerHttpIntegrateTest.java
@@ -34,8 +34,9 @@ import org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper;
 import org.junit.Test;
 
 import java.io.File;
-import java.util.Arrays;
+import java.time.Instant;
 import java.util.Base64;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -64,7 +65,7 @@ public class GremlinServerHttpIntegrateTest extends AbstractGremlinServerIntegra
             case "should200OnPOSTWithGremlinJsonEndcodedBodyWithIteratorResult":
             case "should200OnPOSTWithGremlinJsonEndcodedBodyWithIteratorResultAndAliases":
             case "should200OnGETWithGremlinQueryStringArgumentWithIteratorResultAndAliases":
-                settings.scriptEngines.get("gremlin-groovy").scripts = Arrays.asList("scripts/generate-classic.groovy");
+                settings.scriptEngines.get("gremlin-groovy").scripts = Collections.singletonList("scripts/generate-classic.groovy");
                 break;
             case "should200OnPOSTTransactionalGraph":
                 deleteDirectory(new File("/tmp/neo4j"));
@@ -428,6 +429,24 @@ public class GremlinServerHttpIntegrateTest extends AbstractGremlinServerIntegra
     }
 
     @Test
+    public void should200OnPOSTWithGremlinJsonEndcodedBodyForJavaTime() throws Exception {
+        // basic test of java.time.* serialization over JSON from the server perspective. more complete tests
+        // exist in gremlin-core
+        final CloseableHttpClient httpclient = HttpClients.createDefault();
+        final HttpPost httppost = new HttpPost("http://localhost:8182");
+        httppost.addHeader("Content-Type", "application/json");
+        httppost.setEntity(new StringEntity("{\"gremlin\":\"java.time.Instant.MAX\"}", Consts.UTF_8));
+
+        try (final CloseableHttpResponse response = httpclient.execute(httppost)) {
+            assertEquals(200, response.getStatusLine().getStatusCode());
+            assertEquals("application/json", response.getEntity().getContentType().getValue());
+            final String json = EntityUtils.toString(response.getEntity());
+            final JsonNode node = mapper.readTree(json);
+            assertEquals(Instant.MAX, Instant.parse(node.get("result").get("data").get(0).asText()));
+        }
+    }
+
+    @Test
     public void should200OnPOSTTransactionalGraph() throws Exception {
         assumeNeo4jIsPresent();
 



[33/37] incubator-tinkerpop git commit: Merge remote-tracking branch 'origin/TINKERPOP-1106' into tp31

Posted by sp...@apache.org.
Merge remote-tracking branch 'origin/TINKERPOP-1106' into tp31


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

Branch: refs/heads/master
Commit: f3ef0e0cc9cf6ada2713390f4dba0bc5203ee9c3
Parents: 9aba328 9f85d3e
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Feb 12 18:24:16 2016 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Feb 12 18:24:16 2016 -0500

----------------------------------------------------------------------
 .../server/op/AbstractEvalOpProcessor.java      | 38 ++++++++++++--------
 1 file changed, 23 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/f3ef0e0c/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java
----------------------------------------------------------------------


[32/37] incubator-tinkerpop git commit: Update changelog.

Posted by sp...@apache.org.
Update changelog.


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

Branch: refs/heads/master
Commit: 9aba3286112ee1460ecb6966fb93d55b58941361
Parents: 71ed313
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Feb 12 18:16:01 2016 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Feb 12 18:16:01 2016 -0500

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


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/9aba3286/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 1b23566..ef8c606 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,9 @@ image::https://raw.githubusercontent.com/apache/incubator-tinkerpop/master/docs/
 TinkerPop 3.1.2 (NOT OFFICIALLY RELEASED YET)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+* Fixed bug in "round robin" load balancing in `gremlin-driver` where requests were wrongly being sent to the same host.
+* Prevented the spawning of unneeded reconnect tasks in `gremlin-driver` when a host goes offline.
+* Fixed bug preventing `gremlin-driver` from reconnecting to Gremlin Server when it was restarted.
 * Added GraphSON serializers for the `java.time.*` classes.
 * Improved the logging of the Gremlin Server REST endpoint as it pertained to script execution failures.
 * `TraversalExplanation` is now `Serializable` and registered with `GryoMapper`.


[05/37] incubator-tinkerpop git commit: Improved messaging from gremlin server around timeouts.

Posted by sp...@apache.org.
Improved messaging from gremlin server around timeouts.

There are multiple timeouts configurable in gremlin server and it wasn't always clear which was triggering given the error messages that were being generated.  Improved the clarity in server-side logging and in the messages returned to the client.


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

Branch: refs/heads/master
Commit: 89e159b8bf9d4d6bcf6fc392dceb6c7eba33cf51
Parents: a3e2a98
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Feb 8 16:09:51 2016 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Feb 8 16:09:51 2016 -0500

----------------------------------------------------------------------
 .../gremlin/groovy/engine/GremlinExecutor.java  |  2 +-
 .../TimedInterruptCustomizerProvider.java       |  1 +
 .../TimedInterruptTimeoutException.java         | 34 ++++++++++++
 .../groovy/engine/GremlinExecutorTest.java      |  3 +-
 ...linGroovyScriptEngineTimedInterruptTest.java |  7 +--
 .../server/op/AbstractEvalOpProcessor.java      | 12 +++--
 .../server/GremlinServerIntegrateTest.java      | 57 ++++++++++++++++----
 7 files changed, 99 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/89e159b8/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 49e2ac7..2e678f8 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
@@ -277,7 +277,7 @@ public class GremlinExecutor implements AutoCloseable {
                 // check for that situation and convert to TimeoutException
                 if (root instanceof InterruptedException)
                     evaluationFuture.completeExceptionally(new TimeoutException(
-                            String.format("Script evaluation exceeded the configured threshold of %s ms for request [%s]: %s", scriptEvaluationTimeout, script, root.getMessage())));
+                            String.format("Script evaluation exceeded the configured 'scriptEvaluationTimeout' threshold of %s ms for request [%s]: %s", scriptEvaluationTimeout, script, root.getMessage())));
                 else {
                     lifeCycle.getAfterFailure().orElse(afterFailure).accept(bindings, root);
                     evaluationFuture.completeExceptionally(root);

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/89e159b8/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/customizer/TimedInterruptCustomizerProvider.java
----------------------------------------------------------------------
diff --git a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/customizer/TimedInterruptCustomizerProvider.java b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/customizer/TimedInterruptCustomizerProvider.java
index 1a85b2d..e4bdc62 100644
--- a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/customizer/TimedInterruptCustomizerProvider.java
+++ b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/customizer/TimedInterruptCustomizerProvider.java
@@ -57,6 +57,7 @@ public class TimedInterruptCustomizerProvider implements CompilerCustomizerProvi
         timedInterruptAnnotationParams.put("value", interruptionTimeout);
         timedInterruptAnnotationParams.put("unit", GeneralUtils.propX(GeneralUtils.classX(TimeUnit.class), TimeUnit.MILLISECONDS.toString()));
         timedInterruptAnnotationParams.put("checkOnMethodStart", false);
+        timedInterruptAnnotationParams.put("thrown", GeneralUtils.classX(TimedInterruptTimeoutException.class));
         return new ASTTransformationCustomizer(timedInterruptAnnotationParams, TimedInterrupt.class);
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/89e159b8/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/customizer/TimedInterruptTimeoutException.java
----------------------------------------------------------------------
diff --git a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/customizer/TimedInterruptTimeoutException.java b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/customizer/TimedInterruptTimeoutException.java
new file mode 100644
index 0000000..40abd59
--- /dev/null
+++ b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/customizer/TimedInterruptTimeoutException.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.groovy.jsr223.customizer;
+
+import java.util.concurrent.TimeoutException;
+
+/**
+ * An exception thrown from the {@link TimedInterruptCustomizerProvider} when the timeout is exceeded. This exception
+ * allows differentiation from other "timeout exceptions" that might occur.
+ */
+public class TimedInterruptTimeoutException extends TimeoutException {
+    public TimedInterruptTimeoutException() {
+    }
+
+    public TimedInterruptTimeoutException(final String message) {
+        super(message);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/89e159b8/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutorTest.java
----------------------------------------------------------------------
diff --git a/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutorTest.java b/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutorTest.java
index fcab563..3f346e7 100644
--- a/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutorTest.java
+++ b/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutorTest.java
@@ -22,6 +22,7 @@ import org.apache.commons.lang3.concurrent.BasicThreadFactory;
 import org.apache.tinkerpop.gremlin.TestHelper;
 import org.apache.tinkerpop.gremlin.groovy.jsr223.customizer.ThreadInterruptCustomizerProvider;
 import org.apache.tinkerpop.gremlin.groovy.jsr223.customizer.TimedInterruptCustomizerProvider;
+import org.apache.tinkerpop.gremlin.groovy.jsr223.customizer.TimedInterruptTimeoutException;
 import org.javatuples.Pair;
 import org.javatuples.Triplet;
 import org.junit.Test;
@@ -501,7 +502,7 @@ public class GremlinExecutorTest {
                 gremlinExecutor.eval("s = System.currentTimeMillis();\nwhile((System.currentTimeMillis() - s) < 10000) {}").get();
                 fail("This should have timed out");
             } catch (Exception se) {
-                assertEquals(TimeoutException.class, se.getCause().getClass());
+                assertEquals(TimedInterruptTimeoutException.class, se.getCause().getClass());
             }
 
             // this script takes significantly less than the interruptionTimeout

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/89e159b8/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTimedInterruptTest.java
----------------------------------------------------------------------
diff --git a/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTimedInterruptTest.java b/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTimedInterruptTest.java
index 18fcbd6..c465732 100644
--- a/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTimedInterruptTest.java
+++ b/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTimedInterruptTest.java
@@ -20,6 +20,7 @@ package org.apache.tinkerpop.gremlin.groovy.jsr223;
 
 import org.apache.tinkerpop.gremlin.groovy.DefaultImportCustomizerProvider;
 import org.apache.tinkerpop.gremlin.groovy.jsr223.customizer.TimedInterruptCustomizerProvider;
+import org.apache.tinkerpop.gremlin.groovy.jsr223.customizer.TimedInterruptTimeoutException;
 import org.junit.Test;
 
 import javax.script.ScriptEngine;
@@ -42,7 +43,7 @@ public class GremlinGroovyScriptEngineTimedInterruptTest {
             engine.eval("s = System.currentTimeMillis();\nwhile((System.currentTimeMillis() - s) < 10000) {}");
             fail("This should have timed out");
         } catch (ScriptException se) {
-            assertEquals(TimeoutException.class, se.getCause().getCause().getClass());
+            assertEquals(TimedInterruptTimeoutException.class, se.getCause().getCause().getClass());
         }
     }
 
@@ -55,7 +56,7 @@ public class GremlinGroovyScriptEngineTimedInterruptTest {
             engine.eval("s = System.currentTimeMillis();\nwhile((System.currentTimeMillis() - s) < 10000) {}");
             fail("This should have timed out");
         } catch (ScriptException se) {
-            assertEquals(TimeoutException.class, se.getCause().getCause().getClass());
+            assertEquals(TimedInterruptTimeoutException.class, se.getCause().getCause().getClass());
         }
 
         assertEquals(2, engine.eval("1+1"));
@@ -72,7 +73,7 @@ public class GremlinGroovyScriptEngineTimedInterruptTest {
                 engine.eval("s = System.currentTimeMillis();\nwhile((System.currentTimeMillis() - s) < 2000) {}");
                 fail("This should have timed out");
             } catch (ScriptException se) {
-                assertEquals(TimeoutException.class, se.getCause().getCause().getClass());
+                assertEquals(TimedInterruptTimeoutException.class, se.getCause().getCause().getClass());
             }
 
             // this script takes 500 ms less than the interruptionTimeout

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/89e159b8/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java
index aab9950..a1d5320 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java
@@ -27,6 +27,7 @@ import org.apache.tinkerpop.gremlin.driver.message.ResponseMessage;
 import org.apache.tinkerpop.gremlin.driver.message.ResponseStatusCode;
 import org.apache.tinkerpop.gremlin.driver.ser.MessageTextSerializer;
 import org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor;
+import org.apache.tinkerpop.gremlin.groovy.jsr223.customizer.TimedInterruptTimeoutException;
 import org.apache.tinkerpop.gremlin.server.GraphManager;
 import org.apache.tinkerpop.gremlin.server.handler.Frame;
 import org.apache.tinkerpop.gremlin.server.handler.GremlinResponseFrameEncoder;
@@ -213,9 +214,14 @@ public abstract class AbstractEvalOpProcessor implements OpProcessor {
             timerContext.stop();
 
             if (t != null) {
-                if (t instanceof TimeoutException) {
-                    final String errorMessage = String.format("Response evaluation exceeded the configured threshold for request [%s] - %s", msg, t.getMessage());
+                if (t instanceof TimedInterruptTimeoutException) {
+                    // occurs when the TimedInterruptCustomizerProvider is in play
+                    final String errorMessage = String.format("A timeout occurred within the script during evaluation of [%s] - consider increasing the limit given to TimedInterruptCustomizerProvider", msg);
                     logger.warn(errorMessage);
+                    ctx.writeAndFlush(ResponseMessage.build(msg).code(ResponseStatusCode.SERVER_ERROR_TIMEOUT).statusMessage("Timeout during script evaluation triggered by TimedInterruptCustomizerProvider").create());
+                } else if (t instanceof TimeoutException) {
+                    final String errorMessage = String.format("Response evaluation exceeded the configured threshold for request [%s] - %s", msg, t.getMessage());
+                    logger.warn(errorMessage, t);
                     ctx.writeAndFlush(ResponseMessage.build(msg).code(ResponseStatusCode.SERVER_ERROR_TIMEOUT).statusMessage(t.getMessage()).create());
                 } else {
                     logger.warn(String.format("Exception processing a script on request [%s].", msg), t);
@@ -328,7 +334,7 @@ public abstract class AbstractEvalOpProcessor implements OpProcessor {
 
             stopWatch.split();
             if (stopWatch.getSplitTime() > settings.serializedResponseTimeout) {
-                final String timeoutMsg = String.format("Serialization of the entire response exceeded the serializeResponseTimeout setting %s",
+                final String timeoutMsg = String.format("Serialization of the entire response exceeded the 'serializeResponseTimeout' setting %s",
                         warnOnce ? "[Gremlin Server paused writes to client as messages were not being consumed quickly enough]" : "");
                 throw new TimeoutException(timeoutMsg.trim());
             }

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/89e159b8/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 df515bd..83dfa46 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
@@ -35,6 +35,7 @@ import org.apache.tinkerpop.gremlin.driver.simple.WebSocketClient;
 import org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine;
 import org.apache.tinkerpop.gremlin.groovy.jsr223.customizer.CompileStaticCustomizerProvider;
 import org.apache.tinkerpop.gremlin.groovy.jsr223.customizer.SimpleSandboxExtension;
+import org.apache.tinkerpop.gremlin.groovy.jsr223.customizer.TimedInterruptCustomizerProvider;
 import org.apache.tinkerpop.gremlin.structure.T;
 import org.apache.tinkerpop.gremlin.server.channel.NioChannelizer;
 import org.apache.tinkerpop.gremlin.server.op.session.SessionOpProcessor;
@@ -60,6 +61,7 @@ import java.util.stream.IntStream;
 
 import static org.hamcrest.CoreMatchers.containsString;
 import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.core.StringStartsWith.startsWith;
 import static org.junit.Assert.*;
 import static org.junit.Assume.assumeThat;
 
@@ -131,19 +133,36 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration
                 settings.graphs.put("graph", "conf/neo4j-empty.properties");
                 break;
             case "shouldUseSimpleSandbox":
-                final Map<String,Object> scriptEngineConf = new HashMap<>();
-                final Map<String,Object> compilerCustomizerProviderConf = new HashMap<>();
-                final List<String> sandboxes = new ArrayList<>();
-                sandboxes.add(SimpleSandboxExtension.class.getName());
-                compilerCustomizerProviderConf.put(CompileStaticCustomizerProvider.class.getName(), sandboxes);
-                scriptEngineConf.put("compilerCustomizerProviders", compilerCustomizerProviderConf);
-                settings.scriptEngines.get("gremlin-groovy").config = scriptEngineConf;
+                settings.scriptEngines.get("gremlin-groovy").config = getScriptEngineConfForSimpleSandbox();
+                break;
+            case "shouldReceiveFailureTimeOutOnScriptEvalOfOutOfControlLoop":
+                settings.scriptEngines.get("gremlin-groovy").config = getScriptEngineConfForTimedInterrupt();
                 break;
         }
 
         return settings;
     }
 
+    private static Map<String, Object> getScriptEngineConfForSimpleSandbox() {
+        final Map<String,Object> scriptEngineConf = new HashMap<>();
+        final Map<String,Object> compilerCustomizerProviderConf = new HashMap<>();
+        final List<String> sandboxes = new ArrayList<>();
+        sandboxes.add(SimpleSandboxExtension.class.getName());
+        compilerCustomizerProviderConf.put(CompileStaticCustomizerProvider.class.getName(), sandboxes);
+        scriptEngineConf.put("compilerCustomizerProviders", compilerCustomizerProviderConf);
+        return scriptEngineConf;
+    }
+
+    private static Map<String, Object> getScriptEngineConfForTimedInterrupt() {
+        final Map<String,Object> scriptEngineConf = new HashMap<>();
+        final Map<String,Object> timedInterruptProviderConf = new HashMap<>();
+        final List<Object> config = new ArrayList<>();
+        config.add(1000);
+        timedInterruptProviderConf.put(TimedInterruptCustomizerProvider.class.getName(), config);
+        scriptEngineConf.put("compilerCustomizerProviders", timedInterruptProviderConf);
+        return scriptEngineConf;
+    }
+
     @Test
     public void shouldUseSimpleSandbox() throws Exception {
         final Cluster cluster = Cluster.open();
@@ -413,7 +432,27 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration
             client.submit("Thread.sleep(3000);'some-stuff-that-should not return'").all().join();
             fail("Should throw an exception.");
         } catch (RuntimeException re) {
-            assertTrue(ExceptionUtils.getRootCause(re).getMessage().startsWith("Script evaluation exceeded the configured threshold of 200 ms for request"));
+            assertThat(ExceptionUtils.getRootCause(re).getMessage(), startsWith("Script evaluation exceeded the configured 'scriptEvaluationTimeout' threshold of 200 ms for request"));
+
+            // validate that we can still send messages to the server
+            assertEquals(2, client.submit("1+1").all().join().get(0).getInt());
+        } finally {
+            cluster.close();
+        }
+    }
+
+    @Test
+    public void shouldReceiveFailureTimeOutOnScriptEvalOfOutOfControlLoop() throws Exception {
+        final Cluster cluster = Cluster.open();
+        final Client client = cluster.connect();
+
+        try {
+            // timeout configured for 1 second so the timed interrupt should trigger prior to the
+            // scriptEvaluationTimeout which is at 30 seconds by default
+            client.submit("while(true){}").all().join();
+            fail("Should throw an exception.");
+        } catch (RuntimeException re) {
+            assertEquals("Timeout during script evaluation triggered by TimedInterruptCustomizerProvider", ExceptionUtils.getRootCause(re).getMessage());
 
             // validate that we can still send messages to the server
             assertEquals(2, client.submit("1+1").all().join().get(0).getInt());
@@ -431,7 +470,7 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration
             client.submit("(0..<100000)").all().join();
             fail("Should throw an exception.");
         } catch (RuntimeException re) {
-            assertTrue(re.getCause().getMessage().endsWith("Serialization of the entire response exceeded the serializeResponseTimeout setting"));
+            assertTrue(re.getCause().getMessage().endsWith("Serialization of the entire response exceeded the 'serializeResponseTimeout' setting"));
 
             // validate that we can still send messages to the server
             assertEquals(2, client.submit("1+1").all().join().get(0).getInt());


[24/37] incubator-tinkerpop git commit: Updates to LICENSE and NOTICE.

Posted by sp...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d6f4645e/gremlin-server/src/main/static/LICENSE
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/static/LICENSE b/gremlin-server/src/main/static/LICENSE
new file mode 100644
index 0000000..5502044
--- /dev/null
+++ b/gremlin-server/src/main/static/LICENSE
@@ -0,0 +1,242 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed 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.
+
+========================================================================
+BSD-style Licenses
+========================================================================
+
+The Apache TinkerPop project bundles the following components under the BSD License:
+
+     jcabi-log (com.jcabi:jcabi-log:0.14 - http://www.jcabi.com/jcabi-log) - for details, see deps/jcabi-log
+     jcabi-manifests 1.1 (com.jcabi:jcabi-manifests:1.1 - http://www.jcabi.com/jcabi-manifests) - for details, see deps/jcabi-manifests
+     JLine (jline:jline:2.12 - https://github.com/jline/jline2) - for details, see deps/jline2
+     Kryo (com.esotericsoftware:kryo-shaded:3.0.1 - https://github.com/EsotericSoftware/kryo)
+       - shaded in gremlin-shaded to org.apache.tinkerpop.shaded.kryo
+       - for details, see deps/kryo
+     minlog (com.esotericsoftware:minlog:1.3.0 - https://github.com/EsotericSoftware/minlog)
+       - shaded in gremlin-shaded to org.apache.tinkerpop.shaded.minlog
+       - for details, see deps/minlog
+
+========================================================================
+MIT Licenses
+========================================================================
+
+The Apache TinkerPop project bundles the following components under the MIT License:
+
+     JCL 1.1.1 implemented over SLF4J (org.slf4j:jcl-over-slf4j:1.7.12 - http://www.slf4j.org) - for details, see deps/slf4j
+     SLF4J API Module (org.slf4j:slf4j-api:1.7.12 - http://www.slf4j.org) - for details, see deps/slf4j
+     SLF4J LOG4J-12 Binding (org.slf4j:slf4j-log4j12:1.7.12 - http://www.slf4j.org) - for details, see deps/slf4j
+     Foundation stylesheet for CodeRay (http://foundation.zurb.com) - for details, see deps/foundation
+     normalize.css 2.1.2 (http://necolas.github.io/normalize.css/) - for details, see deps/normalize
+
+========================================================================
+Other Licenses
+========================================================================
+
+The Apache TinkerPop project bundles the following components under the BSD/MIT License:
+
+     gmetric4j (info.ganglia.gmetric4j:gmetric4j:1.0.3 - http://github.com/ganglia/gmetric4j) - for details, see deps/gmetric4j
+
+The Apache TinkerPop project bundles the following components under the ISC License:
+
+     jBCrypt (org.mindrot:jbcrypt:0.3m - https://github.com/jeremyh/jBCrypt) - for details, see deps/jbcrypt
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d6f4645e/gremlin-server/src/main/static/NOTICE
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/static/NOTICE b/gremlin-server/src/main/static/NOTICE
new file mode 100644
index 0000000..b9b9a2e
--- /dev/null
+++ b/gremlin-server/src/main/static/NOTICE
@@ -0,0 +1,63 @@
+Apache TinkerPop (incubating)
+Copyright 2015-2016 The Apache Software Foundation.
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+------------------------------------------------------------------------
+Apache Commons Lang (AL ASF)
+------------------------------------------------------------------------
+This product includes software from the Spring Framework,
+under the Apache License 2.0 (see: StringUtils.containsWhitespace())
+
+------------------------------------------------------------------------
+Apache Groovy (AL ASF)
+------------------------------------------------------------------------
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+This product includes/uses ANTLR (http://www.antlr2.org/)
+developed by Terence Parr 1989-2006
+
+This product bundles icons from the famfamfam.com silk icons set
+http://www.famfamfam.com/lab/icons/silk/
+Licensed under the Creative Commons Attribution Licence v2.5
+http://creativecommons.org/licenses/by/2.5/
+
+------------------------------------------------------------------------
+Apache Ivy (AL ASF)
+------------------------------------------------------------------------
+Portions of Ivy were originally developed by
+Jayasoft SARL (http://www.jayasoft.fr/)
+and are licensed to the Apache Software Foundation under the
+"Software Grant License Agreement"
+
+SSH and SFTP support is provided by the JCraft JSch package,
+which is open source software, available under
+the terms of a BSD style license.
+The original software and related information is available
+at http://www.jcraft.com/jsch/.
+
+------------------------------------------------------------------------
+JavaTuples
+------------------------------------------------------------------------
+Copyright (c) 2010, The JAVATUPLES team (http://www.javatuples.org)
+
+------------------------------------------------------------------------
+Metrics
+------------------------------------------------------------------------
+Copyright 2010-2013 Coda Hale and Yammer, Inc., 2014-2015 Dropwizard Team
+
+This product includes software developed by Coda Hale and Yammer, Inc.
+
+This product includes code derived from the JSR-166 project (ThreadLocalRandom, Striped64,
+LongAdder), which was released with the following comments:
+
+    Written by Doug Lea with assistance from members of JCP JSR-166
+    Expert Group and released to the public domain, as explained at
+    http://creativecommons.org/publicdomain/zero/1.0/
+
+------------------------------------------------------------------------
+Netty
+------------------------------------------------------------------------
+Copyright 2014 The Netty Project
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d6f4645e/gremlin-server/src/main/static/deps/foundation
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/static/deps/foundation b/gremlin-server/src/main/static/deps/foundation
new file mode 100644
index 0000000..a54868c
--- /dev/null
+++ b/gremlin-server/src/main/static/deps/foundation
@@ -0,0 +1,22 @@
+Copyright (c) 2013-2016 ZURB, inc.
+
+MIT License
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d6f4645e/gremlin-server/src/main/static/deps/gmetric4j
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/static/deps/gmetric4j b/gremlin-server/src/main/static/deps/gmetric4j
new file mode 100644
index 0000000..fb3227f
--- /dev/null
+++ b/gremlin-server/src/main/static/deps/gmetric4j
@@ -0,0 +1,31 @@
+Title:		gmetric4j
+
+Copyright:
+
+Copyright (C) 2012 Daniel Pocock <da...@pocock.com.au>
+Copyright (c) 2008-2011 Jasper Humphrey <ja...@gmail.com>
+
+Based on:	jmxetric by Jasper Humphrey (BSD style license)
+
+License:             BSD terms
+
+    Copyright (C) 2010-2012 Daniel Pocock <da...@pocock.com.au>
+    Copyright (c) 2008-2011 Jasper Humphrey <ja...@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d6f4645e/gremlin-server/src/main/static/deps/jbcrypt
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/static/deps/jbcrypt b/gremlin-server/src/main/static/deps/jbcrypt
new file mode 100644
index 0000000..e0e23ed
--- /dev/null
+++ b/gremlin-server/src/main/static/deps/jbcrypt
@@ -0,0 +1,17 @@
+jBCrypt is subject to the following license:
+
+/*
+ * Copyright (c) 2006 Damien Miller <dj...@mindrot.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d6f4645e/gremlin-server/src/main/static/deps/jcabi-log
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/static/deps/jcabi-log b/gremlin-server/src/main/static/deps/jcabi-log
new file mode 100644
index 0000000..ece789e
--- /dev/null
+++ b/gremlin-server/src/main/static/deps/jcabi-log
@@ -0,0 +1,27 @@
+Copyright (c) 2012-2015, jcabi.com
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met: 1) Redistributions of source code must retain the above
+copyright notice, this list of conditions and the following
+disclaimer. 2) Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following
+disclaimer in the documentation and/or other materials provided
+with the distribution. 3) Neither the name of the jcabi.com nor
+the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written
+permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
+NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d6f4645e/gremlin-server/src/main/static/deps/jcabi-manifests
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/static/deps/jcabi-manifests b/gremlin-server/src/main/static/deps/jcabi-manifests
new file mode 100644
index 0000000..ece789e
--- /dev/null
+++ b/gremlin-server/src/main/static/deps/jcabi-manifests
@@ -0,0 +1,27 @@
+Copyright (c) 2012-2015, jcabi.com
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met: 1) Redistributions of source code must retain the above
+copyright notice, this list of conditions and the following
+disclaimer. 2) Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following
+disclaimer in the documentation and/or other materials provided
+with the distribution. 3) Neither the name of the jcabi.com nor
+the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written
+permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
+NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d6f4645e/gremlin-server/src/main/static/deps/jline2
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/static/deps/jline2 b/gremlin-server/src/main/static/deps/jline2
new file mode 100644
index 0000000..112aabf
--- /dev/null
+++ b/gremlin-server/src/main/static/deps/jline2
@@ -0,0 +1,34 @@
+Copyright (c) 2002-2012, the original author or authors.
+All rights reserved.
+
+http://www.opensource.org/licenses/bsd-license.php
+
+Redistribution and use in source and binary forms, with or
+without modification, are permitted provided that the following
+conditions are met:
+
+Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+
+Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with
+the distribution.
+
+Neither the name of JLine nor the names of its contributors
+may be used to endorse or promote products derived from this
+software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
+BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d6f4645e/gremlin-server/src/main/static/deps/kryo
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/static/deps/kryo b/gremlin-server/src/main/static/deps/kryo
new file mode 100644
index 0000000..3f6a160
--- /dev/null
+++ b/gremlin-server/src/main/static/deps/kryo
@@ -0,0 +1,10 @@
+Copyright (c) 2008, Nathan Sweet
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+    * Neither the name of Esoteric Software nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d6f4645e/gremlin-server/src/main/static/deps/minlog
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/static/deps/minlog b/gremlin-server/src/main/static/deps/minlog
new file mode 100644
index 0000000..3f6a160
--- /dev/null
+++ b/gremlin-server/src/main/static/deps/minlog
@@ -0,0 +1,10 @@
+Copyright (c) 2008, Nathan Sweet
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+    * Neither the name of Esoteric Software nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d6f4645e/gremlin-server/src/main/static/deps/normalize
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/static/deps/normalize b/gremlin-server/src/main/static/deps/normalize
new file mode 100644
index 0000000..4e3a191
--- /dev/null
+++ b/gremlin-server/src/main/static/deps/normalize
@@ -0,0 +1,7 @@
+Copyright (c) Nicolas Gallagher and Jonathan Neal
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d6f4645e/gremlin-server/src/main/static/deps/slf4j
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/static/deps/slf4j b/gremlin-server/src/main/static/deps/slf4j
new file mode 100644
index 0000000..d32467b
--- /dev/null
+++ b/gremlin-server/src/main/static/deps/slf4j
@@ -0,0 +1,21 @@
+ Copyright (c) 2004-2013 QOS.ch
+ All rights reserved.
+
+ Permission is hereby granted, free  of charge, to any person obtaining
+ a  copy  of this  software  and  associated  documentation files  (the
+ "Software"), to  deal in  the Software without  restriction, including
+ without limitation  the rights to  use, copy, modify,  merge, publish,
+ distribute,  sublicense, and/or sell  copies of  the Software,  and to
+ permit persons to whom the Software  is furnished to do so, subject to
+ the following conditions:
+
+ The  above  copyright  notice  and  this permission  notice  shall  be
+ included in all copies or substantial portions of the Software.
+
+ THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
+ EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
+ MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d6f4645e/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 0a26050..8f0bb2b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -276,6 +276,7 @@ limitations under the License.
                         <exclude>**/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/script/*.txt</exclude>
                         <exclude>**/src/main/resources/META-INF/services/**</exclude>
                         <exclude>**/src/main/ext/**</exclude>
+                        <exclude>**/src/main/static/**</exclude>
                         <exclude>**/_bsp/**</exclude>
                         <exclude>DEPENDENCIES</exclude>
                     </excludes>


[13/37] incubator-tinkerpop git commit: Made the email templates for votes a little more clear in dev docs.

Posted by sp...@apache.org.
Made the email templates for votes a little more clear in dev docs.


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

Branch: refs/heads/master
Commit: ed193170345a3c0cfcdcc8c56d287e546932a37d
Parents: 2478594
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Feb 11 10:42:59 2016 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Feb 11 10:42:59 2016 -0500

----------------------------------------------------------------------
 docs/src/dev/developer/release.asciidoc | 45 ++++++++++++++++++++++++++--
 1 file changed, 43 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/ed193170/docs/src/dev/developer/release.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/dev/developer/release.asciidoc b/docs/src/dev/developer/release.asciidoc
index 0069acc..a7ce055 100644
--- a/docs/src/dev/developer/release.asciidoc
+++ b/docs/src/dev/developer/release.asciidoc
@@ -157,13 +157,19 @@ Release & Promote
 . Wait for Apache Central to sync the jars and src (link:http://repo1.maven.org/maven2/org/apache/tinkerpop/tinkerpop/[http://repo1.maven.org/maven2/org/apache/tinkerpop/tinkerpop/]).
 . Announce release on `dev@`/`gremlin-users@` mailing lists and tweet from `@apachetinkerpop`
 
-Example `[VOTE]` email:
+Email Templates
+---------------
+
+Release VOTE
+~~~~~~~~~~~~
 
 ```
-[VOTE] TinkerPop xx.yy.zz Release
+Subject: [VOTE] TinkerPop xx.yy.zz Release
 
 Hello,
 
+We are happy to announce that TinkerPop xx.yy.zz is ready for release.
+
 The release artifacts can be found at this location:
 	https://dist.apache.org/repos/dist/dev/incubator/tinkerpop/xx.yy.zz/
 
@@ -193,3 +199,38 @@ My vote is +1.
 Thank you very much,
 <TinkerPop Committer Name>
 ```
+
+If the above email template is used for the "Incubator Vote", then it should include the following just after the
+"release notes":
+
+```
+Finally, the dev@tinkerpop [VOTE] thread can be found at this location:
+
+    https://pony-poc.apache.org/thread.html/...
+```
+
+where this link should point to the result of the VOTE.
+
+Dev Release RESULT VOTE
+~~~~~~~~~~~~~~~~~~~~~~~
+
+```
+Subject: [RESULT][VOTE] TinkerPop xx.yy.zz Release
+
+This vote is now closed with a total of X +1s, no +0s and no -1s. The results are:
+
+BINDING VOTES:
+
++1  (X -- list of voters)
+0   (0)
+-1  (0)
+
+NON-BINDING VOTES:
+
++1 (X -- list of voters)
+0  (0)
+-1 (0)
+
+Thank you very much,
+<TinkerPop Committer Name>
+```
\ No newline at end of file


[27/37] incubator-tinkerpop git commit: Added ConcurrentBindings implementation for Gremlin ScriptEngine.

Posted by sp...@apache.org.
Added ConcurrentBindings implementation for Gremlin ScriptEngine.

This Bindings implementation is used with the global bindings of the GremlinExecutor so that it can allow for concurrent modification.


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

Branch: refs/heads/master
Commit: 232b187417dba66d3dec9fec90b3d76f49b19ef2
Parents: d5d78c7
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Feb 12 14:05:37 2016 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Feb 12 14:05:37 2016 -0500

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 .../groovy/engine/ConcurrentBindings.java       | 42 ++++++++++
 .../gremlin/groovy/engine/GremlinExecutor.java  |  7 +-
 .../groovy/engine/GremlinExecutorTest.java      | 84 +++++++++++++++++---
 .../jsr223/GremlinGroovyScriptEngineTest.java   |  8 +-
 5 files changed, 126 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/232b1874/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 9e197c2..dd5b51b 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -27,6 +27,7 @@ TinkerPop 3.1.2 (NOT OFFICIALLY RELEASED YET)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 * `TraversalExplanation` is now `Serializable` and registered with `GryoMapper`.
+* Fixed a problem with global bindings in Gremlin Server which weren't properly designed to handle concurrent modification.
 * Deprecated `ScriptElementFactory` and made the local `StarGraph` globally available for `ScriptInputFormat`'s `parse()` method.
 * Improved reusability of unique test directory creation in `/target` for `AbstractGraphProvider`, which was formerly only available to Neo4j, by adding `makeTestDirectory()`.
 * Optimized memory-usage in `TraversalVertexProgram`.

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/232b1874/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/ConcurrentBindings.java
----------------------------------------------------------------------
diff --git a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/ConcurrentBindings.java b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/ConcurrentBindings.java
new file mode 100644
index 0000000..0c12ea4
--- /dev/null
+++ b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/ConcurrentBindings.java
@@ -0,0 +1,42 @@
+/*
+ * 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.groovy.engine;
+
+import javax.script.SimpleBindings;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+/**
+ * A {@code Bindings} that can be accessed concurrently by multiple threads. It is needed in cases where "global"
+ * bindings are required for the {@code ScriptEngine}.
+ *
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+public class ConcurrentBindings extends SimpleBindings {
+
+    public ConcurrentBindings() {
+        super(new ConcurrentHashMap<>());
+    }
+
+    public ConcurrentBindings(final Map<String, Object> m) {
+        // initialize the bindings first with a ConcurrentHashMap and then copy in the bindings
+        this();
+        this.putAll(m);
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/232b1874/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 49e2ac7..3d80a95 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
@@ -485,7 +485,7 @@ public class GremlinExecutor implements AutoCloseable {
         private BiConsumer<Bindings, Throwable> afterFailure = (b, e) -> {
         };
         private List<List<String>> use = new ArrayList<>();
-        private Bindings globalBindings = new SimpleBindings();
+        private Bindings globalBindings = new ConcurrentBindings();
 
         private Builder() {
         }
@@ -512,10 +512,11 @@ public class GremlinExecutor implements AutoCloseable {
         }
 
         /**
-         * Bindings to apply to every script evaluated.
+         * Bindings to apply to every script evaluated. Note that the entries of the supplied {@code Bindings} object
+         * will be copied into a newly created {@link ConcurrentBindings} object at the call of this method.
          */
         public Builder globalBindings(final Bindings bindings) {
-            this.globalBindings = bindings;
+            this.globalBindings = new ConcurrentBindings(bindings);
             return this;
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/232b1874/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutorTest.java
----------------------------------------------------------------------
diff --git a/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutorTest.java b/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutorTest.java
index fcab563..54e185a 100644
--- a/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutorTest.java
+++ b/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutorTest.java
@@ -23,8 +23,11 @@ import org.apache.tinkerpop.gremlin.TestHelper;
 import org.apache.tinkerpop.gremlin.groovy.jsr223.customizer.ThreadInterruptCustomizerProvider;
 import org.apache.tinkerpop.gremlin.groovy.jsr223.customizer.TimedInterruptCustomizerProvider;
 import org.javatuples.Pair;
-import org.javatuples.Triplet;
+import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.TestName;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import javax.script.Bindings;
 import javax.script.CompiledScript;
@@ -37,6 +40,7 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.CyclicBarrier;
 import java.util.concurrent.ExecutorService;
@@ -46,13 +50,14 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicInteger;
-import java.util.stream.Collectors;
 import java.util.stream.IntStream;
 
 import static org.hamcrest.CoreMatchers.instanceOf;
 import static org.hamcrest.CoreMatchers.not;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.contains;
+import static org.hamcrest.Matchers.greaterThan;
+import static org.hamcrest.core.Is.is;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNull;
@@ -69,7 +74,7 @@ public class GremlinExecutorTest {
 
     static {
         try {
-            final List<String> groovyScriptResources = Arrays.asList("GremlinExecutorInit.groovy");
+            final List<String> groovyScriptResources = Collections.singletonList("GremlinExecutorInit.groovy");
             for (final String fileName : groovyScriptResources) {
                 PATHS.put(fileName, TestHelper.generateTempFileFromResource(GremlinExecutorTest.class, fileName, "").getAbsolutePath());
             }
@@ -77,7 +82,7 @@ public class GremlinExecutorTest {
             e.printStackTrace();
         }
     }
-
+    /*
     @Test
     public void shouldEvalScript() throws Exception {
         final GremlinExecutor gremlinExecutor = GremlinExecutor.build().create();
@@ -102,14 +107,11 @@ public class GremlinExecutorTest {
 
     @Test
     public void shouldEvalFailingAssertionScript() throws Exception {
-        final GremlinExecutor gremlinExecutor = GremlinExecutor.build().create();
-        try {
+        try (GremlinExecutor gremlinExecutor = GremlinExecutor.build().create()) {
             gremlinExecutor.eval("assert 1==0").get();
             fail("Should have thrown an exception");
         } catch (Exception ex) {
             assertThat(ex.getCause(), instanceOf(AssertionError.class));
-        } finally {
-            gremlinExecutor.close();
         }
     }
 
@@ -597,14 +599,16 @@ public class GremlinExecutorTest {
         assertSame(service, gremlinExecutor.getScheduledExecutorService());
         gremlinExecutor.close();
     }
+    */
 
     @Test
     public void shouldAllowVariableReuseAcrossThreads() throws Exception {
         final ExecutorService service = Executors.newFixedThreadPool(8, testingThreadFactory);
         final GremlinExecutor gremlinExecutor = GremlinExecutor.build().create();
 
-        final int max = 256;
-        final List<Pair<Integer, List<Integer>>> futures = new ArrayList<>(max);
+        final AtomicBoolean failed = new AtomicBoolean(false);
+        final int max = 512;
+        final List<Pair<Integer, List<Integer>>> futures = Collections.synchronizedList(new ArrayList<>(max));
         IntStream.range(0, max).forEach(i -> {
             final int yValue = i * 2;
             final Bindings b = new SimpleBindings();
@@ -619,7 +623,61 @@ public class GremlinExecutorTest {
                         final List<Integer> result = (List<Integer>) gremlinExecutor.eval(script, b).get();
                         futures.add(Pair.with(i, result));
                     } catch (Exception ex) {
-                        throw new RuntimeException(ex);
+                        failed.set(true);
+                    }
+                });
+            } catch (Exception ex) {
+                throw new RuntimeException(ex);
+            }
+        });
+
+        // likely a concurrency exception if it occurs - and if it does then we've messed up because that's what this
+        // test is partially designed to protected against.
+        assertThat(failed.get(), is(false));
+        service.shutdown();
+        service.awaitTermination(30000, TimeUnit.MILLISECONDS);
+
+        assertEquals(max, futures.size());
+        futures.forEach(t -> {
+            assertEquals(t.getValue0(), t.getValue1().get(0));
+            assertEquals(t.getValue0() * 2, t.getValue1().get(1).intValue());
+            assertEquals(t.getValue0() * -1, t.getValue1().get(2).intValue());
+        });
+    }
+
+    @Test
+    public void shouldAllowConcurrentModificationOfGlobals() throws Exception {
+        // this test simulates a scenario that likely shouldn't happen - where globals are modified by multiple
+        // threads.  globals are created in a synchronized fashion typically but it's possible that someone
+        // could do something like this and this test validate that concurrency exceptions don't occur as a
+        // result
+        final ExecutorService service = Executors.newFixedThreadPool(8, testingThreadFactory);
+        final Bindings globals = new SimpleBindings();
+        globals.put("g", -1);
+        final GremlinExecutor gremlinExecutor = GremlinExecutor.build().globalBindings(globals).create();
+
+        final AtomicBoolean failed = new AtomicBoolean(false);
+        final int max = 512;
+        final List<Pair<Integer, List<Integer>>> futures = Collections.synchronizedList(new ArrayList<>(max));
+        IntStream.range(0, max).forEach(i -> {
+            final int yValue = i * 2;
+            final Bindings b = new SimpleBindings();
+            b.put("x", i);
+            b.put("y", yValue);
+            final int zValue = i * -1;
+
+            final String script = "z=" + zValue + ";[x,y,z,g]";
+            try {
+                service.submit(() -> {
+                    try {
+                        // modify the global in a separate thread
+                        gremlinExecutor.getGlobalBindings().put("g", i);
+                        gremlinExecutor.getGlobalBindings().put(Integer.toString(i), i);
+                        gremlinExecutor.getGlobalBindings().keySet().stream().filter(s -> i % 2 == 0 && !s.equals("g")).findFirst().ifPresent(globals::remove);
+                        final List<Integer> result = (List<Integer>) gremlinExecutor.eval(script, b).get();
+                        futures.add(Pair.with(i, result));
+                    } catch (Exception ex) {
+                        failed.set(true);
                     }
                 });
             } catch (Exception ex) {
@@ -630,11 +688,15 @@ public class GremlinExecutorTest {
         service.shutdown();
         service.awaitTermination(30000, TimeUnit.MILLISECONDS);
 
+        // likely a concurrency exception if it occurs - and if it does then we've messed up because that's what this
+        // test is partially designed to protected against.
+        assertThat(failed.get(), is(false));
         assertEquals(max, futures.size());
         futures.forEach(t -> {
             assertEquals(t.getValue0(), t.getValue1().get(0));
             assertEquals(t.getValue0() * 2, t.getValue1().get(1).intValue());
             assertEquals(t.getValue0() * -1, t.getValue1().get(2).intValue());
+            assertThat(t.getValue1().get(3).intValue(), greaterThan(-1));
         });
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/232b1874/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTest.java
----------------------------------------------------------------------
diff --git a/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTest.java b/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTest.java
index 3765d42..4740cd2 100644
--- a/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTest.java
+++ b/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTest.java
@@ -336,7 +336,8 @@ public class GremlinGroovyScriptEngineTest {
         final ExecutorService service = Executors.newFixedThreadPool(8, testingThreadFactory);
         final GremlinGroovyScriptEngine scriptEngine = new GremlinGroovyScriptEngine();
 
-        final int max = 256;
+        final AtomicBoolean failed = new AtomicBoolean(false);
+        final int max = 512;
         final List<Pair<Integer, List<Integer>>> futures = Collections.synchronizedList(new ArrayList<>(max));
         IntStream.range(0, max).forEach(i -> {
             final int yValue = i * 2;
@@ -352,7 +353,7 @@ public class GremlinGroovyScriptEngineTest {
                         final List<Integer> result = (List<Integer>) scriptEngine.eval(script, b);
                         futures.add(Pair.with(i, result));
                     } catch (Exception ex) {
-                        throw new RuntimeException(ex);
+                        failed.set(true);
                     }
                 });
             } catch (Exception ex) {
@@ -363,6 +364,9 @@ public class GremlinGroovyScriptEngineTest {
         service.shutdown();
         assertThat(service.awaitTermination(120000, TimeUnit.MILLISECONDS), is(true));
 
+        // likely a concurrency exception if it occurs - and if it does then we've messed up because that's what this
+        // test is partially designed to protected against.
+        assertThat(failed.get(), is(false));
         assertEquals(max, futures.size());
         futures.forEach(t -> {
             assertEquals(t.getValue0(), t.getValue1().get(0));


[11/37] incubator-tinkerpop git commit: Merge branch 'TINKERPOP-1126' of https://github.com/kieransherlock/incubator-tinkerpop into TINKERPOP-1125-to-1127

Posted by sp...@apache.org.
Merge branch 'TINKERPOP-1126' of https://github.com/kieransherlock/incubator-tinkerpop into TINKERPOP-1125-to-1127


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

Branch: refs/heads/master
Commit: ec6499f313c3be808e26ed681c68faeb48515adc
Parents: bf90af0 457ef48
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Feb 10 07:27:56 2016 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 10 07:27:56 2016 -0500

----------------------------------------------------------------------
 .../apache/tinkerpop/gremlin/driver/Host.java   | 23 ++++++++++++--------
 .../AbstractGremlinServerIntegrationTest.java   |  4 ++++
 .../server/GremlinServerIntegrateTest.java      | 19 ++++++++++++----
 3 files changed, 33 insertions(+), 13 deletions(-)
----------------------------------------------------------------------



[26/37] incubator-tinkerpop git commit: Update docs on LICENSE/NOTICE to mention including copies of the license.

Posted by sp...@apache.org.
Update docs on LICENSE/NOTICE to mention including copies of the license.


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

Branch: refs/heads/master
Commit: d5d78c7ca8e4fc91c9d11d28be906503307f198c
Parents: d6f4645
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Feb 12 12:27:32 2016 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Feb 12 12:27:32 2016 -0500

----------------------------------------------------------------------
 docs/src/dev/developer/contributing.asciidoc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d5d78c7c/docs/src/dev/developer/contributing.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/dev/developer/contributing.asciidoc b/docs/src/dev/developer/contributing.asciidoc
index b78af98..6186c51 100644
--- a/docs/src/dev/developer/contributing.asciidoc
+++ b/docs/src/dev/developer/contributing.asciidoc
@@ -386,7 +386,8 @@ if the distribution has a file added to it.  Such a situation may arise from sev
 likely come from the addition of a source file from another library.
 
 * If the file being bundled is Apache licensed, then add an entry to NOTICE.
-* If the file being bundled is under a different approved license, then add an entry to LICENSE.
+* If the file being bundled is under a different approved license, then add an entry to LICENSE and include a copy of
+that LICENSE in the root `/deps` directory of the code repository.
 
 Binary LICENSE and NOTICE
 ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -399,7 +400,8 @@ distributions, either:
 * target/apache-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.
+license (e.g. BSD, MIT) then it should be added in the pattern already defined. A copy of the LICENSE should be
+added to the `<project>/static/deps` directory of the code repository.
 
 To determine if changes are required to the NOTICE, first check if the bundled jar has a NOTICE file in it (typically
 found in `/META-INF` directory of the jar).


[29/37] incubator-tinkerpop git commit: Merge remote-tracking branch 'origin/TINKERPOP-1138' into tp31

Posted by sp...@apache.org.
Merge remote-tracking branch 'origin/TINKERPOP-1138' into tp31

Conflicts:
	CHANGELOG.asciidoc
	gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java


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

Branch: refs/heads/master
Commit: f683d9515bd060c1c7021e3418d085a6889774ed
Parents: dea9327 330c521
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Feb 12 17:51:27 2016 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Feb 12 17:51:27 2016 -0500

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 .../gremlin/groovy/engine/GremlinExecutor.java  |  2 +-
 .../TimedInterruptCustomizerProvider.java       |  1 +
 .../TimedInterruptTimeoutException.java         | 34 +++++++++++++
 .../groovy/engine/GremlinExecutorTest.java      |  3 +-
 ...linGroovyScriptEngineTimedInterruptTest.java |  7 +--
 .../server/op/AbstractEvalOpProcessor.java      | 12 +++--
 .../server/GremlinServerIntegrateTest.java      | 51 ++++++++++++++++----
 8 files changed, 93 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/f683d951/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --cc CHANGELOG.asciidoc
index 0238a47,0de6caa..1b23566
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@@ -26,14 -26,7 +26,15 @@@ image::https://raw.githubusercontent.co
  TinkerPop 3.1.2 (NOT OFFICIALLY RELEASED YET)
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
 +* Added GraphSON serializers for the `java.time.*` classes.
 +* Improved the logging of the Gremlin Server REST endpoint as it pertained to script execution failures.
 +* `TraversalExplanation` is now `Serializable` and registered with `GryoMapper`.
 +* Deprecated `ScriptElementFactory` and made the local `StarGraph` globally available for `ScriptInputFormat`'s `parse()` method.
 +* Improved reusability of unique test directory creation in `/target` for `AbstractGraphProvider`, which was formerly only available to Neo4j, by adding `makeTestDirectory()`.
 +* Optimized memory-usage in `TraversalVertexProgram`.
 +* `Graph` instances are not merely "closed" at the end of tests, they are "cleared" via `GraphProvider.clear()`, which should in turn cleans up old data for an implementation.
 +* Greatly reduced the amount of objects required in OLAP for the `ReducingBarrierStep` steps.
+ * Improved messages for the different distinct "timeouts" that a user can encounter with Gremlin Server.
  
  [[release-3.1.1-incubating]]
  TinkerPop 3.1.1 (Release Date: February 8, 2016)

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/f683d951/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
----------------------------------------------------------------------
diff --cc gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
index 1d3d650,83dfa46..7e6330f
--- 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
@@@ -61,9 -61,7 +62,9 @@@ import java.util.stream.IntStream
  
  import static org.hamcrest.CoreMatchers.containsString;
  import static org.hamcrest.CoreMatchers.is;
- import static org.hamcrest.CoreMatchers.startsWith;
 +import static org.hamcrest.core.IsNot.not;
 +import static org.hamcrest.core.StringEndsWith.endsWith;
+ import static org.hamcrest.core.StringStartsWith.startsWith;
  import static org.junit.Assert.*;
  import static org.junit.Assume.assumeThat;
  
@@@ -401,28 -424,58 +419,41 @@@ public class GremlinServerIntegrateTes
      }
  
      @Test
 +    @SuppressWarnings("unchecked")
      public void shouldReceiveFailureTimeOutOnScriptEval() throws Exception {
 -        final Cluster cluster = Cluster.open();
 -        final Client client = cluster.connect();
 -
 -        try {
 -            client.submit("Thread.sleep(3000);'some-stuff-that-should not return'").all().join();
 -            fail("Should throw an exception.");
 -        } catch (RuntimeException re) {
 -            assertThat(ExceptionUtils.getRootCause(re).getMessage(), startsWith("Script evaluation exceeded the configured 'scriptEvaluationTimeout' threshold of 200 ms for request"));
 +        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 threshold of 200 ms for request"));
++            assertThat(responses.get(0).getStatus().getMessage(), startsWith("Script evaluation exceeded the configured 'scriptEvaluationTimeout' threshold of 200 ms for request"));
+ 
+             // validate that we can still send messages to the server
 -            assertEquals(2, client.submit("1+1").all().join().get(0).getInt());
 -        } finally {
 -            cluster.close();
++            assertEquals(2, ((List<Integer>) client.submit("1+1").get(0).getResult().getData()).get(0).intValue());
+         }
+     }
+ 
+     @Test
+     public void shouldReceiveFailureTimeOutOnScriptEvalOfOutOfControlLoop() throws Exception {
 -        final Cluster cluster = Cluster.open();
 -        final Client client = cluster.connect();
 -
 -        try {
++        try (SimpleClient client = new WebSocketClient()){
+             // timeout configured for 1 second so the timed interrupt should trigger prior to the
+             // scriptEvaluationTimeout which is at 30 seconds by default
 -            client.submit("while(true){}").all().join();
 -            fail("Should throw an exception.");
 -        } catch (RuntimeException re) {
 -            assertEquals("Timeout during script evaluation triggered by TimedInterruptCustomizerProvider", ExceptionUtils.getRootCause(re).getMessage());
++            final List<ResponseMessage> responses = client.submit("while(true){}");
++            assertThat(responses.get(0).getStatus().getMessage(), startsWith("Timeout during script evaluation triggered by TimedInterruptCustomizerProvider"));
  
              // validate that we can still send messages to the server
 -            assertEquals(2, client.submit("1+1").all().join().get(0).getInt());
 -        } finally {
 -            cluster.close();
 +            assertEquals(2, ((List<Integer>) client.submit("1+1").get(0).getResult().getData()).get(0).intValue());
          }
      }
  
      @Test
 +    @SuppressWarnings("unchecked")
      public void shouldReceiveFailureTimeOutOnTotalSerialization() throws Exception {
 -        final Cluster cluster = Cluster.open();
 -        final Client client = cluster.connect();
 +        try (SimpleClient client = new WebSocketClient()){
 +            final List<ResponseMessage> responses = client.submit("(0..<100000)");
  
 -        try {
 -            client.submit("(0..<100000)").all().join();
 -            fail("Should throw an exception.");
 -        } catch (RuntimeException re) {
 -            assertTrue(re.getCause().getMessage().endsWith("Serialization of the entire response exceeded the 'serializeResponseTimeout' setting"));
 +            // the last message should contain the error
-             assertThat(responses.get(responses.size() - 1).getStatus().getMessage(), endsWith("Serialization of the entire response exceeded the serializeResponseTimeout setting"));
++            assertThat(responses.get(responses.size() - 1).getStatus().getMessage(), endsWith("Serialization of the entire response exceeded the 'serializeResponseTimeout' setting"));
  
              // validate that we can still send messages to the server
 -            assertEquals(2, client.submit("1+1").all().join().get(0).getInt());
 -        } finally {
 -            cluster.close();
 +            assertEquals(2, ((List<Integer>) client.submit("1+1").get(0).getResult().getData()).get(0).intValue());
          }
      }
  


[15/37] incubator-tinkerpop git commit: Added the "result summary" to the email template for release vote.

Posted by sp...@apache.org.
Added the "result summary" to the email template for release vote.


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

Branch: refs/heads/master
Commit: c590e7a62ff2057487eb67ea29d3fdd56bf021ff
Parents: 8bb113a
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Feb 11 11:00:48 2016 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Feb 11 11:00:48 2016 -0500

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


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/c590e7a6/docs/src/dev/developer/release.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/dev/developer/release.asciidoc b/docs/src/dev/developer/release.asciidoc
index 58118d8..af2e24e 100644
--- a/docs/src/dev/developer/release.asciidoc
+++ b/docs/src/dev/developer/release.asciidoc
@@ -210,6 +210,8 @@ If the above email template is used for the "Incubator Vote", then it should inc
 Finally, the dev@tinkerpop [VOTE] thread can be found at this location:
 
     https://pony-poc.apache.org/thread.html/...
+
+Result summary: +X (Y binding, Z non-binding), 0 (0), -1 (0)
 ```
 
 where this link should point to the result of the VOTE.


[06/37] incubator-tinkerpop git commit: Merge remote-tracking branch 'origin/tp31' into TINKERPOP-1138

Posted by sp...@apache.org.
Merge remote-tracking branch 'origin/tp31' into TINKERPOP-1138


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

Branch: refs/heads/master
Commit: bad3af7ca2c57057995c4fb7f183bdc41f41ff72
Parents: 89e159b 1286b4f
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Feb 9 11:58:23 2016 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Feb 9 11:58:23 2016 -0500

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



[12/37] incubator-tinkerpop git commit: Use GraphProvider.clear() to auto-clear graphs created in tests

Posted by sp...@apache.org.
Use GraphProvider.clear() to auto-clear graphs created in tests

Was formerlly just calling Graph.close() which wasn't enough to actually empty graphs of data. This led to test errors for some graph providers.  This change actually calls GraphProvider.clear() which by definition should empty a graph of data at the end of a test.


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

Branch: refs/heads/master
Commit: 597c350459cf0ade1791180b0660d415064e17c4
Parents: 51140a4
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Feb 10 14:51:20 2016 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 10 14:51:20 2016 -0500

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 .../upgrade/release-3.1.x-incubating.asciidoc   | 26 ++++++++++++++++++++
 .../tinkerpop/gremlin/AbstractGremlinTest.java  |  2 +-
 .../apache/tinkerpop/gremlin/GraphManager.java  | 26 ++++++++++++--------
 .../apache/tinkerpop/gremlin/GraphProvider.java |  3 +++
 .../neo4j/AbstractNeo4jGraphProvider.java       |  3 +--
 6 files changed, 48 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/597c3504/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 0cd221f..fc53b72 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -27,6 +27,7 @@ TinkerPop 3.1.2 (NOT OFFICIALLY RELEASED YET)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 * Optimized memory-usage in `TraversalVertexProgram`.
+* `Graph` instances are not merely "closed" at the end of tests, they are "cleared" via `GraphProvider.clear()`, which should in turn cleans up old data for an implementation.
 * Greatly reduced the amount of objects required in OLAP for the `ReducingBarrierStep` steps.
 
 [[release-3.1.1-incubating]]

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/597c3504/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 280d760..840d20c 100644
--- a/docs/src/upgrade/release-3.1.x-incubating.asciidoc
+++ b/docs/src/upgrade/release-3.1.x-incubating.asciidoc
@@ -22,6 +22,32 @@ image::https://raw.githubusercontent.com/apache/incubator-tinkerpop/master/docs/
 
 *A 187 On The Undercover Gremlinz*
 
+TinkerPop 3.1.2
+---------------
+
+*Release Date: NOT OFFICIALLY RELEASED YET*
+
+Please see the link:https://github.com/apache/incubator-tinkerpop/blob/3.1.1-incubating/CHANGELOG.asciidoc#tinkerpop-312-release-date-XXXXXXXXXXXXXXXXXXXXXXXXXX[changelog] for a complete list of all the modifications that are part of this release.
+
+Upgrading for Providers
+~~~~~~~~~~~~~~~~~~~~~~~
+
+IMPORTANT: It is recommended that providers also review all the upgrade instructions specified for users. Many of the
+changes there may prove important for the provider's implementation.
+
+Graph System Providers
+^^^^^^^^^^^^^^^^^^^^^^
+
+GraphProvider.clear() Semantics
++++++++++++++++++++++++++++++++
+
+The semantics of the various `clear()` methods on `GraphProvider` didn't really change, but it would be worth reviewing
+their implementations to ensure that implementations can be called successfully in an idempotent fashion. Multiple
+calls to `clear()` may occur for a single test on the same `Graph` instance, as `3.1.1-incubating` introduced an
+automated method for clearing graphs at the end of a test and some tests call `clear()` manually.
+
+See: link:https://issues.apache.org/jira/browse/TINKERPOP-1146[TINKERPOP-1146]
+
 TinkerPop 3.1.1
 ---------------
 

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/597c3504/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinTest.java
index 14b1bcf..49a03e1 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinTest.java
@@ -138,7 +138,7 @@ public abstract class AbstractGremlinTest {
             // which wraps injected GraphProviders with a ManagedGraphProvider instance. If this doesn't happen, there
             // is no way to trace open graphs.
             if(graphProvider instanceof GraphManager.ManagedGraphProvider)
-                ((GraphManager.ManagedGraphProvider)graphProvider).tryCloseGraphs();
+                ((GraphManager.ManagedGraphProvider)graphProvider).tryClearGraphs();
             else
                 logger.warn("The {} is not of type ManagedGraphProvider and therefore graph instances may leak between test cases.", graphProvider.getClass());
 

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/597c3504/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/GraphManager.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/GraphManager.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/GraphManager.java
index 39524bf..55ffcf8 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/GraphManager.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/GraphManager.java
@@ -24,6 +24,9 @@ import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
 import org.apache.tinkerpop.gremlin.structure.Element;
 import org.apache.tinkerpop.gremlin.structure.Graph;
+import org.javatuples.Pair;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -65,22 +68,25 @@ public class GraphManager {
     /**
      * This class provides a way to intercepts calls to {@link Graph} implementation's {@link GraphProvider} instances.
      * When {@link #openTestGraph(Configuration)} is called the created object is stored in a list and when tests are
-     * complete the {@link #tryCloseGraphs()} is called. When this is called, an attempt is made to close all open graphs.
+     * complete the {@link #tryClearGraphs()} is called. When this is called, an attempt is made to close all open graphs.
      */
     public static class ManagedGraphProvider implements GraphProvider {
+        private static final Logger logger = LoggerFactory.getLogger(ManagedGraphProvider.class);
         private final GraphProvider innerGraphProvider;
-        private final List<Graph> openGraphs = new ArrayList<>();
+        private final List<Pair<Graph, Configuration>> openGraphs = new ArrayList<>();
 
         public ManagedGraphProvider(final GraphProvider innerGraphProvider){
             this.innerGraphProvider = innerGraphProvider;
         }
 
-        public void tryCloseGraphs(){
-            for(Graph graph : openGraphs) {
+        public void tryClearGraphs(){
+            for(Pair<Graph, Configuration> p : openGraphs) {
                 try {
-                    graph.close();
+                    innerGraphProvider.clear(p.getValue0(), p.getValue1());
                 }catch (Exception e){
-                    e.printStackTrace();
+                    logger.warn(String.format("Automatic close of Graph instance [%s] and config [%s] generated failure.",
+                            p.getValue0() != null ? p.getValue0().toString() : "null",
+                            p.getValue1() != null ? p.getValue1().toString() : "null"), e);
                 }
             }
         }
@@ -102,15 +108,15 @@ public class GraphManager {
 
         @Override
         public Graph standardTestGraph(final Class<?> test, final String testMethodName, final LoadGraphWith.GraphData loadGraphWith) {
-            final Graph graph = innerGraphProvider.standardTestGraph(test, testMethodName, loadGraphWith);
-            openGraphs.add(graph);
-            return graph;
+            // call the ManagedGraphProvider.openTestGraph() so that the created Graph/Configuration instances
+            // are tracked
+            return openTestGraph(standardGraphConfiguration(test, testMethodName, loadGraphWith));
         }
 
         @Override
         public Graph openTestGraph(final Configuration config) {
             final Graph graph = innerGraphProvider.openTestGraph(config);
-            openGraphs.add(graph);
+            openGraphs.add(Pair.with(graph, config));
             return graph;
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/597c3504/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/GraphProvider.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/GraphProvider.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/GraphProvider.java
index 1d343c8..f14fb96 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/GraphProvider.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/GraphProvider.java
@@ -152,12 +152,15 @@ public interface GraphProvider {
 
     /**
      * Clears a {@link Graph} of all data and settings.  Implementations will have different ways of handling this.
+     * It is typically expected that {@link Graph#close()} will be called and open transactions will be closed.
      * For a brute force approach, implementers can simply delete data directories provided in the configuration.
      * Implementers may choose a more elegant approach if it exists.
      * <p/>
      * Implementations should be able to accept an argument of null for the Graph, in which case the only action
      * that can be performed is a clear given the configuration.  The method will typically be called this way
      * as clean up task on setup to ensure that a persisted graph has a clear space to create a test graph.
+     * <p/>
+     * Calls to this method may occur multiple times for a specific test. Develop this method to be idempotent.
      */
     public void clear(final Graph graph, final Configuration configuration) throws Exception;
 

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/597c3504/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/AbstractNeo4jGraphProvider.java
----------------------------------------------------------------------
diff --git a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/AbstractNeo4jGraphProvider.java b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/AbstractNeo4jGraphProvider.java
index 82a9801..ebe8099 100644
--- a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/AbstractNeo4jGraphProvider.java
+++ b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/AbstractNeo4jGraphProvider.java
@@ -57,8 +57,7 @@ public abstract class AbstractNeo4jGraphProvider extends AbstractGraphProvider {
     @Override
     public void clear(final Graph graph, final Configuration configuration) throws Exception {
         if (null != graph) {
-            if (graph.features().graph().supportsTransactions() && graph.tx().isOpen())
-                graph.tx().rollback();
+            if (graph.tx().isOpen()) graph.tx().rollback();
             graph.close();
         }
 


[25/37] incubator-tinkerpop git commit: Updates to LICENSE and NOTICE.

Posted by sp...@apache.org.
Updates to LICENSE and NOTICE.

Moved to static/ directories and included copies of actual non-Apache licenses with references to them in the various TinkerPop LICENSEs.  Added version to LICENSE for each dependency. Altered the assembly files to include /deps into the zip distributions.

http://mail-archives.apache.org/mod_mbox/incubator-general/201602.mbox/%3C8997E0D3-F844-44B1-B19A-955E246D6ABD%40classsoftware.com%3E


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

Branch: refs/heads/master
Commit: d6f4645e7b2e8cb7d391e0b008043743d6c03651
Parents: ec4f489
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Feb 12 12:17:03 2016 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Feb 12 12:17:03 2016 -0500

----------------------------------------------------------------------
 LICENSE                                         |  23 +-
 deps/normalize                                  |   7 +
 gremlin-console/src/assembly/distribution.xml   |   8 +-
 gremlin-console/src/main/LICENSE                | 273 ------------------
 gremlin-console/src/main/NOTICE                 |  62 -----
 gremlin-console/src/main/static/LICENSE         | 238 ++++++++++++++++
 gremlin-console/src/main/static/NOTICE          |  62 +++++
 gremlin-console/src/main/static/deps/foundation |  22 ++
 gremlin-console/src/main/static/deps/jbcrypt    |  17 ++
 gremlin-console/src/main/static/deps/jcabi-log  |  27 ++
 .../src/main/static/deps/jcabi-manifests        |  27 ++
 gremlin-console/src/main/static/deps/jline2     |  34 +++
 gremlin-console/src/main/static/deps/kryo       |  10 +
 gremlin-console/src/main/static/deps/minlog     |  10 +
 gremlin-console/src/main/static/deps/normalize  |   7 +
 gremlin-console/src/main/static/deps/slf4j      |  21 ++
 gremlin-server/src/assembly/distribution.xml    |   8 +-
 gremlin-server/src/main/LICENSE                 | 274 -------------------
 gremlin-server/src/main/NOTICE                  |  63 -----
 gremlin-server/src/main/static/LICENSE          | 242 ++++++++++++++++
 gremlin-server/src/main/static/NOTICE           |  63 +++++
 gremlin-server/src/main/static/deps/foundation  |  22 ++
 gremlin-server/src/main/static/deps/gmetric4j   |  31 +++
 gremlin-server/src/main/static/deps/jbcrypt     |  17 ++
 gremlin-server/src/main/static/deps/jcabi-log   |  27 ++
 .../src/main/static/deps/jcabi-manifests        |  27 ++
 gremlin-server/src/main/static/deps/jline2      |  34 +++
 gremlin-server/src/main/static/deps/kryo        |  10 +
 gremlin-server/src/main/static/deps/minlog      |  10 +
 gremlin-server/src/main/static/deps/normalize   |   7 +
 gremlin-server/src/main/static/deps/slf4j       |  21 ++
 pom.xml                                         |   1 +
 32 files changed, 1007 insertions(+), 698 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d6f4645e/LICENSE
----------------------------------------------------------------------
diff --git a/LICENSE b/LICENSE
index 6adae58..05f4a6e 100644
--- a/LICENSE
+++ b/LICENSE
@@ -207,25 +207,4 @@ MIT Licenses
 
 The Apache TinkerPop project bundles the following components under the MIT License:
 
-     normalize.css (http://necolas.github.io/normalize.css/)
-
-All rights reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
+     normalize.css 2.1.2 (http://necolas.github.io/normalize.css/) - for details, see deps/normalize
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d6f4645e/deps/normalize
----------------------------------------------------------------------
diff --git a/deps/normalize b/deps/normalize
new file mode 100644
index 0000000..4e3a191
--- /dev/null
+++ b/deps/normalize
@@ -0,0 +1,7 @@
+Copyright (c) Nicolas Gallagher and Jonathan Neal
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d6f4645e/gremlin-console/src/assembly/distribution.xml
----------------------------------------------------------------------
diff --git a/gremlin-console/src/assembly/distribution.xml b/gremlin-console/src/assembly/distribution.xml
index 29142ce..0f5932e 100644
--- a/gremlin-console/src/assembly/distribution.xml
+++ b/gremlin-console/src/assembly/distribution.xml
@@ -30,6 +30,10 @@ limitations under the License.
             </includes>
         </fileSet>
         <fileSet>
+            <directory>src/main/static/deps</directory>
+            <outputDirectory>deps</outputDirectory>
+        </fileSet>
+        <fileSet>
             <directory>target/apache-${project.artifactId}-${project.version}-standalone/conf</directory>
             <outputDirectory>conf</outputDirectory>
         </fileSet>
@@ -56,11 +60,11 @@ limitations under the License.
     </fileSets>
     <files>
         <file>
-            <source>src/main/LICENSE</source>
+            <source>src/main/static/LICENSE</source>
             <outputDirectory></outputDirectory>
         </file>
         <file>
-            <source>src/main/NOTICE</source>
+            <source>src/main/static/NOTICE</source>
             <outputDirectory></outputDirectory>
         </file>
         <file>

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d6f4645e/gremlin-console/src/main/LICENSE
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/LICENSE b/gremlin-console/src/main/LICENSE
deleted file mode 100644
index 2adef32..0000000
--- a/gremlin-console/src/main/LICENSE
+++ /dev/null
@@ -1,273 +0,0 @@
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed 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.
-
-========================================================================
-BSD-style Licenses
-========================================================================
-
-The Apache TinkerPop project bundles the following components under the BSD License:
-
-     jBCrypt (org.mindrot:jbcrypt - https://github.com/jeremyh/jBCrypt)
-     jcabi-log (com.jcabi:jcabi-log - http://www.jcabi.com/jcabi-log)
-     jcabi-manifests (com.jcabi:jcabi-manifests - http://www.jcabi.com/jcabi-manifests)
-     JLine (jline:jline - http://nexus.sonatype.org/oss-repository-hosting.html/jline)
-     Kryo (com.esotericsoftware:kryo-shaded - https://github.com/EsotericSoftware/kryo) - shaded in gremlin-shaded to org.apache.tinkerpop.shaded.kryo
-     minlog (com.esotericsoftware:minlog - https://github.com/EsotericSoftware/minlog) - shaded in gremlin-shaded to org.apache.tinkerpop.shaded.minlog
-
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met: 1) Redistributions of source code must retain the above
-copyright notice, this list of conditions and the following
-disclaimer. 2) Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following
-disclaimer in the documentation and/or other materials provided
-with the distribution. 3) Neither the name of the jcabi.com nor
-the names of its contributors may be used to endorse or promote
-products derived from this software without specific prior written
-permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
-NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
-THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
-OF THE POSSIBILITY OF SUCH DAMAGE.
-
-========================================================================
-MIT Licenses
-========================================================================
-
-The Apache TinkerPop project bundles the following components under the MIT License:
-
-     JCL 1.1.1 implemented over SLF4J (org.slf4j:jcl-over-slf4j - http://www.slf4j.org)
-     SLF4J API Module (org.slf4j:slf4j-api - http://www.slf4j.org)
-     SLF4J LOG4J-12 Binding (org.slf4j:slf4j-log4j12 - http://www.slf4j.org)
-
-All rights reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d6f4645e/gremlin-console/src/main/NOTICE
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/NOTICE b/gremlin-console/src/main/NOTICE
deleted file mode 100644
index 51d06c8..0000000
--- a/gremlin-console/src/main/NOTICE
+++ /dev/null
@@ -1,62 +0,0 @@
-Apache TinkerPop (incubating)
-Copyright 2015-2016 The Apache Software Foundation.
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-------------------------------------------------------------------------
-Apache Commons Codec (AL ASF)
-------------------------------------------------------------------------
-src/test/org/apache/commons/codec/language/DoubleMetaphoneTest.java
-contains test data from http://aspell.net/test/orig/batch0.tab.
-Copyright (C) 2002 Kevin Atkinson (kevina@gnu.org)
-
-------------------------------------------------------------------------
-Apache Commons Lang (AL ASF)
-------------------------------------------------------------------------
-This product includes software from the Spring Framework,
-under the Apache License 2.0 (see: StringUtils.containsWhitespace())
-
-------------------------------------------------------------------------
-Apache Groovy (AL ASF)
-------------------------------------------------------------------------
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-This product includes/uses ANTLR (http://www.antlr2.org/)
-developed by Terence Parr 1989-2006
-
-This product bundles icons from the famfamfam.com silk icons set
-http://www.famfamfam.com/lab/icons/silk/
-Licensed under the Creative Commons Attribution Licence v2.5
-http://creativecommons.org/licenses/by/2.5/
-
-------------------------------------------------------------------------
-Apache Http Components Core (AL ASF)
-------------------------------------------------------------------------
-This project contains annotations derived from JCIP-ANNOTATIONS
-Copyright (c) 2005 Brian Goetz and Tim Peierls. See http://www.jcip.net
-
-------------------------------------------------------------------------
-Apache Ivy (AL ASF)
-------------------------------------------------------------------------
-Portions of Ivy were originally developed by
-Jayasoft SARL (http://www.jayasoft.fr/)
-and are licensed to the Apache Software Foundation under the
-"Software Grant License Agreement"
-
-SSH and SFTP support is provided by the JCraft JSch package,
-which is open source software, available under
-the terms of a BSD style license.
-The original software and related information is available
-at http://www.jcraft.com/jsch/.
-
-------------------------------------------------------------------------
-JavaTuples
-------------------------------------------------------------------------
-Copyright (c) 2010, The JAVATUPLES team (http://www.javatuples.org)
-
-------------------------------------------------------------------------
-Netty
-------------------------------------------------------------------------
-Copyright 2014 The Netty Project
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d6f4645e/gremlin-console/src/main/static/LICENSE
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/static/LICENSE b/gremlin-console/src/main/static/LICENSE
new file mode 100644
index 0000000..2116ef4
--- /dev/null
+++ b/gremlin-console/src/main/static/LICENSE
@@ -0,0 +1,238 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed 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.
+
+========================================================================
+BSD-style Licenses
+========================================================================
+
+The Apache TinkerPop project bundles the following components under the BSD License:
+
+     jcabi-log (com.jcabi:jcabi-log:0.14 - http://www.jcabi.com/jcabi-log) - for details, see deps/jcabi-log
+     jcabi-manifests 1.1 (com.jcabi:jcabi-manifests:1.1 - http://www.jcabi.com/jcabi-manifests) - for details, see deps/jcabi-manifests
+     JLine (jline:jline:2.12 - https://github.com/jline/jline2) - for details, see deps/jline2
+     Kryo (com.esotericsoftware:kryo-shaded:3.0.1 - https://github.com/EsotericSoftware/kryo)
+       - shaded in gremlin-shaded to org.apache.tinkerpop.shaded.kryo
+       - for details, see deps/kryo
+     minlog (com.esotericsoftware:minlog:1.3.0 - https://github.com/EsotericSoftware/minlog)
+       - shaded in gremlin-shaded to org.apache.tinkerpop.shaded.minlog
+       - for details, see deps/minlog
+
+========================================================================
+MIT Licenses
+========================================================================
+
+The Apache TinkerPop project bundles the following components under the MIT License:
+
+     JCL 1.1.1 implemented over SLF4J (org.slf4j:jcl-over-slf4j:1.7.12 - http://www.slf4j.org) - for details, see deps/slf4j
+     SLF4J API Module (org.slf4j:slf4j-api:1.7.12 - http://www.slf4j.org) - for details, see deps/slf4j
+     SLF4J LOG4J-12 Binding (org.slf4j:slf4j-log4j12:1.7.12 - http://www.slf4j.org) - for details, see deps/slf4j
+     Foundation stylesheet for CodeRay (http://foundation.zurb.com) - for details, see deps/foundation
+     normalize.css 2.1.2 (http://necolas.github.io/normalize.css/) - for details, see deps/normalize
+
+========================================================================
+Other Licenses
+========================================================================
+
+The Apache TinkerPop project bundles the following components under the ISC License:
+
+     jBCrypt (org.mindrot:jbcrypt:0.3m - https://github.com/jeremyh/jBCrypt) - for details, see deps/jbcrypt
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d6f4645e/gremlin-console/src/main/static/NOTICE
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/static/NOTICE b/gremlin-console/src/main/static/NOTICE
new file mode 100644
index 0000000..51d06c8
--- /dev/null
+++ b/gremlin-console/src/main/static/NOTICE
@@ -0,0 +1,62 @@
+Apache TinkerPop (incubating)
+Copyright 2015-2016 The Apache Software Foundation.
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+------------------------------------------------------------------------
+Apache Commons Codec (AL ASF)
+------------------------------------------------------------------------
+src/test/org/apache/commons/codec/language/DoubleMetaphoneTest.java
+contains test data from http://aspell.net/test/orig/batch0.tab.
+Copyright (C) 2002 Kevin Atkinson (kevina@gnu.org)
+
+------------------------------------------------------------------------
+Apache Commons Lang (AL ASF)
+------------------------------------------------------------------------
+This product includes software from the Spring Framework,
+under the Apache License 2.0 (see: StringUtils.containsWhitespace())
+
+------------------------------------------------------------------------
+Apache Groovy (AL ASF)
+------------------------------------------------------------------------
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+This product includes/uses ANTLR (http://www.antlr2.org/)
+developed by Terence Parr 1989-2006
+
+This product bundles icons from the famfamfam.com silk icons set
+http://www.famfamfam.com/lab/icons/silk/
+Licensed under the Creative Commons Attribution Licence v2.5
+http://creativecommons.org/licenses/by/2.5/
+
+------------------------------------------------------------------------
+Apache Http Components Core (AL ASF)
+------------------------------------------------------------------------
+This project contains annotations derived from JCIP-ANNOTATIONS
+Copyright (c) 2005 Brian Goetz and Tim Peierls. See http://www.jcip.net
+
+------------------------------------------------------------------------
+Apache Ivy (AL ASF)
+------------------------------------------------------------------------
+Portions of Ivy were originally developed by
+Jayasoft SARL (http://www.jayasoft.fr/)
+and are licensed to the Apache Software Foundation under the
+"Software Grant License Agreement"
+
+SSH and SFTP support is provided by the JCraft JSch package,
+which is open source software, available under
+the terms of a BSD style license.
+The original software and related information is available
+at http://www.jcraft.com/jsch/.
+
+------------------------------------------------------------------------
+JavaTuples
+------------------------------------------------------------------------
+Copyright (c) 2010, The JAVATUPLES team (http://www.javatuples.org)
+
+------------------------------------------------------------------------
+Netty
+------------------------------------------------------------------------
+Copyright 2014 The Netty Project
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d6f4645e/gremlin-console/src/main/static/deps/foundation
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/static/deps/foundation b/gremlin-console/src/main/static/deps/foundation
new file mode 100644
index 0000000..a54868c
--- /dev/null
+++ b/gremlin-console/src/main/static/deps/foundation
@@ -0,0 +1,22 @@
+Copyright (c) 2013-2016 ZURB, inc.
+
+MIT License
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d6f4645e/gremlin-console/src/main/static/deps/jbcrypt
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/static/deps/jbcrypt b/gremlin-console/src/main/static/deps/jbcrypt
new file mode 100644
index 0000000..e0e23ed
--- /dev/null
+++ b/gremlin-console/src/main/static/deps/jbcrypt
@@ -0,0 +1,17 @@
+jBCrypt is subject to the following license:
+
+/*
+ * Copyright (c) 2006 Damien Miller <dj...@mindrot.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d6f4645e/gremlin-console/src/main/static/deps/jcabi-log
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/static/deps/jcabi-log b/gremlin-console/src/main/static/deps/jcabi-log
new file mode 100644
index 0000000..ece789e
--- /dev/null
+++ b/gremlin-console/src/main/static/deps/jcabi-log
@@ -0,0 +1,27 @@
+Copyright (c) 2012-2015, jcabi.com
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met: 1) Redistributions of source code must retain the above
+copyright notice, this list of conditions and the following
+disclaimer. 2) Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following
+disclaimer in the documentation and/or other materials provided
+with the distribution. 3) Neither the name of the jcabi.com nor
+the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written
+permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
+NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d6f4645e/gremlin-console/src/main/static/deps/jcabi-manifests
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/static/deps/jcabi-manifests b/gremlin-console/src/main/static/deps/jcabi-manifests
new file mode 100644
index 0000000..ece789e
--- /dev/null
+++ b/gremlin-console/src/main/static/deps/jcabi-manifests
@@ -0,0 +1,27 @@
+Copyright (c) 2012-2015, jcabi.com
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met: 1) Redistributions of source code must retain the above
+copyright notice, this list of conditions and the following
+disclaimer. 2) Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following
+disclaimer in the documentation and/or other materials provided
+with the distribution. 3) Neither the name of the jcabi.com nor
+the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written
+permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
+NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d6f4645e/gremlin-console/src/main/static/deps/jline2
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/static/deps/jline2 b/gremlin-console/src/main/static/deps/jline2
new file mode 100644
index 0000000..112aabf
--- /dev/null
+++ b/gremlin-console/src/main/static/deps/jline2
@@ -0,0 +1,34 @@
+Copyright (c) 2002-2012, the original author or authors.
+All rights reserved.
+
+http://www.opensource.org/licenses/bsd-license.php
+
+Redistribution and use in source and binary forms, with or
+without modification, are permitted provided that the following
+conditions are met:
+
+Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+
+Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with
+the distribution.
+
+Neither the name of JLine nor the names of its contributors
+may be used to endorse or promote products derived from this
+software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
+BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d6f4645e/gremlin-console/src/main/static/deps/kryo
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/static/deps/kryo b/gremlin-console/src/main/static/deps/kryo
new file mode 100644
index 0000000..3f6a160
--- /dev/null
+++ b/gremlin-console/src/main/static/deps/kryo
@@ -0,0 +1,10 @@
+Copyright (c) 2008, Nathan Sweet
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+    * Neither the name of Esoteric Software nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d6f4645e/gremlin-console/src/main/static/deps/minlog
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/static/deps/minlog b/gremlin-console/src/main/static/deps/minlog
new file mode 100644
index 0000000..3f6a160
--- /dev/null
+++ b/gremlin-console/src/main/static/deps/minlog
@@ -0,0 +1,10 @@
+Copyright (c) 2008, Nathan Sweet
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+    * Neither the name of Esoteric Software nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d6f4645e/gremlin-console/src/main/static/deps/normalize
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/static/deps/normalize b/gremlin-console/src/main/static/deps/normalize
new file mode 100644
index 0000000..4e3a191
--- /dev/null
+++ b/gremlin-console/src/main/static/deps/normalize
@@ -0,0 +1,7 @@
+Copyright (c) Nicolas Gallagher and Jonathan Neal
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d6f4645e/gremlin-console/src/main/static/deps/slf4j
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/static/deps/slf4j b/gremlin-console/src/main/static/deps/slf4j
new file mode 100644
index 0000000..d32467b
--- /dev/null
+++ b/gremlin-console/src/main/static/deps/slf4j
@@ -0,0 +1,21 @@
+ Copyright (c) 2004-2013 QOS.ch
+ All rights reserved.
+
+ Permission is hereby granted, free  of charge, to any person obtaining
+ a  copy  of this  software  and  associated  documentation files  (the
+ "Software"), to  deal in  the Software without  restriction, including
+ without limitation  the rights to  use, copy, modify,  merge, publish,
+ distribute,  sublicense, and/or sell  copies of  the Software,  and to
+ permit persons to whom the Software  is furnished to do so, subject to
+ the following conditions:
+
+ The  above  copyright  notice  and  this permission  notice  shall  be
+ included in all copies or substantial portions of the Software.
+
+ THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
+ EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
+ MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d6f4645e/gremlin-server/src/assembly/distribution.xml
----------------------------------------------------------------------
diff --git a/gremlin-server/src/assembly/distribution.xml b/gremlin-server/src/assembly/distribution.xml
index 6e72bb1..64d6fde 100644
--- a/gremlin-server/src/assembly/distribution.xml
+++ b/gremlin-server/src/assembly/distribution.xml
@@ -33,6 +33,10 @@ limitations under the License.
             <directory>conf</directory>
         </fileSet>
         <fileSet>
+            <directory>src/main/static/deps</directory>
+            <outputDirectory>deps</outputDirectory>
+        </fileSet>
+        <fileSet>
             <directory>target/apache-${project.artifactId}-${project.version}-standalone/data</directory>
             <outputDirectory>data</outputDirectory>
         </fileSet>
@@ -58,11 +62,11 @@ limitations under the License.
     </fileSets>
     <files>
         <file>
-            <source>src/main/LICENSE</source>
+            <source>src/main/static/LICENSE</source>
             <outputDirectory></outputDirectory>
         </file>
         <file>
-            <source>src/main/NOTICE</source>
+            <source>src/main/static/NOTICE</source>
             <outputDirectory></outputDirectory>
         </file>
         <file>

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d6f4645e/gremlin-server/src/main/LICENSE
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/LICENSE b/gremlin-server/src/main/LICENSE
deleted file mode 100644
index c622a43..0000000
--- a/gremlin-server/src/main/LICENSE
+++ /dev/null
@@ -1,274 +0,0 @@
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed 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.
-
-========================================================================
-BSD-style Licenses
-========================================================================
-
-The Apache TinkerPop project bundles the following components under the BSD License:
-
-     jBCrypt (org.mindrot:jbcrypt - https://github.com/jeremyh/jBCrypt)
-     jcabi-log (com.jcabi:jcabi-log - http://www.jcabi.com/jcabi-log)
-     jcabi-manifests (com.jcabi:jcabi-manifests - http://www.jcabi.com/jcabi-manifests)
-     JLine (jline:jline - http://nexus.sonatype.org/oss-repository-hosting.html/jline)
-     Kryo (com.esotericsoftware:kryo-shaded - https://github.com/EsotericSoftware/kryo) - shaded in gremlin-shaded to org.apache.tinkerpop.shaded.kryo
-     minlog (com.esotericsoftware:minlog - https://github.com/EsotericSoftware/minlog) - shaded in gremlin-shaded to org.apache.tinkerpop.shaded.minlog
-
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met: 1) Redistributions of source code must retain the above
-copyright notice, this list of conditions and the following
-disclaimer. 2) Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following
-disclaimer in the documentation and/or other materials provided
-with the distribution. 3) Neither the name of the jcabi.com nor
-the names of its contributors may be used to endorse or promote
-products derived from this software without specific prior written
-permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
-NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
-THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
-OF THE POSSIBILITY OF SUCH DAMAGE.
-
-========================================================================
-MIT Licenses
-========================================================================
-
-The Apache TinkerPop project bundles the following components under the MIT License:
-
-     gmetric4j (info.ganglia.gmetric4j:gmetric4j - http://github.com/ganglia/gmetric4j)
-     JCL 1.1.1 implemented over SLF4J (org.slf4j:jcl-over-slf4j - http://www.slf4j.org)
-     SLF4J API Module (org.slf4j:slf4j-api - http://www.slf4j.org)
-     SLF4J LOG4J-12 Binding (org.slf4j:slf4j-log4j12 - http://www.slf4j.org)
-
-All rights reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d6f4645e/gremlin-server/src/main/NOTICE
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/NOTICE b/gremlin-server/src/main/NOTICE
deleted file mode 100644
index b9b9a2e..0000000
--- a/gremlin-server/src/main/NOTICE
+++ /dev/null
@@ -1,63 +0,0 @@
-Apache TinkerPop (incubating)
-Copyright 2015-2016 The Apache Software Foundation.
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-------------------------------------------------------------------------
-Apache Commons Lang (AL ASF)
-------------------------------------------------------------------------
-This product includes software from the Spring Framework,
-under the Apache License 2.0 (see: StringUtils.containsWhitespace())
-
-------------------------------------------------------------------------
-Apache Groovy (AL ASF)
-------------------------------------------------------------------------
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-This product includes/uses ANTLR (http://www.antlr2.org/)
-developed by Terence Parr 1989-2006
-
-This product bundles icons from the famfamfam.com silk icons set
-http://www.famfamfam.com/lab/icons/silk/
-Licensed under the Creative Commons Attribution Licence v2.5
-http://creativecommons.org/licenses/by/2.5/
-
-------------------------------------------------------------------------
-Apache Ivy (AL ASF)
-------------------------------------------------------------------------
-Portions of Ivy were originally developed by
-Jayasoft SARL (http://www.jayasoft.fr/)
-and are licensed to the Apache Software Foundation under the
-"Software Grant License Agreement"
-
-SSH and SFTP support is provided by the JCraft JSch package,
-which is open source software, available under
-the terms of a BSD style license.
-The original software and related information is available
-at http://www.jcraft.com/jsch/.
-
-------------------------------------------------------------------------
-JavaTuples
-------------------------------------------------------------------------
-Copyright (c) 2010, The JAVATUPLES team (http://www.javatuples.org)
-
-------------------------------------------------------------------------
-Metrics
-------------------------------------------------------------------------
-Copyright 2010-2013 Coda Hale and Yammer, Inc., 2014-2015 Dropwizard Team
-
-This product includes software developed by Coda Hale and Yammer, Inc.
-
-This product includes code derived from the JSR-166 project (ThreadLocalRandom, Striped64,
-LongAdder), which was released with the following comments:
-
-    Written by Doug Lea with assistance from members of JCP JSR-166
-    Expert Group and released to the public domain, as explained at
-    http://creativecommons.org/publicdomain/zero/1.0/
-
-------------------------------------------------------------------------
-Netty
-------------------------------------------------------------------------
-Copyright 2014 The Netty Project
\ No newline at end of file


[17/37] incubator-tinkerpop git commit: Allowed for transaction management in sessions.

Posted by sp...@apache.org.
Allowed for transaction management in sessions.

Added a per request argument called manageTransaction to allow an in-session client to signal that it would like Gremlin Server to commit/rollback at the end of the request. This basically allows a session to behave much like the sessionless request does by default.


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

Branch: refs/heads/master
Commit: e9966b3bdbbf8ca34a45e6f9f7a48e9b8b2d5720
Parents: 4a6f9a2
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Feb 11 12:10:37 2016 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Feb 11 12:10:37 2016 -0500

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |   1 +
 .../src/reference/gremlin-applications.asciidoc | 103 +++++++++++++------
 .../upgrade/release-3.1.x-incubating.asciidoc   |  36 +++++++
 .../apache/tinkerpop/gremlin/driver/Client.java |   5 +-
 .../tinkerpop/gremlin/driver/Cluster.java       |  24 ++++-
 .../apache/tinkerpop/gremlin/driver/Tokens.java |  11 +-
 .../server/op/AbstractEvalOpProcessor.java      |  30 +++---
 .../server/GremlinDriverIntegrateTest.java      |  57 ++++++++--
 .../server/GremlinServerIntegrateTest.java      |  62 +++++++++++
 9 files changed, 273 insertions(+), 56 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/e9966b3b/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index caccb0f..de5bc67 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -30,6 +30,7 @@ TinkerPop 3.1.2 (NOT OFFICIALLY RELEASED YET)
 * Deprecated `ScriptElementFactory` and made the local `StarGraph` globally available for `ScriptInputFormat`'s `parse()` method.
 * Optimized memory-usage in `TraversalVertexProgram`.
 * `Graph` instances are not merely "closed" at the end of tests, they are "cleared" via `GraphProvider.clear()`, which should in turn cleans up old data for an implementation.
+* Expanded the Gremlin Server protocol to allow for transaction management on in-session requests and updated the `gremlin-driver` to take advantage of that.
 * Greatly reduced the amount of objects required in OLAP for the `ReducingBarrierStep` steps.
 
 [[release-3.1.1-incubating]]

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/e9966b3b/docs/src/reference/gremlin-applications.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc
index 097312e..43608b1 100644
--- a/docs/src/reference/gremlin-applications.asciidoc
+++ b/docs/src/reference/gremlin-applications.asciidoc
@@ -1178,7 +1178,7 @@ The parameter is called `#jsr223.groovy.engine.keep.globals` and has four option
 
 By specifying an option other than `hard`, an `OutOfMemoryError` in Gremlin Server should be avoided.  Of course,
 this approach will come with the downside that compiled scripts could be garbage collected and thus removed from the
-cache, forcing Gremlin Server to recompile later.
+cache, forcing Gremlin Server to recompile later if that script is later encountered.
 
 [[sessions]]
 Considering Sessions
@@ -1206,6 +1206,57 @@ boundaries are managed properly from one request to the next.
 server that the session was initialized in.  Gremlin Server does not share session state as the transactional context
 of a `Graph` is bound to the thread it was initialized in.
 
+To connect to a session with Java via the `gremlin-driver`, it is necessary to create a `SessionedClient` from the
+`Cluster` object:
+
+[source,java]
+----
+Cluster cluster = Cluster.open();  <1>
+Client client = cluster.connect("sessionName"); <2>
+----
+
+<1> Opens a reference to `localhost` as <<connecting-via-java,previously shown>>.
+<2> Creates a `SessionedClient` given the configuration options of the Cluster. The `connect()` method is given a
+`String` value that becomes the unique name of the session. It is often best to simply use a `UUID` to represent
+the session.
+
+It is also possible to have Gremlin Server manage the transactions as is done with sessionless requests. The user is
+in control of enabling this feature when creating the `SessionedClient`:
+
+[source,java]
+----
+Cluster cluster = Cluster.open();
+Client client = cluster.connect("sessionName", true);
+----
+
+Specifying `true` to the `connect()` method signifies that the `client` should make each request as one encapsulated
+in a transaction. With this configuration of `client` there is no need to close a transaction manually.
+
+When using this mode of the `SessionedClient` it is important to recognize that global variable state for the session
+is not rolled-back on failure depending on where the failure occurs. For example, sending the following script would
+create a variable "x" in global session scope that would be acccessible on the next request:
+
+[source,groovy]
+x = 1
+
+However, sending this script which explicitly throws an exception:
+
+[source,groovy]
+y = 2
+throw new RuntimeException()
+
+will result in an obvious failure during script evaluation and "y" will not be available to the next request. The
+complication arises where the script evaluates successfully, but fails during result iteration or serialization. For
+example, this script:
+
+[source,groovy]
+a = 1
+g.addV()
+
+would sucessfully evaluate and return a `Traversal`.  The variable "a" would be available on the next request. However,
+if there was a failure in transaction management on the call to `commit()`, "a" would still be available to the next
+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.
 
@@ -1213,8 +1264,9 @@ necessary for a given use case.
 Considering Transactions
 ^^^^^^^^^^^^^^^^^^^^^^^^
 
-Gremlin Server performs automated transaction handling for "sessionless" requests (i.e. no state between requests). It
-will automatically commit or rollback transactions depending on the success or failure of the request.
+Gremlin Server performs automated transaction handling for "sessionless" requests (i.e. no state between requests) and
+for "in-session" requests with that feature enabled. It will automatically commit or rollback transactions depending
+on the success or failure of the request.
 
 Another aspect of Transaction Management that should be considered is the usage of the `strictTransactionManagement`
 setting.  It is `false` by default, but when set to `true`, it forces the user to pass `aliases` for all requests.
@@ -1336,7 +1388,7 @@ Gremlin Server will send:
 |=========================================================
 |Code |Name |Description
 |200 |SUCCESS |The server successfully processed a request to completion - there are no messages remaining in this stream.
-|204 |NO CONTENT |The server processed the request but there is no result to return (e.g. an `Iterator` with no elements).
+|204 |NO CONTENT |The server processed the request but there is no result to return (e.g. an `Iterator` with no elements) - there are no messages remaining in this stream.
 |206 |PARTIAL CONTENT |The server successfully returned some content, but there is more in the stream to arrive - wait for a `SUCCESS` to signify the end of the stream.
 |401 |UNAUTHORIZED |The request attempted to access resources that the requesting user did not have access to.
 |407 |AUTHENTICATE |A challenge from the server for the client to authenticate its request.
@@ -1348,16 +1400,6 @@ Gremlin Server will send:
 |599 |SERVER SERIALIZATION ERROR |The server was not capable of serializing an object that was returned from the script supplied on the request. Either transform the object into something Gremlin Server can process within the script or install mapper serialization classes to Gremlin Server.
 |=========================================================
 
-`SUCCESS` and `NO CONTENT` messages are terminating messages that indicate that a request was properly handled on the
-server and that there are no additional messages streaming in for that request.  When developing a driver, it is
-important to note the slight differences in semantics for these result codes when it comes to sessionless versus
-in-session requests.  For a sessionless request, which operates under automatic transaction management, Gremlin Server
-will only send one of these message types after result iteration and transaction `commit()`.  In other words, the
-driver could potentially expect to receive a number of "successful" `PARTIAL CONTENT` messages before ultimately
-ending in failure on `commit()`.  For in-session requests, the client is responsible for managing the transaction
-and therefore, a first request could receive multiple "success" related messages, only to fail on a future request
-that finally issues the `commit()`.
-
 OpProcessors Arguments
 ^^^^^^^^^^^^^^^^^^^^^^
 
@@ -1386,12 +1428,12 @@ evaluated and is committed when the script completes (or rolled back if an error
 [width="100%",cols="3,10a",options="header"]
 |=========================================================
 |Key |Description
-|processor |As this is the default `OpProcessor` this value can be set to an empty string
+|processor |As this is the default `OpProcessor` this value can be set to an empty string.
 |op |[width="100%",cols="3,10",options="header"]
 !=========================================================
 !Key !Description
 !`authentication` !A request that contains the response to a server challenge for authentication.
-!`eval` !Evaluate a Gremlin script provided as a `String`
+!`eval` !Evaluate a Gremlin script provided as a `String`.
 !=========================================================
 |=========================================================
 
@@ -1406,9 +1448,9 @@ evaluated and is committed when the script completes (or rolled back if an error
 [width="100%",cols="2,2,9",options="header"]
 |=========================================================
 |Key |Type |Description
-|gremlin |String | *Required* The Gremlin script to evaluate
-|bindings |Map |A map of key/value pairs to apply as variables in the context of the Gremlin script
-|language |String |The flavor used (e.g. `gremlin-groovy`)
+|gremlin |String | *Required* The Gremlin script to evaluate.
+|bindings |Map |A map of key/value pairs to apply as variables in the context of the Gremlin script.
+|language |String |The flavor of Gremlin used (e.g. `gremlin-groovy`).
 |aliases |Map |A map of key/value pairs that allow globally bound `Graph` and `TraversalSource` objects to
 be aliased to different variable names for purposes of the current request.  The value represents the name the
 global variable and its key represents the new binding name as it will be referenced in the Gremlin query.  For
@@ -1420,11 +1462,11 @@ Session OpProcessor
 +++++++++++++++++++
 
 The "session" `OpProcessor` handles requests for the primary function of Gremlin Server - executing Gremlin. It is
-like the "standard" `OpProcessor`, but instead maintains state between sessions and leaves all transaction management
-up to the calling client.  It is important that clients that open sessions, commit or roll them back, however Gremlin
-Server will try to clean up such things when a session is killed that has been abandoned.  It is important to consider
-that a session can only be maintained with a single machine.  In the event that multiple Gremlin Server are deployed,
-session state is not shared among them.
+like the "standard" `OpProcessor`, but instead maintains state between sessions and allows the option to leave all
+transaction management up to the calling client.  It is important that clients that open sessions, commit or roll
+them back, however Gremlin Server will try to clean up such things when a session is killed that has been abandoned.
+It is important to consider that a session can only be maintained with a single machine.  In the event that multiple
+Gremlin Server are deployed, session state is not shared among them.
 
 [width="100%",cols="3,10a",options="header"]
 |=========================================================
@@ -1434,8 +1476,8 @@ session state is not shared among them.
 [cols="3,10",options="header"]
 !=========================================================
 !Key !Description
-!`authentication` !A request that contains the response to a server challenge for authentication
-!`eval` !Evaluate a Gremlin script provided as a `String`
+!`authentication` !A request that contains the response to a server challenge for authentication.
+!`eval` !Evaluate a Gremlin script provided as a `String`.
 !`close` !Close the specified session and rollback any open transactions.
 |=========================================================
 
@@ -1450,10 +1492,11 @@ session state is not shared among them.
 [width="100%",options="header"]
 |=========================================================
 |Key |Type |Description
-|gremlin |String | *Required* The Gremlin script to evaluate
-|session |String | *Required* The session identifier for the current session - typically this value should be a UUID (the session will be created if it doesn't exist)
-|bindings |Map |A map of key/value pairs to apply as variables in the context of the Gremlin script
-|language |String |The flavor used (e.g. `gremlin-groovy`)
+|gremlin |String | *Required* The Gremlin script to evaluate.
+|session |String | *Required* The session identifier for the current session - typically this value should be a UUID (the session will be created if it doesn't exist).
+|manageTransaction |Boolean |When set to `true` the transaction for the current request is auto-committed or rolled-back as are done with sessionless requests - defaulted to `false`.
+|bindings |Map |A map of key/value pairs to apply as variables in the context of the Gremlin script.
+|language |String |The flavor of Gremlin used (e.g. `gremlin-groovy`)
 |=========================================================
 
 '`close` operation arguments'

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/e9966b3b/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 840d20c..1b7425c 100644
--- a/docs/src/upgrade/release-3.1.x-incubating.asciidoc
+++ b/docs/src/upgrade/release-3.1.x-incubating.asciidoc
@@ -29,6 +29,27 @@ TinkerPop 3.1.2
 
 Please see the link:https://github.com/apache/incubator-tinkerpop/blob/3.1.1-incubating/CHANGELOG.asciidoc#tinkerpop-312-release-date-XXXXXXXXXXXXXXXXXXXXXXXXXX[changelog] for a complete list of all the modifications that are part of this release.
 
+Upgrading for Users
+~~~~~~~~~~~~~~~~~~~
+
+Session Transaction Management
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+When connecting to a session with `gremlin-driver`, it is now possible to configure the `Client` instance so as to
+request that the server manage the transaction for each requests.
+
+[source,java]
+----
+Cluster cluster = Cluster.open();
+Client client = cluster.connect("sessionName", true);
+----
+
+Specifying `true` to the `connect()` method signifies that the `client` should make each request as one encapsulated
+in a transaction. With this configuration of `client` there is no need to close a transaction manually.
+
+See: link:https://issues.apache.org/jira/browse/TINKERPOP-1039[TINKERPOP-1039],
+link:http://tinkerpop.apache.org/docs/3.1.2-incubating/reference/#sessions[Reference Documentation - Considering Sessions]
+
 Upgrading for Providers
 ~~~~~~~~~~~~~~~~~~~~~~~
 
@@ -48,6 +69,21 @@ automated method for clearing graphs at the end of a test and some tests call `c
 
 See: link:https://issues.apache.org/jira/browse/TINKERPOP-1146[TINKERPOP-1146]
 
+Driver Providers
+^^^^^^^^^^^^^^^^
+
+Session Transaction Management
+++++++++++++++++++++++++++++++
+
+Up until now transaction management has been a feature of sessionless requests only, but the new `manageTransaction`
+request argument for the link:http://tinkerpop.apache.org/docs/3.1.2-incubating/reference/#_session_opprocessor[Session OpProcessor]
+changes that.  Session-based requests can now pass this boolean value on each request to signal to
+Gremlin Server that it should attempt to commit (or rollback) the transaction at the end of the request. By default,
+this value as `false`, so there is no change to the protocol for this feature.
+
+See: link:https://issues.apache.org/jira/browse/TINKERPOP-1039[TINKERPOP-1039],
+link:http://tinkerpop.apache.org/docs/3.1.2-incubating/reference/#sessions[Reference Documentation - Considering Sessions]
+
 TinkerPop 3.1.1
 ---------------
 

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/e9966b3b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java
index 8c80b8a..6a91f0e 100644
--- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java
+++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java
@@ -490,12 +490,14 @@ public abstract class Client {
      */
     public final static class SessionedClient extends Client {
         private final String sessionId;
+        private final boolean manageTransactions;
 
         private ConnectionPool connectionPool;
 
-        SessionedClient(final Cluster cluster, final String sessionId) {
+        SessionedClient(final Cluster cluster, final String sessionId, final boolean manageTransactions) {
             super(cluster);
             this.sessionId = sessionId;
+            this.manageTransactions = manageTransactions;
         }
 
         String getSessionId() {
@@ -531,6 +533,7 @@ public abstract class Client {
         public RequestMessage buildMessage(final RequestMessage.Builder builder) {
             builder.processor("session");
             builder.addArg(Tokens.ARGS_SESSION, sessionId);
+            builder.addArg(Tokens.ARGS_MANAGE_TRANSACTION, manageTransactions);
             return builder.create();
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/e9966b3b/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 c8d3bd6..b29cc95 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
@@ -86,7 +86,7 @@ public final class Cluster {
      * Creates a {@link Client.SessionedClient} instance to this {@code Cluster}, meaning requests will be routed to
      * a single server (randomly selected from the cluster), where the same bindings will be available on each request.
      * Requests are bound to the same thread on the server and thus transactions may extend beyond the bounds of a
-     * single request.  The transactions are managed by the user and must be committed or rolledback manually.
+     * single request.  The transactions are managed by the user and must be committed or rolled-back manually.
      * <p/>
      * Note that calling this method does not imply that a connection is made to the server itself at this point.
      * Therefore, if there is only one server specified in the {@code Cluster} and that server is not available an
@@ -96,9 +96,29 @@ public final class Cluster {
      * @param sessionId user supplied id for the session which should be unique (a UUID is ideal).
      */
     public <T extends Client> T connect(final String sessionId) {
+        return connect(sessionId, false);
+    }
+
+    /**
+     * Creates a {@link Client.SessionedClient} instance to this {@code Cluster}, meaning requests will be routed to
+     * a single server (randomly selected from the cluster), where the same bindings will be available on each request.
+     * Requests are bound to the same thread on the server and thus transactions may extend beyond the bounds of a
+     * single request.  If {@code manageTransactions} is set to {@code false} then transactions are managed by the
+     * user and must be committed or rolled-back manually. When set to {@code true} the transaction is committed or
+     * rolled-back at the end of each request.
+     * <p/>
+     * Note that calling this method does not imply that a connection is made to the server itself at this point.
+     * Therefore, if there is only one server specified in the {@code Cluster} and that server is not available an
+     * error will not be raised at this point.  Connections get initialized in the {@link Client} when a request is
+     * submitted or can be directly initialized via {@link Client#init()}.
+     *
+     * @param sessionId user supplied id for the session which should be unique (a UUID is ideal).
+     * @param manageTransactions enables auto-transactions when set to true
+     */
+    public <T extends Client> T connect(final String sessionId, final boolean manageTransactions) {
         if (null == sessionId || sessionId.isEmpty())
             throw new IllegalArgumentException("sessionId cannot be null or empty");
-        return (T) new Client.SessionedClient(this, sessionId);
+        return (T) new Client.SessionedClient(this, sessionId, manageTransactions);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/e9966b3b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Tokens.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Tokens.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Tokens.java
index 64d2fe1..dbb37c6 100644
--- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Tokens.java
+++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Tokens.java
@@ -49,20 +49,27 @@ public final class Tokens {
     public static final String ARGS_LANGUAGE = "language";
 
     /**
-     * @deprecated As of release 3.1.0, replaced by {@link #ARGS_ALIASES}.
+     * @deprecated As of release 3.1.0-incubating, replaced by {@link #ARGS_ALIASES}.
      */
     @Deprecated
     public static final String ARGS_REBINDINGS = "rebindings";
     public static final String ARGS_SESSION = "session";
+    public static final String ARGS_MANAGE_TRANSACTION = "manageTransaction";
     public static final String ARGS_SASL = "sasl";
 
     public static final String ARGS_COORDINATES_GROUP = "group";
     public static final String ARGS_COORDINATES_ARTIFACT = "artifact";
     public static final String ARGS_COORDINATES_VERSION = "version";
 
+    public static final String ARGS_INFO_TYPE_DEPENDENCIES = "dependencies";
+
+    /**
+     * @deprecated As of release 3.1.1-incubating, replaced by {@link #ARGS_INFO_TYPE_DEPENDENCIES}
+     */
+    @Deprecated
     public static final String ARGS_INFO_TYPE_DEPDENENCIES = "dependencies";
     public static final String ARGS_INFO_TYPE_IMPORTS = "imports";
 
-    public static final List<String> INFO_TYPES = Arrays.asList(ARGS_INFO_TYPE_DEPDENENCIES,
+    public static final List<String> INFO_TYPES = Arrays.asList(ARGS_INFO_TYPE_DEPENDENCIES,
             ARGS_INFO_TYPE_IMPORTS);
 }

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/e9966b3b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java
index aab9950..e6cf2e6 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java
@@ -57,7 +57,6 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 import java.util.function.Supplier;
 import java.util.regex.Pattern;
-import java.util.stream.Collectors;
 
 import static com.codahale.metrics.MetricRegistry.name;
 
@@ -190,6 +189,10 @@ public abstract class AbstractEvalOpProcessor implements OpProcessor {
         final String language = args.containsKey(Tokens.ARGS_LANGUAGE) ? (String) args.get(Tokens.ARGS_LANGUAGE) : null;
         final Bindings bindings = bindingsSupplier.get();
 
+        // sessionless requests are always transaction managed, but in-session requests are configurable.
+        final boolean managedTransactionsForRequest = manageTransactions ?
+                true : (Boolean) args.getOrDefault(Tokens.ARGS_MANAGE_TRANSACTION, false);
+
         final CompletableFuture<Object> evalFuture = gremlinExecutor.eval(script, language, bindings, null, o -> {
             final Iterator itty = IteratorUtils.asIterator(o);
 
@@ -201,11 +204,11 @@ public abstract class AbstractEvalOpProcessor implements OpProcessor {
                 final String errorMessage = String.format("Response iteration exceeded the configured threshold for request [%s] - %s", msg, ex.getMessage());
                 logger.warn(errorMessage);
                 ctx.writeAndFlush(ResponseMessage.build(msg).code(ResponseStatusCode.SERVER_ERROR_TIMEOUT).statusMessage(errorMessage).create());
-                if (manageTransactions) attemptRollback(msg, context.getGraphManager(), settings.strictTransactionManagement);
+                if (managedTransactionsForRequest) attemptRollback(msg, context.getGraphManager(), settings.strictTransactionManagement);
             } catch (Exception ex) {
                 logger.warn(String.format("Exception processing a script on request [%s].", msg), ex);
                 ctx.writeAndFlush(ResponseMessage.build(msg).code(ResponseStatusCode.SERVER_ERROR).statusMessage(ex.getMessage()).create());
-                if (manageTransactions) attemptRollback(msg, context.getGraphManager(), settings.strictTransactionManagement);
+                if (managedTransactionsForRequest) attemptRollback(msg, context.getGraphManager(), settings.strictTransactionManagement);
             }
         });
 
@@ -245,11 +248,15 @@ public abstract class AbstractEvalOpProcessor implements OpProcessor {
         final boolean useBinary = ctx.channel().attr(StateKey.USE_BINARY).get();
         boolean warnOnce = false;
 
+        // sessionless requests are always transaction managed, but in-session requests are configurable.
+        final boolean managedTransactionsForRequest = manageTransactions ?
+                true : (Boolean) msg.getArgs().getOrDefault(Tokens.ARGS_MANAGE_TRANSACTION, false);
+
         // we have an empty iterator - happens on stuff like: g.V().iterate()
         if (!itty.hasNext()) {
             // as there is nothing left to iterate if we are transaction managed then we should execute a
             // commit here before we send back a NO_CONTENT which implies success
-            if (manageTransactions) attemptCommit(msg, context.getGraphManager(), settings.strictTransactionManagement);
+            if (managedTransactionsForRequest) attemptCommit(msg, context.getGraphManager(), settings.strictTransactionManagement);
             ctx.writeAndFlush(ResponseMessage.build(msg)
                     .code(ResponseStatusCode.NO_CONTENT)
                     .create());
@@ -260,9 +267,6 @@ public abstract class AbstractEvalOpProcessor implements OpProcessor {
         final StopWatch stopWatch = new StopWatch();
         stopWatch.start();
 
-        // if we manage the transactions then we need to commit stuff now that eval is complete.
-        Iterator toIterate = itty;
-
         // the batch size can be overridden by the request
         final int resultIterationBatchSize = (Integer) msg.optionalArgs(Tokens.ARGS_BATCH_SIZE)
                 .orElse(settings.resultIterationBatchSize);
@@ -271,7 +275,7 @@ public abstract class AbstractEvalOpProcessor implements OpProcessor {
         // use an external control to manage the loop as opposed to just checking hasNext() in the while.  this
         // prevent situations where auto transactions create a new transaction after calls to commit() withing
         // the loop on calls to hasNext().
-        boolean hasMore = toIterate.hasNext();
+        boolean hasMore = itty.hasNext();
 
         while (hasMore) {
             if (Thread.interrupted()) throw new InterruptedException();
@@ -280,13 +284,13 @@ public abstract class AbstractEvalOpProcessor implements OpProcessor {
             // so iterating next() if the message is not written and flushed would bump the aggregate size beyond
             // the expected resultIterationBatchSize.  Total serialization time for the response remains in
             // effect so if the client is "slow" it may simply timeout.
-            if (aggregate.size() < resultIterationBatchSize) aggregate.add(toIterate.next());
+            if (aggregate.size() < resultIterationBatchSize) aggregate.add(itty.next());
 
             // send back a page of results if batch size is met or if it's the end of the results being iterated.
             // also check writeability of the channel to prevent OOME for slow clients.
             if (ctx.channel().isWritable()) {
-                if (aggregate.size() == resultIterationBatchSize || !toIterate.hasNext()) {
-                    final ResponseStatusCode code = toIterate.hasNext() ? ResponseStatusCode.PARTIAL_CONTENT : ResponseStatusCode.SUCCESS;
+                if (aggregate.size() == resultIterationBatchSize || !itty.hasNext()) {
+                    final ResponseStatusCode code = itty.hasNext() ? ResponseStatusCode.PARTIAL_CONTENT : ResponseStatusCode.SUCCESS;
 
                     // serialize here because in sessionless requests the serialization must occur in the same
                     // thread as the eval.  as eval occurs in the GremlinExecutor there's no way to get back to the
@@ -294,7 +298,7 @@ public abstract class AbstractEvalOpProcessor implements OpProcessor {
                     serializeResponseMessage(ctx, msg, serializer, useBinary, aggregate, code);
 
                     // only need to reset the aggregation list if there's more stuff to write
-                    if (toIterate.hasNext())
+                    if (itty.hasNext())
                         aggregate = new ArrayList<>(resultIterationBatchSize);
                     else {
                         // iteration and serialization are both complete which means this finished successfully. note that
@@ -302,7 +306,7 @@ public abstract class AbstractEvalOpProcessor implements OpProcessor {
                         // local errors will get rolledback below because the exceptions aren't thrown in those cases to be
                         // caught by the GremlinExecutor for global rollback logic. this only needs to be committed if
                         // there are no more items to iterate and serialization is complete
-                        if (manageTransactions) attemptCommit(msg, context.getGraphManager(), settings.strictTransactionManagement);
+                        if (managedTransactionsForRequest) attemptCommit(msg, context.getGraphManager(), settings.strictTransactionManagement);
 
                         // exit the result iteration loop as there are no more results left.  using this external control
                         // because of the above commit.  some graphs may open a new transaction on the call to

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/e9966b3b/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 2dc0935..125afa9 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
@@ -109,6 +109,7 @@ public class GremlinDriverIntegrateTest extends AbstractGremlinServerIntegration
             case "shouldExecuteSessionlessScriptOnTransactionalGraph":
             case "shouldExecuteScriptInSessionOnTransactionalWithManualTransactionsGraph":
             case "shouldExecuteInSessionAndSessionlessWithoutOpeningTransaction":
+            case "shouldManageTransactionsInSession":
                 deleteDirectory(new File("/tmp/neo4j"));
                 settings.graphs.put("graph", "conf/neo4j-empty.properties");
                 break;
@@ -729,11 +730,11 @@ public class GremlinDriverIntegrateTest extends AbstractGremlinServerIntegration
 
         client.submit("v.property(\"color\",\"blue\")").all().get();
         client.submit("graph.tx().commit()").all().get();
-        
+
         // Run a sessionless request to change transaction.readWriteConsumer back to AUTO
         // The will make the next in session request fail if consumers aren't ThreadLocal
         sessionlessClient.submit("graph.vertices().next()").all().get();
-        
+
         client.submit("graph.tx().open()").all().get();
 
         final Vertex vertexAfterTx = client.submit("graph.vertices().next()").all().get().get(0).getVertex();
@@ -748,28 +749,28 @@ public class GremlinDriverIntegrateTest extends AbstractGremlinServerIntegration
     @Test
     public void shouldExecuteInSessionAndSessionlessWithoutOpeningTransaction() throws Exception {
         assumeNeo4jIsPresent();
-        
+
         final Cluster cluster = Cluster.build().create();
         final Client sessionClient = cluster.connect(name.getMethodName());
         final Client sessionlessClient = cluster.connect();
-        
+
         //open transaction in session, then add vertex and commit
         sessionClient.submit("graph.tx().open()").all().get();
         final Vertex vertexBeforeTx = sessionClient.submit("v=graph.addVertex(\"name\",\"stephen\")").all().get().get(0).getVertex();
         assertEquals("stephen", vertexBeforeTx.values("name").next());
         sessionClient.submit("graph.tx().commit()").all().get();
-        
+
         // check that session transaction is closed
         final boolean isOpen = sessionClient.submit("graph.tx().isOpen()").all().get().get(0).getBoolean();
         assertTrue("Transaction should be closed", !isOpen);
-        
+
         //run a sessionless read
         sessionlessClient.submit("graph.traversal().V()").all().get();
-        
+
         // check that session transaction is still closed
         final boolean isOpenAfterSessionless = sessionClient.submit("graph.tx().isOpen()").all().get().get(0).getBoolean();
         assertTrue("Transaction should stil be closed", !isOpenAfterSessionless);
-        
+
     }
 
     @Test
@@ -1019,4 +1020,44 @@ public class GremlinDriverIntegrateTest extends AbstractGremlinServerIntegration
 
         cluster.close();
     }
+
+    @Test
+    public void shouldManageTransactionsInSession() throws Exception {
+        assumeNeo4jIsPresent();
+
+        final Cluster cluster = Cluster.build().create();
+        final Client client = cluster.connect();
+        final Client sessionWithManagedTx = cluster.connect(name.getMethodName() + "-managed", true);
+        final Client sessionWithoutManagedTx = cluster.connect(name.getMethodName() + "-not-managed");
+
+        // this should auto-commit
+        final Vertex vStephen = sessionWithManagedTx.submit("v = g.addV('name','stephen').next()").all().get().get(0).getVertex();
+        assertEquals("stephen", vStephen.value("name"));
+
+        // the other clients should see that change because of auto-commit
+        assertThat(client.submit("g.V().has('name','stephen').hasNext()").all().get().get(0).getBoolean(), is(true));
+        assertThat(sessionWithoutManagedTx.submit("g.V().has('name','stephen').hasNext()").all().get().get(0).getBoolean(), is(true));
+
+        // this should NOT auto-commit
+        final Vertex vDaniel = sessionWithoutManagedTx.submit("v = g.addV('name','daniel').next()").all().get().get(0).getVertex();
+        assertEquals("daniel", vDaniel.value("name"));
+
+        // the other clients should NOT see that change because of auto-commit
+        assertThat(client.submit("g.V().has('name','daniel').hasNext()").all().get().get(0).getBoolean(), is(false));
+        assertThat(sessionWithManagedTx.submit("g.V().has('name','daniel').hasNext()").all().get().get(0).getBoolean(), is(false));
+
+        // but "v" should still be there
+        final Vertex vDanielAgain = sessionWithoutManagedTx.submit("v").all().get().get(0).getVertex();
+        assertEquals("daniel", vDanielAgain.value("name"));
+
+        // now commit manually
+        sessionWithoutManagedTx.submit("g.tx().commit()").all().get();
+
+        // should be there for all now
+        assertThat(client.submit("g.V().has('name','daniel').hasNext()").all().get().get(0).getBoolean(), is(true));
+        assertThat(sessionWithManagedTx.submit("g.V().has('name','daniel').hasNext()").all().get().get(0).getBoolean(), is(true));
+        assertThat(sessionWithoutManagedTx.submit("g.V().has('name','daniel').hasNext()").all().get().get(0).getBoolean(), is(true));
+
+        cluster.close();
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/e9966b3b/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 1d3d650..96c2727 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
@@ -131,6 +131,7 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration
                 settings.processors.add(processorSettings);
                 break;
             case "shouldExecuteInSessionAndSessionlessWithoutOpeningTransactionWithSingleClient":
+            case "shouldExecuteInSessionWithTransactionManagement":
                 deleteDirectory(new File("/tmp/neo4j"));
                 settings.graphs.put("graph", "conf/neo4j-empty.properties");
                 break;
@@ -661,6 +662,67 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration
 
     @Test
     @SuppressWarnings("unchecked")
+    public void shouldExecuteInSessionWithTransactionManagement() throws Exception {
+        assumeNeo4jIsPresent();
+
+        try (final SimpleClient client = new WebSocketClient()) {
+            final RequestMessage addRequest = RequestMessage.build(Tokens.OPS_EVAL)
+                    .processor("session")
+                    .addArg(Tokens.ARGS_SESSION, name.getMethodName())
+                    .addArg(Tokens.ARGS_GREMLIN, "v=graph.addVertex(\"name\",\"stephen\")")
+                    .addArg(Tokens.ARGS_MANAGE_TRANSACTION, true)
+                    .create();
+            final List<ResponseMessage> addResponses = client.submit(addRequest);
+            assertEquals(1, addResponses.size());
+            assertEquals(ResponseStatusCode.SUCCESS, addResponses.get(0).getStatus().getCode());
+
+            // Check to see if the transaction is closed.
+            final RequestMessage checkRequest = RequestMessage.build(Tokens.OPS_EVAL)
+                    .processor("session")
+                    .addArg(Tokens.ARGS_SESSION, name.getMethodName())
+                    .addArg(Tokens.ARGS_GREMLIN, "graph.tx().isOpen()")
+                    .create();
+            final List<ResponseMessage> checkResponses = client.submit(checkRequest);
+            assertEquals(1, checkResponses.size());
+            assertEquals(ResponseStatusCode.SUCCESS, checkResponses.get(0).getStatus().getCode());
+            assertThat(((List<Boolean>) checkResponses.get(0).getResult().getData()).get(0), is(false));
+
+            // lets run a sessionless read and validate that the transaction was managed
+            final RequestMessage sessionlessRequest = RequestMessage.build(Tokens.OPS_EVAL)
+                    .addArg(Tokens.ARGS_GREMLIN, "graph.traversal().V().values('name')")
+                    .create();
+            final List<ResponseMessage> sessionlessResponses = client.submit(sessionlessRequest);
+            assertEquals(1, sessionlessResponses.size());
+            assertEquals(ResponseStatusCode.SUCCESS, sessionlessResponses.get(0).getStatus().getCode());
+            assertEquals("stephen", ((List<String>) sessionlessResponses.get(0).getResult().getData()).get(0));
+
+            // make sure the session is intact
+            final RequestMessage getRequest = RequestMessage.build(Tokens.OPS_EVAL)
+                    .processor("session")
+                    .addArg(Tokens.ARGS_SESSION, name.getMethodName())
+                    .addArg(Tokens.ARGS_GREMLIN, "v.values(\"name\")")
+                    .addArg(Tokens.ARGS_MANAGE_TRANSACTION, true)
+                    .create();
+            final List<ResponseMessage> getResponses = client.submit(getRequest);
+            assertEquals(1, getResponses.size());
+            assertEquals(ResponseStatusCode.SUCCESS, getResponses.get(0).getStatus().getCode());
+            assertEquals("stephen", ((List<String>) getResponses.get(0).getResult().getData()).get(0));
+
+            // Check to see if the transaction is still closed.
+            final RequestMessage checkAgainRequest = RequestMessage.build(Tokens.OPS_EVAL)
+                    .processor("session")
+                    .addArg(Tokens.ARGS_SESSION, name.getMethodName())
+                    .addArg(Tokens.ARGS_GREMLIN, "graph.tx().isOpen()")
+                    .create();
+            final List<ResponseMessage> checkAgainstResponses = client.submit(checkAgainRequest);
+            assertEquals(1, checkAgainstResponses.size());
+            assertEquals(ResponseStatusCode.SUCCESS, checkAgainstResponses.get(0).getStatus().getCode());
+            assertThat(((List<Boolean>) checkAgainstResponses.get(0).getResult().getData()).get(0), is(false));
+        }
+    }
+
+    @Test
+    @SuppressWarnings("unchecked")
     public void shouldStillSupportDeprecatedRebindingsParameterOnServer() throws Exception {
         // this test can be removed when the rebindings arg is removed
         try (SimpleClient client = new WebSocketClient()) {



[18/37] incubator-tinkerpop git commit: A note about speeding up doc generation for a single file CTR

Posted by sp...@apache.org.
A note about speeding up doc generation for a single file CTR


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

Branch: refs/heads/master
Commit: e1575146355c79717f2838ce6aa5247bf27407e0
Parents: 4a6f9a2
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Feb 12 06:37:17 2016 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Feb 12 06:37:17 2016 -0500

----------------------------------------------------------------------
 docs/src/dev/developer/contributing.asciidoc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/e1575146/docs/src/dev/developer/contributing.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/dev/developer/contributing.asciidoc b/docs/src/dev/developer/contributing.asciidoc
index 8e65ed5..b78af98 100644
--- a/docs/src/dev/developer/contributing.asciidoc
+++ b/docs/src/dev/developer/contributing.asciidoc
@@ -47,7 +47,8 @@ generate the docs to validate formatting by just doing `bin/process-docs.sh --dr
 please be sure to have Zookeeper and Hadoop running when doing a `bin/process-docs.sh`.  If no code changes were made,
 one can also use the `--noClean` option. This will prevent the processor from cleaning up the local Grapes directory and
 the Hadoop Gremlin Libs directory in HDFS, resulting in a slightly faster execution time. The documentation is generated
-to `/target/docs/htmlsingle`.
+to `/target/docs/htmlsingle`. Once a full run of the documentation is executed, it is possible to run just one file by
+deleting the file to regenerated from `target/postprocess-asciidoc` then re-executing `bin/process-docs.sh`.
 . If necessary, run the integration tests.  For example, if the changes affect serialization or Gremlin Server/Driver
 operations then running the integration tests assures in addition to unit tests will definitely be necessary. After
 a successful `mvn clean install`, do `mvn verify -DskipIntegrationTests=false -pl gremlin-server`.


[14/37] incubator-tinkerpop git commit: Add GPG keys to email template for release vote.

Posted by sp...@apache.org.
Add GPG keys to email template for release vote.


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

Branch: refs/heads/master
Commit: 8bb113a20f80f468ec01dd58d0ac50a9098ed5eb
Parents: ed193170
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Feb 11 10:58:07 2016 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Feb 11 10:58:07 2016 -0500

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


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/8bb113a2/docs/src/dev/developer/release.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/dev/developer/release.asciidoc b/docs/src/dev/developer/release.asciidoc
index a7ce055..58118d8 100644
--- a/docs/src/dev/developer/release.asciidoc
+++ b/docs/src/dev/developer/release.asciidoc
@@ -180,6 +180,9 @@ Two binary distributions are provided for user convenience:
 	apache-gremlin-console-xx.yy.zz-bin.zip
 	apache-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/incubator/tinkerpop/KEYS
+
 The online docs can be found here:
 	http://tinkerpop.apache.org/docs/xx.yy.zz/reference/ (user docs)
 	http://tinkerpop.apache.org/docs/xx.yy.zz/upgrade/ (upgrade docs)