You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by ok...@apache.org on 2016/01/05 23:54:33 UTC

[01/50] incubator-tinkerpop git commit: empty commit to retrigger Travis build

Repository: incubator-tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1033 55165a572 -> dbd4a5360


empty commit to retrigger Travis build


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

Branch: refs/heads/TINKERPOP-1033
Commit: 2523090657094e914dc41b6c4759d62a5d4d0fa5
Parents: 2e44303
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Fri Dec 18 02:08:20 2015 +0100
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Fri Dec 18 02:08:20 2015 +0100

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

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



[20/50] incubator-tinkerpop git commit: Removed ignore annotations on TinkerGraph index tests.

Posted by ok...@apache.org.
Removed ignore annotations on TinkerGraph index tests.

Not sure why those were ignored - not finding out.  Turned them back on.


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

Branch: refs/heads/TINKERPOP-1033
Commit: 2f16c774ea44f9681afb58cb313d02b32376821e
Parents: 94f3315
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Dec 22 16:20:17 2015 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Dec 22 16:20:17 2015 -0500

----------------------------------------------------------------------
 .../gremlin/tinkergraph/structure/TinkerGraphTest.java        | 7 -------
 1 file changed, 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/2f16c774/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphTest.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphTest.java
index e79889f..47ba642 100644
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphTest.java
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphTest.java
@@ -35,7 +35,6 @@ import org.apache.tinkerpop.gremlin.structure.io.Mapper;
 import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONReader;
 import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONWriter;
 import org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper;
-import org.junit.Ignore;
 import org.junit.Test;
 
 import java.io.BufferedOutputStream;
@@ -130,7 +129,6 @@ public class TinkerGraphTest {
         g.createIndex("", Edge.class);
     }
 
-    @Ignore
     @Test
     public void shouldUpdateVertexIndicesInNewGraph() {
         final TinkerGraph g = TinkerGraph.open();
@@ -150,7 +148,6 @@ public class TinkerGraphTest {
         }, 35)).has("name", "stephen").count().next());
     }
 
-    @Ignore
     @Test
     public void shouldRemoveAVertexFromAnIndex() {
         final TinkerGraph g = TinkerGraph.open();
@@ -177,7 +174,6 @@ public class TinkerGraphTest {
         }, 35)).has("name", "stephen").count().next());
     }
 
-    @Ignore
     @Test
     public void shouldUpdateVertexIndicesInExistingGraph() {
         final TinkerGraph g = TinkerGraph.open();
@@ -205,7 +201,6 @@ public class TinkerGraphTest {
         }, 35)).has("name", "stephen").count().next());
     }
 
-    @Ignore
     @Test
     public void shouldUpdateEdgeIndicesInNewGraph() {
         final TinkerGraph g = TinkerGraph.open();
@@ -226,7 +221,6 @@ public class TinkerGraphTest {
         }, 0.5)).has("oid", "1").count().next());
     }
 
-    @Ignore
     @Test
     public void shouldRemoveEdgeFromAnIndex() {
         final TinkerGraph g = TinkerGraph.open();
@@ -254,7 +248,6 @@ public class TinkerGraphTest {
         }, 0.5)).has("oid", "1").count().next());
     }
 
-    @Ignore
     @Test
     public void shouldUpdateEdgeIndicesInExistingGraph() {
         final TinkerGraph g = TinkerGraph.open();


[49/50] incubator-tinkerpop git commit: Merge remote-tracking branch 'origin/TINKERPOP-1064'

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


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

Branch: refs/heads/TINKERPOP-1033
Commit: 46c7189e29a7ae22195106fca59ce248ae715a58
Parents: f4be739 f8dc1aa
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Jan 4 15:23:48 2016 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Jan 4 15:23:48 2016 -0500

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |   1 +
 .../src/reference/gremlin-applications.asciidoc |  10 +-
 .../upgrade/release-3.1.x-incubating.asciidoc   |  15 +++
 .../structure/io/gryo/GryoClassResolver.java    |   2 +-
 .../gremlin/structure/io/gryo/GryoMapper.java   |  25 +++-
 .../tinkerpop/gremlin/structure/io/IoX.java     |   5 +
 .../gremlin/structure/io/IoXIoRegistry.java     |  57 +++++++++
 .../tinkerpop/gremlin/structure/io/IoY.java     |   5 +
 .../gremlin/structure/io/IoYIoRegistry.java     |  39 +++++++
 .../structure/io/gryo/GryoMapperTest.java       | 113 ++++++++++++++++++
 .../AbstractGraphSONMessageSerializerV1d0.java  |   5 +-
 .../driver/ser/AbstractMessageSerializer.java   |  82 +++++++++++++
 .../driver/ser/GryoMessageSerializerV1d0.java   |  49 +++-----
 ...raphSONMessageSerializerGremlinV1d0Test.java |   5 +-
 .../ser/GraphSONMessageSerializerV1d0Test.java  |  60 ++++++++++
 .../ser/GryoMessageSerializerV1d0Test.java      | 115 ++++++++++++++++++-
 16 files changed, 544 insertions(+), 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/46c7189e/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --cc CHANGELOG.asciidoc
index e131b81,5d0feae..43fb4b6
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@@ -27,9 -27,9 +27,10 @@@ TinkerPop 3.1.1 (NOT OFFICIALLY RELEASE
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
  * Execute the `LifeCycle.beforeEval()` in the same thread that `eval()` is executed in for `GremlinExecutor`.
 +* Improved error handling of Gremlin Console initialization scripts to better separate errors in initialization script I/O versus execution of the script itself.
  * Fixed a bug in `Graph.OptOut` when trying to opt-out of certain test cases with the `method` property set to "*".
  * Added another `BulkLoader` implementation (`OneTimeBulkLoader`) that doesn't store temporary properties in the target graph.
+ * Added option to allow for a custom `ClassResolver` to be assigned to a `GryoMapper` instance.
  * Fixed a `SparkGraphComputer` sorting bug in MapReduce that occurred when there was more than one partition.
  * Added `strictTransactionManagement` to the Gremlin Server settings to indicate that the `aliases` parameter must be passed on requests and that transaction management will be scoped to the graphs provided in that argument.
  * Fixed a `NullPointerException` bug in `PeerPressureVertexProgram` that occurred when an adjacency traversal was not provided.


[39/50] incubator-tinkerpop git commit: Merge remote-tracking branch 'origin/master'

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


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

Branch: refs/heads/TINKERPOP-1033
Commit: d3a59f42768492a9209effed557ebc489e49189e
Parents: 9ba55be b1e704b
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Dec 29 12:15:46 2015 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Dec 29 12:15:46 2015 -0500

----------------------------------------------------------------------
 docs/static/images/quantum-gremlin-full.png | Bin 1804044 -> 1877990 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)
----------------------------------------------------------------------



[06/50] incubator-tinkerpop git commit: TINKERPOP-1051: Changed max to maximum

Posted by ok...@apache.org.
TINKERPOP-1051: Changed max to maximum


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

Branch: refs/heads/TINKERPOP-1033
Commit: 52edf4152d71a59730302bd358878827aa051214
Parents: 44932d1
Author: Jeremy Hanna <jh...@datastax.com>
Authored: Fri Dec 18 10:07:45 2015 -0800
Committer: Jeremy Hanna <jh...@datastax.com>
Committed: Fri Dec 18 10:07:45 2015 -0800

----------------------------------------------------------------------
 docs/src/reference/gremlin-applications.asciidoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/52edf415/docs/src/reference/gremlin-applications.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc
index d96e356..9979b3d 100644
--- a/docs/src/reference/gremlin-applications.asciidoc
+++ b/docs/src/reference/gremlin-applications.asciidoc
@@ -1104,7 +1104,7 @@ Tuning
 
 image:gremlin-handdrawn.png[width=120,float=right] Tuning Gremlin Server for a particular environment may require some simple trial-and-error, but the following represent some basic guidelines that might be useful:
 
-* Gremlin Server defaults to a very modest max heap size.  Consider increasing this value for non-trivial uses.  Max heap size (`-Xmx`) is defined with the `JAVA_OPTIONS` setting in `gremlin-server.sh`.
+* Gremlin Server defaults to a very modest maximum heap size.  Consider increasing this value for non-trivial uses.  Maximum heap size (`-Xmx`) is defined with the `JAVA_OPTIONS` setting in `gremlin-server.sh`.
 * When configuring the size of `threadPoolWorker` start with the default of `1` and increment by one as needed to a maximum of `2*number of cores`.
 * The "right" size of the `gremlinPool` setting is somewhat dependent on the type of scripts that will be processed
 by Gremlin Server.  As requests arrive to Gremlin Server they are decoded and queued to be processed by threads in


[16/50] incubator-tinkerpop git commit: TINKERPOP3-1062 Move beforeEval to occur in same thread as eval

Posted by ok...@apache.org.
TINKERPOP3-1062 Move beforeEval to occur in same thread as eval

In this way, beforeEval can working with ThreadLocal settings on the Graph instances (as it may pertain to transactions).


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

Branch: refs/heads/TINKERPOP-1033
Commit: d85a35d8741a5e534c0c45b194a716de10803198
Parents: 114d867
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Dec 22 08:58:58 2015 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Dec 22 08:58:58 2015 -0500

----------------------------------------------------------------------
 .../apache/tinkerpop/gremlin/groovy/engine/GremlinExecutor.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d85a35d8/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 f213d0d..49e2ac7 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
@@ -247,11 +247,12 @@ public class GremlinExecutor implements AutoCloseable {
         final Bindings bindings = new SimpleBindings();
         bindings.putAll(globalBindings);
         bindings.putAll(boundVars);
-        lifeCycle.getBeforeEval().orElse(beforeEval).accept(bindings);
 
         final CompletableFuture<Object> evaluationFuture = new CompletableFuture<>();
         final FutureTask<Void> f = new FutureTask<>(() -> {
             try {
+                lifeCycle.getBeforeEval().orElse(beforeEval).accept(bindings);
+
                 logger.debug("Evaluating script - {} - in thread [{}]", script, Thread.currentThread().getName());
 
                 final Object o = scriptEngines.eval(script, bindings, lang);


[29/50] incubator-tinkerpop git commit: Update upgrade docs.

Posted by ok...@apache.org.
Update upgrade 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/0defd91a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/0defd91a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/0defd91a

Branch: refs/heads/TINKERPOP-1033
Commit: 0defd91a992e1abbbefc1519871f501bc17a4711
Parents: 34db892
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Dec 24 08:30:35 2015 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Dec 24 08:30:35 2015 -0500

----------------------------------------------------------------------
 docs/src/upgrade/release-3.1.x-incubating.asciidoc | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/0defd91a/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 b50f3e1..8f487a2 100644
--- a/docs/src/upgrade/release-3.1.x-incubating.asciidoc
+++ b/docs/src/upgrade/release-3.1.x-incubating.asciidoc
@@ -161,6 +161,21 @@ link:https://issues.apache.org/jira/browse/TINKERPOP-1000[TINKERPOP-1000]
 Graph Database Providers
 ^^^^^^^^^^^^^^^^^^^^^^^^
 
+Custom ClassResolver
+++++++++++++++++++++
+
+For providers who have built custom serializers in Gryo, there is a new feature open that can be considered.  A
+`GryoMapper` can now take a custom Kryo `ClassResolver`, which means that custom types can be coerced to other types
+during serialization (e.g. a custom identifier could be serialized as a `HashMap`).  The advantage to taking this
+approach is that users will not need to have the provider's serializers on the client side.  They will only need to
+exist on the server (presuming that the a type is coerced to a type available on the client, of course).  The downside
+is that serialization is then no longer a two way street. For example, a custom `ClassResolver` that coerced a
+custom identifier to `HashMap` would let the client work with the identifier as a `HashMap`, but the client would then
+have to send that identifier back to the server as a `HashMap` where it would be recognized as a `HashMap` (not an
+identifier).
+
+See: link:https://issues.apache.org/jira/browse/TINKERPOP-1064[TINKERPOP-1064]
+
 Feature Consistency
 +++++++++++++++++++
 


[07/50] incubator-tinkerpop git commit: Merge branch 'master' of https://github.com/jeromatron/incubator-tinkerpop

Posted by ok...@apache.org.
Merge branch 'master' of https://github.com/jeromatron/incubator-tinkerpop


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

Branch: refs/heads/TINKERPOP-1033
Commit: 87dfadb8bcd15ce7f8e95d10604e48ca9b1def3f
Parents: 4f4384b 52edf41
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Dec 18 13:26:59 2015 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Dec 18 13:26:59 2015 -0500

----------------------------------------------------------------------
 docs/src/reference/gremlin-applications.asciidoc | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------



[50/50] incubator-tinkerpop git commit: merged master into branch. Minor tweaks given @spmallette new work on TestDirectory stuffs.

Posted by ok...@apache.org.
merged master into branch. Minor tweaks given @spmallette new work on TestDirectory stuffs.


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

Branch: refs/heads/TINKERPOP-1033
Commit: dbd4a5360a75d562df64eecd91cc8c12550adb10
Parents: 55165a5 46c7189
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Tue Jan 5 15:54:14 2016 -0700
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Tue Jan 5 15:54:14 2016 -0700

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              | 235 ++++-----
 README.asciidoc                                 |  12 +-
 bin/validate-distribution.sh                    |   4 +-
 docs/src/dev/developer/contributing.asciidoc    |  35 +-
 docs/src/dev/developer/meetings.asciidoc        | 194 ++++----
 docs/src/dev/developer/release.asciidoc         |   4 +-
 .../src/reference/gremlin-applications.asciidoc | 107 +++-
 docs/src/reference/implementations.asciidoc     |   5 +
 docs/src/reference/intro.asciidoc               |  23 +-
 docs/src/reference/the-graph.asciidoc           |  40 +-
 docs/src/reference/the-graphcomputer.asciidoc   |  11 +-
 docs/src/reference/the-traversal.asciidoc       |   2 +-
 .../tutorials/getting-started/index.asciidoc    |  52 +-
 .../upgrade/release-3.0.x-incubating.asciidoc   |  28 +-
 .../upgrade/release-3.1.x-incubating.asciidoc   | 100 ++--
 docs/static/images/business-gremlin.png         | Bin 0 -> 412520 bytes
 .../images/modern-edge-1-to-3-1-gremlin.png     | Bin 11607 -> 12720 bytes
 docs/static/images/modern-edge-1-to-3-1.png     | Bin 3210 -> 3887 bytes
 .../images/modern-edge-1-to-3-2-gremlin.png     | Bin 17029 -> 18052 bytes
 docs/static/images/modern-edge-1-to-3-2.png     | Bin 4420 -> 3784 bytes
 .../images/modern-edge-1-to-3-3-gremlin.png     | Bin 20948 -> 22258 bytes
 docs/static/images/modern-edge-1-to-3-3.png     | Bin 7372 -> 5800 bytes
 docs/static/images/quantum-gremlin-full.png     | Bin 0 -> 1877990 bytes
 .../tinkerpop/gremlin/console/Console.groovy    |  20 +-
 .../computer/bulkloading/BulkLoader.java        |   8 +-
 .../bulkloading/BulkLoaderVertexProgram.java    |  11 +-
 .../bulkloading/IncrementalBulkLoader.java      |   8 +-
 .../computer/bulkloading/OneTimeBulkLoader.java | 109 +++++
 .../tinkerpop/gremlin/structure/Element.java    |   2 +-
 .../structure/io/gryo/GryoClassResolver.java    |   2 +-
 .../gremlin/structure/io/gryo/GryoMapper.java   |  25 +-
 .../apache/tinkerpop/gremlin/TestHelper.java    |  76 ++-
 .../sideEffect/LambdaSideEffectStepTest.java    |   7 +-
 .../tinkerpop/gremlin/structure/io/IoX.java     |   5 +
 .../gremlin/structure/io/IoXIoRegistry.java     |  57 +++
 .../tinkerpop/gremlin/structure/io/IoY.java     |   5 +
 .../gremlin/structure/io/IoYIoRegistry.java     |  39 ++
 .../structure/io/gryo/GryoMapperTest.java       | 113 +++++
 .../AbstractGraphSONMessageSerializerV1d0.java  |   5 +-
 .../driver/ser/AbstractMessageSerializer.java   |  82 ++++
 .../driver/ser/GryoMessageSerializerV1d0.java   |  49 +-
 ...raphSONMessageSerializerGremlinV1d0Test.java |   5 +-
 .../ser/GraphSONMessageSerializerV1d0Test.java  |  60 +++
 .../ser/GryoMessageSerializerV1d0Test.java      | 115 ++++-
 .../traversal/step/map/GroovySelectTest.groovy  |   2 +-
 .../gremlin/groovy/GroovyEnvironmentSuite.java  |   2 +
 ...remlinGroovyScriptEngineFileSandboxTest.java | 117 +++++
 .../GremlinGroovyScriptEngineIntegrateTest.java |  11 +-
 .../process/GroovyProcessComputerSuite.java     |   1 -
 .../gremlin/groovy/jsr223/sandbox.yaml          |  58 +++
 .../customizer/AbstractSandboxExtension.groovy  |  90 ++++
 .../customizer/FileSandboxExtension.groovy      | 107 ++++
 .../PropertyExpressionEvaluator.groovy          |  66 +++
 .../jsr223/customizer/SandboxExtension.groovy   |   3 +
 .../jsr223/customizer/SandboxHelper.groovy      |  57 +++
 .../customizer/SimpleSandboxExtension.groovy    |  30 +-
 .../customizer/TinkerPopSandboxExtension.groovy |  44 +-
 .../gremlin/groovy/engine/GremlinExecutor.java  |   3 +-
 .../jsr223/GremlinGroovyScriptEngineTest.java   |   9 +-
 .../groovy/util/DependencyGrabberTest.java      |   3 +-
 gremlin-server/conf/gremlin-server-classic.yaml |   1 +
 gremlin-server/conf/gremlin-server-min.yaml     |   1 +
 .../conf/gremlin-server-modern-readonly.yaml    |   1 +
 gremlin-server/conf/gremlin-server-modern.yaml  |   1 +
 gremlin-server/conf/gremlin-server-neo4j.yaml   |   1 +
 .../conf/gremlin-server-rest-modern.yaml        |   1 +
 .../conf/gremlin-server-rest-secure.yaml        |   1 +
 gremlin-server/conf/gremlin-server-secure.yaml  |   1 +
 gremlin-server/conf/gremlin-server-spark.yaml   |   1 +
 gremlin-server/conf/gremlin-server.yaml         |   1 +
 .../scripts/empty-sample-secure.groovy          |   4 +-
 .../tinkerpop/gremlin/server/GraphManager.java  |  46 ++
 .../tinkerpop/gremlin/server/GremlinServer.java |   2 +-
 .../tinkerpop/gremlin/server/Settings.java      |   9 +
 .../server/auth/AllowAllAuthenticator.java      |   2 +-
 .../gremlin/server/auth/Authenticator.java      |   2 +-
 .../server/auth/SimpleAuthenticator.java        |   4 +-
 .../gremlin/server/channel/HttpChannelizer.java |   2 +-
 .../handler/HttpGremlinEndpointHandler.java     |  37 +-
 .../server/handler/OpSelectorHandler.java       |   2 +-
 .../server/op/AbstractEvalOpProcessor.java      |  52 +-
 .../server/op/control/ControlOpProcessor.java   |  18 +-
 .../server/op/session/SessionOpProcessor.java   |   7 +-
 .../server/op/standard/StandardOpProcessor.java |  31 +-
 .../AbstractGremlinServerIntegrationTest.java   |   7 +-
 .../server/GremlinAdditionPerformanceTest.java  |   5 +-
 .../server/GremlinDriverIntegrateTest.java      | 113 ++++-
 .../GremlinServerAuthOldIntegrateTest.java      |   2 +-
 .../server/GremlinServerHttpIntegrateTest.java  |  36 ++
 .../server/GremlinServerIntegrateTest.java      |  90 ++--
 .../server/gremlin-server-integration.yaml      |   1 +
 .../server/gremlin-server-performance.yaml      |   1 +
 .../gremlin/AbstractGraphProvider.java          |  14 +-
 .../tinkerpop/gremlin/AbstractGremlinSuite.java |  32 +-
 .../tinkerpop/gremlin/AbstractGremlinTest.java  |  20 +-
 .../apache/tinkerpop/gremlin/GraphManager.java  | 115 ++++-
 .../apache/tinkerpop/gremlin/GraphProvider.java |  10 +
 .../apache/tinkerpop/gremlin/TestHelper.java    |  51 +-
 .../generator/CommunityGeneratorTest.java       |   5 +-
 .../process/AbstractGremlinProcessTest.java     |   7 +-
 .../gremlin/process/GremlinProcessRunner.java   |   6 +-
 .../BulkLoaderVertexProgramTest.java            |  39 +-
 .../process/traversal/step/filter/TailTest.java |   2 +-
 .../process/traversal/step/map/FlatMapTest.java |   2 +-
 .../process/traversal/step/map/MapTest.java     |   2 +-
 .../process/traversal/step/map/SelectTest.java  |   6 +-
 .../ElementIdStrategyProcessTest.java           |   7 +-
 .../gremlin/structure/FeatureSupportTest.java   |   7 +-
 .../tinkerpop/gremlin/structure/GraphTest.java  |  16 +-
 .../gremlin/structure/PropertyTest.java         |   4 +-
 .../tinkerpop/gremlin/structure/VertexTest.java |  18 +-
 .../gremlin/structure/io/IoIntegrateTest.java   |  10 +-
 .../structure/ExceptionCoverageTest.java        |   5 +-
 .../gremlin/hadoop/HadoopGraphProvider.java     |   2 +-
 .../groovy/plugin/HadoopGremlinPluginCheck.java |  55 ++-
 .../structure/io/RecordReaderWriterTest.java    |   7 +-
 .../gremlin/neo4j/NativeNeo4jSuite.java         |  18 +-
 .../neo4j/process/NativeNeo4jCypherCheck.java   | 214 ++++++++
 .../neo4j/process/NativeNeo4jCypherTest.java    | 211 --------
 .../neo4j/structure/NativeNeo4jIndexCheck.java  | 371 ++++++++++++++
 .../neo4j/structure/NativeNeo4jIndexTest.java   | 368 --------------
 .../structure/NativeNeo4jStructureCheck.java    | 483 +++++++++++++++++++
 .../structure/NativeNeo4jStructureTest.java     | 483 -------------------
 pom.xml                                         |   3 -
 .../gremlin/spark/AbstractSparkTest.java        |   5 +-
 .../process/computer/LocalPropertyTest.java     |   9 +-
 .../groovy/plugin/SparkGremlinPluginTest.java   |  35 +-
 .../gremlin/spark/structure/SparkTest.java      |   6 +-
 .../spark/structure/io/InputOutputRDDTest.java  |   4 +-
 .../spark/structure/io/InputRDDTest.java        |   5 +-
 .../spark/structure/io/OutputRDDTest.java       |   3 +-
 .../io/PersistedInputOutputRDDTest.java         |  58 +--
 .../structure/TinkerGraphPlayTest.java          |  55 ++-
 .../tinkergraph/structure/TinkerGraphTest.java  |  18 +-
 134 files changed, 3713 insertions(+), 1819 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/dbd4a536/hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/groovy/plugin/HadoopGremlinPluginCheck.java
----------------------------------------------------------------------
diff --cc hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/groovy/plugin/HadoopGremlinPluginCheck.java
index 95c19ed,6c58c52..26acee9
--- a/hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/groovy/plugin/HadoopGremlinPluginCheck.java
+++ b/hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/groovy/plugin/HadoopGremlinPluginCheck.java
@@@ -26,22 -27,23 +27,21 @@@ import org.apache.tinkerpop.gremlin.gro
  import org.apache.tinkerpop.gremlin.hadoop.Constants;
  import org.apache.tinkerpop.gremlin.hadoop.HadoopGraphProvider;
  import org.apache.tinkerpop.gremlin.process.AbstractGremlinProcessTest;
--import org.apache.tinkerpop.gremlin.process.computer.KeyValue;
--import org.apache.tinkerpop.gremlin.process.computer.MapReduce;
  import org.apache.tinkerpop.gremlin.process.computer.traversal.step.sideEffect.mapreduce.TraverserMapReduce;
  import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
--import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
  import org.apache.tinkerpop.gremlin.structure.Vertex;
  import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;
  import org.junit.Before;
  import org.junit.Test;
  
+ import java.io.File;
  import java.util.Arrays;
--import java.util.Collection;
  import java.util.List;
--import java.util.UUID;
  
--import static org.junit.Assert.*;
++import static org.junit.Assert.assertEquals;
++import static org.junit.Assert.assertFalse;
++import static org.junit.Assert.assertNotNull;
++import static org.junit.Assert.assertTrue;
  
  /**
   * This is an test that is mean to be used in the context of the {@link HadoopPluginSuite} and shouldn't be
@@@ -135,8 -140,30 +138,30 @@@ public class HadoopGremlinPluginCheck e
          this.remote.connect(Arrays.asList("graph", "g"));
          Traversal<Vertex, String> traversal = (Traversal<Vertex, String>) this.remote.submit(Arrays.asList("g.V().hasLabel('person').group('m').by('age').by('name').out('knows').out('created').values('name')"));
          AbstractGremlinProcessTest.checkResults(Arrays.asList("ripple", "lop"), traversal);
-         assertFalse((Boolean) this.console.eval("hdfs.exists('target/test-output/m')"));
-         assertFalse((Boolean) this.console.eval("hdfs.exists('target/test-output/" + TraverserMapReduce.TRAVERSERS + "')"));
 -        assertTrue((Boolean) this.console.eval("hdfs.exists('" + hadoopGraphProviderDataDir + "m')"));
 -        assertTrue((Boolean) this.console.eval("hdfs.exists('" + hadoopGraphProviderDataDir + TraverserMapReduce.TRAVERSERS + "')"));
 -        final List<KeyValue<Integer, Collection<String>>> mList = IteratorUtils.asList(this.console.eval("hdfs.head('" + hadoopGraphProviderDataDir + "m',ObjectWritable)"));
++//        assertFalse((Boolean) this.console.eval("hdfs.exists('" + hadoopGraphProviderDataDir + "m')"));
++//        assertFalse((Boolean) this.console.eval("hdfs.exists('" + hadoopGraphProviderDataDir + TraverserMapReduce.TRAVERSERS + "')"));
++        /*final List<KeyValue<Integer, Collection<String>>> mList = IteratorUtils.asList(this.console.eval("hdfs.head('" + hadoopGraphProviderDataDir + "m',ObjectWritable)"));
+         assertEquals(4, mList.size());
+         mList.forEach(keyValue -> {
+             if (keyValue.getKey().equals(29))
+                 assertTrue(keyValue.getValue().contains("marko"));
+             else if (keyValue.getKey().equals(35))
+                 assertTrue(keyValue.getValue().contains("peter"));
+             else if (keyValue.getKey().equals(32))
+                 assertTrue(keyValue.getValue().contains("josh"));
+             else if (keyValue.getKey().equals(27))
+                 assertTrue(keyValue.getValue().contains("vadas"));
+             else
+                 throw new IllegalStateException("The provided key/value is unknown: " + keyValue);
+         });
+         final List<KeyValue<MapReduce.NullObject, Traverser<String>>> traversersList = IteratorUtils.asList(this.console.eval("hdfs.head('" + hadoopGraphProviderDataDir + TraverserMapReduce.TRAVERSERS + "',ObjectWritable)"));
+         assertEquals(2, traversersList.size());
+         traversersList.forEach(keyValue -> {
+             assertEquals(MapReduce.NullObject.instance(), keyValue.getKey());
+             final String name = keyValue.getValue().get();
+             assertTrue(name.equals("ripple") || name.equals("lop"));
 -        });
++        });*/
+         ////////////////
      }
  
      @Test

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/dbd4a536/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/AbstractSparkTest.java
----------------------------------------------------------------------
diff --cc spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/AbstractSparkTest.java
index 3fc2a59,9f3b87a..2ad0c14
--- a/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/AbstractSparkTest.java
+++ b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/AbstractSparkTest.java
@@@ -24,18 -22,11 +24,20 @@@ import org.apache.commons.configuration
  import org.apache.spark.SparkConf;
  import org.apache.spark.SparkContext;
  import org.apache.spark.api.java.JavaSparkContext;
 +import org.apache.tinkerpop.gremlin.hadoop.Constants;
 +import org.apache.tinkerpop.gremlin.hadoop.structure.HadoopGraph;
 +import org.apache.tinkerpop.gremlin.hadoop.structure.io.graphson.GraphSONInputFormat;
 +import org.apache.tinkerpop.gremlin.hadoop.structure.io.gryo.GryoInputFormat;
 +import org.apache.tinkerpop.gremlin.spark.process.computer.SparkHadoopGraphProvider;
  import org.apache.tinkerpop.gremlin.spark.structure.Spark;
 +import org.apache.tinkerpop.gremlin.spark.structure.io.PersistedInputRDD;
 +import org.apache.tinkerpop.gremlin.spark.structure.io.PersistedOutputRDD;
 +import org.apache.tinkerpop.gremlin.spark.structure.io.gryo.GryoSerializer;
 +import org.apache.tinkerpop.gremlin.structure.Graph;
  import org.junit.After;
  import org.junit.Before;
+ import org.slf4j.Logger;
+ import org.slf4j.LoggerFactory;
  
  /**
   * @author Marko A. Rodriguez (http://markorodriguez.com)
@@@ -52,25 -44,6 +55,25 @@@ public abstract class AbstractSparkTes
          sparkContext.close();
          Spark.create(sparkContext.sc());
          Spark.close();
-         System.out.println("SparkContext has been closed for " + this.getClass().getCanonicalName() + "-setupTest");
+         logger.info("SparkContext has been closed for " + this.getClass().getCanonicalName() + "-setupTest");
      }
 +
 +    protected Configuration getBaseConfiguration(final String inputLocation) {
 +        final BaseConfiguration configuration = new BaseConfiguration();
 +        configuration.setDelimiterParsingDisabled(true);
 +        configuration.setProperty("spark.master", "local[4]");
 +        configuration.setProperty("spark.serializer", GryoSerializer.class.getCanonicalName());
 +        configuration.setProperty(Graph.GRAPH, HadoopGraph.class.getName());
 +        configuration.setProperty(Constants.GREMLIN_HADOOP_JARS_IN_DISTRIBUTED_CACHE, false);
 +        configuration.setProperty(Constants.GREMLIN_HADOOP_INPUT_LOCATION, SparkHadoopGraphProvider.PATHS.get("tinkerpop-modern.kryo"));
 +        if (inputLocation.contains(".kryo"))
 +            configuration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_INPUT_FORMAT, GryoInputFormat.class.getCanonicalName());
 +        else if (inputLocation.contains(".json"))
 +            configuration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_INPUT_FORMAT, GraphSONInputFormat.class.getCanonicalName());
 +        else
 +            configuration.setProperty(Constants.GREMLIN_SPARK_GRAPH_INPUT_RDD, PersistedInputRDD.class.getCanonicalName());
 +
 +        configuration.setProperty(Constants.GREMLIN_SPARK_GRAPH_OUTPUT_RDD, PersistedOutputRDD.class.getCanonicalName());
 +        return configuration;
 +    }
  }

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/dbd4a536/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/LocalPropertyTest.java
----------------------------------------------------------------------
diff --cc spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/LocalPropertyTest.java
index 1bf5338,f535012..65d6ce4
--- a/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/LocalPropertyTest.java
+++ b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/LocalPropertyTest.java
@@@ -78,10 -79,10 +79,10 @@@ public class LocalPropertyTest extends 
          JavaSparkContext sparkContext = new JavaSparkContext(SparkContext.getOrCreate(sparkConfiguration));
          JavaSparkStatusTracker statusTracker = sparkContext.statusTracker();
          assertTrue(statusTracker.getJobIdsForGroup("22").length >= 1);
-         assertTrue(Spark.hasRDD(Constants.getGraphLocation(rddLocation)));
 -        assertTrue(Spark.hasRDD(rddName));
++        assertTrue(Spark.hasRDD(Constants.getGraphLocation(rddName)));
          ///////
          configuration.setProperty(Constants.GREMLIN_SPARK_GRAPH_INPUT_RDD, PersistedInputRDD.class.getCanonicalName());
-         configuration.setProperty(Constants.GREMLIN_HADOOP_INPUT_LOCATION, rddLocation);
+         configuration.setProperty(Constants.GREMLIN_HADOOP_INPUT_LOCATION, rddName);
          configuration.setProperty(Constants.GREMLIN_SPARK_GRAPH_OUTPUT_RDD, null);
          configuration.setProperty(Constants.GREMLIN_HADOOP_OUTPUT_LOCATION, null);
          configuration.setProperty(Constants.GREMLIN_SPARK_PERSIST_CONTEXT, false);

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/dbd4a536/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/groovy/plugin/SparkGremlinPluginTest.java
----------------------------------------------------------------------
diff --cc spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/groovy/plugin/SparkGremlinPluginTest.java
index 7574908,a6741da..4eadd97
--- a/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/groovy/plugin/SparkGremlinPluginTest.java
+++ b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/groovy/plugin/SparkGremlinPluginTest.java
@@@ -67,7 -66,8 +68,9 @@@ public class SparkGremlinPluginTest ext
  
      @Test
      public void shouldSupportBasicRDDOperations() throws Exception {
-         String rddLocation = "target/test-output/graph-1";
++
+         final String root = TestHelper.makeTestDataDirectory(SparkGremlinPluginTest.class, "shouldSupportBasicRDDOperations");
+         final String rddName1 = TestHelper.makeTestDataDirectory(SparkGremlinPluginTest.class, "shouldSupportBasicRDDOperations", "graph-1");
          final Configuration configuration = new BaseConfiguration();
          configuration.setProperty("spark.master", "local[4]");
          configuration.setProperty("spark.serializer", GryoSerializer.class.getCanonicalName());
@@@ -87,40 -87,38 +90,38 @@@
          this.console.addBinding("graph", graph);
          this.console.eval("graph.compute(SparkGraphComputer).program(PageRankVertexProgram.build().iterations(1).create()).submit().get()");
          assertEquals(1, ((List<String>) this.console.eval("spark.ls()")).size());
-         assertEquals(Constants.getGraphLocation(rddLocation) + " [Memory Deserialized 1x Replicated]", ((List<String>) this.console.eval("spark.ls()")).get(0));
 -        assertEquals(rddName1 + " [Memory Deserialized 1x Replicated]", ((List<String>) this.console.eval("spark.ls()")).get(0));
++        assertEquals(Constants.getGraphLocation(rddName1) + " [Memory Deserialized 1x Replicated]", ((List<String>) this.console.eval("spark.ls()")).get(0));
  
-         rddLocation = "target/test-output/graph-2";
-         this.console.eval("graph.configuration().setProperty('" + Constants.GREMLIN_HADOOP_OUTPUT_LOCATION + "','" + rddLocation + "')");
+         final String rddName2 = TestHelper.makeTestDataDirectory(SparkGremlinPluginTest.class, "shouldSupportBasicRDDOperations", "graph-2");
+         this.console.eval("graph.configuration().setProperty('" + Constants.GREMLIN_HADOOP_OUTPUT_LOCATION + "','" + rddName2 + "')");
          this.console.eval("graph.compute(SparkGraphComputer).program(PageRankVertexProgram.build().iterations(1).create()).submit().get()");
          assertEquals(2, ((List<String>) this.console.eval("spark.ls()")).size());
-         assertTrue(((List<String>) this.console.eval("spark.ls()")).contains(Constants.getGraphLocation(rddLocation) + " [Memory Deserialized 1x Replicated]"));
 -        assertTrue(((List<String>) this.console.eval("spark.ls()")).contains(rddName2 + " [Memory Deserialized 1x Replicated]"));
++        assertTrue(((List<String>) this.console.eval("spark.ls()")).contains(Constants.getGraphLocation(rddName2) + " [Memory Deserialized 1x Replicated]"));
  
-         this.console.eval("spark.rm('target/test-output/graph-2/~g')");
 -        this.console.eval("spark.rm('" + rddName2 + "')");
++        this.console.eval("spark.rm('" + Constants.getGraphLocation(rddName2) + "')");
          assertEquals(1, ((List<String>) this.console.eval("spark.ls()")).size());
-         assertTrue(((List<String>) this.console.eval("spark.ls()")).contains("target/test-output/graph-1/~g [Memory Deserialized 1x Replicated]"));
 -        assertTrue(((List<String>) this.console.eval("spark.ls()")).contains(rddName1 + " [Memory Deserialized 1x Replicated]"));
++        assertTrue(((List<String>) this.console.eval("spark.ls()")).contains(Constants.getGraphLocation(rddName1) + " [Memory Deserialized 1x Replicated]"));
  
-         assertEquals(6, IteratorUtils.count(((Iterator<Object>) this.console.eval("spark.head('target/test-output/graph-1/~g')"))));
 -        assertEquals(6, ((List<Object>) this.console.eval("spark.head('" + rddName1 + "')")).size());
++        assertEquals(6, IteratorUtils.count(((Iterator<Object>) this.console.eval("spark.head('" + Constants.getGraphLocation(rddName1) + "')"))));
  
-         this.console.eval("spark.rmr('target/test-output/graph-*')");
 -        this.console.eval("spark.rm('"+ root + "graph-*')");
++        this.console.eval("spark.rmr('" + root + "graph-*')");
          assertEquals(0, ((List<String>) this.console.eval("spark.ls()")).size());
  
          //////
-         rddLocation = "target/test-output/graph-1";
-         this.console.eval("graph.configuration().setProperty('" + Constants.GREMLIN_HADOOP_OUTPUT_LOCATION + "','" + rddLocation + "')");
 -        this.console.eval("graph.configuration().setProperty('" + Constants.GREMLIN_HADOOP_OUTPUT_LOCATION + "','" + rddName1 + "')");
++        this.console.eval("graph.configuration().setProperty('" + Constants.GREMLIN_HADOOP_OUTPUT_LOCATION + "','" + Constants.getGraphLocation(rddName1) + "')");
          this.console.eval("graph.compute(SparkGraphComputer).program(PageRankVertexProgram.build().iterations(1).create()).submit().get()");
  
-         rddLocation = "target/test-output/graph-2";
-         this.console.eval("graph.configuration().setProperty('" + Constants.GREMLIN_HADOOP_OUTPUT_LOCATION + "','" + rddLocation + "')");
 -        this.console.eval("graph.configuration().setProperty('" + Constants.GREMLIN_HADOOP_OUTPUT_LOCATION + "','" + rddName2 + "')");
++        this.console.eval("graph.configuration().setProperty('" + Constants.GREMLIN_HADOOP_OUTPUT_LOCATION + "','" + Constants.getGraphLocation(rddName2) + "')");
          this.console.eval("graph.compute(SparkGraphComputer).program(PageRankVertexProgram.build().iterations(1).create()).submit().get()");
  
-         rddLocation = "target/test-output/x";
-         this.console.eval("graph.configuration().setProperty('" + Constants.GREMLIN_HADOOP_OUTPUT_LOCATION + "','" + rddLocation + "')");
+         final String rddName3 = TestHelper.makeTestDataDirectory(SparkGremlinPluginTest.class, "shouldSupportBasicRDDOperations", "x");
 -        this.console.eval("graph.configuration().setProperty('" + Constants.GREMLIN_HADOOP_OUTPUT_LOCATION + "','" + rddName3 + "')");
++        this.console.eval("graph.configuration().setProperty('" + Constants.GREMLIN_HADOOP_OUTPUT_LOCATION + "','" + Constants.getGraphLocation(rddName3) + "')");
          this.console.eval("graph.compute(SparkGraphComputer).program(PageRankVertexProgram.build().iterations(1).create()).submit().get()");
  
          assertEquals(3, ((List<String>) this.console.eval("spark.ls()")).size());
-         this.console.eval("spark.rmr('target/test-output/graph-*')");
 -        this.console.eval("spark.rm('"+ root + "graph-*')");
++        this.console.eval("spark.rmr('" + root + "graph-*')");
          assertEquals(1, ((List<String>) this.console.eval("spark.ls()")).size());
 -        this.console.eval("spark.rm('*')");
 +        this.console.eval("spark.rmr('*')");
          assertEquals(0, ((List<String>) this.console.eval("spark.ls()")).size());
  
          //

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/dbd4a536/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/structure/SparkTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/dbd4a536/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/structure/io/PersistedInputOutputRDDTest.java
----------------------------------------------------------------------
diff --cc spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/structure/io/PersistedInputOutputRDDTest.java
index 44e0949,4028fc6..e153c4e
--- a/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/structure/io/PersistedInputOutputRDDTest.java
+++ b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/structure/io/PersistedInputOutputRDDTest.java
@@@ -21,6 -21,10 +21,7 @@@ package org.apache.tinkerpop.gremlin.sp
  
  import org.apache.commons.configuration.BaseConfiguration;
  import org.apache.commons.configuration.Configuration;
 -import org.apache.spark.SparkConf;
 -import org.apache.spark.SparkContext;
 -import org.apache.spark.api.java.JavaSparkContext;
+ import org.apache.tinkerpop.gremlin.TestHelper;
  import org.apache.tinkerpop.gremlin.hadoop.Constants;
  import org.apache.tinkerpop.gremlin.hadoop.structure.HadoopGraph;
  import org.apache.tinkerpop.gremlin.hadoop.structure.io.gryo.GryoInputFormat;
@@@ -76,13 -79,13 +77,14 @@@ public class PersistedInputOutputRDDTes
                                  "g.V()").create(graph)).submit().get();
          ////////
          Spark.create("local[4]");
-         assertFalse(Spark.hasRDD(Constants.getGraphLocation(rddLocation)));
 -        assertFalse(Spark.hasRDD(rddName));
++        assertFalse(Spark.hasRDD(Constants.getGraphLocation(rddName)));
          Spark.close();
      }
  
      @Test
      public void shouldPersistRDDAcrossJobs() throws Exception {
-         final String rddLocation = "target/test-output/" + UUID.randomUUID();
++
+         final String rddName = TestHelper.makeTestDataDirectory(PersistedInputOutputRDDTest.class, UUID.randomUUID().toString());
          final Configuration configuration = new BaseConfiguration();
          configuration.setProperty("spark.master", "local[4]");
          configuration.setProperty("spark.serializer", GryoSerializer.class.getCanonicalName());
@@@ -102,10 -105,10 +104,10 @@@
                                  "gremlin-groovy",
                                  "g.V()").create(graph)).submit().get();
          ////////
-         assertTrue(Spark.hasRDD(Constants.getGraphLocation(rddLocation)));
 -        assertTrue(Spark.hasRDD(rddName));
++        assertTrue(Spark.hasRDD(Constants.getGraphLocation(rddName)));
          ///////
          configuration.setProperty(Constants.GREMLIN_SPARK_GRAPH_INPUT_RDD, PersistedInputRDD.class.getCanonicalName());
-         configuration.setProperty(Constants.GREMLIN_HADOOP_INPUT_LOCATION, rddLocation);
+         configuration.setProperty(Constants.GREMLIN_HADOOP_INPUT_LOCATION, rddName);
          configuration.setProperty(Constants.GREMLIN_SPARK_GRAPH_OUTPUT_RDD, null);
          configuration.setProperty(Constants.GREMLIN_HADOOP_OUTPUT_LOCATION, null);
          graph = GraphFactory.open(configuration);
@@@ -151,7 -154,7 +153,7 @@@
                  .program(BulkLoaderVertexProgram.build().userSuppliedIds(true).writeGraph(writeConfiguration).create(bulkLoaderGraph))
                  .submit().get();
          ////
-         assertTrue(Spark.hasRDD(Constants.getGraphLocation(rddLocation)));
 -        assertTrue(Spark.hasRDD(rddName));
++        assertTrue(Spark.hasRDD(Constants.getGraphLocation(rddName)));
          ////
          final Graph graph = TinkerGraph.open();
          final GraphTraversalSource g = graph.traversal();
@@@ -194,7 -197,7 +196,7 @@@
                  .submit().get();
          ////
          Spark.create(readConfiguration);
-         assertTrue(Spark.hasRDD(Constants.getGraphLocation(rddLocation)));
 -        assertTrue(Spark.hasRDD(rddName));
++        assertTrue(Spark.hasRDD(Constants.getGraphLocation(rddName)));
          ////
          final Graph graph = TinkerGraph.open();
          final GraphTraversalSource g = graph.traversal();
@@@ -220,11 -223,9 +222,11 @@@
          configuration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_INPUT_FORMAT, GryoInputFormat.class.getCanonicalName());
          configuration.setProperty(Constants.GREMLIN_HADOOP_INPUT_LOCATION, SparkHadoopGraphProvider.PATHS.get("tinkerpop-modern.kryo"));
          configuration.setProperty(Constants.GREMLIN_SPARK_GRAPH_OUTPUT_RDD, PersistedOutputRDD.class.getCanonicalName());
-         configuration.setProperty(Constants.GREMLIN_HADOOP_OUTPUT_LOCATION, rddLocation);
+         configuration.setProperty(Constants.GREMLIN_HADOOP_OUTPUT_LOCATION, rddName);
          configuration.setProperty(Constants.GREMLIN_HADOOP_JARS_IN_DISTRIBUTED_CACHE, false);
          configuration.setProperty(Constants.GREMLIN_SPARK_PERSIST_CONTEXT, true);
 +
-         assertFalse(Spark.hasRDD(Constants.getGraphLocation(rddLocation)));
++        assertFalse(Spark.hasRDD(Constants.getGraphLocation(rddName)));
          Graph graph = GraphFactory.open(configuration);
          graph = graph.compute(SparkGraphComputer.class).persist(GraphComputer.Persist.EDGES).program(PageRankVertexProgram.build().iterations(2).create(graph)).submit().get().graph();
          GraphTraversalSource g = graph.traversal();
@@@ -233,12 -234,12 +235,12 @@@
          assertEquals(6l, g.V().values(PageRankVertexProgram.PAGE_RANK).count().next().longValue());
          assertEquals(6l, g.V().values(PageRankVertexProgram.EDGE_COUNT).count().next().longValue());
          ////
-         assertTrue(Spark.hasRDD(Constants.getGraphLocation(rddLocation)));
 -        assertTrue(Spark.hasRDD(rddName));
++        assertTrue(Spark.hasRDD(Constants.getGraphLocation(rddName)));
          ////
          configuration.setProperty(Constants.GREMLIN_SPARK_GRAPH_INPUT_RDD, PersistedInputRDD.class.getCanonicalName());
-         configuration.setProperty(Constants.GREMLIN_HADOOP_INPUT_LOCATION, rddLocation);
+         configuration.setProperty(Constants.GREMLIN_HADOOP_INPUT_LOCATION, rddName);
          configuration.setProperty(Constants.GREMLIN_SPARK_GRAPH_OUTPUT_RDD, PersistedOutputRDD.class.getCanonicalName());
-         configuration.setProperty(Constants.GREMLIN_HADOOP_OUTPUT_LOCATION, rddLocation);
+         configuration.setProperty(Constants.GREMLIN_HADOOP_OUTPUT_LOCATION, rddName);
          ////
          graph = GraphFactory.open(configuration);
          graph = graph.compute(SparkGraphComputer.class).persist(GraphComputer.Persist.EDGES).program(PageRankVertexProgram.build().iterations(2).create(graph)).submit().get().graph();
@@@ -248,7 -249,7 +250,7 @@@
          assertEquals(6l, g.V().values(PageRankVertexProgram.PAGE_RANK).count().next().longValue());
          assertEquals(6l, g.V().values(PageRankVertexProgram.EDGE_COUNT).count().next().longValue());
          ////
-         assertTrue(Spark.hasRDD(Constants.getGraphLocation(rddLocation)));
 -        assertTrue(Spark.hasRDD(rddName));
++        assertTrue(Spark.hasRDD(Constants.getGraphLocation(rddName)));
          ////
          graph = GraphFactory.open(configuration);
          graph = graph.compute(SparkGraphComputer.class).persist(GraphComputer.Persist.VERTEX_PROPERTIES).program(PageRankVertexProgram.build().iterations(2).create(graph)).submit().get().graph();
@@@ -258,18 -259,18 +260,18 @@@
          assertEquals(6l, g.V().values(PageRankVertexProgram.PAGE_RANK).count().next().longValue());
          assertEquals(6l, g.V().values(PageRankVertexProgram.EDGE_COUNT).count().next().longValue());
          ////
-         assertTrue(Spark.hasRDD(Constants.getGraphLocation(rddLocation)));
 -        assertTrue(Spark.hasRDD(rddName));
++        assertTrue(Spark.hasRDD(Constants.getGraphLocation(rddName)));
          ////
          graph = GraphFactory.open(configuration);
          graph.compute(SparkGraphComputer.class).persist(GraphComputer.Persist.NOTHING).program(PageRankVertexProgram.build().iterations(2).create(graph)).submit().get().graph();
-         assertFalse(Spark.hasRDD(Constants.getGraphLocation(rddLocation)));
 -        assertFalse(Spark.hasRDD(rddName));
++        assertFalse(Spark.hasRDD(Constants.getGraphLocation(rddName)));
          g = graph.traversal();
          assertEquals(0l, g.V().count().next().longValue());
          assertEquals(0l, g.E().count().next().longValue());
          assertEquals(0l, g.V().values(PageRankVertexProgram.PAGE_RANK).count().next().longValue());
          assertEquals(0l, g.V().values(PageRankVertexProgram.EDGE_COUNT).count().next().longValue());
          ////
-         assertFalse(Spark.hasRDD(Constants.getGraphLocation(rddLocation)));
 -        assertFalse(Spark.hasRDD(rddName));
++        assertFalse(Spark.hasRDD(Constants.getGraphLocation(rddName)));
          Spark.close();
      }
  }


[05/50] incubator-tinkerpop git commit: Merge branch 'TINKERPOP-1026'

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

Resolved Conflicts:
	CHANGELOG.asciidoc


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

Branch: refs/heads/TINKERPOP-1033
Commit: 4f4384bca5100089b56ffd82e624b8615dc8acc2
Parents: 529512f be30e2d
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Fri Dec 18 19:02:27 2015 +0100
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Fri Dec 18 19:02:27 2015 +0100

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |   1 +
 docs/src/reference/the-graphcomputer.asciidoc   |  11 +-
 .../computer/bulkloading/BulkLoader.java        |   8 +-
 .../bulkloading/BulkLoaderVertexProgram.java    |  10 +-
 .../bulkloading/IncrementalBulkLoader.java      |   8 +-
 .../computer/bulkloading/OneTimeBulkLoader.java | 109 +++++++++++++++++++
 .../process/GroovyProcessComputerSuite.java     |   1 -
 .../BulkLoaderVertexProgramTest.java            |  49 ++++++++-
 8 files changed, 173 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4f4384bc/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --cc CHANGELOG.asciidoc
index f90c92d,abac39c..4e6d849
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@@ -26,7 -26,7 +26,8 @@@ image::https://raw.githubusercontent.co
  TinkerPop 3.1.1 (NOT OFFICIALLY RELEASED YET)
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
 +* Fixed a bug in `Graph.OptOut` when trying to opt-out of certain test cases with the `method` property set to "*".
+ * Added another `BulkLoader` implementation (`OneTimeBulkLoader`) that doesn't store temporary properties in the target graph.
  * Fixed a `SparkGraphComputer` sorting bug in MapReduce that occurred when there was more than one partition.
  * Added `strictTransactionManagement` to the Gremlin Server settings to indicate that the `aliases` parameter must be passed on requests and that transaction management will be scoped to the graphs provided in that argument.
  * Fixed a `NullPointerException` bug in `PeerPressureVertexProgram` that occurred when an adjacency traversal was not provided.


[28/50] incubator-tinkerpop git commit: Update reference docs.

Posted by ok...@apache.org.
Update reference 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/34db8921
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/34db8921
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/34db8921

Branch: refs/heads/TINKERPOP-1033
Commit: 34db89216dfda92e8dbe1389feb8dc8690c088ba
Parents: c288d65
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Dec 24 08:30:22 2015 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Dec 24 08:30:22 2015 -0500

----------------------------------------------------------------------
 docs/src/reference/gremlin-applications.asciidoc | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/34db8921/docs/src/reference/gremlin-applications.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc
index 747e693..0db16d2 100644
--- a/docs/src/reference/gremlin-applications.asciidoc
+++ b/docs/src/reference/gremlin-applications.asciidoc
@@ -1094,10 +1094,11 @@ It has the MIME type of `application/vnd.gremlin-v1.0+gryo` and the following co
 |=========================================================
 |Key |Description |Default
 |bufferSize |The maximum size of the Kryo buffer for use on a single object being serialized.  Increasing this value will correct `KryoException` errors that complain of "Buffer too small". |_4096_
+|classResolverSupplier |The fully qualified classname of a custom `Supplier<ClassResolver>` which will be used when constructing `Kryo` instances. There is no direct default for this setting, but without a setting the `GryoClassResolver` is used. |_none_
+|custom |A list of classes with custom kryo `Serializer` implementations related to them in the form of `<class>;<serializer-class>`. |_none_
+|ioRegistries |A list of `IoRegistry` implementations to be applied to the serializer. |_none_
 |serializeResultToString |When set to `true`, results are serialized by first calling `toString()` on each object in the result list resulting in an extended MIME Type of `application/vnd.gremlin-v1.0+gryo-stringd`.  When set to `false` Kryo-based serialization is applied. |_false_
 |useMapperFromGraph |Specifies the name of the `Graph` (from the `graphs` `Map` in the configuration file) from which to plugin any custom serializers that are tied to it. |_none_
-|ioRegistries |A list of `IoRegistry` implementations to be applied to the serializer.
-|custom |A list of classes with custom kryo `Serializer` implementations related to them in the form of `<class>;<serializer-class>`. |_none_
 |=========================================================
 
 As described above, there are multiple ways in which to register serializers for Kryo-based serialization.  These
@@ -1105,6 +1106,11 @@ configurations can be used in conjunction with one another where there is a spec
 are applied.  The `userMapperFromGraph` setting is applied first, followed by any `ioRegistries` and finalized by the
 `custom` setting.
 
+Those configuring or implementing a `Supplier<ClassResolver>` should consider this an "advanced" option and typically
+important to use cases where server types need to be coerced to client types (i.e. a type is available on the server
+but not on the client).  Implementations should typically instantiate `ClassResolver` implementations that are
+extensions of the `GryoClassResolver` as this class is important to most serialization tasks in TinkerPop.
+
 Best Practices
 ~~~~~~~~~~~~~~
 


[35/50] incubator-tinkerpop git commit: ketrina added more exposure to the image. done done. the original (full scale) is 15 megs and ping me if you want it.

Posted by ok...@apache.org.
ketrina added more exposure to the image. done done. the original (full scale) is 15 megs and ping me if you want it.


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

Branch: refs/heads/TINKERPOP-1033
Commit: b1e704b4259570c4ba6020df80e8a418006ecc7d
Parents: ee70843
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Mon Dec 28 08:48:42 2015 -0700
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Mon Dec 28 08:48:51 2015 -0700

----------------------------------------------------------------------
 docs/static/images/quantum-gremlin-full.png | Bin 1804044 -> 1877990 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/b1e704b4/docs/static/images/quantum-gremlin-full.png
----------------------------------------------------------------------
diff --git a/docs/static/images/quantum-gremlin-full.png b/docs/static/images/quantum-gremlin-full.png
index 4ae361d..8c7e4a6 100644
Binary files a/docs/static/images/quantum-gremlin-full.png and b/docs/static/images/quantum-gremlin-full.png differ


[34/50] incubator-tinkerpop git commit: Fix typo in release docs.

Posted by ok...@apache.org.
Fix typo in release 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/ee70843f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/ee70843f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/ee70843f

Branch: refs/heads/TINKERPOP-1033
Commit: ee70843f4bd913808cbbad05f9e20b980f700eda
Parents: e23e80c
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Dec 28 06:48:49 2015 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Dec 28 06:48:49 2015 -0500

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


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/ee70843f/docs/src/dev/developer/release.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/dev/developer/release.asciidoc b/docs/src/dev/developer/release.asciidoc
index 02419c8..766a7e7 100644
--- a/docs/src/dev/developer/release.asciidoc
+++ b/docs/src/dev/developer/release.asciidoc
@@ -93,7 +93,7 @@ validity into question.
 .. Update the release date
 .. Generate the JIRA release notes report for the current version and append them to the `CHANGELOG.asciidoc`.
 ... Use an "advanced" search to filter out JIRA issues already released on other versions. For example: `fixVersion
-= 3.1.0-incubating AND fixVersion not in (3.0.2-incubating, 3.0.1-incubating`.
+= 3.1.0-incubating AND fixVersion not in (3.0.2-incubating, 3.0.1-incubating)`.
 ... Consider use of an "Excel" export to organize, sort and prepare the JIRA tickets to be pasted to `CHANGELOG.asciidoc`
 ... Be sure to include a link to other versions in the `CHANGELOG.asciidoc` that were previously released while the
 current release was under development as this new release will have those changes included within it. Please see
@@ -191,4 +191,4 @@ My vote is +1.
 
 Thank you very much,
 <TinkerPop Committer Name>
-```
\ No newline at end of file
+```


[40/50] incubator-tinkerpop git commit: Add warning about transaction management in initialization scripts for Gremlin Server.

Posted by ok...@apache.org.
Add warning about transaction management in initialization scripts for Gremlin Server.


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

Branch: refs/heads/TINKERPOP-1033
Commit: a705c21962a2e96cbfc63c381f5903a2b4f9b01b
Parents: d3a59f4
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Dec 29 12:25:13 2015 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Dec 29 12:25:13 2015 -0500

----------------------------------------------------------------------
 docs/src/reference/gremlin-applications.asciidoc | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/a705c219/docs/src/reference/gremlin-applications.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc
index 747e693..6954b4c 100644
--- a/docs/src/reference/gremlin-applications.asciidoc
+++ b/docs/src/reference/gremlin-applications.asciidoc
@@ -366,8 +366,11 @@ single time. In this case, the startup hook loads the "modern" graph into the em
 it for use.  The second key/value pair assigned to the `Map`, named "g", defines a `TraversalSource` from the `Graph`
 bound to the "graph" variable in the YAML configuration file.  This variable `g`, as well as any other variable
 assigned to the `Map`, will be made available as variables for future remote script executions.  In more general
-terms, any key/value pairs assigned to a `Map` returned from the init script will become variables that are global
-to all requests. In addition, any functions that are defined will be cached for future use.
+terms, any key/value pairs assigned to a `Map` returned from the initialization script will become variables that
+are global to all requests. In addition, any functions that are defined will be cached for future use.
+
+WARNING: Transactions on graphs in initialization scripts are not closed automatically after the script finishes
+executing.  It is up to the script to properly commit or rollback transactions in the script itself.
 
 With Gremlin Server running it is now possible to issue some scripts to it for processing.  Start Gremlin Console as follows:
 


[13/50] incubator-tinkerpop git commit: Merge remote-tracking branch 'origin/master'

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


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

Branch: refs/heads/TINKERPOP-1033
Commit: 3be83fff06d4bfc8dc6f0ffa6f60f8ffa3adb8db
Parents: f5963fc 5760bf0
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Dec 21 18:14:55 2015 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Dec 21 18:14:55 2015 -0500

----------------------------------------------------------------------
 .../BulkLoaderVertexProgramTest.java            | 35 ++++++--------------
 1 file changed, 11 insertions(+), 24 deletions(-)
----------------------------------------------------------------------



[43/50] incubator-tinkerpop git commit: Merge remote-tracking branch 'origin/master' into TINKERPOP-1064

Posted by ok...@apache.org.
Merge remote-tracking branch 'origin/master' into TINKERPOP-1064


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

Branch: refs/heads/TINKERPOP-1033
Commit: e480f4aa9ac419443b54df3ccc9bc538dfeffe28
Parents: 0defd91 a705c21
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Dec 29 18:45:19 2015 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Dec 29 18:45:19 2015 -0500

----------------------------------------------------------------------
 CHANGELOG.asciidoc                               |   1 +
 README.asciidoc                                  |  12 ++++++------
 docs/src/dev/developer/release.asciidoc          |   4 ++--
 docs/src/reference/gremlin-applications.asciidoc |   7 +++++--
 docs/static/images/quantum-gremlin-full.png      | Bin 0 -> 1877990 bytes
 5 files changed, 14 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/e480f4aa/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --cc CHANGELOG.asciidoc
index 23ae585,028f20f..5d0feae
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@@ -26,9 -26,9 +26,10 @@@ image::https://raw.githubusercontent.co
  TinkerPop 3.1.1 (NOT OFFICIALLY RELEASED YET)
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
+ * Execute the `LifeCycle.beforeEval()` in the same thread that `eval()` is executed in for `GremlinExecutor`.
  * Fixed a bug in `Graph.OptOut` when trying to opt-out of certain test cases with the `method` property set to "*".
  * Added another `BulkLoader` implementation (`OneTimeBulkLoader`) that doesn't store temporary properties in the target graph.
 +* Added option to allow for a custom `ClassResolver` to be assigned to a `GryoMapper` instance.
  * Fixed a `SparkGraphComputer` sorting bug in MapReduce that occurred when there was more than one partition.
  * Added `strictTransactionManagement` to the Gremlin Server settings to indicate that the `aliases` parameter must be passed on requests and that transaction management will be scoped to the graphs provided in that argument.
  * Fixed a `NullPointerException` bug in `PeerPressureVertexProgram` that occurred when an adjacency traversal was not provided.

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


[23/50] incubator-tinkerpop git commit: TINKERPOP-1065: fixed a newly introduced typo.

Posted by ok...@apache.org.
TINKERPOP-1065: fixed a newly introduced typo.


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

Branch: refs/heads/TINKERPOP-1033
Commit: c2cff18acb4357c7b6eea40ba26cdffa24fd3a95
Parents: 3eb4726
Author: Jeremy Hanna <jh...@datastax.com>
Authored: Wed Dec 23 14:31:04 2015 -0800
Committer: Jeremy Hanna <jh...@datastax.com>
Committed: Wed Dec 23 14:31:04 2015 -0800

----------------------------------------------------------------------
 docs/src/reference/the-graph.asciidoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/c2cff18a/docs/src/reference/the-graph.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/the-graph.asciidoc b/docs/src/reference/the-graph.asciidoc
index a97907b..aba7500 100644
--- a/docs/src/reference/the-graph.asciidoc
+++ b/docs/src/reference/the-graph.asciidoc
@@ -389,7 +389,7 @@ have to be configured manually by the user to do the serialization.
 
 It is up to the implementations of the `GraphReader` and `GraphWriter` interfaces to choose the methods they
 implement and the manner in which they work together.  The only characteristic enforced and expected is that the write
-methods should produce output that is compatible with the corresponding read method.  For example, he output of
+methods should produce output that is compatible with the corresponding read method.  For example, the output of
 `writeVertices` should be readable as input to `readVertices` and the output of `writeProperty` should be readable as
 input to `readProperty`.
 


[15/50] incubator-tinkerpop git commit: Fixed broken links in Getting Started tutorial.

Posted by ok...@apache.org.
Fixed broken links in Getting Started tutorial.

Links were broken to the reference docs after we restructured the docs directories for TINKERPOP-928.


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

Branch: refs/heads/TINKERPOP-1033
Commit: 114d867194cf123c5c29c3145ccb448224d985b0
Parents: 3be83ff
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Dec 22 06:44:48 2015 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Dec 22 06:44:48 2015 -0500

----------------------------------------------------------------------
 .../tutorials/getting-started/index.asciidoc    | 52 ++++++++++----------
 1 file changed, 26 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/114d8671/docs/src/tutorials/getting-started/index.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/tutorials/getting-started/index.asciidoc b/docs/src/tutorials/getting-started/index.asciidoc
index 5cf61af..df9f59c 100644
--- a/docs/src/tutorials/getting-started/index.asciidoc
+++ b/docs/src/tutorials/getting-started/index.asciidoc
@@ -24,7 +24,7 @@ link:http://tinkerpop.apache.org[Apache TinkerPop] is an open source Graph Compu
 represents a large collection of capabilities and technologies and, in its wider ecosystem, an additionally extended
 world of link:http://tinkerpop.apache.org/#graph-systems[third-party contributed] graph libraries and
 systems. TinkerPop's ecosystem can appear complex to newcomers of all experience, especially when glancing at the
-link:http://tinkerpop.apache.org/docs/x.y.z/index.html[reference documentation] for the first time.
+link:http://tinkerpop.apache.org/docs/x.y.z/reference/[reference documentation] for the first time.
 
 So, where do you get started with TinkerPop? How do you dive in quickly and get productive? Well - Gremlin, the
 most recognizable citizen of The TinkerPop, is here to help with this thirty minute tutorial. That's right - in just
@@ -45,7 +45,7 @@ Gremlin helps you navigate the vertices and edges of a graph. He is essentially
 databases, as link:http://sql2gremlin.com/[SQL] is the query language to relational databases. To tell Gremlin how
 he should "traverse" the graph (i.e. what you want your query to do) you need a way to provide him commands in the
 language he understands - and, of course, that language is called "Gremlin". For this task, you need one of
-TinkerPop's most important tools: link:http://tinkerpop.apache.org/docs/x.y.z/#gremlin-console[The Gremlin Console].
+TinkerPop's most important tools: link:http://tinkerpop.apache.org/docs/x.y.z/reference/#gremlin-console[The Gremlin Console].
 
 Download the console, unpackage it and start it:
 
@@ -74,10 +74,10 @@ You will find yourself using it for a variety of TinkerPop-related activities, s
 graphs, working out complex traversals, etc.
 
 To get Gremlin to traverse a graph, you need a `Graph` instance, which holds the
-link:http://tinkerpop.apache.org/docs/x.y.z/#_the_graph_structure[structure] and data of the
+link:http://tinkerpop.apache.org/docs/x.y.z/reference/#_the_graph_structure[structure] and data of the
 graph. TinkerPop is a graph abstraction layer over different graph databases and different graph processors, so there
 are many `Graph` instances you can choose from to instantiate in the console. The best `Graph` instance to start with
-however is link:http://tinkerpop.apache.org/docs/x.y.z/#tinkergraph-gremlin[TinkerGraph]. TinkerGraph
+however is link:http://tinkerpop.apache.org/docs/x.y.z/reference/#tinkergraph-gremlin[TinkerGraph]. TinkerGraph
 is a fast, in-memory graph database with a small handful of configuration options, making it a good choice for beginners.
 
 TIP: TinkerGraph is not just a toy for beginners. It is useful in analyzing subgraphs taken from a large graph,
@@ -85,7 +85,7 @@ working with a small static graph that doesn't change much, writing unit tests a
 can fit in memory.
 
 TIP: Resist the temptation to "get started" with more complex databases like link:http://thinkaurelius.github.io/titan/[Titan]
-or to delve into how to get link:http://tinkerpop.apache.org/docs/x.y.zg/#gremlin-server[Gremlin Server]
+or to delve into how to get link:http://tinkerpop.apache.org/docs/x.y.z/reference/#gremlin-server[Gremlin Server]
 working properly. Focusing on the basics, presented in this guide, builds a good foundation for all the other things
 TinkerPop offers.
 
@@ -109,8 +109,8 @@ g = graph.traversal()
 The first command creates a `Graph` instance named `graph`, which thus provides a reference to the data you want
 Gremlin to traverse. Unfortunately, just having `graph` doesn't provide Gremlin enough context to do his job. You
 also need something called a `TraversalSource`, which is generated by the second command. The `TraversalSource`
-provides additional information to Gremlin (such as the link:http://tinkerpop.apache.org/docs/x.y.z/#traversalstrategy[traversal strategies]
-to apply and the link:http://tinkerpop.apache.org/docs/x.y.z/#graphcomputer[traversal engine] to use) which
+provides additional information to Gremlin (such as the link:http://tinkerpop.apache.org/docs/x.y.z/reference/#traversalstrategy[traversal strategies]
+to apply and the link:http://tinkerpop.apache.org/docs/x.y.z/reference/#graphcomputer[traversal engine] to use) which
 provides him guidance on how to execute his trip around the `Graph`.
 
 With your `TraversalSource` `g` available it is now possible to ask Gremlin to traverse the `Graph`:
@@ -212,7 +212,7 @@ Graph Traversal - Staying Simple
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 Now that Gremlin knows where the graph data is, you can ask him to get you some data from it by doing a traversal,
-which you can think of as executing some link:http://tinkerpop.apache.org/docs/x.y.z/#_the_graph_process[process]
+which you can think of as executing some link:http://tinkerpop.apache.org/docs/x.y.z/reference/#_the_graph_process[process]
 over the structure of the graph. We can form our question in English and then translate it to Gremlin. For this
 initial example, let's ask Gremlin: "What software has Marko created?"
 
@@ -224,12 +224,12 @@ To answer this question, we would want Gremlin to:
 
 The English-based steps above largely translate to Gremlin's position in the graph and to the steps we need to take
 to ask him to answer our question. By stringing these steps together, we form a `Traversal` or the sequence of programmatic
-link:http://tinkerpop.apache.org/docs/x.y.z/#graph-traversal-steps[steps] Gremlin needs to perform
+link:http://tinkerpop.apache.org/docs/x.y.z/reference/#graph-traversal-steps[steps] Gremlin needs to perform
 in order to get you an answer.
 
 Let's start with finding "marko". This operation is a filtering step as it searches the full set of vertices to match
 those that have the "name" property value of "marko". This can be done with the
-link:http://tinkerpop.apache.org/docs/x.y.z/#has-step[has()] step as follows:
+link:http://tinkerpop.apache.org/docs/x.y.z/reference/#has-step[has()] step as follows:
 
 [gremlin-groovy,modern]
 ----
@@ -254,7 +254,7 @@ traversals will remain unchanged however, as the indices will be used transparen
 Now that Gremlin has found "marko", he can now consider the next step in the traversal where we ask him to "walk"
 along "created" edges to "software" vertices. As described earlier, edges have direction, so we have to tell Gremlin
 what direction to follow. In this case, we want him to traverse on outgoing edges from the "marko" vertex. For this,
-we use the link:http://tinkerpop.apache.org/docs/x.y.z/#vertex-steps[outE] step.
+we use the link:http://tinkerpop.apache.org/docs/x.y.z/reference/#vertex-steps[outE] step.
 
 [gremlin-groovy,modern]
 ----
@@ -325,14 +325,14 @@ earlier).
 NOTE: The fully qualified name for `P` is `org.apache.tinkerpop.gremlin.process.traversal.P`.
 
 If we wanted to ask Gremlin the average age of "vadas" and "marko" we could use the
-link:http://tinkerpop.apache.org/docs/x.y.z/#mean-step[mean()] step as follows:
+link:http://tinkerpop.apache.org/docs/x.y.z/reference/#mean-step[mean()] step as follows:
 
 [gremlin-groovy,modern]
 ----
 g.V().has('name',within('vadas','marko')).values('age').mean()
 ----
 
-Another method of filtering is seen in the use of the link:http://tinkerpop.apache.org/docs/x.y.z/#where-step[where]
+Another method of filtering is seen in the use of the link:http://tinkerpop.apache.org/docs/x.y.z/reference/#where-step[where]
 step. We know how to find the "software" that "marko" created:
 
 [gremlin-groovy,modern]
@@ -361,7 +361,7 @@ g.V().has('name','marko').as('exclude').out('created').in('created').where(neq('
 ----
 
 We made two additions to the traversal to make it exclude "marko" from the results. First, we added the
-link:http://tinkerpop.apache.org/docs/x.y.z/#as-step[as()] step. The `as()` step is not really a "step",
+link:http://tinkerpop.apache.org/docs/x.y.z/reference/#as-step[as()] step. The `as()` step is not really a "step",
 but a "step modulator" - something that adds features to a step or the traversal. Here, the `as('exclude')` labels
 the `has()` step with the name "exclude" and all values that pass through that step are held in that label for later
 use. In this case, the "marko" vertex is the only vertex to pass through that point, so it is held in "exclude".
@@ -372,7 +372,7 @@ on the list of "marko" collaborators. The `where()` specifies that the "person"
 not equal (i.e. `neq()`) the contents of the "exclude" label. As it just contains the "marko" vertex, the `where()`
 filters out the "marko" that we get when we traverse back _in_ on the "created" edges.
 
-You will find many uses of `as()`. Here it is in combination with link:http://tinkerpop.apache.org/docs/x.y.z/#select-step[select]:
+You will find many uses of `as()`. Here it is in combination with link:http://tinkerpop.apache.org/docs/x.y.z/reference/#select-step[select]:
 
 [gremlin-groovy,modern]
 ----
@@ -383,8 +383,8 @@ In the above example, we tell Gremlin to iterate through all vertices and traver
 will label each vertex in that path with "a", "b" and "c", respectively. We can then use `select` to extract the
 contents of that label.
 
-Another common but important step is the link:http://tinkerpop.apache.org/docs/x.y.z/#group-step[group()]
-step and its related step modulator called link:http://tinkerpop.apache.org/docs/x.y.z/#by-step[by()]. If
+Another common but important step is the link:http://tinkerpop.apache.org/docs/x.y.z/reference/#group-step[group()]
+step and its related step modulator called link:http://tinkerpop.apache.org/docs/x.y.z/reference/#by-step[by()]. If
 we wanted to ask Gremlin to group all the vertices in the graph by their vertex label we could do:
 
 [gremlin-groovy,modern]
@@ -439,7 +439,7 @@ link:http://giraph.apache.org/[Giraph]. The scope of this tutorial does not perm
 executed to run in distributed fashion over Spark or Hadoop. The changes required to the code to do this are not
 in the traversal itself, but in the definition of the `TraversalSource`. You can again see why we encourage, graph
 operations to be executed through that class as opposed to just using `Graph`. You can read more about these
-features in this section on link:http://tinkerpop.apache.org/docs/x.y.z/#hadoop-gremlin[hadoop-gremlin].
+features in this section on link:http://tinkerpop.apache.org/docs/x.y.z/reference/#hadoop-gremlin[hadoop-gremlin].
 
 TIP: To maintain an abstraction over `Graph` creation use `GraphFactory.open()` to construct new instances. See
 the documentation for individual `Graph` implementations to learn about the configuration options to provide.
@@ -494,21 +494,21 @@ to any data source you require and Groovy tends to have nice libraries that can
 link:http://thinkaurelius.com/2013/02/04/polyglot-persistence-and-query-with-gremlin/[quite enjoyable].
 
 WARNING: Take care if using a `Graph` implementation that supports
-link:http://tinkerpop.apache.org/docs/x.y.z/#transactions[transactions]. As TinkerGraph does not, there is
+link:http://tinkerpop.apache.org/docs/x.y.z/reference/#transactions[transactions]. As TinkerGraph does not, there is
 no need to `commit()`.  If your `Graph` does support transactions, intermediate commits during load will need to be
 applied.
 
 To load larger data sets you should read about the
-link:http://tinkerpop.apache.org/docs/x.y.z/#bulkloadervertexprogram[BulkLoaderVertexProgram] (BLVP), which
+link:http://tinkerpop.apache.org/docs/x.y.z/reference/#bulkloadervertexprogram[BulkLoaderVertexProgram] (BLVP), which
 provides a generalized method for loading graphs of virtually any size.
 
 Gremlin Server
 ~~~~~~~~~~~~~~
 
-image:gremlin-server-protocol.png[width=325,float=right] link:http://tinkerpop.apache.org/docs/x.y.z/#gremlin-server[Gremlin Server]
+image:gremlin-server-protocol.png[width=325,float=right] link:http://tinkerpop.apache.org/docs/x.y.z/reference/#gremlin-server[Gremlin Server]
 provides a way to remotely execute Gremlin scripts against one or more `Graph` instances hosted within it. It does
-this by exposing different endpoints, such as link:http://tinkerpop.apache.org/docs/x.y.z/#_connecting_via_rest[REST]
-and link:http://tinkerpop.apache.org/docs/x.y.z/#_connecting_via_java[websockets], which allow a request
+this by exposing different endpoints, such as link:http://tinkerpop.apache.org/docs/x.y.z/reference/#_connecting_via_rest[REST]
+and link:http://tinkerpop.apache.org/docs/x.y.z/reference/#_connecting_via_java[websockets], which allow a request
 containing a Gremlin script to be processed with results returned.
 
 [source,text]
@@ -552,13 +552,13 @@ $ curl -X POST -d "{\"gremlin\":\"g.V(x).out().values('name')\", \"language\":\"
 
 IMPORTANT: Take careful note of the use of "bindings" in the arguments on the request. These are variables that are
 applied to the script on execution and is essentially a way to parameterize your scripts. This "parameterization" is
-critical to link:http://tinkerpop.apache.org/docs/x.y.z/#_best_practices[performance].  Whenever
+critical to link:http://tinkerpop.apache.org/docs/x.y.z/reference/#_best_practices[performance].  Whenever
 possible, parameterize your queries.
 
 As mentioned earlier, Gremlin Server can also be configured with a websockets endpoint. This endpoint has an
-embedded link:http://tinkerpop.apache.org/docs/x.y.z/#_developing_a_driver[subprotocol] that allow a
+embedded link:http://tinkerpop.apache.org/docs/x.y.z/reference/#_developing_a_driver[subprotocol] that allow a
 compliant driver to communicate with it.  TinkerPop supplies a
-link:http://tinkerpop.apache.org/docs/x.y.z/#_connecting_via_java[reference driver] written in Java, but
+link:http://tinkerpop.apache.org/docs/x.y.z/reference/#_connecting_via_java[reference driver] written in Java, but
 there are drivers developed by third-parties for other link:http://tinkerpop.apache.org/#graph-libraries[languages]
 such as Python, Javascript, etc. Gremlin Server therefore represents the method by which non-JVM languages can
 interact with TinkerPop.


[04/50] incubator-tinkerpop git commit: TINKERPOP-1051: Added best practice to increase the gremlin server heap size in non-trivial use cases. Fixed typo.

Posted by ok...@apache.org.
TINKERPOP-1051: Added best practice to increase the gremlin server heap size in non-trivial use cases.  Fixed typo.


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

Branch: refs/heads/TINKERPOP-1033
Commit: 44932d17167a8d22579d397fc0f881be7172363a
Parents: 3fedaf6
Author: Jeremy Hanna <jh...@datastax.com>
Authored: Fri Dec 18 09:56:23 2015 -0800
Committer: Jeremy Hanna <jh...@datastax.com>
Committed: Fri Dec 18 09:56:23 2015 -0800

----------------------------------------------------------------------
 docs/src/reference/gremlin-applications.asciidoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/44932d17/docs/src/reference/gremlin-applications.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc
index 10cb55b..d96e356 100644
--- a/docs/src/reference/gremlin-applications.asciidoc
+++ b/docs/src/reference/gremlin-applications.asciidoc
@@ -1104,7 +1104,7 @@ Tuning
 
 image:gremlin-handdrawn.png[width=120,float=right] Tuning Gremlin Server for a particular environment may require some simple trial-and-error, but the following represent some basic guidelines that might be useful:
 
-* Gremlin Server defaults to a very modest max heap size.  Consider increasing this value for non-trivial uses.  Max heap size (`-xmx`) is defined with the `JAVA_OPTIONS` setting in `gremlin-server.sh`.
+* Gremlin Server defaults to a very modest max heap size.  Consider increasing this value for non-trivial uses.  Max heap size (`-Xmx`) is defined with the `JAVA_OPTIONS` setting in `gremlin-server.sh`.
 * When configuring the size of `threadPoolWorker` start with the default of `1` and increment by one as needed to a maximum of `2*number of cores`.
 * The "right" size of the `gremlinPool` setting is somewhat dependent on the type of scripts that will be processed
 by Gremlin Server.  As requests arrive to Gremlin Server they are decoded and queued to be processed by threads in


[17/50] incubator-tinkerpop git commit: Add a note about ScriptExecutor in the reference docs.

Posted by ok...@apache.org.
Add a note about ScriptExecutor in the reference docs.

Just mentioning that users can't do console commands like :> in a script to -e


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

Branch: refs/heads/TINKERPOP-1033
Commit: 96e7cbd23b9f7da94f35e6928fcbc3f30b11e05b
Parents: d85a35d
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Dec 22 09:23:32 2015 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Dec 22 09:23:32 2015 -0500

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


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/96e7cbd2/docs/src/reference/gremlin-applications.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc
index 9979b3d..d5cbdec 100644
--- a/docs/src/reference/gremlin-applications.asciidoc
+++ b/docs/src/reference/gremlin-applications.asciidoc
@@ -276,6 +276,11 @@ $ bin/gremlin.sh -e gremlin.groovy vadas
 v[2]
 ----
 
+NOTE: The `ScriptExecutor` is for Gremlin Groovy scripts only.  It is not possible to include Console plugin commands
+such as `:remote` or `:>` when using `-e` in these scripts. That does not mean that it is impossible to script such
+commands, it just means that they need to be scripted manually.  For example, instead of trying to use the `:remote`
+command, manually construct a <<connecting-via-java,Gremlin Driver>> `Client` and submit scripts from there.
+
 [[gremlin-server]]
 Gremlin Server
 --------------
@@ -468,6 +473,7 @@ for purposes of execution within the context of a script.  Therefore, it becomes
 :> x.E().label().groupCount()
 ----
 
+[[connecting-via-java]]
 Connecting via Java
 ~~~~~~~~~~~~~~~~~~~
 


[10/50] incubator-tinkerpop git commit: Initial development to track open graph instances in the tests.

Posted by ok...@apache.org.
Initial development to track open graph instances in the tests.

Neo4j is currently not passing


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

Branch: refs/heads/TINKERPOP-1033
Commit: 947d192e682fb1a3c9470c87bed8b4cebf69a60e
Parents: 0926604
Author: Nghia Tran <ng...@gmail.com>
Authored: Sun Dec 6 17:25:34 2015 -0500
Committer: Nghia Tran <ng...@gmail.com>
Committed: Mon Dec 21 17:01:34 2015 -0500

----------------------------------------------------------------------
 .../tinkerpop/gremlin/AbstractGremlinTest.java  |   3 +
 .../apache/tinkerpop/gremlin/GraphManager.java  | 102 ++++++++++++++++++-
 2 files changed, 104 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/947d192e/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 ebf804b..e859208 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
@@ -133,6 +133,9 @@ public abstract class AbstractGremlinTest {
     public void tearDown() throws Exception {
         if (null != graphProvider) {
             graphProvider.clear(graph, config);
+            if(graphProvider instanceof GraphManager.ManagedGraphProvider)
+                ((GraphManager.ManagedGraphProvider)graphProvider).tryCloseGraphs();
+
             g = null;
             config = null;
             graphProvider = null;

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/947d192e/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 4b3c98c..23f5c8e 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
@@ -18,7 +18,17 @@
  */
 package org.apache.tinkerpop.gremlin;
 
+import org.apache.commons.configuration.Configuration;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine;
+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 java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
 
 /**
  * Holds objects specified by the test suites supplying them in a static manner to the test cases.
@@ -36,7 +46,7 @@ public class GraphManager {
     }
 
     public static GraphProvider getGraphProvider() {
-        return graphProvider;
+        return new ManagedGraphProvider(graphProvider);
     }
 
     public static TraversalEngine.Type setTraversalEngineType(final TraversalEngine.Type traversalEngine) {
@@ -48,4 +58,94 @@ public class GraphManager {
     public static TraversalEngine.Type getTraversalEngineType() {
         return traversalEngineType;
     }
+
+    public static class ManagedGraphProvider implements GraphProvider {
+        private final GraphProvider innerGraphProvider;
+        private final List<Graph> openGraphs = new ArrayList<>();
+
+        public ManagedGraphProvider(final GraphProvider innerGraphProvider){
+            this.innerGraphProvider = innerGraphProvider;
+        }
+
+        public void tryCloseGraphs(){
+            for(Graph graph : openGraphs) {
+                try {
+                    graph.close();
+                }catch (Exception e){
+                    e.printStackTrace();
+                }
+            }
+        }
+
+        @Override
+        public GraphTraversalSource traversal(final Graph graph) {
+            return innerGraphProvider.traversal(graph);
+        }
+
+        @Override
+        public GraphTraversalSource traversal(final Graph graph, final TraversalStrategy... strategies) {
+            return innerGraphProvider.traversal(graph, strategies);
+        }
+
+        @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;
+        }
+
+        @Override
+        public Graph openTestGraph(final Configuration config) {
+            final Graph graph = innerGraphProvider.openTestGraph(config);
+            openGraphs.add(graph);
+            return graph;
+        }
+
+        @Override
+        public Configuration standardGraphConfiguration(final Class<?> test, final String testMethodName, final LoadGraphWith.GraphData loadGraphWith) {
+            return innerGraphProvider.standardGraphConfiguration(test, testMethodName, loadGraphWith);
+        }
+
+        @Override
+        public void clear(final Configuration configuration) throws Exception {
+            innerGraphProvider.clear(configuration);
+        }
+
+        @Override
+        public void clear(final Graph graph, final Configuration configuration) throws Exception {
+            innerGraphProvider.clear(graph, configuration);
+        }
+
+        @Override
+        public Object convertId(final Object id, final Class<? extends Element> c) {
+            return innerGraphProvider.convertId(id, c);
+        }
+
+        @Override
+        public String convertLabel(final String label) {
+            return innerGraphProvider.convertLabel(label);
+        }
+
+        @Override
+        public Configuration newGraphConfiguration(final String graphName, final Class<?> test, final String testMethodName,
+                                                   final Map<String, Object> configurationOverrides, final LoadGraphWith.GraphData loadGraphWith) {
+            return innerGraphProvider.newGraphConfiguration(graphName, test, testMethodName, configurationOverrides, loadGraphWith);
+        }
+
+        @Override
+        public Configuration newGraphConfiguration(final String graphName, final Class<?> test, final String testMethodName,final LoadGraphWith.GraphData loadGraphWith) {
+            return innerGraphProvider.newGraphConfiguration(graphName, test, testMethodName, loadGraphWith);
+        }
+
+        @Override
+        public void loadGraphData(final Graph graph, final LoadGraphWith loadGraphWith, final Class testClass, final String testName) {
+            innerGraphProvider.loadGraphData(graph, loadGraphWith, testClass, testName);
+        }
+
+        @Override
+        public Set<Class> getImplementations() {
+            return innerGraphProvider.getImplementations();
+        }
+    }
+
 }


[11/50] incubator-tinkerpop git commit: Refactor tests to use member variables for graphProvider

Posted by ok...@apache.org.
Refactor tests to use member variables for graphProvider


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

Branch: refs/heads/TINKERPOP-1033
Commit: 0926604ecdfcf5c9ece592f94470df7d3434c701
Parents: 5760bf0
Author: Nghia Tran <ng...@gmail.com>
Authored: Tue Dec 1 19:18:42 2015 -0500
Committer: Nghia Tran <ng...@gmail.com>
Committed: Mon Dec 21 17:01:34 2015 -0500

----------------------------------------------------------------------
 .../tinkerpop/gremlin/structure/GraphTest.java    | 16 +++-------------
 .../tinkerpop/gremlin/structure/PropertyTest.java |  4 ++--
 .../tinkerpop/gremlin/structure/VertexTest.java   | 18 +++++++++---------
 3 files changed, 14 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/0926604e/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/GraphTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/GraphTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/GraphTest.java
index 09d836a..830e259 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/GraphTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/GraphTest.java
@@ -874,7 +874,7 @@ public class GraphTest extends AbstractGremlinTest {
                 final Vertex a = vertices.get(random.nextInt(vertices.size()));
                 final Vertex b = vertices.get(random.nextInt(vertices.size()));
                 if (a != b) {
-                    edges.add(a.addEdge(GraphManager.getGraphProvider().convertLabel("a" + UUID.randomUUID()), b));
+                    edges.add(a.addEdge(graphProvider.convertLabel("a" + UUID.randomUUID()), b));
                     created = true;
                 }
             }
@@ -910,7 +910,7 @@ public class GraphTest extends AbstractGremlinTest {
         for (int i = 0; i < vertexCount; i = i + 2) {
             final Vertex a = vertices.get(i);
             final Vertex b = vertices.get(i + 1);
-            edges.add(a.addEdge(GraphManager.getGraphProvider().convertLabel("a" + UUID.randomUUID()), b));
+            edges.add(a.addEdge(graphProvider.convertLabel("a" + UUID.randomUUID()), b));
         }
 
         tryCommit(graph, assertVertexEdgeCounts(vertexCount, vertexCount / 2));
@@ -975,8 +975,6 @@ public class GraphTest extends AbstractGremlinTest {
     @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
     @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
     public void shouldEvaluateConnectivityPatterns() {
-        final GraphProvider graphProvider = GraphManager.getGraphProvider();
-
         final Vertex a;
         final Vertex b;
         final Vertex c;
@@ -1066,10 +1064,7 @@ public class GraphTest extends AbstractGremlinTest {
     @Test
     @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
     @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    public void shouldTraverseInOutFromVertexWithSingleEdgeLabelFilter() {
-        final GraphProvider graphProvider = GraphManager.getGraphProvider();
-
-        final Vertex a = graph.addVertex();
+    public void shouldTraverseInOutFromVertexWithSingleEdgeLabelFilter() {final Vertex a = graph.addVertex();
         final Vertex b = graph.addVertex();
         final Vertex c = graph.addVertex();
 
@@ -1117,7 +1112,6 @@ public class GraphTest extends AbstractGremlinTest {
     @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
     @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
     public void shouldTraverseInOutFromVertexWithMultipleEdgeLabelFilter() {
-        final GraphProvider graphProvider = GraphManager.getGraphProvider();
         final Vertex a = graph.addVertex();
         final Vertex b = graph.addVertex();
         final Vertex c = graph.addVertex();
@@ -1154,8 +1148,6 @@ public class GraphTest extends AbstractGremlinTest {
     @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
     @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
     public void shouldTestTreeConnectivity() {
-        final GraphProvider graphProvider = GraphManager.getGraphProvider();
-
         int branchSize = 11;
         final Vertex start = graph.addVertex();
         for (int i = 0; i < branchSize; i++) {
@@ -1201,8 +1193,6 @@ public class GraphTest extends AbstractGremlinTest {
     @FeatureRequirementSet(FeatureRequirementSet.Package.SIMPLE)
     @FeatureRequirement(featureClass = Graph.Features.GraphFeatures.class, feature = Graph.Features.GraphFeatures.FEATURE_PERSISTENCE)
     public void shouldPersistDataOnClose() throws Exception {
-        final GraphProvider graphProvider = GraphManager.getGraphProvider();
-
         final Vertex v = graph.addVertex();
         final Vertex u = graph.addVertex();
         if (graph.features().vertex().properties().supportsStringValues()) {

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/0926604e/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/PropertyTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/PropertyTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/PropertyTest.java
index 6d48961..2d5623e 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/PropertyTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/PropertyTest.java
@@ -472,13 +472,13 @@ public class PropertyTest {
         private Edge createEdgeForPropertyFeatureTests() {
             final Vertex vertexA = graph.addVertex();
             final Vertex vertexB = graph.addVertex();
-            return vertexA.addEdge(GraphManager.getGraphProvider().convertLabel("knows"), vertexB);
+            return vertexA.addEdge(graphProvider.convertLabel("knows"), vertexB);
         }
 
         private Edge createEdgeForPropertyFeatureTests(final String k, Object v) {
             final Vertex vertexA = graph.addVertex();
             final Vertex vertexB = graph.addVertex();
-            return vertexA.addEdge(GraphManager.getGraphProvider().convertLabel("knows"), vertexB, k, v);
+            return vertexA.addEdge(graphProvider.convertLabel("knows"), vertexB, k, v);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/0926604e/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexTest.java
index f097e01..9aab219 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexTest.java
@@ -259,7 +259,7 @@ public class VertexTest {
         @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_USER_SUPPLIED_IDS)
         public void shouldHaveExceptionConsistencyWhenAssigningSameIdOnEdge() {
             final Vertex v = graph.addVertex();
-            final Object o = GraphManager.getGraphProvider().convertId("1", Edge.class);
+            final Object o = graphProvider.convertId("1", Edge.class);
             v.addEdge("self", v, T.id, o);
 
             try {
@@ -359,8 +359,8 @@ public class VertexTest {
         @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
         @FeatureRequirement(featureClass = VertexFeatures.class, feature = FEATURE_USER_SUPPLIED_IDS)
         public void shouldEvaluateVerticesEquivalentWithSuppliedIdsViaTraversal() {
-            final Vertex v = graph.addVertex(T.id, GraphManager.getGraphProvider().convertId("1", Vertex.class));
-            final Vertex u = graph.vertices(GraphManager.getGraphProvider().convertId("1", Vertex.class)).next();
+            final Vertex v = graph.addVertex(T.id, graphProvider.convertId("1", Vertex.class));
+            final Vertex u = graph.vertices(graphProvider.convertId("1", Vertex.class)).next();
             assertEquals(v, u);
         }
 
@@ -368,8 +368,8 @@ public class VertexTest {
         @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
         @FeatureRequirement(featureClass = VertexFeatures.class, feature = FEATURE_USER_SUPPLIED_IDS)
         public void shouldEvaluateVerticesEquivalentWithSuppliedIdsViaIterators() {
-            final Vertex v = graph.addVertex(T.id, GraphManager.getGraphProvider().convertId("1", Vertex.class));
-            final Vertex u = graph.vertices(GraphManager.getGraphProvider().convertId("1", Vertex.class)).next();
+            final Vertex v = graph.addVertex(T.id, graphProvider.convertId("1", Vertex.class));
+            final Vertex u = graph.vertices(graphProvider.convertId("1", Vertex.class)).next();
             assertEquals(v, u);
         }
 
@@ -392,8 +392,8 @@ public class VertexTest {
         @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
         @FeatureRequirement(featureClass = VertexFeatures.class, feature = FEATURE_USER_SUPPLIED_IDS)
         public void shouldEvaluateEquivalentVertexHashCodeWithSuppliedIds() {
-            final Vertex v = graph.addVertex(T.id, GraphManager.getGraphProvider().convertId("1", Vertex.class));
-            final Vertex u = graph.vertices(GraphManager.getGraphProvider().convertId("1", Vertex.class)).next();
+            final Vertex v = graph.addVertex(T.id, graphProvider.convertId("1", Vertex.class));
+            final Vertex u = graph.vertices(graphProvider.convertId("1", Vertex.class)).next();
             assertEquals(v, u);
 
             final Set<Vertex> set = new HashSet<>();
@@ -401,8 +401,8 @@ public class VertexTest {
             set.add(v);
             set.add(u);
             set.add(u);
-            set.add(graph.vertices(GraphManager.getGraphProvider().convertId("1", Vertex.class)).next());
-            set.add(graph.vertices(GraphManager.getGraphProvider().convertId("1", Vertex.class)).next());
+            set.add(graph.vertices(graphProvider.convertId("1", Vertex.class)).next());
+            set.add(graph.vertices(graphProvider.convertId("1", Vertex.class)).next());
 
             assertEquals(1, set.size());
             assertEquals(v.hashCode(), u.hashCode());


[19/50] incubator-tinkerpop git commit: Updated docs with new sandbox.yaml regex updates.

Posted by ok...@apache.org.
Updated docs with new sandbox.yaml regex updates.


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

Branch: refs/heads/TINKERPOP-1033
Commit: 94f3315fc7377e70e52583572cea01897d0d7450
Parents: bc41af3
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Dec 22 15:46:08 2015 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Dec 22 15:46:08 2015 -0500

----------------------------------------------------------------------
 .../src/reference/gremlin-applications.asciidoc | 41 +++++++++++---------
 1 file changed, 23 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/94f3315f/docs/src/reference/gremlin-applications.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc
index d5cbdec..747e693 100644
--- a/docs/src/reference/gremlin-applications.asciidoc
+++ b/docs/src/reference/gremlin-applications.asciidoc
@@ -974,25 +974,29 @@ The configuration file is YAML-based and an example is presented as follows:
 ----
 autoTypeUnknown: true
 methodWhiteList:
-  - java\.lang\.Boolean
-  - java\.lang\.Byte
-  - java\.lang\.Character
-  - java\.lang\.Double
-  - java\.lang\.Enum
-  - java\.lang\.Float
-  - java\.lang\.Integer
-  - java\.lang\.Long
-  - java\.lang\.Math
-  - java\.lang\.Number
-  - java\.lang\.Object
-  - java\.lang\.Short
-  - java\.lang\.String
-  - java\.lang\.StringBuffer
-  - java\.lang\.Throwable
-  - java\.lang\.Void
+  - java\.lang\.Boolean.*
+  - java\.lang\.Byte.*
+  - java\.lang\.Character.*
+  - java\.lang\.Double.*
+  - java\.lang\.Enum.*
+  - java\.lang\.Float.*
+  - java\.lang\.Integer.*
+  - java\.lang\.Long.*
+  - java\.lang\.Math.*
+  - java\.lang\.Number.*
+  - java\.lang\.Object.*
+  - java\.lang\.Short.*
+  - java\.lang\.String.*
+  - java\.lang\.StringBuffer.*
+  - java\.lang\.System#currentTimeMillis\(\)
+  - java\.lang\.System#nanoTime\(\)
+  - java\.lang\.Throwable.*
+  - java\.lang\.Void.*
   - java\.util\..*
-  - org\.codehaus\.groovy\.runtime\.DefaultGroovyMethods
-  - org\.codehaus\.groovy\.runtime\.StringGroovyMethods
+  - org\.codehaus\.groovy\.runtime\.DefaultGroovyMethods.*
+  - org\.codehaus\.groovy\.runtime\.InvokerHelper#runScript\(java\.lang\.Class,java\.lang\.String\[\]\)
+  - org\.codehaus\.groovy\.runtime\.StringGroovyMethods.*
+  - groovy\.lang\.Script#<init>\(groovy.lang.Binding\)
   - org\.apache\.tinkerpop\.gremlin\.structure\..*
   - org\.apache\.tinkerpop\.gremlin\.process\..*
   - org\.apache\.tinkerpop\.gremlin\.process\.computer\..*
@@ -1003,6 +1007,7 @@ methodWhiteList:
   - org\.apache\.tinkerpop\.gremlin\.process\.traversal\..*
   - org\.apache\.tinkerpop\.gremlin\.process\.traversal\.dsl\.graph\..*
   - org\.apache\.tinkerpop\.gremlin\.process\.traversal\.engine\..*
+  - org\.apache\.tinkerpop\.gremlin\.server\.util\.LifeCycleHook.*
 staticVariableTypes:
   graph: org.apache.tinkerpop.gremlin.structure.Graph
   g: org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource


[25/50] incubator-tinkerpop git commit: Removed test IoRegistry implementations for ClassResolver.

Posted by ok...@apache.org.
Removed test IoRegistry implementations for ClassResolver.

Apparently, it is unnecessary to register a serializer to a class whose registration is overriden by the ClassResolver.  That's kinda cool.


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

Branch: refs/heads/TINKERPOP-1033
Commit: a51701d907539328d8a486cfb4f03e7ef5082554
Parents: a94c51f
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Dec 24 07:00:12 2015 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Dec 24 07:00:12 2015 -0500

----------------------------------------------------------------------
 .../gremlin/structure/io/IoXIoRegistry.java     |  6 --
 .../gremlin/structure/io/IoYIoRegistry.java     |  6 --
 .../structure/io/gryo/GryoMapperTest.java       | 75 ++++++++++----------
 3 files changed, 36 insertions(+), 51 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/a51701d9/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/IoXIoRegistry.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/IoXIoRegistry.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/IoXIoRegistry.java
index ddc5477..c49ea0b 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/IoXIoRegistry.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/IoXIoRegistry.java
@@ -56,12 +56,6 @@ public class IoXIoRegistry {
         }
     }
 
-    public static class SerializerToVertexBased extends AbstractIoRegistry {
-        public SerializerToVertexBased() {
-            register(GryoIo.class, IoX.class, new IoXToVertexSerializer());
-        }
-    }
-
     /**
      * Converts an {@link IoX} to a {@link DetachedVertex}.
      */

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/a51701d9/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/IoYIoRegistry.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/IoYIoRegistry.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/IoYIoRegistry.java
index 53c3404..1654945 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/IoYIoRegistry.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/IoYIoRegistry.java
@@ -51,12 +51,6 @@ public class IoYIoRegistry {
         }
     }
 
-    public static class SerializerToMapBased extends AbstractIoRegistry {
-        public SerializerToMapBased() {
-            register(GryoIo.class, IoY.class, new IoYToHashMapSerializer());
-        }
-    }
-
     /**
      * Converts an {@link IoX} to a {@link HashMap}.
      */

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/a51701d9/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 947528c..76a2804 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
@@ -19,7 +19,6 @@
 package org.apache.tinkerpop.gremlin.structure.io.gryo;
 
 import org.apache.tinkerpop.gremlin.structure.Vertex;
-import org.apache.tinkerpop.gremlin.structure.io.IoRegistry;
 import org.apache.tinkerpop.gremlin.structure.io.IoX;
 import org.apache.tinkerpop.gremlin.structure.io.IoXIoRegistry;
 import org.apache.tinkerpop.gremlin.structure.io.IoY;
@@ -86,9 +85,8 @@ public class GryoMapperTest {
 
     @Test
     public void shouldSerializeWithCustomClassResolverToDetachedVertex() throws Exception {
-        final IoRegistry ioRegistry = new IoXIoRegistry.SerializerToVertexBased();
         final Supplier<ClassResolver> classResolver = new CustomClassResolverSupplier();
-        final GryoMapper mapper = GryoMapper.build().addRegistry(ioRegistry).classResolver(classResolver).create();
+        final GryoMapper mapper = GryoMapper.build().classResolver(classResolver).create();
         final Kryo kryo = mapper.createMapper();
         try (final OutputStream stream = new ByteArrayOutputStream()) {
             final Output out = new Output(stream);
@@ -108,9 +106,8 @@ public class GryoMapperTest {
 
     @Test
     public void shouldSerializeWithCustomClassResolverToHashMap() throws Exception {
-        final IoRegistry ioRegistry = new IoXIoRegistry.SerializerToVertexBased();
         final Supplier<ClassResolver> classResolver = new CustomClassResolverSupplier();
-        final GryoMapper mapper = GryoMapper.build().addRegistry(ioRegistry).classResolver(classResolver).create();
+        final GryoMapper mapper = GryoMapper.build().classResolver(classResolver).create();
         final Kryo kryo = mapper.createMapper();
         try (final OutputStream stream = new ByteArrayOutputStream()) {
             final Output out = new Output(stream);
@@ -128,40 +125,6 @@ public class GryoMapperTest {
         }
     }
 
-    /**
-     * Creates new {@link CustomClassResolver} when requested.
-     */
-    public static class CustomClassResolverSupplier implements Supplier<ClassResolver> {
-        @Override
-        public ClassResolver get() {
-            return new CustomClassResolver();
-        }
-    }
-
-    /**
-     * A custom {@code ClassResolver} that alters the {@code Registration} returned to Kryo when an {@link IoX} class
-     * is requested, coercing it to a totally different class (a {@link DetachedVertex}).  This coercion demonstrates
-     * how a TinkerPop provider might take a custom internal class and serialize it into something core to
-     * TinkerPop which then removes the requirement for providers to expose serializers on the client side for user
-     * consumption.
-     */
-    public static class CustomClassResolver extends GryoClassResolver {
-        private IoXIoRegistry.IoXToVertexSerializer ioXToVertexSerializer = new IoXIoRegistry.IoXToVertexSerializer();
-        private IoYIoRegistry.IoYToHashMapSerializer ioYToHashMapSerializer = new IoYIoRegistry.IoYToHashMapSerializer();
-
-        public Registration getRegistration(final Class clazz) {
-            if (IoX.class.isAssignableFrom(clazz)) {
-                final Registration registration = super.getRegistration(DetachedVertex.class);
-                return new Registration(registration.getType(), ioXToVertexSerializer, registration.getId());
-            } else if (IoY.class.isAssignableFrom(clazz)) {
-                final Registration registration = super.getRegistration(HashMap.class);
-                return new Registration(registration.getType(), ioYToHashMapSerializer, registration.getId());
-            } else {
-                return super.getRegistration(clazz);
-            }
-        }
-    }
-
     @Test
     public void shouldSerializeWithoutRegistration() throws Exception {
         final GryoMapper mapper = GryoMapper.build().registrationRequired(false).create();
@@ -236,4 +199,38 @@ public class GryoMapperTest {
             }
         }
     }
+
+    /**
+     * Creates new {@link CustomClassResolver} when requested.
+     */
+    public static class CustomClassResolverSupplier implements Supplier<ClassResolver> {
+        @Override
+        public ClassResolver get() {
+            return new CustomClassResolver();
+        }
+    }
+
+    /**
+     * A custom {@code ClassResolver} that alters the {@code Registration} returned to Kryo when an {@link IoX} class
+     * is requested, coercing it to a totally different class (a {@link DetachedVertex}).  This coercion demonstrates
+     * how a TinkerPop provider might take a custom internal class and serialize it into something core to
+     * TinkerPop which then removes the requirement for providers to expose serializers on the client side for user
+     * consumption.
+     */
+    public static class CustomClassResolver extends GryoClassResolver {
+        private IoXIoRegistry.IoXToVertexSerializer ioXToVertexSerializer = new IoXIoRegistry.IoXToVertexSerializer();
+        private IoYIoRegistry.IoYToHashMapSerializer ioYToHashMapSerializer = new IoYIoRegistry.IoYToHashMapSerializer();
+
+        public Registration getRegistration(final Class clazz) {
+            if (IoX.class.isAssignableFrom(clazz)) {
+                final Registration registration = super.getRegistration(DetachedVertex.class);
+                return new Registration(registration.getType(), ioXToVertexSerializer, registration.getId());
+            } else if (IoY.class.isAssignableFrom(clazz)) {
+                final Registration registration = super.getRegistration(HashMap.class);
+                return new Registration(registration.getType(), ioYToHashMapSerializer, registration.getId());
+            } else {
+                return super.getRegistration(clazz);
+            }
+        }
+    }
 }


[08/50] incubator-tinkerpop git commit: removed failure test case, because it screwed up the Giraph integration test suite

Posted by ok...@apache.org.
removed failure test case, because it screwed up the Giraph integration test suite


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

Branch: refs/heads/TINKERPOP-1033
Commit: ae4bffe35375302b5a1718faec0ff523af48876e
Parents: 4f4384b
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Sat Dec 19 21:00:31 2015 +0100
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Sat Dec 19 21:00:31 2015 +0100

----------------------------------------------------------------------
 .../BulkLoaderVertexProgramTest.java            | 35 ++++++--------------
 1 file changed, 11 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/ae4bffe3/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/bulkloading/BulkLoaderVertexProgramTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/bulkloading/BulkLoaderVertexProgramTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/bulkloading/BulkLoaderVertexProgramTest.java
index a4d4d3a..f66d1b5 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/bulkloading/BulkLoaderVertexProgramTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/bulkloading/BulkLoaderVertexProgramTest.java
@@ -40,7 +40,6 @@ import org.junit.Test;
 import java.io.File;
 import java.lang.reflect.Field;
 import java.util.Iterator;
-import java.util.concurrent.ExecutionException;
 import java.util.function.Function;
 
 import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData.MODERN;
@@ -155,29 +154,17 @@ public class BulkLoaderVertexProgramTest extends AbstractGremlinProcessTest {
     @Test
     @LoadGraphWith(MODERN)
     public void shouldUseOneTimeBulkLoaderWithUserSuppliedIds() throws Exception {
-        for (int iteration = 1; iteration <= 2; iteration++) {
-            final BulkLoaderVertexProgram blvp = BulkLoaderVertexProgram.build()
-                    .bulkLoader(OneTimeBulkLoader.class)
-                    .userSuppliedIds(true)
-                    .writeGraph(getWriteGraphConfiguration()).create(graph);
-            final BulkLoader loader = getBulkLoader(blvp);
-            assertTrue(loader instanceof OneTimeBulkLoader);
-            try {
-                graph.compute(graphComputerClass.get()).workers(1).program(blvp).submit().get();
-                assertEquals(1, iteration);
-                final Graph result = getWriteGraph();
-                assertEquals(6, IteratorUtils.count(result.vertices()));
-                assertEquals(6, IteratorUtils.count(result.edges()));
-                result.close();
-            } catch (ExecutionException e) {
-                assertEquals(2, iteration);
-                Throwable cause = e.getCause();
-                while (cause.getCause() != null) {
-                    cause = cause.getCause();
-                }
-                assertTrue(cause.getMessage().startsWith("Vertex with id already exists"));
-            }
-        }
+        final BulkLoaderVertexProgram blvp = BulkLoaderVertexProgram.build()
+                .bulkLoader(OneTimeBulkLoader.class)
+                .userSuppliedIds(true)
+                .writeGraph(getWriteGraphConfiguration()).create(graph);
+        final BulkLoader loader = getBulkLoader(blvp);
+        assertTrue(loader instanceof OneTimeBulkLoader);
+        graph.compute(graphComputerClass.get()).workers(1).program(blvp).submit().get();
+        final Graph result = getWriteGraph();
+        assertEquals(6, IteratorUtils.count(result.vertices()));
+        assertEquals(6, IteratorUtils.count(result.edges()));
+        result.close();
     }
 
     private static void assertGraphEquality(final Graph source, final Graph target) {


[32/50] incubator-tinkerpop git commit: Update README.asciidoc with correct hyperlinks

Posted by ok...@apache.org.
Update README.asciidoc with correct hyperlinks

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

Branch: refs/heads/TINKERPOP-1033
Commit: 8bc2419ab5516d1d4428fb5d289c083a07a0cf90
Parents: 5406e52
Author: MarkHoekstra <Ma...@users.noreply.github.com>
Authored: Mon Dec 28 11:36:19 2015 +0100
Committer: MarkHoekstra <Ma...@users.noreply.github.com>
Committed: Mon Dec 28 11:36:19 2015 +0100

----------------------------------------------------------------------
 README.asciidoc | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/8bc2419a/README.asciidoc
----------------------------------------------------------------------
diff --git a/README.asciidoc b/README.asciidoc
index 0dff831..07f5e57 100644
--- a/README.asciidoc
+++ b/README.asciidoc
@@ -24,10 +24,10 @@ Documentation
 
 TinkerPop3 provides graph computing capabilities for both graph databases (OLTP) and graph analytic systems (OLAP).
 
-* link:http://apache.tinkerpop.org/[homepage (downloads)]
-* link:http://apache.tinkerpop.org/docs/3.0.2-incubating/[reference documentation]
-* link:http://apache.tinkerpop.org/javadocs/3.0.2-incubating/core/[core javadoc]
-* link:http://apache.tinkerpop.org/javadocs/3.0.2-incubating/full/[full javadoc]
+* link:http://tinkerpop.apache.org/[homepage (downloads)]
+* link:http://tinkerpop.apache.org/docs/3.0.2-incubating/[reference documentation]
+* link:http://tinkerpop.apache.org/javadocs/3.0.2-incubating/core/[core javadoc]
+* link:http://tinkerpop.apache.org/javadocs/3.0.2-incubating/full/[full javadoc]
 
 Building and Testing
 ~~~~~~~~~~~~~~~~~~~~
@@ -63,4 +63,4 @@ gremlin> g = graph.traversal()
 ==>graphtraversalsource[tinkergraph[vertices:6 edges:6], standard]
 gremlin> g.V().has('name','vadas').valueMap()
 ==>[name:[vadas], age:[27]]
-----
\ No newline at end of file
+----


[42/50] incubator-tinkerpop git commit: Update changelog.

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

Branch: refs/heads/TINKERPOP-1033
Commit: 5463bd9cff76624067994e2469047d5ebbb305b6
Parents: 1f6cb94
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Dec 29 13:44:11 2015 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Dec 29 13:44:11 2015 -0500

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


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5463bd9c/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 028f20f..e131b81 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -27,6 +27,7 @@ TinkerPop 3.1.1 (NOT OFFICIALLY RELEASED YET)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 * Execute the `LifeCycle.beforeEval()` in the same thread that `eval()` is executed in for `GremlinExecutor`.
+* Improved error handling of Gremlin Console initialization scripts to better separate errors in initialization script I/O versus execution of the script itself.
 * Fixed a bug in `Graph.OptOut` when trying to opt-out of certain test cases with the `method` property set to "*".
 * Added another `BulkLoader` implementation (`OneTimeBulkLoader`) that doesn't store temporary properties in the target graph.
 * Fixed a `SparkGraphComputer` sorting bug in MapReduce that occurred when there was more than one partition.


[33/50] incubator-tinkerpop git commit: Bump README links to 3.1.0.

Posted by ok...@apache.org.
Bump README links to 3.1.0.


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

Branch: refs/heads/TINKERPOP-1033
Commit: e23e80c8886648ec80d2d730b2473ebf9f1b67e3
Parents: 8bc2419
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Dec 28 06:47:11 2015 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Dec 28 06:47:11 2015 -0500

----------------------------------------------------------------------
 README.asciidoc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/e23e80c8/README.asciidoc
----------------------------------------------------------------------
diff --git a/README.asciidoc b/README.asciidoc
index 07f5e57..261cdcd 100644
--- a/README.asciidoc
+++ b/README.asciidoc
@@ -25,9 +25,9 @@ Documentation
 TinkerPop3 provides graph computing capabilities for both graph databases (OLTP) and graph analytic systems (OLAP).
 
 * link:http://tinkerpop.apache.org/[homepage (downloads)]
-* link:http://tinkerpop.apache.org/docs/3.0.2-incubating/[reference documentation]
-* link:http://tinkerpop.apache.org/javadocs/3.0.2-incubating/core/[core javadoc]
-* link:http://tinkerpop.apache.org/javadocs/3.0.2-incubating/full/[full javadoc]
+* link:http://tinkerpop.apache.org/docs/3.1.0-incubating/[reference documentation]
+* link:http://tinkerpop.apache.org/javadocs/3.1.0-incubating/core/[core javadoc]
+* link:http://tinkerpop.apache.org/javadocs/3.1.0-incubating/full/[full javadoc]
 
 Building and Testing
 ~~~~~~~~~~~~~~~~~~~~
@@ -42,7 +42,7 @@ The zip distributions can be found in the following directories:
 . `gremlin-server/target`
 . `gremlin-console/target`
 
-Please see the `CONTRIBUTING.asciidoc` file for more detailed information and options for building, test running and developing TinkerPop.
+Please see the link:http://tinkerpop.apache.org/docs/3.1.0-incubating/developer.html#_contributing[CONTRIBUTING.asciidoc] file for more detailed information and options for building, test running and developing TinkerPop.
 
 Get Started
 ~~~~~~~~~~~


[03/50] incubator-tinkerpop git commit: TINKERPOP-1052 Fixed a bug in OptOut when using method wildcard.

Posted by ok...@apache.org.
TINKERPOP-1052 Fixed a bug in OptOut when using method wildcard.

This problem seemed to occur when trying to opt-out a whole test case of parameterized tests (i think).  Seems like parameterized tests don't pass the test class down in the junit test Description which then triggers a NullPointerException.


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

Branch: refs/heads/TINKERPOP-1033
Commit: 529512f6eb23db456c6766bb13e5b2554fffddc1
Parents: 0c74e39
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Dec 18 08:39:32 2015 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Dec 18 08:39:32 2015 -0500

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 .../tinkerpop/gremlin/AbstractGremlinSuite.java | 25 +++++++++++++-------
 2 files changed, 17 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/529512f6/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 4de69c1..f90c92d 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/incubator-tinkerpop/master/docs/
 TinkerPop 3.1.1 (NOT OFFICIALLY RELEASED YET)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+* Fixed a bug in `Graph.OptOut` when trying to opt-out of certain test cases with the `method` property set to "*".
 * Fixed a `SparkGraphComputer` sorting bug in MapReduce that occurred when there was more than one partition.
 * Added `strictTransactionManagement` to the Gremlin Server settings to indicate that the `aliases` parameter must be passed on requests and that transaction management will be scoped to the graphs provided in that argument.
 * Fixed a `NullPointerException` bug in `PeerPressureVertexProgram` that occurred when an adjacency traversal was not provided.

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/529512f6/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinSuite.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinSuite.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinSuite.java
index 1aab8aa..fa9d0e6 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinSuite.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinSuite.java
@@ -282,15 +282,14 @@ public abstract class AbstractGremlinSuite extends Suite {
 
         @Override
         public boolean shouldRun(final Description description) {
-            // first check if all tests from a class should be ignored.
-            if (!entireTestCaseToIgnore.isEmpty() && entireTestCaseToIgnore.stream().map(optOut -> {
-                try {
-                    return Class.forName(optOut.test());
-                } catch (Exception ex) {
-                    throw new RuntimeException(ex);
-                }
-            }).anyMatch(claxx -> claxx.isAssignableFrom(description.getTestClass()))) {
-                return false;
+            // first check if all tests from a class should be ignored - where "OptOut.method" is set to "*". the
+            // description appears to be null in some cases of parameterized tests, but if the entire test case
+            // was ignored it would have been caught earlier and these parameterized tests wouldn't be considered
+            // for a call to shouldRun
+            if (description.getTestClass() != null) {
+                final boolean ignoreWholeTestCase = entireTestCaseToIgnore.stream().map(this::transformToClass)
+                        .anyMatch(claxx -> claxx.isAssignableFrom(description.getTestClass()));
+                if (ignoreWholeTestCase) return false;
             }
 
             if (description.isTest()) {
@@ -346,5 +345,13 @@ public abstract class AbstractGremlinSuite extends Suite {
                 }
             }).filter(c -> !c.equals(Object.class)).anyMatch(c -> c == graphProviderDescriptor.get().computer());
         }
+
+        private Class<?> transformToClass(final Graph.OptOut optOut) {
+            try {
+                return Class.forName(optOut.test());
+            } catch (Exception ex) {
+                throw new RuntimeException(ex);
+            }
+        }
     }
 }


[48/50] incubator-tinkerpop git commit: fail earlier if download of distribution files fails

Posted by ok...@apache.org.
fail earlier if download of distribution files fails


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

Branch: refs/heads/TINKERPOP-1033
Commit: f4be739e7a61920d274834f3b68ed1ccedf633af
Parents: 044b5ed
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Mon Jan 4 13:08:22 2016 +0100
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Mon Jan 4 13:08:22 2016 +0100

----------------------------------------------------------------------
 bin/validate-distribution.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/f4be739e/bin/validate-distribution.sh
----------------------------------------------------------------------
diff --git a/bin/validate-distribution.sh b/bin/validate-distribution.sh
index 16de126..001c17c 100755
--- a/bin/validate-distribution.sh
+++ b/bin/validate-distribution.sh
@@ -71,10 +71,10 @@ if [ "${TYPE}" = "SOURCE" ]; then
 fi
 
 echo -n "* downloading ${COMPONENT} (${ZIP_FILENAME})... "
-curl -Ls ${URL} -o ${ZIP_FILENAME}
+curl -Lsf ${URL} -o ${ZIP_FILENAME} || { echo "Failed to download ${COMPONENT}" ; exit 1; }
 for ext in "asc" "md5" "sha1"
 do
-  curl -Ls ${URL}.${ext} -o ${ZIP_FILENAME}.${ext} || (echo "Failed to download ${COMPONENT} (${ext})" ; exit 1)
+  curl -Lsf ${URL}.${ext} -o ${ZIP_FILENAME}.${ext} || { echo "Failed to download ${COMPONENT} (${ext})" ; exit 1 ; }
 done
 echo "OK"
 


[18/50] incubator-tinkerpop git commit: Minor alteration to whitelist matching in sanboxing for scriptengine.

Posted by ok...@apache.org.
Minor alteration to whitelist matching in sanboxing for scriptengine.

Used a strict match function compared to groovy find.  Not sure why find wasn't working reliably - added some asserts to validate.


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

Branch: refs/heads/TINKERPOP-1033
Commit: bc41af3a11b6b94f2bfb250144872442033a8285
Parents: 96e7cbd
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Dec 22 15:30:03 2015 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Dec 22 15:30:03 2015 -0500

----------------------------------------------------------------------
 ...remlinGroovyScriptEngineFileSandboxTest.java |  9 ++++-
 .../gremlin/groovy/jsr223/sandbox.yaml          | 42 +++++++++++---------
 .../customizer/AbstractSandboxExtension.groovy  |  2 +-
 .../PropertyExpressionEvaluator.groovy          |  2 +-
 .../customizer/TinkerPopSandboxExtension.groovy |  2 +-
 5 files changed, 34 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/bc41af3a/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineFileSandboxTest.java
----------------------------------------------------------------------
diff --git a/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineFileSandboxTest.java b/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineFileSandboxTest.java
index 6bfd2de..89aba64 100644
--- a/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineFileSandboxTest.java
+++ b/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineFileSandboxTest.java
@@ -25,6 +25,7 @@ import org.apache.tinkerpop.gremlin.groovy.CompilerCustomizerProvider;
 import org.apache.tinkerpop.gremlin.groovy.jsr223.customizer.CompileStaticCustomizerProvider;
 import org.apache.tinkerpop.gremlin.groovy.jsr223.customizer.FileSandboxExtension;
 import org.codehaus.groovy.control.MultipleCompilationErrorsException;
+import org.hamcrest.MatcherAssert;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -36,6 +37,7 @@ import java.util.Arrays;
 
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.Matchers.containsString;
+import static org.hamcrest.Matchers.greaterThan;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.fail;
@@ -60,6 +62,8 @@ public class GremlinGroovyScriptEngineFileSandboxTest extends AbstractGremlinTes
         final CompilerCustomizerProvider standardSandbox = new CompileStaticCustomizerProvider(FileSandboxExtension.class.getName());
         try (GremlinGroovyScriptEngine engine = new GremlinGroovyScriptEngine(standardSandbox)) {
             assertEquals(123, engine.eval("java.lang.Math.abs(-123)"));
+            assertThat(engine.eval("new Boolean(true)"), is(true));
+            assertThat(engine.eval("new Boolean(true).toString()"), is("true"));
         }
     }
 
@@ -72,9 +76,12 @@ public class GremlinGroovyScriptEngineFileSandboxTest extends AbstractGremlinTes
     }
 
     @Test
-    public void shouldPreventMaliciousStuffWithSystem() throws Exception {
+    public void shouldPreventMaliciousStuffWithSystemButAllowSomeMethodsOnSystem() throws Exception {
         final CompilerCustomizerProvider standardSandbox = new CompileStaticCustomizerProvider(FileSandboxExtension.class.getName());
         try (GremlinGroovyScriptEngine engine = new GremlinGroovyScriptEngine(standardSandbox)) {
+            assertThat((long) engine.eval("System.currentTimeMillis()"), greaterThan(0l));
+            assertThat((long) engine.eval("System.nanoTime()"), greaterThan(0l));
+
             engine.eval("System.exit(0)");
             fail("Should have a compile error because class/method is not white listed");
         } catch (Exception ex) {

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/bc41af3a/gremlin-groovy-test/src/main/resources/org/apache/tinkerpop/gremlin/groovy/jsr223/sandbox.yaml
----------------------------------------------------------------------
diff --git a/gremlin-groovy-test/src/main/resources/org/apache/tinkerpop/gremlin/groovy/jsr223/sandbox.yaml b/gremlin-groovy-test/src/main/resources/org/apache/tinkerpop/gremlin/groovy/jsr223/sandbox.yaml
index 8ee6a87..b2b7f67 100644
--- a/gremlin-groovy-test/src/main/resources/org/apache/tinkerpop/gremlin/groovy/jsr223/sandbox.yaml
+++ b/gremlin-groovy-test/src/main/resources/org/apache/tinkerpop/gremlin/groovy/jsr223/sandbox.yaml
@@ -19,25 +19,29 @@
 
 autoTypeUnknown: true
 methodWhiteList:
-  - java\.lang\.Boolean
-  - java\.lang\.Byte
-  - java\.lang\.Character
-  - java\.lang\.Double
-  - java\.lang\.Enum
-  - java\.lang\.Float
-  - java\.lang\.Integer
-  - java\.lang\.Long
-  - java\.lang\.Math
-  - java\.lang\.Number
-  - java\.lang\.Object
-  - java\.lang\.Short
-  - java\.lang\.String
-  - java\.lang\.StringBuffer
-  - java\.lang\.Throwable
-  - java\.lang\.Void
+  - java\.lang\.Boolean.*
+  - java\.lang\.Byte.*
+  - java\.lang\.Character.*
+  - java\.lang\.Double.*
+  - java\.lang\.Enum.*
+  - java\.lang\.Float.*
+  - java\.lang\.Integer.*
+  - java\.lang\.Long.*
+  - java\.lang\.Math.*
+  - java\.lang\.Number.*
+  - java\.lang\.Object.*
+  - java\.lang\.Short.*
+  - java\.lang\.String.*
+  - java\.lang\.StringBuffer.*
+  - java\.lang\.System#currentTimeMillis\(\)
+  - java\.lang\.System#nanoTime\(\)
+  - java\.lang\.Throwable.*
+  - java\.lang\.Void.*
   - java\.util\..*
-  - org\.codehaus\.groovy\.runtime\.DefaultGroovyMethods
-  - org\.codehaus\.groovy\.runtime\.StringGroovyMethods
+  - org\.codehaus\.groovy\.runtime\.DefaultGroovyMethods.*
+  - org\.codehaus\.groovy\.runtime\.InvokerHelper#runScript\(java\.lang\.Class,java\.lang\.String\[\]\)
+  - org\.codehaus\.groovy\.runtime\.StringGroovyMethods.*
+  - groovy\.lang\.Script#<init>\(groovy.lang.Binding\)
   - org\.apache\.tinkerpop\.gremlin\.structure\..*
   - org\.apache\.tinkerpop\.gremlin\.process\..*
   - org\.apache\.tinkerpop\.gremlin\.process\.computer\..*
@@ -48,7 +52,7 @@ methodWhiteList:
   - org\.apache\.tinkerpop\.gremlin\.process\.traversal\..*
   - org\.apache\.tinkerpop\.gremlin\.process\.traversal\.dsl\.graph\..*
   - org\.apache\.tinkerpop\.gremlin\.process\.traversal\.engine\..*
-  - org\.apache\.tinkerpop\.gremlin\.server\.util\.LifeCycleHook
+  - org\.apache\.tinkerpop\.gremlin\.server\.util\.LifeCycleHook.*
 staticVariableTypes:
   graph: org.apache.tinkerpop.gremlin.structure.Graph
   g: org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/bc41af3a/gremlin-groovy/src/main/groovy/org/apache/tinkerpop/gremlin/groovy/jsr223/customizer/AbstractSandboxExtension.groovy
----------------------------------------------------------------------
diff --git a/gremlin-groovy/src/main/groovy/org/apache/tinkerpop/gremlin/groovy/jsr223/customizer/AbstractSandboxExtension.groovy b/gremlin-groovy/src/main/groovy/org/apache/tinkerpop/gremlin/groovy/jsr223/customizer/AbstractSandboxExtension.groovy
index babad14..699e250 100644
--- a/gremlin-groovy/src/main/groovy/org/apache/tinkerpop/gremlin/groovy/jsr223/customizer/AbstractSandboxExtension.groovy
+++ b/gremlin-groovy/src/main/groovy/org/apache/tinkerpop/gremlin/groovy/jsr223/customizer/AbstractSandboxExtension.groovy
@@ -77,7 +77,7 @@ abstract class AbstractSandboxExtension extends GroovyTypeCheckingExtensionSuppo
         // evaluate methods to be sure they are on the whitelist
         onMethodSelection { expr, MethodNode methodNode ->
             def descriptor = SandboxHelper.toMethodDescriptor(methodNode)
-            if (!methodWhiteList.any { descriptor =~ it })
+            if (!methodWhiteList.any { descriptor ==~ it })
                 addStaticTypeError("Not authorized to call this method: $descriptor", expr)
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/bc41af3a/gremlin-groovy/src/main/groovy/org/apache/tinkerpop/gremlin/groovy/jsr223/customizer/PropertyExpressionEvaluator.groovy
----------------------------------------------------------------------
diff --git a/gremlin-groovy/src/main/groovy/org/apache/tinkerpop/gremlin/groovy/jsr223/customizer/PropertyExpressionEvaluator.groovy b/gremlin-groovy/src/main/groovy/org/apache/tinkerpop/gremlin/groovy/jsr223/customizer/PropertyExpressionEvaluator.groovy
index 577bef9..be00cba 100644
--- a/gremlin-groovy/src/main/groovy/org/apache/tinkerpop/gremlin/groovy/jsr223/customizer/PropertyExpressionEvaluator.groovy
+++ b/gremlin-groovy/src/main/groovy/org/apache/tinkerpop/gremlin/groovy/jsr223/customizer/PropertyExpressionEvaluator.groovy
@@ -59,7 +59,7 @@ class PropertyExpressionEvaluator extends ClassCodeVisitorSupport {
                 owner = typeCheckingVisitor.inferComponentType(owner, ClassHelper.int_TYPE)
 
             def descriptor = "${SandboxHelper.prettyPrint(owner)}#${expression.propertyAsString}"
-            if (!methodWhiteList.any { descriptor =~ it })
+            if (!methodWhiteList.any { descriptor ==~ it })
                 dsl.addStaticTypeError("Not authorized to call this method: $descriptor", expression)
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/bc41af3a/gremlin-groovy/src/main/groovy/org/apache/tinkerpop/gremlin/groovy/jsr223/customizer/TinkerPopSandboxExtension.groovy
----------------------------------------------------------------------
diff --git a/gremlin-groovy/src/main/groovy/org/apache/tinkerpop/gremlin/groovy/jsr223/customizer/TinkerPopSandboxExtension.groovy b/gremlin-groovy/src/main/groovy/org/apache/tinkerpop/gremlin/groovy/jsr223/customizer/TinkerPopSandboxExtension.groovy
index c418e4d..1be9c05 100644
--- a/gremlin-groovy/src/main/groovy/org/apache/tinkerpop/gremlin/groovy/jsr223/customizer/TinkerPopSandboxExtension.groovy
+++ b/gremlin-groovy/src/main/groovy/org/apache/tinkerpop/gremlin/groovy/jsr223/customizer/TinkerPopSandboxExtension.groovy
@@ -32,7 +32,7 @@ import org.apache.tinkerpop.gremlin.structure.Graph
 class TinkerPopSandboxExtension extends AbstractSandboxExtension {
 
     private static final List<String> methodWhiteList = ["java\\.util\\..*",
-                                                         "org\\.codehaus\\.groovy\\.runtime\\.DefaultGroovyMethods",
+                                                         "org\\.codehaus\\.groovy\\.runtime\\.DefaultGroovyMethods.*",
                                                          "org\\.apache\\.tinkerpop\\.gremlin\\.structure\\..*",
                                                          "org\\.apache\\.tinkerpop\\.gremlin\\.process\\..*",
                                                          "org\\.apache\\.tinkerpop\\.gremlin\\.process\\.traversal\\.dsl\\.graph\\..*"]


[12/50] incubator-tinkerpop git commit: Merge remote-tracking branch 'origin/TINKERPOP-1045'

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


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

Branch: refs/heads/TINKERPOP-1033
Commit: f5963fc55b1e26ee34c878357d2327b0573163ea
Parents: 87dfadb 55752d3
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Dec 21 18:11:19 2015 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Dec 21 18:11:19 2015 -0500

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  2 +
 .../server/handler/OpSelectorHandler.java       |  2 +-
 .../server/op/AbstractEvalOpProcessor.java      | 22 +++++++--
 .../server/op/control/ControlOpProcessor.java   | 18 ++++----
 .../server/op/session/SessionOpProcessor.java   |  6 +--
 .../server/op/standard/StandardOpProcessor.java |  6 +--
 .../server/GremlinDriverIntegrateTest.java      | 18 ++++++++
 .../server/GremlinServerIntegrateTest.java      | 48 +++++++++++++++++++-
 8 files changed, 100 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


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

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

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


[24/50] incubator-tinkerpop git commit: Add option on GryoMapper to allow overriding the ClassResolver.

Posted by ok...@apache.org.
Add option on GryoMapper to allow overriding the ClassResolver.

Included tests to demonstrate capabilities.


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

Branch: refs/heads/TINKERPOP-1033
Commit: a94c51f368f91a7c1204fb19517d02338ca1b141
Parents: 2f16c77
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Dec 24 06:54:11 2015 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Dec 24 06:54:11 2015 -0500

----------------------------------------------------------------------
 .../structure/io/gryo/GryoClassResolver.java    |   2 +-
 .../gremlin/structure/io/gryo/GryoMapper.java   |  25 +++-
 .../tinkerpop/gremlin/structure/io/IoX.java     |   5 +
 .../gremlin/structure/io/IoXIoRegistry.java     |  63 ++++++++++
 .../tinkerpop/gremlin/structure/io/IoY.java     |   5 +
 .../gremlin/structure/io/IoYIoRegistry.java     |  45 +++++++
 .../structure/io/gryo/GryoMapperTest.java       | 116 +++++++++++++++++++
 7 files changed, 257 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/a94c51f3/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoClassResolver.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoClassResolver.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoClassResolver.java
index 268da9c..5d51d22 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoClassResolver.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoClassResolver.java
@@ -52,7 +52,7 @@ import static org.apache.tinkerpop.shaded.kryo.util.Util.getWrapperClass;
  *
  * @author Stephen Mallette (http://stephen.genoprime.com)
  */
-class GryoClassResolver implements ClassResolver {
+public class GryoClassResolver implements ClassResolver {
     static public final byte NAME = -1;
 
     protected Kryo kryo;

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/a94c51f3/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoMapper.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoMapper.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoMapper.java
index 1fec5c8..7d945ce 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoMapper.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoMapper.java
@@ -57,6 +57,7 @@ import org.apache.tinkerpop.gremlin.structure.util.reference.ReferenceVertex;
 import org.apache.tinkerpop.gremlin.structure.util.reference.ReferenceVertexProperty;
 import org.apache.tinkerpop.gremlin.structure.util.star.StarGraph;
 import org.apache.tinkerpop.gremlin.structure.util.star.StarGraphGryoSerializer;
+import org.apache.tinkerpop.shaded.kryo.ClassResolver;
 import org.apache.tinkerpop.shaded.kryo.Kryo;
 import org.apache.tinkerpop.shaded.kryo.KryoSerializable;
 import org.apache.tinkerpop.shaded.kryo.Serializer;
@@ -90,6 +91,7 @@ import java.util.UUID;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicLong;
 import java.util.function.Function;
+import java.util.function.Supplier;
 import java.util.stream.Collectors;
 
 /**
@@ -125,18 +127,20 @@ public final class GryoMapper implements Mapper<Kryo> {
     public static final byte[] GIO = "gio".getBytes();
     public static final byte[] HEADER = Arrays.copyOf(GIO, 16);
     private final List<Triplet<Class, Function<Kryo, Serializer>, Integer>> serializationList;
-    private boolean registrationRequired;
-    private boolean referenceTracking;
+    private final boolean registrationRequired;
+    private final boolean referenceTracking;
+    private final Supplier<ClassResolver> classResolver;
 
     private GryoMapper(final Builder builder) {
         this.serializationList = builder.serializationList;
         this.registrationRequired = builder.registrationRequired;
         this.referenceTracking = builder.referenceTracking;
+        this.classResolver = builder.classResolver;
     }
 
     @Override
     public Kryo createMapper() {
-        final Kryo kryo = new Kryo(new GryoClassResolver(), new MapReferenceResolver(), new DefaultStreamFactory());
+        final Kryo kryo = new Kryo(classResolver.get(), new MapReferenceResolver(), new DefaultStreamFactory());
         kryo.addDefaultSerializer(Map.Entry.class, new EntrySerializer());
         kryo.setRegistrationRequired(registrationRequired);
         kryo.setReferences(referenceTracking);
@@ -289,6 +293,7 @@ public final class GryoMapper implements Mapper<Kryo> {
 
         private boolean registrationRequired = true;
         private boolean referenceTracking = true;
+        private Supplier<ClassResolver> classResolver = GryoClassResolver::new;
 
         private Builder() {
         }
@@ -304,6 +309,20 @@ public final class GryoMapper implements Mapper<Kryo> {
         }
 
         /**
+         * Provides a custom Kryo {@code ClassResolver} to be supplied to a {@code Kryo} instance.  If this value is
+         * not supplied then it will default to the {@link GryoClassResolver}. To ensure compatibility with Gryo it
+         * is highly recommended that objects passed to this method extend that class.
+         * <p/>
+         * If the {@code ClassResolver} implementation share state, then the {@link Supplier} should typically create
+         * new instances when requested, as the {@link Supplier} will be called for each {@link Kryo} instance created.
+         */
+        public Builder classResolver(final Supplier<ClassResolver> classResolverSupplier) {
+            if (null == classResolverSupplier) throw new IllegalArgumentException("The classResolverSupplier cannot be null");
+            this.classResolver = classResolverSupplier;
+            return this;
+        }
+
+        /**
          * Register custom classes to serializes with gryo using default serialization.
          */
         public Builder addCustom(final Class... custom) {

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/a94c51f3/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/IoX.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/IoX.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/IoX.java
index 2f67382..4c1698f 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/IoX.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/IoX.java
@@ -47,4 +47,9 @@ public class IoX {
     public int hashCode() {
         return x.hashCode();
     }
+
+    @Override
+    public String toString() {
+        return x;
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/a94c51f3/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/IoXIoRegistry.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/IoXIoRegistry.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/IoXIoRegistry.java
index dabdae8..ddc5477 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/IoXIoRegistry.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/IoXIoRegistry.java
@@ -18,7 +18,21 @@
  */
 package org.apache.tinkerpop.gremlin.structure.io;
 
+import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONTokens;
 import org.apache.tinkerpop.gremlin.structure.io.gryo.GryoIo;
+import org.apache.tinkerpop.gremlin.structure.util.detached.DetachedVertex;
+import org.apache.tinkerpop.shaded.kryo.Kryo;
+import org.apache.tinkerpop.shaded.kryo.Serializer;
+import org.apache.tinkerpop.shaded.kryo.io.Input;
+import org.apache.tinkerpop.shaded.kryo.io.Output;
+
+import java.io.ByteArrayOutputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 /**
  * @author Stephen Mallette (http://stephen.genoprime.com)
@@ -41,4 +55,53 @@ public class IoXIoRegistry {
             return INSTANCE;
         }
     }
+
+    public static class SerializerToVertexBased extends AbstractIoRegistry {
+        public SerializerToVertexBased() {
+            register(GryoIo.class, IoX.class, new IoXToVertexSerializer());
+        }
+    }
+
+    /**
+     * Converts an {@link IoX} to a {@link DetachedVertex}.
+     */
+    public final static class IoXToVertexSerializer extends Serializer<IoX> {
+        public IoXToVertexSerializer() {
+        }
+
+        @Override
+        public void write(final Kryo kryo, final Output output, final IoX iox) {
+            final Map<String,Object> props = new HashMap<>();
+            addSingleProperty("x", iox.toString(), props);
+            final DetachedVertex vertex = new DetachedVertex(100, Vertex.DEFAULT_LABEL, props);
+            try (final OutputStream stream = new ByteArrayOutputStream()) {
+                final Output detachedOutput = new Output(stream);
+                kryo.writeObject(detachedOutput, vertex);
+
+                // have to remove the first byte because it marks a reference we don't want to have as this
+                // serializer is trying to "act" like a DetachedVertex
+                final byte[] b = detachedOutput.toBytes();
+                output.write(b, 1, b.length - 1);
+            } catch (Exception ex) {
+                ex.printStackTrace();
+            }
+        }
+
+        @Override
+        public IoX read(final Kryo kryo, final Input input, final Class<IoX> ioxClass) {
+            throw new UnsupportedOperationException("IoX writes to DetachedVertex and can't be read back in as IoX");
+        }
+
+        private static void addSingleProperty(final String key, final Object value, final Map<String, Object> props)
+        {
+            final List<Map<String, Object>> propertyNames = new ArrayList<>(1);
+            final Map<String,Object> propertyName = new HashMap<>();
+            propertyName.put(GraphSONTokens.ID, key);
+            propertyName.put(GraphSONTokens.KEY, key);
+            propertyName.put(GraphSONTokens.VALUE, value);
+            propertyNames.add(propertyName);
+
+            props.put(key, propertyNames);
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/a94c51f3/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/IoY.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/IoY.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/IoY.java
index ddbb221..5da7cec 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/IoY.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/IoY.java
@@ -49,4 +49,9 @@ public class IoY {
     public int hashCode() {
         return y.hashCode();
     }
+
+    @Override
+    public String toString() {
+        return y + "-" + z;
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/a94c51f3/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/IoYIoRegistry.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/IoYIoRegistry.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/IoYIoRegistry.java
index 1d03500..53c3404 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/IoYIoRegistry.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/IoYIoRegistry.java
@@ -19,6 +19,15 @@
 package org.apache.tinkerpop.gremlin.structure.io;
 
 import org.apache.tinkerpop.gremlin.structure.io.gryo.GryoIo;
+import org.apache.tinkerpop.shaded.kryo.Kryo;
+import org.apache.tinkerpop.shaded.kryo.Serializer;
+import org.apache.tinkerpop.shaded.kryo.io.Input;
+import org.apache.tinkerpop.shaded.kryo.io.Output;
+
+import java.io.ByteArrayOutputStream;
+import java.io.OutputStream;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  * @author Stephen Mallette (http://stephen.genoprime.com)
@@ -41,4 +50,40 @@ public class IoYIoRegistry {
             return INSTANCE;
         }
     }
+
+    public static class SerializerToMapBased extends AbstractIoRegistry {
+        public SerializerToMapBased() {
+            register(GryoIo.class, IoY.class, new IoYToHashMapSerializer());
+        }
+    }
+
+    /**
+     * Converts an {@link IoX} to a {@link HashMap}.
+     */
+    public final static class IoYToHashMapSerializer extends Serializer<IoY> {
+        public IoYToHashMapSerializer() {
+        }
+
+        @Override
+        public void write(final Kryo kryo, final Output output, final IoY ioy) {
+            final Map<String, Object> map = new HashMap<>();
+            map.put("y", ioy.toString());
+            try (final OutputStream stream = new ByteArrayOutputStream()) {
+                final Output detachedOutput = new Output(stream);
+                kryo.writeObject(detachedOutput, map);
+
+                // have to remove the first byte because it marks a reference we don't want to have as this
+                // serializer is trying to "act" like a Map
+                final byte[] b = detachedOutput.toBytes();
+                output.write(b, 1, b.length - 1);
+            } catch (Exception ex) {
+                ex.printStackTrace();
+            }
+        }
+
+        @Override
+        public IoY read(final Kryo kryo, final Input input, final Class<IoY> ioyClass) {
+            throw new UnsupportedOperationException("IoX writes to Map and can't be read back in as IoX");
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/a94c51f3/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 9bdec55..947528c 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
@@ -18,11 +18,17 @@
  */
 package org.apache.tinkerpop.gremlin.structure.io.gryo;
 
+import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.tinkerpop.gremlin.structure.io.IoRegistry;
 import org.apache.tinkerpop.gremlin.structure.io.IoX;
 import org.apache.tinkerpop.gremlin.structure.io.IoXIoRegistry;
 import org.apache.tinkerpop.gremlin.structure.io.IoY;
 import org.apache.tinkerpop.gremlin.structure.io.IoYIoRegistry;
+import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONTokens;
+import org.apache.tinkerpop.gremlin.structure.util.detached.DetachedVertex;
+import org.apache.tinkerpop.shaded.kryo.ClassResolver;
 import org.apache.tinkerpop.shaded.kryo.Kryo;
+import org.apache.tinkerpop.shaded.kryo.Registration;
 import org.apache.tinkerpop.shaded.kryo.io.Input;
 import org.apache.tinkerpop.shaded.kryo.io.Output;
 import org.junit.Test;
@@ -31,6 +37,11 @@ import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.InputStream;
 import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.function.Supplier;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotEquals;
@@ -47,6 +58,111 @@ public class GryoMapperTest {
     }
 
     @Test
+    public void shouldSerializeDeserialize() throws Exception {
+        final GryoMapper mapper = GryoMapper.build().create();
+        final Kryo kryo = mapper.createMapper();
+        try (final OutputStream stream = new ByteArrayOutputStream()) {
+            final Output out = new Output(stream);
+
+            final Map<String,Object> props = new HashMap<>();
+            final List<Map<String, Object>> propertyNames = new ArrayList<>(1);
+            final Map<String,Object> propertyName = new HashMap<>();
+            propertyName.put(GraphSONTokens.ID, "x");
+            propertyName.put(GraphSONTokens.KEY, "x");
+            propertyName.put(GraphSONTokens.VALUE, "no-way-this-will-ever-work");
+            propertyNames.add(propertyName);
+            props.put("x", propertyNames);
+            final DetachedVertex v = new DetachedVertex(100, Vertex.DEFAULT_LABEL, props);
+
+            kryo.writeClassAndObject(out, v);
+
+            try (final InputStream inputStream = new ByteArrayInputStream(out.toBytes())) {
+                final Input input = new Input(inputStream);
+                final DetachedVertex readX = (DetachedVertex) kryo.readClassAndObject(input);
+                assertEquals("no-way-this-will-ever-work", readX.value("x"));
+            }
+        }
+    }
+
+    @Test
+    public void shouldSerializeWithCustomClassResolverToDetachedVertex() throws Exception {
+        final IoRegistry ioRegistry = new IoXIoRegistry.SerializerToVertexBased();
+        final Supplier<ClassResolver> classResolver = new CustomClassResolverSupplier();
+        final GryoMapper mapper = GryoMapper.build().addRegistry(ioRegistry).classResolver(classResolver).create();
+        final Kryo kryo = mapper.createMapper();
+        try (final OutputStream stream = new ByteArrayOutputStream()) {
+            final Output out = new Output(stream);
+            final IoX x = new IoX("no-way-this-will-ever-work");
+
+            kryo.writeClassAndObject(out, x);
+
+            final GryoMapper mapperWithoutKnowledgeOfIox = GryoMapper.build().create();
+            final Kryo kryoWithoutKnowledgeOfIox = mapperWithoutKnowledgeOfIox.createMapper();
+            try (final InputStream inputStream = new ByteArrayInputStream(out.toBytes())) {
+                final Input input = new Input(inputStream);
+                final DetachedVertex readX = (DetachedVertex) kryoWithoutKnowledgeOfIox.readClassAndObject(input);
+                assertEquals("no-way-this-will-ever-work", readX.value("x"));
+            }
+        }
+    }
+
+    @Test
+    public void shouldSerializeWithCustomClassResolverToHashMap() throws Exception {
+        final IoRegistry ioRegistry = new IoXIoRegistry.SerializerToVertexBased();
+        final Supplier<ClassResolver> classResolver = new CustomClassResolverSupplier();
+        final GryoMapper mapper = GryoMapper.build().addRegistry(ioRegistry).classResolver(classResolver).create();
+        final Kryo kryo = mapper.createMapper();
+        try (final OutputStream stream = new ByteArrayOutputStream()) {
+            final Output out = new Output(stream);
+            final IoY y = new IoY(100, 200);
+
+            kryo.writeClassAndObject(out, y);
+
+            final GryoMapper mapperWithoutKnowledgeOfIoy = GryoMapper.build().create();
+            final Kryo kryoWithoutKnowledgeOfIox = mapperWithoutKnowledgeOfIoy.createMapper();
+            try (final InputStream inputStream = new ByteArrayInputStream(out.toBytes())) {
+                final Input input = new Input(inputStream);
+                final Map readY = (HashMap) kryoWithoutKnowledgeOfIox.readClassAndObject(input);
+                assertEquals("100-200", readY.get("y"));
+            }
+        }
+    }
+
+    /**
+     * Creates new {@link CustomClassResolver} when requested.
+     */
+    public static class CustomClassResolverSupplier implements Supplier<ClassResolver> {
+        @Override
+        public ClassResolver get() {
+            return new CustomClassResolver();
+        }
+    }
+
+    /**
+     * A custom {@code ClassResolver} that alters the {@code Registration} returned to Kryo when an {@link IoX} class
+     * is requested, coercing it to a totally different class (a {@link DetachedVertex}).  This coercion demonstrates
+     * how a TinkerPop provider might take a custom internal class and serialize it into something core to
+     * TinkerPop which then removes the requirement for providers to expose serializers on the client side for user
+     * consumption.
+     */
+    public static class CustomClassResolver extends GryoClassResolver {
+        private IoXIoRegistry.IoXToVertexSerializer ioXToVertexSerializer = new IoXIoRegistry.IoXToVertexSerializer();
+        private IoYIoRegistry.IoYToHashMapSerializer ioYToHashMapSerializer = new IoYIoRegistry.IoYToHashMapSerializer();
+
+        public Registration getRegistration(final Class clazz) {
+            if (IoX.class.isAssignableFrom(clazz)) {
+                final Registration registration = super.getRegistration(DetachedVertex.class);
+                return new Registration(registration.getType(), ioXToVertexSerializer, registration.getId());
+            } else if (IoY.class.isAssignableFrom(clazz)) {
+                final Registration registration = super.getRegistration(HashMap.class);
+                return new Registration(registration.getType(), ioYToHashMapSerializer, registration.getId());
+            } else {
+                return super.getRegistration(clazz);
+            }
+        }
+    }
+
+    @Test
     public void shouldSerializeWithoutRegistration() throws Exception {
         final GryoMapper mapper = GryoMapper.build().registrationRequired(false).create();
         final Kryo kryo = mapper.createMapper();


[27/50] incubator-tinkerpop git commit: Updated changelog.

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

Branch: refs/heads/TINKERPOP-1033
Commit: c288d658438008e3e5a66efe7ed39a2444552d9e
Parents: 5c196db
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Dec 24 08:01:16 2015 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Dec 24 08:01:16 2015 -0500

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


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/c288d658/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 25773e8..23ae585 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -28,6 +28,7 @@ TinkerPop 3.1.1 (NOT OFFICIALLY RELEASED YET)
 
 * Fixed a bug in `Graph.OptOut` when trying to opt-out of certain test cases with the `method` property set to "*".
 * Added another `BulkLoader` implementation (`OneTimeBulkLoader`) that doesn't store temporary properties in the target graph.
+* Added option to allow for a custom `ClassResolver` to be assigned to a `GryoMapper` instance.
 * Fixed a `SparkGraphComputer` sorting bug in MapReduce that occurred when there was more than one partition.
 * Added `strictTransactionManagement` to the Gremlin Server settings to indicate that the `aliases` parameter must be passed on requests and that transaction management will be scoped to the graphs provided in that argument.
 * Fixed a `NullPointerException` bug in `PeerPressureVertexProgram` that occurred when an adjacency traversal was not provided.


[36/50] incubator-tinkerpop git commit: TINKERPOP-1065: fixed a sentence that was incorrectly modified.

Posted by ok...@apache.org.
TINKERPOP-1065: fixed a sentence that was incorrectly modified.


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

Branch: refs/heads/TINKERPOP-1033
Commit: 6e5895b59ae682f62fefc3c95524b156cf9fb7fb
Parents: c2cff18
Author: Jeremy Hanna <jh...@datastax.com>
Authored: Mon Dec 28 08:59:22 2015 -0800
Committer: Jeremy Hanna <jh...@datastax.com>
Committed: Mon Dec 28 08:59:22 2015 -0800

----------------------------------------------------------------------
 docs/src/reference/the-graph.asciidoc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/6e5895b5/docs/src/reference/the-graph.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/the-graph.asciidoc b/docs/src/reference/the-graph.asciidoc
index aba7500..e562eeb 100644
--- a/docs/src/reference/the-graph.asciidoc
+++ b/docs/src/reference/the-graph.asciidoc
@@ -405,8 +405,8 @@ applications outside of TinkerPop, GraphML may be the best choice to do that. Co
 * Produce a subgraph and export it to GraphML to be consumed by and visualized in link:https://gephi.org/[Gephi].
 * Migrate the data of an entire graph to a different graph database not supported by TinkerPop.
 
-As GraphML is a specification for the serialization of an entire graph and not the individual elements of a graph.
-Methods that support input and output of single vertices, edges, etc. are not supported.
+As GraphML is a specification for the serialization of an entire graph and not the individual elements of a graph,
+methods that support input and output of single vertices, edges, etc. are not supported.
 
 CAUTION: GraphML is a "lossy" format in that it only supports primitive values for properties and does not have
 support for `Graph` variables.  It will use `toString` to serialize property values outside of those primitives.


[22/50] incubator-tinkerpop git commit: TINKERPOP-1065: fix some typos and clarify some wording.

Posted by ok...@apache.org.
TINKERPOP-1065: fix some typos and clarify some wording.


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

Branch: refs/heads/TINKERPOP-1033
Commit: 3eb472654a88bd1f6f4947244c6e16c05433768d
Parents: 2f16c77
Author: Jeremy Hanna <jh...@datastax.com>
Authored: Wed Dec 23 14:27:25 2015 -0800
Committer: Jeremy Hanna <jh...@datastax.com>
Committed: Wed Dec 23 14:27:25 2015 -0800

----------------------------------------------------------------------
 docs/src/reference/intro.asciidoc     | 23 +++++++++-------
 docs/src/reference/the-graph.asciidoc | 44 ++++++++++++++++--------------
 2 files changed, 36 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/3eb47265/docs/src/reference/intro.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/intro.asciidoc b/docs/src/reference/intro.asciidoc
index 2affc01..8fb82e3 100644
--- a/docs/src/reference/intro.asciidoc
+++ b/docs/src/reference/intro.asciidoc
@@ -67,7 +67,7 @@ link:http://en.wikipedia.org/wiki/Graph_traversal[traversal].
  ** `MapReduce`: a computations that analyzes all vertices in the graph in parallel and yields a single reduced result.
 
 IMPORTANT: TinkerPop3 is licensed under the popular link:http://www.apache.org/licenses/LICENSE-2.0.html[Apache2]
-free software license. However, note that the underlying graph engine used with TinkerPop3 may have a difference
+free software license. However, note that the underlying graph engine used with TinkerPop3 may have a different
 license. Thus, be sure to respect the license caveats of the graph system product.
 
 image:tinkerpop-enabled.png[width=135,float=left] When a graph system implements the TinkerPop3 structure and process
@@ -92,7 +92,7 @@ between its vertices, edges, and properties. A vertex has incident edges. A vert
 they share an incident edge. A property is attached to an element and an element has a set of properties. A property
 is a key/value pair, where the key is always a character `String`. The graph structure API of TinkerPop3 provides the
 methods necessary to create such a structure. The TinkerPop graph previously diagrammed can be created with the
-following Java8 code. Note that this graph is available as an in-memory TinkerGraph using
+following Java 8 code. Note that this graph is available as an in-memory TinkerGraph using
 `TinkerFactory.createClassic()`.
 
 [source,java]
@@ -122,20 +122,20 @@ with the provided key/value pair properties appended to it.
 CAUTION: Many graph systems do not allow the user to specify an element ID and in such cases, an exception is thrown.
 
 NOTE: In TinkerPop3, vertices are allowed a single immutable string label (similar to an edge label). This
-functionality did not exist in TinkerPop2. Likewise, element id's are immutable as they were in TinkerPop2.
+functionality did not exist in TinkerPop2. Element ids are still immutable in TinkerPop3 as they were in TinkerPop2.
 
 Mutating the Graph
 ~~~~~~~~~~~~~~~~~~
 
-Below is a sequence of basic graph mutation operations represented in Java8. One of the major differences between
+Below is a sequence of basic graph mutation operations represented in Java 8. One of the major differences between
 TinkerPop2 and TinkerPop3 is that in TinkerPop3, the Java convention of using setters and getters has been abandoned
 in favor of a syntax that is more aligned with the syntax of Gremlin-Groovy in TinkerPop2. Given that Gremlin-Java8
-and Gremlin-Groovy are nearly identical due to the inclusion of Java8 lambdas, a big efforts was made to ensure that
+and Gremlin-Groovy are nearly identical due to the inclusion of Java 8 lambdas, a big effort was made to ensure that
 both languages are as similar as possible.
 
 CAUTION: In the code examples presented throughout this documentation, either Gremlin-Java8 or Gremlin-Groovy is used.
-It is possible to determine which derivative of Gremlin is being used by "mousing over" on the code block and see
-either "JAVA" or "GROOVY" pop up in the top right corner of the code block.
+It is possible to determine which derivative of Gremlin is being used by mousing over the code block.  The word "JAVA"
+or "GROOVY" will appear in the top right corner of the code block.
 
 image:basic-mutation.png[width=240,float=right]
 [source,java]
@@ -207,7 +207,7 @@ gremlin> gremlin.addEdge('dependsOn',blueprints)
 gremlin> blueprints.property('created',2010)
 ==>vp[created->2010]
 gremlin> blueprints.property('created').remove()
-==>null
+==>null <1>
 gremlin> gremlin.addEdge('encapsulates',blueprints)
 ==>e[7][0-encapsulates->3]
 gremlin> blueprints.remove()
@@ -216,6 +216,9 @@ gremlin> gremlin.remove()
 ==>null
 ----
 
+<1> A `==>null` output is usually from a `void` method call and simply indicates that there was no problem with the
+invocation. If there were a problem, an error would be output or an exception would be thrown.
+
 IMPORTANT: TinkerGraph is not a transactional graph. For more information on transaction handling (for those graph
 systems that support them) see the section dedicated to <<transactions,transactions>>.
 
@@ -338,7 +341,7 @@ may alter the flow).
 On Gremlin Language Variants
 ----------------------------
 
-Gremlin is written in Java8. There are various language variants of Gremlin such as Gremlin-Groovy (packaged with
+Gremlin is written in Java 8. There are various language variants of Gremlin such as Gremlin-Groovy (packaged with
 TinkerPop3), link:https://github.com/mpollmeier/gremlin-scala[Gremlin-Scala], Gremlin-JavaScript, Gremlin-Clojure
 (known as link:https://github.com/clojurewerkz/ogre[Ogre]), etc. It is best to think of Gremlin as a style of graph
 traversing that is not bound to a particular programming language per se. Within a programming language familiar to
@@ -346,7 +349,7 @@ the developer, there is a Gremlin variant that they can use that leverages the i
 a programming language providing a Gremlin implementation must support
 link:http://en.wikipedia.org/wiki/Method_chaining[function chaining] (with
 link:http://en.wikipedia.org/wiki/Anonymous_function[lambdas/anonymous functions] being a "nice to have" if the
-variants wishes to offer arbitrary computations beyond the provided Gremlin steps).
+variant wishes to offer arbitrary computations beyond the provided Gremlin steps).
 
 Throughout the documentation, the examples provided are primarily written in Gremlin-Groovy. The reason for this is
 the <<gremlin-console,Gremlin Console>> whereby an interactive programming environment exists that does not require

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/3eb47265/docs/src/reference/the-graph.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/the-graph.asciidoc b/docs/src/reference/the-graph.asciidoc
index d03ca67..a97907b 100644
--- a/docs/src/reference/the-graph.asciidoc
+++ b/docs/src/reference/the-graph.asciidoc
@@ -63,17 +63,18 @@ pairs. Moreover, while an `Edge` can only have one property of key "name" (for e
 "name" properties. With the inclusion of vertex properties, two features are introduced which ultimately advance the
 graph modelers toolkit:
 
-. Multiple properties (*multi-properties*): a vertex property key can have multiple values (i.e. a vertex can have
-multiple "name" properties).
+. Multiple properties (*multi-properties*): a vertex property key can have multiple values.  For example, a vertex can have
+multiple "name" properties.
 . Properties on properties (*meta-properties*): a vertex property can have properties (i.e. a vertex property can
 have key/value data associated with it).
 
-A collection of use cases are itemized below:
+Possible use cases for meta-properties:
 
 . *Permissions*: Vertex properties can have key/value ACL-type permission information associated with them.
 . *Auditing*: When a vertex property is manipulated, it can have key/value information attached to it saying who the
 creator, deletor, etc. are.
-. *Provenance*: The "name" of a vertex can be declared by multiple users.
+. *Provenance*: The "name" of a vertex can be declared by multiple users.  For example, there may be multiple spellings
+of a name from different sources.
 
 A running example using vertex properties is provided below to demonstrate and explain the API.
 
@@ -180,15 +181,15 @@ important to note that the `Transaction` object does not represent a "transactio
 methods for working with transactions (e.g. committing, rolling back, etc).
 
 Most `Graph` implementations that `supportsTransactions` will implement an "automatic" `ThreadLocal` transaction,
-which means that when a read or write occurs after the `Graph` is instantiated a transaction is automatically
+which means that when a read or write occurs after the `Graph` is instantiated, a transaction is automatically
 started within that thread.  There is no need to manually call a method to "create" or "start" a transaction.  Simply
 modify the graph as required and call `graph.tx().commit()` to apply changes or `graph.tx().rollback()` to undo them.
 When the next read or write action occurs against the graph, a new transaction will be started within that current
 thread of execution.
 
 When using transactions in this fashion, especially in web application (e.g. REST server), it is important to ensure
-that transaction do not leak from one request to the next.  In other words, unless a client is somehow bound via
-session to process every request on the same server thread, ever request must be committed or rolled back at the end
+that transactions do not leak from one request to the next.  In other words, unless a client is somehow bound via
+session to process every request on the same server thread, every request must be committed or rolled back at the end
 of the request.  By ensuring that the request encapsulates a transaction, it ensures that a future request processed
 on a server thread is starting in a fresh transactional state and will not have access to the remains of one from an
 earlier request. A good strategy is to rollback a transaction at the start of a request, so that if it so happens that
@@ -275,9 +276,9 @@ or other read operations executed in the context of that open transaction.
 <7> Explicitly open a transaction.
 <8> Adding a vertex now succeeds as the transaction was manually opened.
 
-NOTE: It may be important to consult the documentation of the `Graph` implementation when it comes to the specifics of
-how transactions will behave.  TinkerPop allows some latitude in this area and implementations may not have the exact
-same behaviors and link:https://en.wikipedia.org/wiki/ACID[ACID] guarantees.
+NOTE: It may be important to consult the documentation of the `Graph` implementation you are using when it comes to the
+specifics of how transactions will behave.  TinkerPop allows some latitude in this area and implementations may not have
+the exact same behaviors and link:https://en.wikipedia.org/wiki/ACID[ACID] guarantees.
 
 Retries
 ~~~~~~~
@@ -387,10 +388,10 @@ for the serialization process, it is always best to utilize the methods on the `
 have to be configured manually by the user to do the serialization.
 
 It is up to the implementations of the `GraphReader` and `GraphWriter` interfaces to choose the methods they
-implement and the manner in which they work together.  The only semantics enforced and expected is that the write
-methods should produce output that is compatible with the corresponding read method (e.g. the output of
+implement and the manner in which they work together.  The only characteristic enforced and expected is that the write
+methods should produce output that is compatible with the corresponding read method.  For example, he output of
 `writeVertices` should be readable as input to `readVertices` and the output of `writeProperty` should be readable as
-input to `readProperty`).
+input to `readProperty`.
 
 GraphML Reader/Writer
 ~~~~~~~~~~~~~~~~~~~~~
@@ -404,17 +405,18 @@ applications outside of TinkerPop, GraphML may be the best choice to do that. Co
 * Produce a subgraph and export it to GraphML to be consumed by and visualized in link:https://gephi.org/[Gephi].
 * Migrate the data of an entire graph to a different graph database not supported by TinkerPop.
 
-As GraphML is a specification for the serialization of an entire graph and not the individual elements of a graph,
-methods that support input and output of single vertices, edges, etc. are not supported.
+As GraphML is a specification for the serialization of an entire graph and not the individual elements of a graph.
+Methods that support input and output of single vertices, edges, etc. are not supported.
 
 CAUTION: GraphML is a "lossy" format in that it only supports primitive values for properties and does not have
 support for `Graph` variables.  It will use `toString` to serialize property values outside of those primitives.
 
-CAUTION: GraphML, as a specification, allows for `<edge>` and `<node>` elements to appear in any order.  The
-`GraphMLReader` will support that, however, that capability comes with a limitation. TinkerPop does not allow the
-vertex label to be changed after the vertex has been created.  Therefore, if an `<edge>` element comes before the
-`<node>` the label on the vertex will be ignored.  It is thus better to order `<node>` elements in the GraphML to
-appear before all `<edge>` elements if vertex labels are important to the graph.
+CAUTION: GraphML as a specification allows for `<edge>` and `<node>` elements to appear in any order.  Most software
+that writes GraphML (including as TinkerPop's `GraphMLWriter`) write `<node>` elements before `<edge>` elements.  However it
+is important to note that `GraphMLReader` will read this data in order and order can matter.  This is because TinkerPop
+does not allow the vertex label to be changed after the vertex has been created.  Therefore, if an `<edge>` element
+comes before the `<node>`, the label on the vertex will be ignored.  It is thus better to order `<node>` elements in the
+GraphML to appear before all `<edge>` elements if vertex labels are important to the graph.
 
 The following code shows how to write a `Graph` instance to file called `tinkerpop-modern.xml` and then how to read
 that file back into a different instance:
@@ -769,5 +771,5 @@ leverage _qualified namespaces_ particular to their domain (e.g. `mydomain.myver
 IMPORTANT: TinkerPop uses `tinkerpop.` and `gremlin.` as the prefixes for provided strategies, vertex programs, map
 reduce implementations, and plugins.
 
-The only truly protected namespace is the _hidden namespace_ provided to graph systems. From there, its up to
+The only truly protected namespace is the _hidden namespace_ provided to graph systems. From there, it's up to
 engineers to respect the namespacing conventions presented.


[09/50] incubator-tinkerpop git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-tinkerpop

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


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

Branch: refs/heads/TINKERPOP-1033
Commit: 5760bf05e6b4c56d7a655b18619275ee69d654ab
Parents: ae4bffe 87dfadb
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Sat Dec 19 21:01:12 2015 +0100
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Sat Dec 19 21:01:12 2015 +0100

----------------------------------------------------------------------
 docs/src/reference/gremlin-applications.asciidoc | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------



[30/50] incubator-tinkerpop git commit: Full quantum-gremlin image by Ketrina. Will announce with GraphDay slides.

Posted by ok...@apache.org.
Full quantum-gremlin image by Ketrina. Will announce with GraphDay slides.


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

Branch: refs/heads/TINKERPOP-1033
Commit: cfa2592c0418833c9c1020983d66fd63ace1a314
Parents: 2f16c77
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Sat Dec 26 10:16:32 2015 -0700
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Sat Dec 26 10:16:32 2015 -0700

----------------------------------------------------------------------
 docs/static/images/quantum-gremlin-full.png | Bin 0 -> 1730640 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/cfa2592c/docs/static/images/quantum-gremlin-full.png
----------------------------------------------------------------------
diff --git a/docs/static/images/quantum-gremlin-full.png b/docs/static/images/quantum-gremlin-full.png
new file mode 100644
index 0000000..0e813b5
Binary files /dev/null and b/docs/static/images/quantum-gremlin-full.png differ


[31/50] incubator-tinkerpop git commit: Full quantum-gremlin image by Ketrina. Will announce with GraphDay slides.

Posted by ok...@apache.org.
Full quantum-gremlin image by Ketrina. Will announce with GraphDay slides.


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

Branch: refs/heads/TINKERPOP-1033
Commit: 5406e525c8fc830c95a50b6b81ff828332fe9e03
Parents: cfa2592
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Sat Dec 26 10:18:50 2015 -0700
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Sat Dec 26 10:18:50 2015 -0700

----------------------------------------------------------------------
 docs/static/images/quantum-gremlin-full.png | Bin 1730640 -> 1804044 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5406e525/docs/static/images/quantum-gremlin-full.png
----------------------------------------------------------------------
diff --git a/docs/static/images/quantum-gremlin-full.png b/docs/static/images/quantum-gremlin-full.png
index 0e813b5..4ae361d 100644
Binary files a/docs/static/images/quantum-gremlin-full.png and b/docs/static/images/quantum-gremlin-full.png differ


[14/50] incubator-tinkerpop git commit: Added Java docs.

Posted by ok...@apache.org.
Added Java 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/2c07233e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/2c07233e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/2c07233e

Branch: refs/heads/TINKERPOP-1033
Commit: 2c07233e98561a9609ea17ea7a24cf49fc6261fe
Parents: 947d192
Author: Nghia Tran <ng...@gmail.com>
Authored: Mon Dec 21 19:27:57 2015 -0500
Committer: Nghia Tran <ng...@gmail.com>
Committed: Mon Dec 21 19:27:57 2015 -0500

----------------------------------------------------------------------
 .../org/apache/tinkerpop/gremlin/AbstractGremlinTest.java    | 6 ++++++
 .../main/java/org/apache/tinkerpop/gremlin/GraphManager.java | 8 ++++++++
 2 files changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/2c07233e/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 e859208..14b1bcf 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
@@ -133,8 +133,14 @@ public abstract class AbstractGremlinTest {
     public void tearDown() throws Exception {
         if (null != graphProvider) {
             graphProvider.clear(graph, config);
+
+            // All GraphProvider objects should be an instance of ManagedGraphProvider, as this is handled by GraphManager
+            // 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();
+            else
+                logger.warn("The {} is not of type ManagedGraphProvider and therefore graph instances may leak between test cases.", graphProvider.getClass());
 
             g = null;
             config = null;

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/2c07233e/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 23f5c8e..0c93e58 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
@@ -45,6 +45,9 @@ public class GraphManager {
         return old;
     }
 
+    /**
+     * Gets the {@link GraphProvider} from the current test suite and wraps it in a {@link ManagedGraphProvider}.
+     */
     public static GraphProvider getGraphProvider() {
         return new ManagedGraphProvider(graphProvider);
     }
@@ -59,6 +62,11 @@ public class GraphManager {
         return traversalEngineType;
     }
 
+    /**
+     * 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.
+     */
     public static class ManagedGraphProvider implements GraphProvider {
         private final GraphProvider innerGraphProvider;
         private final List<Graph> openGraphs = new ArrayList<>();


[02/50] incubator-tinkerpop git commit: fixed typo

Posted by ok...@apache.org.
fixed typo


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

Branch: refs/heads/TINKERPOP-1033
Commit: be30e2db324c81c4aedcce8e0c848caa84610601
Parents: 2523090
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Fri Dec 18 12:41:53 2015 +0100
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Fri Dec 18 12:41:53 2015 +0100

----------------------------------------------------------------------
 docs/src/reference/the-graphcomputer.asciidoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/be30e2db/docs/src/reference/the-graphcomputer.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/the-graphcomputer.asciidoc b/docs/src/reference/the-graphcomputer.asciidoc
index 924215d..d2a429a 100644
--- a/docs/src/reference/the-graphcomputer.asciidoc
+++ b/docs/src/reference/the-graphcomputer.asciidoc
@@ -366,7 +366,7 @@ It's recommended to tune this property for the target graph and not use the defa
 
 NOTE: `BulkLoaderVertexProgram` uses the `IncrementalBulkLoader` by default. The other option is the `OneTimeBulkLoader`,
 which doesn't store any temporary IDs in the `writeGraph` and thus should only be used for initial bulk loads. Both
-implementations should cover the mahority of use-cases, but have a limitation though: They don't support multi-valued
+implementations should cover the majority of use-cases, but have a limitation though: They don't support multi-valued
 properties. `OneTimeBulkLoader` and `IncrementalBulkLoader` will handle every property as a single-valued property. A
 custom `BulkLoader` implementation has to be used if the default behavior is not sufficient.
 


[38/50] incubator-tinkerpop git commit: Update changelog.

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

Branch: refs/heads/TINKERPOP-1033
Commit: 9ba55beff755c3915c64b7c7a660ae948de597c8
Parents: ee70843
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Dec 29 12:14:58 2015 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Dec 29 12:14:58 2015 -0500

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


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/9ba55bef/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 25773e8..028f20f 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/incubator-tinkerpop/master/docs/
 TinkerPop 3.1.1 (NOT OFFICIALLY RELEASED YET)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+* Execute the `LifeCycle.beforeEval()` in the same thread that `eval()` is executed in for `GremlinExecutor`.
 * Fixed a bug in `Graph.OptOut` when trying to opt-out of certain test cases with the `method` property set to "*".
 * Added another `BulkLoader` implementation (`OneTimeBulkLoader`) that doesn't store temporary properties in the target graph.
 * Fixed a `SparkGraphComputer` sorting bug in MapReduce that occurred when there was more than one partition.


[37/50] incubator-tinkerpop git commit: Merge branch 'master' of https://github.com/apache/incubator-tinkerpop

Posted by ok...@apache.org.
Merge branch 'master' of https://github.com/apache/incubator-tinkerpop


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

Branch: refs/heads/TINKERPOP-1033
Commit: 95584e34be753a29ba62c1813bcadf41cddc7348
Parents: 6e5895b b1e704b
Author: Jeremy Hanna <jh...@datastax.com>
Authored: Mon Dec 28 08:59:57 2015 -0800
Committer: Jeremy Hanna <jh...@datastax.com>
Committed: Mon Dec 28 08:59:57 2015 -0800

----------------------------------------------------------------------
 README.asciidoc                             |  12 ++++++------
 docs/src/dev/developer/release.asciidoc     |   4 ++--
 docs/static/images/quantum-gremlin-full.png | Bin 0 -> 1877990 bytes
 3 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------



[44/50] incubator-tinkerpop git commit: Merge branch 'master' of https://github.com/jeromatron/incubator-tinkerpop

Posted by ok...@apache.org.
Merge branch 'master' of https://github.com/jeromatron/incubator-tinkerpop


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

Branch: refs/heads/TINKERPOP-1033
Commit: 2ca6c962921f6b13296435358eafd0374e9495a3
Parents: a705c21 95584e3
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Dec 30 11:27:31 2015 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Dec 30 11:27:31 2015 -0500

----------------------------------------------------------------------
 docs/src/reference/intro.asciidoc     | 23 +++++++++--------
 docs/src/reference/the-graph.asciidoc | 40 ++++++++++++++++--------------
 2 files changed, 34 insertions(+), 29 deletions(-)
----------------------------------------------------------------------



[47/50] incubator-tinkerpop git commit: TINKERPOP-1066 Allow ioRegistries to be set on GraphSON MessageSerializers

Posted by ok...@apache.org.
TINKERPOP-1066 Allow ioRegistries to be set on GraphSON MessageSerializers

This makes the configuration symmetrical to Gryo.


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

Branch: refs/heads/TINKERPOP-1033
Commit: f8dc1aabd280bde7711d873c8ac0083eacf6e2c9
Parents: e480f4a
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Dec 30 13:59:50 2015 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Dec 30 13:59:50 2015 -0500

----------------------------------------------------------------------
 .../AbstractGraphSONMessageSerializerV1d0.java  |  5 +-
 .../driver/ser/AbstractMessageSerializer.java   | 82 ++++++++++++++++++++
 .../driver/ser/GryoMessageSerializerV1d0.java   | 41 +---------
 ...raphSONMessageSerializerGremlinV1d0Test.java |  5 +-
 .../ser/GraphSONMessageSerializerV1d0Test.java  | 60 ++++++++++++++
 .../ser/GryoMessageSerializerV1d0Test.java      | 43 ++++++++++
 6 files changed, 194 insertions(+), 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/f8dc1aab/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/AbstractGraphSONMessageSerializerV1d0.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/AbstractGraphSONMessageSerializerV1d0.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/AbstractGraphSONMessageSerializerV1d0.java
index 3410ede..810220b 100644
--- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/AbstractGraphSONMessageSerializerV1d0.java
+++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/AbstractGraphSONMessageSerializerV1d0.java
@@ -18,7 +18,6 @@
  */
 package org.apache.tinkerpop.gremlin.driver.ser;
 
-import org.apache.tinkerpop.gremlin.driver.MessageSerializer;
 import org.apache.tinkerpop.gremlin.driver.message.RequestMessage;
 import org.apache.tinkerpop.gremlin.driver.message.ResponseMessage;
 import org.apache.tinkerpop.gremlin.driver.message.ResponseStatusCode;
@@ -51,7 +50,7 @@ import java.util.UUID;
 /**
  * @author Stephen Mallette (http://stephen.genoprime.com)
  */
-public abstract class AbstractGraphSONMessageSerializerV1d0 implements MessageSerializer {
+public abstract class AbstractGraphSONMessageSerializerV1d0 extends AbstractMessageSerializer {
     private static final Logger logger = LoggerFactory.getLogger(AbstractGraphSONMessageSerializerV1d0.class);
 
     protected ObjectMapper mapper;
@@ -97,6 +96,8 @@ public abstract class AbstractGraphSONMessageSerializerV1d0 implements MessageSe
             initialBuilder = GraphSONMapper.build();
         }
 
+        addIoRegistries(config, initialBuilder);
+
         mapper = configureBuilder(initialBuilder).create().createMapper();
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/f8dc1aab/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/AbstractMessageSerializer.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/AbstractMessageSerializer.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/AbstractMessageSerializer.java
new file mode 100644
index 0000000..3c4380c
--- /dev/null
+++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/AbstractMessageSerializer.java
@@ -0,0 +1,82 @@
+/*
+ * 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.driver.ser;
+
+import org.apache.tinkerpop.gremlin.driver.MessageSerializer;
+import org.apache.tinkerpop.gremlin.structure.io.IoRegistry;
+import org.apache.tinkerpop.gremlin.structure.io.Mapper;
+
+import java.lang.reflect.Method;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Base {@link MessageSerializer} that serializers can implement to get some helper methods around configuring a
+ * {@link org.apache.tinkerpop.gremlin.structure.io.Mapper.Builder}.
+ *
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+public abstract class AbstractMessageSerializer implements MessageSerializer {
+    public static final String TOKEN_IO_REGISTRIES = "ioRegistries";
+
+    /**
+     * Reads a list of fully qualified class names from the value of the {@link #TOKEN_IO_REGISTRIES} configuration
+     * key. These classes should equate to {@link IoRegistry} implementations that will be assigned to the
+     * {@link org.apache.tinkerpop.gremlin.structure.io.Mapper.Builder}.  The assumption is that the
+     * {@link IoRegistry} either has a static {@code getInstance()} method or has a zero-arg constructor from which
+     * it can be instantiated.
+     */
+    protected void addIoRegistries(final Map<String, Object> config, final Mapper.Builder builder) {
+        final List<String> classNameList = getListStringFromConfig(TOKEN_IO_REGISTRIES, config);
+
+        classNameList.stream().forEach(className -> {
+            try {
+                final Class<?> clazz = Class.forName(className);
+                try {
+                    final Method instanceMethod = clazz.getDeclaredMethod("getInstance");
+                    if (IoRegistry.class.isAssignableFrom(instanceMethod.getReturnType()))
+                        builder.addRegistry((IoRegistry) instanceMethod.invoke(null));
+                    else
+                        throw new Exception();
+                } catch (Exception methodex) {
+                    // tried getInstance() and that failed so try newInstance() no-arg constructor
+                    builder.addRegistry((IoRegistry) clazz.newInstance());
+                }
+            } catch (Exception ex) {
+                throw new IllegalStateException(ex);
+            }
+        });
+    }
+
+    /**
+     * Gets a {@link List} of strings from the configuration object.
+     */
+    protected List<String> getListStringFromConfig(final String token, final Map<String, Object> config) {
+        final List<String> classNameList;
+        try {
+            classNameList = (List<String>) config.getOrDefault(token, Collections.emptyList());
+        } catch (Exception ex) {
+            throw new IllegalStateException(String.format("Invalid configuration value of [%s] for [%s] setting on %s serialization configuration",
+                    config.getOrDefault(token, ""), token, this.getClass().getName()), ex);
+        }
+
+        return classNameList;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/f8dc1aab/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GryoMessageSerializerV1d0.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GryoMessageSerializerV1d0.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GryoMessageSerializerV1d0.java
index 721d596..ce46dfc 100644
--- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GryoMessageSerializerV1d0.java
+++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GryoMessageSerializerV1d0.java
@@ -21,12 +21,10 @@ package org.apache.tinkerpop.gremlin.driver.ser;
 import io.netty.buffer.ByteBuf;
 import io.netty.buffer.ByteBufAllocator;
 import io.netty.util.ReferenceCountUtil;
-import org.apache.tinkerpop.gremlin.driver.MessageSerializer;
 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.structure.Graph;
-import org.apache.tinkerpop.gremlin.structure.io.IoRegistry;
 import org.apache.tinkerpop.gremlin.structure.io.gryo.GryoIo;
 import org.apache.tinkerpop.gremlin.structure.io.gryo.GryoMapper;
 import org.apache.tinkerpop.shaded.kryo.ClassResolver;
@@ -38,7 +36,6 @@ import org.apache.tinkerpop.shaded.kryo.io.Output;
 import java.io.ByteArrayOutputStream;
 import java.lang.reflect.Method;
 import java.nio.charset.Charset;
-import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.List;
@@ -51,7 +48,7 @@ import java.util.stream.Collectors;
 /**
  * @author Stephen Mallette (http://stephen.genoprime.com)
  */
-public final class GryoMessageSerializerV1d0 implements MessageSerializer {
+public final class GryoMessageSerializerV1d0 extends AbstractMessageSerializer {
     private GryoMapper gryoMapper;
     private ThreadLocal<Kryo> kryoThreadLocal = new ThreadLocal<Kryo>() {
         @Override
@@ -65,7 +62,6 @@ public final class GryoMessageSerializerV1d0 implements MessageSerializer {
     private static final String MIME_TYPE = SerTokens.MIME_GRYO_V1D0;
     private static final String MIME_TYPE_STRINGD = SerTokens.MIME_GRYO_V1D0 + "-stringd";
 
-    public static final String TOKEN_IO_REGISTRIES = "ioRegistries";
     public static final String TOKEN_CUSTOM = "custom";
     public static final String TOKEN_SERIALIZE_RESULT_TO_STRING = "serializeResultToString";
     public static final String TOKEN_USE_MAPPER_FROM_GRAPH = "useMapperFromGraph";
@@ -124,28 +120,6 @@ public final class GryoMessageSerializerV1d0 implements MessageSerializer {
         this.gryoMapper = builder.create();
     }
 
-    private void addIoRegistries(final Map<String, Object> config, final GryoMapper.Builder builder) {
-        final List<String> classNameList = getClassNamesFromConfig(TOKEN_IO_REGISTRIES, config);
-
-        classNameList.stream().forEach(className -> {
-            try {
-                final Class<?> clazz = Class.forName(className);
-                try {
-                    final Method instanceMethod = clazz.getDeclaredMethod("getInstance");
-                    if (IoRegistry.class.isAssignableFrom(instanceMethod.getReturnType()))
-                        builder.addRegistry((IoRegistry) instanceMethod.invoke(null));
-                    else
-                        throw new Exception();
-                } catch (Exception methodex) {
-                    // tried getInstance() and that failed so try newInstance() no-arg constructor
-                    builder.addRegistry((IoRegistry) clazz.newInstance());
-                }
-            } catch (Exception ex) {
-                throw new IllegalStateException(ex);
-            }
-        });
-    }
-
     private void addClassResolverSupplier(final Map<String, Object> config, final GryoMapper.Builder builder) {
         final String className = (String) config.getOrDefault(TOKEN_CLASS_RESOLVER_SUPPLIER, null);
         if (className != null && !className.isEmpty()) {
@@ -165,7 +139,7 @@ public final class GryoMessageSerializerV1d0 implements MessageSerializer {
     }
 
     private void addCustomClasses(final Map<String, Object> config, final GryoMapper.Builder builder) {
-        final List<String> classNameList = getClassNamesFromConfig(TOKEN_CUSTOM, config);
+        final List<String> classNameList = getListStringFromConfig(TOKEN_CUSTOM, config);
 
         classNameList.stream().forEach(serializerDefinition -> {
             String className;
@@ -197,17 +171,6 @@ public final class GryoMessageSerializerV1d0 implements MessageSerializer {
         });
     }
 
-    private List<String> getClassNamesFromConfig(final String token, final Map<String, Object> config) {
-        final List<String> classNameList;
-        try {
-            classNameList = (List<String>) config.getOrDefault(token, new ArrayList<String>());
-        } catch (Exception ex) {
-            throw new IllegalStateException(String.format("Invalid configuration value of [%s] for [%s] setting on %s serialization configuration",
-                    config.getOrDefault(token, ""), token, this.getClass().getName()), ex);
-        }
-        return classNameList;
-    }
-
     @Override
     public String[] mimeTypesSupported() {
         return new String[]{this.serializeToString ? MIME_TYPE_STRINGD : MIME_TYPE};

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/f8dc1aab/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerGremlinV1d0Test.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerGremlinV1d0Test.java b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerGremlinV1d0Test.java
index 91fa899..de719c1 100644
--- a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerGremlinV1d0Test.java
+++ b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerGremlinV1d0Test.java
@@ -44,7 +44,10 @@ import java.util.List;
 import java.util.Map;
 import java.util.UUID;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.fail;
 
 /**
  * Serializer tests that cover non-lossy serialization/deserialization methods.

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/f8dc1aab/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerV1d0Test.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerV1d0Test.java b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerV1d0Test.java
index 3772c7d..de4b4b6 100644
--- a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerV1d0Test.java
+++ b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerV1d0Test.java
@@ -27,22 +27,39 @@ import org.apache.tinkerpop.gremlin.structure.Graph;
 import org.apache.tinkerpop.gremlin.structure.Property;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.apache.tinkerpop.gremlin.structure.VertexProperty;
+import org.apache.tinkerpop.gremlin.structure.io.AbstractIoRegistry;
+import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONIo;
 import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONTokens;
 import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerFactory;
 import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;
 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.JsonParser;
+import org.apache.tinkerpop.shaded.jackson.core.JsonProcessingException;
+import org.apache.tinkerpop.shaded.jackson.databind.DeserializationContext;
 import org.apache.tinkerpop.shaded.jackson.databind.JsonNode;
 import org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper;
+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.module.SimpleModule;
 import org.apache.tinkerpop.shaded.jackson.databind.node.NullNode;
+import org.apache.tinkerpop.shaded.jackson.databind.ser.std.StdSerializer;
 import org.apache.tinkerpop.shaded.jackson.databind.util.StdDateFormat;
 import org.junit.Test;
 
+import java.awt.*;
+import java.io.IOException;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.UUID;
 
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.core.Is.is;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.fail;
@@ -61,6 +78,23 @@ public class GraphSONMessageSerializerV1d0Test {
     private static final ObjectMapper mapper = new ObjectMapper();
 
     @Test
+    public void shouldConfigureIoRegistry() throws Exception {
+        final GraphSONMessageSerializerV1d0 serializer = new GraphSONMessageSerializerV1d0();
+        final Map<String, Object> config = new HashMap<String, Object>() {{
+            put(GryoMessageSerializerV1d0.TOKEN_IO_REGISTRIES, Arrays.asList(ColorIoRegistry.class.getName()));
+        }};
+
+        serializer.configure(config, null);
+
+        final ResponseMessage toSerialize = ResponseMessage.build(UUID.fromString("2D62161B-9544-4F39-AF44-62EC49F9A595"))
+                .result(Color.RED).create();
+        final String results = serializer.serializeResponseAsString(toSerialize);
+        final JsonNode json = mapper.readTree(results);
+        assertNotNull(json);
+        assertThat(json.get(SerTokens.TOKEN_RESULT).get(SerTokens.TOKEN_DATA).booleanValue(), is(true));
+    }
+
+    @Test
     public void shouldSerializeToJsonNullResultReturnsNull() throws Exception {
         final ResponseMessage message = ResponseMessage.build(msg).create();
         final String results = SERIALIZER.serializeResponseAsString(message);
@@ -385,4 +419,30 @@ public class GraphSONMessageSerializerV1d0Test {
             return this.val;
         }
     }
+
+    public static class ColorIoRegistry extends AbstractIoRegistry {
+        public ColorIoRegistry() {
+            register(GraphSONIo.class, null, new ColorSimpleModule());
+        }
+    }
+
+    public static class ColorSimpleModule extends SimpleModule {
+        public ColorSimpleModule() {
+            super("color-fun");
+            addSerializer(Color.class, new ColorSerializer());
+
+        }
+    }
+
+    public static class ColorSerializer extends StdSerializer<Color> {
+        public ColorSerializer() {
+            super(Color.class);
+        }
+
+        @Override
+        public void serialize(final Color color, final JsonGenerator jsonGenerator,
+                              final SerializerProvider serializerProvider) throws IOException, JsonGenerationException {
+            jsonGenerator.writeBoolean(color.equals(Color.RED));
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/f8dc1aab/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GryoMessageSerializerV1d0Test.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GryoMessageSerializerV1d0Test.java b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GryoMessageSerializerV1d0Test.java
index f56bf51..bb731a9 100644
--- a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GryoMessageSerializerV1d0Test.java
+++ b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GryoMessageSerializerV1d0Test.java
@@ -29,7 +29,9 @@ import org.apache.tinkerpop.gremlin.structure.Edge;
 import org.apache.tinkerpop.gremlin.structure.Graph;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.apache.tinkerpop.gremlin.structure.VertexProperty;
+import org.apache.tinkerpop.gremlin.structure.io.AbstractIoRegistry;
 import org.apache.tinkerpop.gremlin.structure.io.gryo.GryoClassResolver;
+import org.apache.tinkerpop.gremlin.structure.io.gryo.GryoIo;
 import org.apache.tinkerpop.gremlin.structure.util.detached.DetachedEdge;
 import org.apache.tinkerpop.gremlin.structure.util.detached.DetachedVertex;
 import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerFactory;
@@ -39,11 +41,17 @@ import io.netty.buffer.ByteBufAllocator;
 import io.netty.buffer.UnpooledByteBufAllocator;
 import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;
 import org.apache.tinkerpop.shaded.kryo.ClassResolver;
+import org.apache.tinkerpop.shaded.kryo.Kryo;
 import org.apache.tinkerpop.shaded.kryo.KryoException;
 import org.apache.tinkerpop.shaded.kryo.Registration;
+import org.apache.tinkerpop.shaded.kryo.Serializer;
+import org.apache.tinkerpop.shaded.kryo.io.Input;
+import org.apache.tinkerpop.shaded.kryo.io.Output;
 import org.junit.Test;
 
+import java.awt.*;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
@@ -82,6 +90,23 @@ public class GryoMessageSerializerV1d0Test {
     }
 
     @Test
+    public void shouldConfigureIoRegistry() throws Exception {
+        final MessageSerializer serializer = new GryoMessageSerializerV1d0();
+        final Map<String, Object> config = new HashMap<String, Object>() {{
+            put(GryoMessageSerializerV1d0.TOKEN_IO_REGISTRIES, Arrays.asList(ColorIoRegistry.class.getName()));
+        }};
+
+        serializer.configure(config, null);
+
+        final ResponseMessage toSerialize = ResponseMessage.build(requestId).result(Color.RED).create();
+        final ByteBuf bb = serializer.serializeResponseAsBinary(toSerialize, allocator);
+        final ResponseMessage deserialized = serializer.deserializeResponse(bb);
+
+        assertCommon(deserialized);
+        assertEquals(Color.RED, deserialized.getResult().getData());
+    }
+
+    @Test
     public void shouldConfigureCustomClassResolver() {
         final MessageSerializer serializer = new GryoMessageSerializerV1d0();
         final Map<String, Object> config = new HashMap<String, Object>() {{
@@ -556,4 +581,22 @@ public class GryoMessageSerializerV1d0Test {
             throw new RuntimeException("Registration is not allowed with this ClassResolver - it is not a good implementation");
         }
     }
+
+    public static class ColorIoRegistry extends AbstractIoRegistry {
+        public ColorIoRegistry() {
+            register(GryoIo.class, Color.class, new ColorSerializer());
+        }
+    }
+
+    public static class ColorSerializer extends Serializer<Color> {
+        @Override
+        public void write(final Kryo kryo, final Output output, final Color color) {
+            output.write(color.equals(Color.RED) ? 1 : 0);
+        }
+
+        @Override
+        public Color read(final Kryo kryo, final Input input, final Class<Color> aClass) {
+            return input.read() == 1 ? Color.RED : Color.BLACK;
+        }
+    }
 }


[26/50] incubator-tinkerpop git commit: Enable the message serializers to use the ClassResolver setting.

Posted by ok...@apache.org.
Enable the message serializers to use the ClassResolver setting.

This will allow Gremlin Server to get configured with the custom ClassResolver instance.


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

Branch: refs/heads/TINKERPOP-1033
Commit: 5c196db6fde877abfdb4c1d07049fe8cf8d16bb8
Parents: a51701d
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Dec 24 07:59:46 2015 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Dec 24 07:59:46 2015 -0500

----------------------------------------------------------------------
 .../driver/ser/GryoMessageSerializerV1d0.java   | 34 +++++++--
 .../ser/GryoMessageSerializerV1d0Test.java      | 72 +++++++++++++++++++-
 2 files changed, 97 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5c196db6/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GryoMessageSerializerV1d0.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GryoMessageSerializerV1d0.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GryoMessageSerializerV1d0.java
index 2d44711..721d596 100644
--- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GryoMessageSerializerV1d0.java
+++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GryoMessageSerializerV1d0.java
@@ -29,6 +29,7 @@ import org.apache.tinkerpop.gremlin.structure.Graph;
 import org.apache.tinkerpop.gremlin.structure.io.IoRegistry;
 import org.apache.tinkerpop.gremlin.structure.io.gryo.GryoIo;
 import org.apache.tinkerpop.gremlin.structure.io.gryo.GryoMapper;
+import org.apache.tinkerpop.shaded.kryo.ClassResolver;
 import org.apache.tinkerpop.shaded.kryo.Kryo;
 import org.apache.tinkerpop.shaded.kryo.Serializer;
 import org.apache.tinkerpop.shaded.kryo.io.Input;
@@ -44,6 +45,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Optional;
 import java.util.UUID;
+import java.util.function.Supplier;
 import java.util.stream.Collectors;
 
 /**
@@ -63,11 +65,12 @@ public final class GryoMessageSerializerV1d0 implements MessageSerializer {
     private static final String MIME_TYPE = SerTokens.MIME_GRYO_V1D0;
     private static final String MIME_TYPE_STRINGD = SerTokens.MIME_GRYO_V1D0 + "-stringd";
 
-    private static final String TOKEN_IO_REGISTRIES = "ioRegistries";
-    private static final String TOKEN_CUSTOM = "custom";
-    private static final String TOKEN_SERIALIZE_RESULT_TO_STRING = "serializeResultToString";
-    private static final String TOKEN_USE_MAPPER_FROM_GRAPH = "useMapperFromGraph";
-    private static final String TOKEN_BUFFER_SIZE = "bufferSize";
+    public static final String TOKEN_IO_REGISTRIES = "ioRegistries";
+    public static final String TOKEN_CUSTOM = "custom";
+    public static final String TOKEN_SERIALIZE_RESULT_TO_STRING = "serializeResultToString";
+    public static final String TOKEN_USE_MAPPER_FROM_GRAPH = "useMapperFromGraph";
+    public static final String TOKEN_BUFFER_SIZE = "bufferSize";
+    public static final String TOKEN_CLASS_RESOLVER_SUPPLIER = "classResolverSupplier";
 
     private boolean serializeToString = false;
     private int bufferSize = 4096;
@@ -82,7 +85,7 @@ public final class GryoMessageSerializerV1d0 implements MessageSerializer {
 
     /**
      * Creates an instance with a provided mapper configured {@link GryoMapper} instance. Note that this instance
-     * will be overriden by {@link #configure} is called.
+     * will be overridden by {@link #configure} is called.
      */
     public GryoMessageSerializerV1d0(final GryoMapper kryo) {
         this.gryoMapper = kryo;
@@ -112,6 +115,7 @@ public final class GryoMessageSerializerV1d0 implements MessageSerializer {
         }
 
         addIoRegistries(config, builder);
+        addClassResolverSupplier(config, builder);
         addCustomClasses(config, builder);
 
         this.serializeToString = Boolean.parseBoolean(config.getOrDefault(TOKEN_SERIALIZE_RESULT_TO_STRING, "false").toString());
@@ -142,6 +146,24 @@ public final class GryoMessageSerializerV1d0 implements MessageSerializer {
         });
     }
 
+    private void addClassResolverSupplier(final Map<String, Object> config, final GryoMapper.Builder builder) {
+        final String className = (String) config.getOrDefault(TOKEN_CLASS_RESOLVER_SUPPLIER, null);
+        if (className != null && !className.isEmpty()) {
+            try {
+                final Class<?> clazz = Class.forName(className);
+                try {
+                    final Method instanceMethod = clazz.getDeclaredMethod("getInstance");
+                    builder.classResolver((Supplier<ClassResolver>) instanceMethod.invoke(null));
+                } catch (Exception methodex) {
+                    // tried getInstance() and that failed so try newInstance() no-arg constructor
+                    builder.classResolver((Supplier<ClassResolver>) clazz.newInstance());
+                }
+            } catch (Exception ex) {
+                throw new IllegalStateException(ex);
+            }
+        }
+    }
+
     private void addCustomClasses(final Map<String, Object> config, final GryoMapper.Builder builder) {
         final List<String> classNameList = getClassNamesFromConfig(TOKEN_CUSTOM, config);
 

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5c196db6/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GryoMessageSerializerV1d0Test.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GryoMessageSerializerV1d0Test.java b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GryoMessageSerializerV1d0Test.java
index e8951fc..f56bf51 100644
--- a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GryoMessageSerializerV1d0Test.java
+++ b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GryoMessageSerializerV1d0Test.java
@@ -29,6 +29,7 @@ import org.apache.tinkerpop.gremlin.structure.Edge;
 import org.apache.tinkerpop.gremlin.structure.Graph;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.apache.tinkerpop.gremlin.structure.VertexProperty;
+import org.apache.tinkerpop.gremlin.structure.io.gryo.GryoClassResolver;
 import org.apache.tinkerpop.gremlin.structure.util.detached.DetachedEdge;
 import org.apache.tinkerpop.gremlin.structure.util.detached.DetachedVertex;
 import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerFactory;
@@ -37,8 +38,9 @@ import io.netty.buffer.ByteBuf;
 import io.netty.buffer.ByteBufAllocator;
 import io.netty.buffer.UnpooledByteBufAllocator;
 import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;
-import org.apache.tinkerpop.shaded.jackson.databind.util.StdDateFormat;
+import org.apache.tinkerpop.shaded.kryo.ClassResolver;
 import org.apache.tinkerpop.shaded.kryo.KryoException;
+import org.apache.tinkerpop.shaded.kryo.Registration;
 import org.junit.Test;
 
 import java.util.ArrayList;
@@ -46,8 +48,8 @@ import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 import java.util.UUID;
+import java.util.function.Supplier;
 
 import static org.hamcrest.CoreMatchers.instanceOf;
 import static org.hamcrest.CoreMatchers.is;
@@ -64,7 +66,7 @@ import static org.junit.Assert.fail;
  */
 public class GryoMessageSerializerV1d0Test {
     private static final Map<String, Object> config = new HashMap<String, Object>() {{
-        put("serializeResultToString", true);
+        put(GryoMessageSerializerV1d0.TOKEN_SERIALIZE_RESULT_TO_STRING, true);
     }};
 
     private UUID requestId = UUID.fromString("6457272A-4018-4538-B9AE-08DD5DDC0AA1");
@@ -80,6 +82,40 @@ public class GryoMessageSerializerV1d0Test {
     }
 
     @Test
+    public void shouldConfigureCustomClassResolver() {
+        final MessageSerializer serializer = new GryoMessageSerializerV1d0();
+        final Map<String, Object> config = new HashMap<String, Object>() {{
+            put(GryoMessageSerializerV1d0.TOKEN_CLASS_RESOLVER_SUPPLIER, ErrorOnlyClassResolverSupplier.class.getName());
+        }};
+
+        serializer.configure(config, null);
+
+        try {
+            serializer.serializeResponseAsBinary(responseMessageBuilder.create(), allocator);
+            fail("Should fail because the ClassResolver used here always generates an error");
+        } catch (Exception ex) {
+            assertEquals("java.lang.RuntimeException: Registration is not allowed with this ClassResolver - it is not a good implementation", ex.getMessage());
+        }
+    }
+
+    @Test
+    public void shouldConfigureCustomClassResolverFromInstance() {
+        final MessageSerializer serializer = new GryoMessageSerializerV1d0();
+        final Map<String, Object> config = new HashMap<String, Object>() {{
+            put(GryoMessageSerializerV1d0.TOKEN_CLASS_RESOLVER_SUPPLIER, ErrorOnlyClassResolverSupplierAsInstance.class.getName());
+        }};
+
+        serializer.configure(config, null);
+
+        try {
+            serializer.serializeResponseAsBinary(responseMessageBuilder.create(), allocator);
+            fail("Should fail because the ClassResolver used here always generates an error");
+        } catch (Exception ex) {
+            assertEquals("java.lang.RuntimeException: Registration is not allowed with this ClassResolver - it is not a good implementation", ex.getMessage());
+        }
+    }
+
+    @Test
     public void shouldSerializeIterable() throws Exception {
         final ArrayList<Integer> list = new ArrayList<>();
         list.add(1);
@@ -490,4 +526,34 @@ public class GryoMessageSerializerV1d0Test {
         final ByteBuf bb = textSerializer.serializeResponseAsBinary(responseMessageBuilder.result(toSerialize).create(), allocator);
         return textSerializer.deserializeResponse(bb);
     }
+
+    public static class ErrorOnlyClassResolverSupplierAsInstance implements Supplier<ClassResolver> {
+
+        private static final ErrorOnlyClassResolverSupplierAsInstance instance = new ErrorOnlyClassResolverSupplierAsInstance();
+
+        private ErrorOnlyClassResolverSupplierAsInstance() {}
+
+        public static ErrorOnlyClassResolverSupplierAsInstance getInstance() {
+            return instance;
+        }
+
+        @Override
+        public ClassResolver get() {
+            return new ErrorOnlyClassResolver();
+        }
+    }
+
+    public static class ErrorOnlyClassResolverSupplier implements Supplier<ClassResolver> {
+        @Override
+        public ClassResolver get() {
+            return new ErrorOnlyClassResolver();
+        }
+    }
+
+    public static class ErrorOnlyClassResolver extends GryoClassResolver {
+        @Override
+        public Registration getRegistration(Class clazz) {
+            throw new RuntimeException("Registration is not allowed with this ClassResolver - it is not a good implementation");
+        }
+    }
 }


[46/50] incubator-tinkerpop git commit: Merge remote-tracking branch 'origin/TINKERPOP-1055'

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


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

Branch: refs/heads/TINKERPOP-1033
Commit: 044b5ed6913a1f28bba25e7b39d13e555b5c7fd8
Parents: 9444168 5463bd9
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Dec 30 11:32:21 2015 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Dec 30 11:32:21 2015 -0500

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 .../tinkerpop/gremlin/console/Console.groovy    | 20 +++++++++++---------
 2 files changed, 12 insertions(+), 9 deletions(-)
----------------------------------------------------------------------



[45/50] incubator-tinkerpop git commit: Merge branch 'TINKERPOP-983' of https://github.com/n-tran/incubator-tinkerpop

Posted by ok...@apache.org.
Merge branch 'TINKERPOP-983' of https://github.com/n-tran/incubator-tinkerpop


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

Branch: refs/heads/TINKERPOP-1033
Commit: 9444168f913717db14aa2063a44f9c8c5c2dbd29
Parents: 2ca6c96 eb73211
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Dec 30 11:30:25 2015 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Dec 30 11:30:25 2015 -0500

----------------------------------------------------------------------
 .../tinkerpop/gremlin/AbstractGremlinTest.java  |   9 ++
 .../apache/tinkerpop/gremlin/GraphManager.java  | 115 ++++++++++++++++++-
 .../tinkerpop/gremlin/structure/GraphTest.java  |  16 +--
 .../gremlin/structure/PropertyTest.java         |   4 +-
 .../tinkerpop/gremlin/structure/VertexTest.java |  18 +--
 5 files changed, 137 insertions(+), 25 deletions(-)
----------------------------------------------------------------------



[41/50] incubator-tinkerpop git commit: Better error reporting around gremlin.sh init script.

Posted by ok...@apache.org.
Better error reporting around gremlin.sh init script.

Refactored code a bit to catch exceptions related to IO on the init script itself versus errors in line of code evaluation. Not sure how to write tests here since we call System.exit(1) on error.


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

Branch: refs/heads/TINKERPOP-1033
Commit: 1f6cb945c5ed0171a502c6468a648e8063fa1bef
Parents: a705c21
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Dec 29 13:41:22 2015 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Dec 29 13:42:44 2015 -0500

----------------------------------------------------------------------
 .../tinkerpop/gremlin/console/Console.groovy    | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1f6cb945/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
index acf613f..5479360 100644
--- a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
+++ b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
@@ -282,19 +282,21 @@ class Console {
     }
 
     private void initializeShellWithScript(final String initScriptFile) {
-        String line = ""
         try {
-            final BufferedReader reader = new BufferedReader(new InputStreamReader(
-                    new FileInputStream(initScriptFile), Charset.forName("UTF-8")))
-            while ((line = reader.readLine()) != null) {
-                groovy.execute(line)
+            final File file = new File(initScriptFile)
+            file.eachLine { line ->
+                try {
+                    groovy.execute(line)
+                } catch (Exception ex) {
+                    io.err.println("Bad line in Gremlin initialization file at [$line] - ${ex.message}")
+                    System.exit(1)
+                }
             }
-            reader.close()
         } catch (FileNotFoundException ignored) {
-            io.err.println(String.format("Gremlin initialization file not found at [%s].", initScriptFile))
+            io.err.println("Gremlin initialization file not found at [$initScriptFile].")
             System.exit(1)
-        } catch (IOException ignored) {
-            io.err.println(String.format("Bad line in Gremlin initialization file at [%s].", line))
+        } catch (Exception ex) {
+            io.err.println("Error starting Gremlin with initialization script at [$initScriptFile] - ${ex.message}")
             System.exit(1)
         }
     }


[21/50] incubator-tinkerpop git commit: HDFS wasn't getting the right directory and the assert fails.

Posted by ok...@apache.org.
HDFS wasn't getting the right directory and the assert fails.


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

Branch: refs/heads/TINKERPOP-1033
Commit: eb7321184004a8a89445c8072e4a3ce3385e8e46
Parents: 2c07233
Author: Nghia Tran <ng...@gmail.com>
Authored: Wed Dec 23 15:22:15 2015 -0500
Committer: Nghia Tran <ng...@gmail.com>
Committed: Wed Dec 23 15:22:15 2015 -0500

----------------------------------------------------------------------
 .../main/java/org/apache/tinkerpop/gremlin/GraphManager.java    | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/eb732118/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 0c93e58..39524bf 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
@@ -86,6 +86,11 @@ public class GraphManager {
         }
 
         @Override
+        public String getWorkingDirectory() {
+            return innerGraphProvider.getWorkingDirectory();
+        }
+
+        @Override
         public GraphTraversalSource traversal(final Graph graph) {
             return innerGraphProvider.traversal(graph);
         }