You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2018/08/09 14:54:56 UTC

[01/50] tinkerpop git commit: TINKERPOP-2005 Minor code cleanup [Forced Update!]

Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1967 06af8c27a -> cbae0a300 (forced update)


TINKERPOP-2005 Minor code cleanup

* Declare variables 'final'
* Remove unused variables


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

Branch: refs/heads/TINKERPOP-1967
Commit: 0e0d26cdafca3c2a3244fe224f3f08391669d470
Parents: 63ae13c
Author: Dmitri Bourlatchkov <dm...@datastax.com>
Authored: Tue Jul 31 10:48:12 2018 -0400
Committer: Dmitri Bourlatchkov <dm...@datastax.com>
Committed: Tue Jul 31 10:48:12 2018 -0400

----------------------------------------------------------------------
 .../gremlin/server/ResponseHandlerContext.java        |  6 +++---
 .../gremlin/server/op/AbstractEvalOpProcessor.java    |  3 +--
 .../gremlin/server/op/AbstractOpProcessor.java        |  4 ++--
 .../gremlin/server/GremlinServerIntegrateTest.java    |  4 ++--
 .../gremlin/server/ResponseHandlerContextTest.java    |  4 ++--
 .../server/op/AbstractEvalOpProcessorTest.java        | 14 +++++++-------
 .../gremlin/server/op/AbstractOpProcessorTest.java    | 12 ++++++------
 7 files changed, 23 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0e0d26cd/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/ResponseHandlerContext.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/ResponseHandlerContext.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/ResponseHandlerContext.java
index 3c8c13c..5cc79b5 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/ResponseHandlerContext.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/ResponseHandlerContext.java
@@ -42,7 +42,7 @@ public class ResponseHandlerContext {
     private final Context context;
     private final AtomicBoolean finalResponseWritten = new AtomicBoolean();
 
-    public ResponseHandlerContext(Context context) {
+    public ResponseHandlerContext(final Context context) {
         this.context = context;
     }
 
@@ -58,7 +58,7 @@ public class ResponseHandlerContext {
      * <p>Attempts to write more than one final response message will be ignored.</p>
      * @see #writeAndFlush(ResponseStatusCode, Object)
      */
-    public void writeAndFlush(ResponseMessage message) {
+    public void writeAndFlush(final ResponseMessage message) {
         writeAndFlush(message.getStatus().getCode(), message);
     }
 
@@ -71,7 +71,7 @@ public class ResponseHandlerContext {
      * <p>Attempts to write more than one final response message will be ignored.</p>
      * @see #writeAndFlush(ResponseMessage)
      */
-    public void writeAndFlush(ResponseStatusCode code, Object responseMessage) {
+    public void writeAndFlush(final ResponseStatusCode code, final Object responseMessage) {
         final boolean messageIsFinal = code.isFinalResponse();
         if(finalResponseWritten.compareAndSet(false, messageIsFinal)) {
             context.getChannelHandlerContext().writeAndFlush(responseMessage);

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0e0d26cd/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java
index 39168c2..ca1ee53 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java
@@ -227,7 +227,7 @@ public abstract class AbstractEvalOpProcessor extends AbstractOpProcessor {
      */
     protected void evalOpInternal(final Context context, final Supplier<GremlinExecutor> gremlinExecutorSupplier,
                                   final BindingSupplier bindingsSupplier) throws OpProcessorException {
-        ResponseHandlerContext rhc = new ResponseHandlerContext(context);
+        final ResponseHandlerContext rhc = new ResponseHandlerContext(context);
         try {
             evalOpInternal(rhc, gremlinExecutorSupplier, bindingsSupplier);
         } catch (Exception ex) {
@@ -251,7 +251,6 @@ public abstract class AbstractEvalOpProcessor extends AbstractOpProcessor {
                                   final BindingSupplier bindingsSupplier) throws OpProcessorException {
         final Context context = rhc.getContext();
         final Timer.Context timerContext = evalOpTimer.time();
-        final ChannelHandlerContext ctx = context.getChannelHandlerContext();
         final RequestMessage msg = context.getRequestMessage();
         final GremlinExecutor gremlinExecutor = gremlinExecutorSupplier.get();
         final Settings settings = context.getSettings();

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0e0d26cd/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractOpProcessor.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractOpProcessor.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractOpProcessor.java
index c2b6f1f..38ca3e1 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractOpProcessor.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractOpProcessor.java
@@ -278,8 +278,8 @@ public abstract class AbstractOpProcessor implements OpProcessor {
     protected static Frame makeFrame(final ChannelHandlerContext ctx, final RequestMessage msg,
                                    final MessageSerializer serializer, final boolean useBinary, final List<Object> aggregate,
                                    final ResponseStatusCode code, final Map<String,Object> responseMetaData) throws Exception {
-        Context context = new Context(msg, ctx, null, null, null, null); // dummy context, good only for writing response messages to the channel
-        ResponseHandlerContext rhc = new ResponseHandlerContext(context);
+        final Context context = new Context(msg, ctx, null, null, null, null); // dummy context, good only for writing response messages to the channel
+        final ResponseHandlerContext rhc = new ResponseHandlerContext(context);
         return makeFrame(rhc, msg, serializer, useBinary, aggregate, code, responseMetaData);
     }
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0e0d26cd/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
index 0867fd3..eb5def9 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
@@ -1028,8 +1028,8 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration
             final List<ResponseMessage> responses = client.submit(request);
             assertThat(responses.size(), Matchers.greaterThan(1));
             for (Iterator<ResponseMessage> it = responses.iterator(); it.hasNext(); ) {
-                ResponseMessage msg = it.next();
-                ResponseStatusCode expected = it.hasNext() ? ResponseStatusCode.PARTIAL_CONTENT : ResponseStatusCode.SUCCESS;
+                final ResponseMessage msg = it.next();
+                final ResponseStatusCode expected = it.hasNext() ? ResponseStatusCode.PARTIAL_CONTENT : ResponseStatusCode.SUCCESS;
                 assertEquals(expected, msg.getStatus().getCode());
             }
         }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0e0d26cd/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/ResponseHandlerContextTest.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/ResponseHandlerContextTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/ResponseHandlerContextTest.java
index 6f15a33..13c9992 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/ResponseHandlerContextTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/ResponseHandlerContextTest.java
@@ -55,7 +55,7 @@ public class ResponseHandlerContextTest {
                 {
                     new BiFunction<ResponseHandlerContext, ResponseStatusCode, Void>() {
                         @Override
-                        public Void apply(ResponseHandlerContext context, ResponseStatusCode code) {
+                        public Void apply(final ResponseHandlerContext context, final ResponseStatusCode code) {
                             context.writeAndFlush(code, "testMessage");
                             return null;
                         }
@@ -68,7 +68,7 @@ public class ResponseHandlerContextTest {
                 }, {
                     new BiFunction<ResponseHandlerContext, ResponseStatusCode, Void>() {
                         @Override
-                        public Void apply(ResponseHandlerContext context, ResponseStatusCode code) {
+                        public Void apply(final ResponseHandlerContext context, final ResponseStatusCode code) {
                             context.writeAndFlush(ResponseMessage.build(UUID.randomUUID()).code(code).create());
                             return null;
                         }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0e0d26cd/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessorTest.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessorTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessorTest.java
index 6f25e2e..72b9c5c 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessorTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessorTest.java
@@ -41,17 +41,17 @@ public class AbstractEvalOpProcessorTest {
 
     @Test
     public void evalOpInternalShouldHandleAllEvaluationExceptions() throws OpProcessorException {
-        AbstractEvalOpProcessor processor = new StandardOpProcessor();
-        RequestMessage request = RequestMessage.build("test").create();
-        Settings settings = new Settings();
-        ChannelHandlerContext ctx = Mockito.mock(ChannelHandlerContext.class);
-        ArgumentCaptor<ResponseMessage> responseCaptor = ArgumentCaptor.forClass(ResponseMessage.class);
+        final AbstractEvalOpProcessor processor = new StandardOpProcessor();
+        final RequestMessage request = RequestMessage.build("test").create();
+        final Settings settings = new Settings();
+        final ChannelHandlerContext ctx = Mockito.mock(ChannelHandlerContext.class);
+        final ArgumentCaptor<ResponseMessage> responseCaptor = ArgumentCaptor.forClass(ResponseMessage.class);
 
-        GremlinExecutor gremlinExecutor = Mockito.mock(GremlinExecutor.class);
+        final GremlinExecutor gremlinExecutor = Mockito.mock(GremlinExecutor.class);
         Mockito.when(gremlinExecutor.eval(anyString(), anyString(), Mockito.any(), Mockito.<GremlinExecutor.LifeCycle>any()))
                 .thenThrow(new IllegalStateException("test-exception"));
 
-        Context context = new Context(request, ctx, settings, null, gremlinExecutor, null);
+        final Context context = new Context(request, ctx, settings, null, gremlinExecutor, null);
         processor.evalOpInternal(context, context::getGremlinExecutor, SimpleBindings::new);
 
         Mockito.verify(ctx, Mockito.times(1)).writeAndFlush(responseCaptor.capture());

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0e0d26cd/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/op/AbstractOpProcessorTest.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/op/AbstractOpProcessorTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/op/AbstractOpProcessorTest.java
index cf42737..a7cee1a 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/op/AbstractOpProcessorTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/op/AbstractOpProcessorTest.java
@@ -33,9 +33,9 @@ public class AbstractOpProcessorTest {
 
     @Test
     public void deprecatedMakeFrameMethodShouldRedirectCorrectly() throws Exception {
-        ChannelHandlerContext ctx = Mockito.mock(ChannelHandlerContext.class);
-        RequestMessage request = RequestMessage.build("test").create();
-        ArgumentCaptor<ResponseMessage> responseCaptor = ArgumentCaptor.forClass(ResponseMessage.class);
+        final ChannelHandlerContext ctx = Mockito.mock(ChannelHandlerContext.class);
+        final RequestMessage request = RequestMessage.build("test").create();
+        final ArgumentCaptor<ResponseMessage> responseCaptor = ArgumentCaptor.forClass(ResponseMessage.class);
 
         try {
             // Induce a NullPointerException to validate error response message writing
@@ -53,9 +53,9 @@ public class AbstractOpProcessorTest {
 
     @Test
     public void alternativeMakeFrameMethodShouldRedirectCorrectly() throws Exception {
-        ChannelHandlerContext ctx = Mockito.mock(ChannelHandlerContext.class);
-        RequestMessage request = RequestMessage.build("test").create();
-        ArgumentCaptor<ResponseMessage> responseCaptor = ArgumentCaptor.forClass(ResponseMessage.class);
+        final ChannelHandlerContext ctx = Mockito.mock(ChannelHandlerContext.class);
+        final RequestMessage request = RequestMessage.build("test").create();
+        final ArgumentCaptor<ResponseMessage> responseCaptor = ArgumentCaptor.forClass(ResponseMessage.class);
 
         try {
             // Induce a NullPointerException to validate error response message writing


[13/50] tinkerpop git commit: Added some javadoc CTR

Posted by sp...@apache.org.
Added some javadoc CTR


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

Branch: refs/heads/TINKERPOP-1967
Commit: ce947388e505436d97bcfb55de45d0a52bf8b075
Parents: 7fce137
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Sat Aug 4 06:27:46 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Sat Aug 4 06:27:46 2018 -0400

----------------------------------------------------------------------
 .../apache/tinkerpop/gremlin/driver/Client.java  | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ce947388/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java
index 3da8663..efbc844 100644
--- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java
+++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java
@@ -23,6 +23,7 @@ import org.apache.tinkerpop.gremlin.driver.message.RequestMessage;
 import org.apache.tinkerpop.gremlin.process.traversal.Bytecode;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalSource;
+import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
 import org.apache.tinkerpop.gremlin.structure.Graph;
 import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;
 import org.slf4j.Logger;
@@ -131,7 +132,10 @@ public abstract class Client {
     }
 
     /**
-     * Submit a {@link Traversal} to the server for remote execution.
+     * Submit a {@link Traversal} to the server for remote execution.Results are returned as {@link Traverser}
+     * instances and are therefore bulked, meaning that to properly iterate the contents of the result each
+     * {@link Traverser#bulk()} must be examined to determine the number of times that object should be presented in
+     * iteration.
      */
     public ResultSet submit(final Traversal traversal) {
         try {
@@ -144,14 +148,19 @@ public abstract class Client {
     }
 
     /**
-     * An asynchronous version of {@link #submit(Traversal)}.
+     * An asynchronous version of {@link #submit(Traversal)}. Results are returned as {@link Traverser} instances and
+     * are therefore bulked, meaning that to properly iterate the contents of the result each {@link Traverser#bulk()}
+     * must be examined to determine the number of times that object should be presented in iteration.
      */
     public CompletableFuture<ResultSet> submitAsync(final Traversal traversal) {
         throw new UnsupportedOperationException("This implementation does not support Traversal submission - use a sessionless Client created with from the alias() method");
     }
 
     /**
-     * Submit a {@link Bytecode} to the server for remote execution.
+     * Submit a {@link Bytecode} to the server for remote execution. Results are returned as {@link Traverser}
+     * instances and are therefore bulked, meaning that to properly iterate the contents of the result each
+     * {@link Traverser#bulk()} must be examined to determine the number of times that object should be presented in
+     * iteration.
      */
     public ResultSet submit(final Bytecode bytecode) {
         try {
@@ -164,7 +173,9 @@ public abstract class Client {
     }
 
     /**
-     * An asynchronous version of {@link #submit(Traversal)}.
+     * An asynchronous version of {@link #submit(Traversal)}. Results are returned as {@link Traverser} instances and
+     * are therefore bulked, meaning that to properly iterate the contents of the result each {@link Traverser#bulk()}
+     * must be examined to determine the number of times that object should be presented in iteration.
      */
     public CompletableFuture<ResultSet> submitAsync(final Bytecode bytecode) {
         throw new UnsupportedOperationException("This implementation does not support Traversal submission - use a sessionless Client created with from the alias() method");


[50/50] tinkerpop git commit: Extended the connected-components recipe

Posted by sp...@apache.org.
Extended the connected-components recipe


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

Branch: refs/heads/TINKERPOP-1967
Commit: a011964030f36c87b1ecb22eefb1e7deeffed3b9
Parents: 002560a
Author: HadoopMarc <vt...@xs4all.nl>
Authored: Sun Jun 10 15:17:17 2018 +0200
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Aug 9 10:54:41 2018 -0400

----------------------------------------------------------------------
 docs/src/recipes/connected-components.asciidoc |  94 ++++++++++++--------
 docs/static/images/cc-scale-ratio.png          | Bin 0 -> 14393 bytes
 docs/static/images/cc-scale-size.png           | Bin 0 -> 12220 bytes
 3 files changed, 58 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a0119640/docs/src/recipes/connected-components.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/recipes/connected-components.asciidoc b/docs/src/recipes/connected-components.asciidoc
index edbeec5..850c31f 100644
--- a/docs/src/recipes/connected-components.asciidoc
+++ b/docs/src/recipes/connected-components.asciidoc
@@ -31,11 +31,11 @@ Depending on the size of the graph, three solution regimes can be discriminated:
 
 1. Small graphs that fit in the memory of a single machine
 
-2. Medium graphs backed by storage for which a linear scan is still feasible. This regime is left to third party
+2. Medium-sized graphs backed by storage for which an OLTP linear scan is still feasible. This regime is left to third party
 TinkerPop implementations, since TinkerPop itself has no storage-backed reference implementations. The idea is that
 component membership is stored in the graph, rather than in memory.
 
-3. Large graphs requiring an OLAP approach to yield results in a reasonable time.
+3. Large graphs requiring an approach with `HadoopGraph` and `SparkGraphComputer` to yield results in a reasonable time.
 
 
 These regimes are discussed separately using the following graph with three weakly connected components:
@@ -55,16 +55,21 @@ g.addV().property(id, "A").as("a").
   addE("link").from("d").to("e").iterate()
 ----
 
+==== Small graph traversals
 
-===== Small graphs
-
-Connected components in a small graph can be determined with both an OLTP traversal and the OLAP
+Connected components in a small graph can be determined with either an OLTP traversal or the OLAP
 `connectedComponent()`-step. The `connectedComponent()`-step is available as of TinkerPop 3.4.0 and is
 described in more detail in the
 link:http://tinkerpop.apache.org/docs/x.y.z/reference/#connectedcomponent-step[Reference Documentation].
+The traversal looks like:
+[gremlin-groovy,existing]
+----
+g.withComputer().V().connectedComponent().
+    group().by('gremlin.connectedComponentVertexProgram.component').
+    select(values).unfold()
+----
 
 A straightforward way to detect the various subgraphs with an OLTP traversal is to do this:
-
 [gremlin-groovy,existing]
 ----
 g.V().emit(cyclicPath().or().not(both())).                                    <1>
@@ -73,7 +78,6 @@ g.V().emit(cyclicPath().or().not(both())).                                    <1
     by(path().unfold().dedup().fold()).                                       <4>
     select(values).unfold()                                                   <5>
 ----
-
 <1> The initial emit() step allows for output of isolated vertices, in addition to the discovery of
 components as described in (2).
 
@@ -83,7 +87,7 @@ path.  Collection `'a'` is used to keep track of visited vertices, for both subt
 and new traversals resulting from the `g.V()` linear scan.
 
 <3> While `'a'` nicely keeps track of vertices already visited, the actual components need to be extracted from the
-path information of surviving traversers. The `path().unfold().limit(1)` closure provides the starting vertex
+path information. The `path().unfold().limit(1)` closure provides the starting vertex
 of surviving traversers, which can be used to group the components.
 
 <4> This clause collects the unique vertices from all paths with the same starting vertex, thus from the same
@@ -91,39 +95,57 @@ weak component.
 
 <5> The values of the groupby map contain the lists of vertices making up the requested components.
 
-This algorithm completes in linear time with the number of vertices and edges, because a traversal is started for each
-vertex and each edge with its associated out-vertex is visited exactly once.
-
 
-==== Large graphs
 
-Large graphs require an OLAP solution with a custom VertexProgram that can be run using a graph implementation's
-GraphComputer, in particular `SparkGraphComputer` on a `HadoopGraph`. The OLAP solution also runs faster for most
-medium-sized graphs, that is when these graph have a 'natural' structure with a limited maximum path length.
+==== Small graph scalability
 
-The TinkerPop library of vertex programs contains the `WeakComponentsVertexProgram` which can be run in the same
-way as the link:http://tinkerpop.apache.org/docs/x.y.z/reference/#peerpressurevertexprogram[PeerPressureVertexProgram]:
+The scalability of the OLTP traversal and the `connectedComponent()`-step for in-memory graphs is shown in the figures
+below.
 
-[gremlin-groovy,existing]
-----
-result = g.getGraph().compute().
-    program(WeakComponentsVertexProgram.build().maxIterations(100).create()).
-    mapReduce(ClusterPopulationMapReduce.build().create()).
-    mapReduce(ClusterCountMapReduce.build().create()).
-    submit().get()
-result.memory().clusterPopulation
-gResult = result.graph().traversal()
-gResult.V().valueMap(true)
-----
+[[cc-scale-size]]
+.Run times for finding connected components in a randomly generated graph with 10 components of equal size and with an edge/vertex ratio of 6
+image::cc-scale-size.png[width=600, side=bottom]
 
-The vertex program has interconnected vertices exchange id's and store the lowest id until no vertex receives a
-lower id. This algorithm is commonly applied in
+In general, the `connectedComponent()`-step is almost a factor two faster than the OLTP traversal. Only, for very
+small graphs the overhead of running the ConnectedComponentVertexProgram is larger than that of the OLTP traversal.
+The vertex program works by having interconnected vertices exchange id's and store the lowest id until no vertex
+receives a lower id. This algorithm is commonly applied in
 link:https://en.wikipedia.org/wiki/Bulk_synchronous_parallel[bulk synchronous parallel] systems, e.g. in
-link:https://spark.apache.org/graphx[Apache Spark GraphX].
+link:https://spark.apache.org/graphx[Apache Spark GraphX]. Overhead for the vertex program arises because it has to run
+as many cycles as the largest length of the shortest paths between any two vertices in a component of the graph. In
+every cycle each vertex has to be checked for being
+"halted". Overhead of the OLTP traversal consists of each traverser having to carry complete path information. For
+pure depth-first-search or breadth-first-search implementations, connected-component algotithms should scale
+as [.big]##O##(V+E). For the traversals in the figure above this is almost the case.
+
+
+[[cc-scale-ratio]]
+.Run times for finding connected components in a randomly generated graph with 10 components, each consisting of 6400 vertices
+image::cc-scale-ratio.png[width=600]
+
+The random graphs used for the scalability tests can be modulated with the edge/vertex ratio. For small ratios the
+components generated are more lint-like and harder to process by the `connectedComponent()`-step. For high ratios
+the components are more mesh-like and the ConnectedComponentVertexProgram needs few cycles to process the graph. These
+characteristics show clearly from the graph. Indeed, for a given number of vertices, the run time of the
+`connectedComponent()`-step does not depend on the number of edges, but rather on the maximum shortest path length in
+the graph.
+
+
+==== Large graphs
+
+Large graphs in TinkerPop require distributed processing by `SparkGraphComputer` to get results in a reasonable time (OLAP
+approach). This means that the graph must be available as `HadoopGraph` (third party TinkerPop implementations often
+allow to make a graph available as an `HadoopGraph` by providing an Hadoop `InputFormat`). Running the
+`connectedComponent()`-step on
+an `HadoopGraph` works the same as for a small graph, provided that `SparkGraphComputer` is specified as the graph computer,
+either with the `gremlin.hadoop.defaultGraphComputer` property or as part of the `withComputer()`-step.
+
+Scalability of the the `connectedComponent()`-step with `SparkGraphComputer` is high, but note that:
+
+* the graph should fit in the memory of the Spark cluster to allow the VertexProgram to run its cycles without spilling
+intermediate results to disk and loosing most of the gains from the distributed processing
 
-==== Scalability
+* as discussed for small graphs, the BSP algorithm does not play well with graphs having a large shortest path between
+any pair of vertices. Overcoming this limitation is still a
+link:http://www.vldb.org/pvldb/vol7/p1821-yan.pdf[subject of academic research].
 
-ToDo:
- - limits and run time regime 1
- - test of friendster graph regime 3
- - discuss: link:http://www.vldb.org/pvldb/vol7/p1821-yan.pdf[http://www.vldb.org/pvldb/vol7/p1821-yan.pdf]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a0119640/docs/static/images/cc-scale-ratio.png
----------------------------------------------------------------------
diff --git a/docs/static/images/cc-scale-ratio.png b/docs/static/images/cc-scale-ratio.png
new file mode 100644
index 0000000..33a842d
Binary files /dev/null and b/docs/static/images/cc-scale-ratio.png differ

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a0119640/docs/static/images/cc-scale-size.png
----------------------------------------------------------------------
diff --git a/docs/static/images/cc-scale-size.png b/docs/static/images/cc-scale-size.png
new file mode 100644
index 0000000..2b08a89
Binary files /dev/null and b/docs/static/images/cc-scale-size.png differ


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

Posted by sp...@apache.org.
Merge branch 'tp33'


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

Branch: refs/heads/TINKERPOP-1967
Commit: 9b41f5a7f4b2b8bef226f5a62685bfdfd17c0feb
Parents: a5d1aa6 2cf551f
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Aug 7 06:30:35 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Aug 7 06:30:35 2018 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                                                | 1 +
 .../tinkerpop/gremlin/server/util/GremlinServerInstall.java       | 3 +++
 2 files changed, 4 insertions(+)
----------------------------------------------------------------------


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


[35/50] tinkerpop git commit: TINKERPOP-1976 Removed an OptOut from RemoteGraph

Posted by sp...@apache.org.
TINKERPOP-1976 Removed an OptOut from RemoteGraph

Carved out a special case for a behavior that is specific to remote operations around side-effects


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

Branch: refs/heads/TINKERPOP-1967
Commit: 682bdde6c58f992b20ad919279c7da691c1dc210
Parents: c03b575
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Aug 6 15:10:52 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Aug 9 07:28:09 2018 -0400

----------------------------------------------------------------------
 .../tinkerpop/gremlin/process/remote/RemoteGraph.java     |  4 ----
 .../driver/remote/DriverRemoteTraversalSideEffects.java   |  3 ++-
 .../gremlin/process/AbstractGremlinProcessTest.java       | 10 +++++++++-
 3 files changed, 11 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/682bdde6/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/RemoteGraph.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/RemoteGraph.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/RemoteGraph.java
index 1ea7d42..3699fea 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/RemoteGraph.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/RemoteGraph.java
@@ -48,10 +48,6 @@ import java.util.Iterator;
 @Graph.OptIn(Graph.OptIn.SUITE_PROCESS_STANDARD)
 @Graph.OptIn(Graph.OptIn.SUITE_PROCESS_COMPUTER)
 @Graph.OptOut(
-        test = "org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GroupCountTest",
-        method = "g_V_hasXnoX_groupCountXaX_capXaX",
-        reason = "This test asserts an empty side-effect which reflects as a null rather than an \"empty\" and thus doesn't assert")
-@Graph.OptOut(
         test = "org.apache.tinkerpop.gremlin.process.traversal.CoreTraversalTest",
         method = "*",
         reason = "The test suite does not support profiling or lambdas and for groovy tests: 'Could not locate method: GraphTraversalSource.withStrategies([{traversalCategory=interface org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy$DecorationStrategy}])'")

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/682bdde6/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/remote/DriverRemoteTraversalSideEffects.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/remote/DriverRemoteTraversalSideEffects.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/remote/DriverRemoteTraversalSideEffects.java
index 4305567..791c70e 100644
--- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/remote/DriverRemoteTraversalSideEffects.java
+++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/remote/DriverRemoteTraversalSideEffects.java
@@ -30,6 +30,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.TraversalSideEffects;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.UUID;
@@ -88,7 +89,7 @@ public class DriverRemoteTraversalSideEffects extends AbstractRemoteTraversalSid
                 final Result result = client.submitAsync(msg).get().all().get().get(0);
                 sideEffects.put(key, null == result ? null : result.getObject());
             } catch (Exception ex) {
-                // we use to try to catch  "no found" situations returned from the server here and then null the
+                // we use to try to catch "no found" situations returned from the server here and then null the
                 // side-effect for the requested key. doesn't seem like there is a need for that now because calls
                 // to get() now initially trigger a call the keys() so you would know all of the keys available on
                 // the server and would validate them up front throwing sideEffectKeyDoesNotExist(key) which thus

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/682bdde6/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/AbstractGremlinProcessTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/AbstractGremlinProcessTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/AbstractGremlinProcessTest.java
index 96dee1d..c3f4dc2 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/AbstractGremlinProcessTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/AbstractGremlinProcessTest.java
@@ -20,6 +20,7 @@ package org.apache.tinkerpop.gremlin.process;
 
 import org.apache.tinkerpop.gremlin.AbstractGremlinTest;
 import org.apache.tinkerpop.gremlin.GraphManager;
+import org.apache.tinkerpop.gremlin.process.remote.traversal.RemoteTraversalSideEffects;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalSideEffects;
@@ -96,8 +97,15 @@ public abstract class AbstractGremlinProcessTest extends AbstractGremlinTest {
             final Class clazz = (Class) keysClasses[i + 1];
             assertThat(sideEffects.keys().contains(key), is(true));
             assertThat(sideEffects.exists(key), is(true));
-            assertEquals(clazz, sideEffects.get((String) keysClasses[i]).getClass());
             assertThat(sideEffects.exists(UUID.randomUUID().toString()), is(false));
+
+            // there is slightly different behavior for remote side-effects so carving out a few asserts with that
+            // in mind. the client really doesnt' really have a way of knowing what type of object to create when it
+            // gets an empty iterator so it makes the result null and therefore we end up with a NPE if we try to
+            // access it. the rest of the behavior is solid so better to do this than OptOut I think
+            if (!(sideEffects instanceof RemoteTraversalSideEffects)) {
+                assertEquals(clazz, sideEffects.get((String) keysClasses[i]).getClass());
+            }
         }
         assertEquals(sideEffects.keys().size(), counter);
         assertThat(sideEffects.keys().contains(UUID.randomUUID().toString()), is(false));


[32/50] tinkerpop git commit: TINKERPOP-1976 Can't assert order() for pageRank()

Posted by sp...@apache.org.
TINKERPOP-1976 Can't assert order() for pageRank()


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

Branch: refs/heads/TINKERPOP-1967
Commit: 13440d6b6720b5d4f091f51674e7b341cc40e8a0
Parents: 0a5d8ce
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Aug 8 06:38:21 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Aug 9 07:28:09 2018 -0400

----------------------------------------------------------------------
 gremlin-test/features/map/PageRank.feature | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/13440d6b/gremlin-test/features/map/PageRank.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/map/PageRank.feature b/gremlin-test/features/map/PageRank.feature
index 76af1ed..049b8c2 100644
--- a/gremlin-test/features/map/PageRank.feature
+++ b/gremlin-test/features/map/PageRank.feature
@@ -48,6 +48,8 @@ Feature: Step - pageRank()
       | m[{"name": ["lop"], "projectRank": [3.0]}] |
       | m[{"name": ["ripple"], "projectRank": [1.0]}] |
 
+  # can't fully assert order here because some ranks are equivalent. the java test does an "or" type assert to deal
+  # with this, which we can't express here in these tests. should probably change the test or
   Scenario: g_V_pageRank_order_byXpageRank_decrX_name
     Given the modern graph
     And the traversal of
@@ -55,7 +57,7 @@ Feature: Step - pageRank()
       g.withComputer().V().pageRank().order().by("gremlin.pageRankVertexProgram.pageRank", Order.decr).values("name")
       """
     When iterated to list
-    Then the result should be ordered
+    Then the result should be unordered
       | result |
       | lop    |
       | ripple |


[25/50] tinkerpop git commit: This closes #906

Posted by sp...@apache.org.
This closes #906


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

Branch: refs/heads/TINKERPOP-1967
Commit: 1e8baec975fa23be4c4e59566ab69dd803352215
Parents: 9b41f5a
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Aug 7 10:25:28 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Aug 7 10:25:28 2018 -0400

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

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



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

Posted by sp...@apache.org.
This closes #892


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

Branch: refs/heads/TINKERPOP-1967
Commit: b183edd10a52dc65022c0270951b5bd9f2b5be7e
Parents: f50aeb6
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Jul 31 15:54:01 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Jul 31 15:54:01 2018 -0400

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

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



[02/50] tinkerpop git commit: TINKERPOP-2005 Set/restore log level in ResponseHandlerContextTest

Posted by sp...@apache.org.
TINKERPOP-2005 Set/restore log level in ResponseHandlerContextTest

This is to allow these tests to capture intended log messages in the
CI environment.


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

Branch: refs/heads/TINKERPOP-1967
Commit: fe9c26f656cf79f513af5b1230f498934a796063
Parents: 0e0d26c
Author: Dmitri Bourlatchkov <dm...@datastax.com>
Authored: Tue Jul 31 12:11:34 2018 -0400
Committer: Dmitri Bourlatchkov <dm...@datastax.com>
Committed: Tue Jul 31 12:11:34 2018 -0400

----------------------------------------------------------------------
 .../tinkerpop/gremlin/server/ResponseHandlerContextTest.java   | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/fe9c26f6/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/ResponseHandlerContextTest.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/ResponseHandlerContextTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/ResponseHandlerContextTest.java
index 13c9992..2babee9 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/ResponseHandlerContextTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/ResponseHandlerContextTest.java
@@ -19,6 +19,7 @@
 package org.apache.tinkerpop.gremlin.server;
 
 import io.netty.channel.ChannelHandlerContext;
+import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
 import org.apache.tinkerpop.gremlin.driver.message.RequestMessage;
 import org.apache.tinkerpop.gremlin.driver.message.ResponseMessage;
@@ -49,6 +50,8 @@ public class ResponseHandlerContextTest {
     private final ResponseHandlerContext rhc = new ResponseHandlerContext(context);
     private final Log4jRecordingAppender recordingAppender = new Log4jRecordingAppender();
 
+    private Level originalLogLevel;
+
     @Parameterized.Parameters(name = "{0}")
     public static Iterable<Object[]> data() {
         return Arrays.asList(new Object[][] {
@@ -86,11 +89,14 @@ public class ResponseHandlerContextTest {
     public void addRecordingAppender() {
         final Logger rootLogger = Logger.getRootLogger();
         rootLogger.addAppender(recordingAppender);
+        originalLogLevel = rootLogger.getLevel();
+        rootLogger.setLevel(Level.ALL);
     }
 
     @After
     public void removeRecordingAppender() {
         final Logger rootLogger = Logger.getRootLogger();
+        rootLogger.setLevel(originalLogLevel);
         rootLogger.removeAppender(recordingAppender);
     }
 


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

Posted by sp...@apache.org.
Merge branch 'tp33'


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

Branch: refs/heads/TINKERPOP-1967
Commit: 69b6f96d7ac8aa706ce65dee436d7038b8b3eaac
Parents: b183edd 8af7837
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Wed Aug 1 11:27:17 2018 -0700
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Wed Aug 1 11:27:17 2018 -0700

----------------------------------------------------------------------
 docker/Dockerfile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------



[19/50] tinkerpop git commit: Added a note about versioning gremlin CTR

Posted by sp...@apache.org.
Added a note about versioning gremlin CTR


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

Branch: refs/heads/TINKERPOP-1967
Commit: 18db9b8159810d0d624944e169ccafdc868a3237
Parents: 891e7da
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Aug 6 07:15:52 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Aug 6 07:15:52 2018 -0400

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


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/18db9b81/docs/src/dev/future/index.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/dev/future/index.asciidoc b/docs/src/dev/future/index.asciidoc
index 6e41cf9..acf587e 100644
--- a/docs/src/dev/future/index.asciidoc
+++ b/docs/src/dev/future/index.asciidoc
@@ -53,6 +53,8 @@ TinkerPop 3.x. These items include:
 * The concept of `Traversal` as the sole means of interacting with the graph.
 ** The role of Blueprints should be significantly reduced.
 ** The role of Gremlin should be significantly increased.
+* Provide better methods of versioning Gremlin itself - being bound to JVM releases and forcing local and remote
+versions of Gremlin to be the same isn't ideal.
 
 == Hiding Blueprints
 


[33/50] tinkerpop git commit: TINKERPOP-1976 Fixed up pageRank() groovy test

Posted by sp...@apache.org.
TINKERPOP-1976 Fixed up pageRank() groovy test


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

Branch: refs/heads/TINKERPOP-1967
Commit: 8c2313ed46d9a8683ff824d954038b9020097ae8
Parents: 5d9c3f1
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Aug 9 07:27:17 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Aug 9 07:28:09 2018 -0400

----------------------------------------------------------------------
 .../gremlin/process/traversal/step/map/GroovyPageRankTest.groovy   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8c2313ed/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyPageRankTest.groovy
----------------------------------------------------------------------
diff --git a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyPageRankTest.groovy b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyPageRankTest.groovy
index 78671da..7554092 100644
--- a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyPageRankTest.groovy
+++ b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyPageRankTest.groovy
@@ -42,7 +42,7 @@ public abstract class GroovyPageRankTest {
 
         @Override
         public Traversal<Vertex, String> get_g_V_pageRank_order_byXpageRank_decrX_byXnameX_name() {
-            new ScriptTraversal<>(g, "gremlin-groovy", "g.V.pageRank.order.by(PageRankVertexProgram.PAGE_RANK, decr).name")
+            new ScriptTraversal<>(g, "gremlin-groovy", "g.V.pageRank.order.by(PageRankVertexProgram.PAGE_RANK, decr).by('name').name")
         }
 
         @Override


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

Posted by sp...@apache.org.
Merge branch 'tp33'

Conflicts:
	gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PeerPressureTest.java


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

Branch: refs/heads/TINKERPOP-1967
Commit: f88ace1420be0034108bf5f3c0c5c1d1973009c8
Parents: 9357d6a b12a3fd
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Aug 9 10:51:01 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Aug 9 10:51:01 2018 -0400

----------------------------------------------------------------------
 .../gremlin/process/remote/RemoteGraph.java     |  17 ---
 .../io/graphson/TraversalSerializersV2d0.java   |   4 -
 .../ModernGraphTypeInformation.cs               |   4 +
 .../DriverRemoteTraversalSideEffects.java       |   3 +-
 .../test/cucumber/feature-steps.js              |  15 ++-
 .../glv/GraphTraversalSource.template           |   2 +-
 .../gremlin_python/process/graph_traversal.py   |   2 +-
 .../RemoteGraphGroovyTranslatorProvider.java    |   3 +-
 gremlin-test/features/map/PageRank.feature      | 132 +++++++++++++++++++
 gremlin-test/features/map/PeerPressure.feature  |  77 +++++++++++
 .../process/AbstractGremlinProcessTest.java     |  26 ++--
 .../traversal/step/map/PageRankTest.java        |  37 +++---
 .../traversal/step/map/PeerPressureTest.java    |  24 ++--
 .../TranslationStrategyProcessTest.java         |   3 +
 .../gremlin/process/FeatureCoverageTest.java    |   6 +-
 15 files changed, 284 insertions(+), 71 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f88ace14/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
----------------------------------------------------------------------
diff --cc gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
index 83dfe22,0cddc02..96eeaaf
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
@@@ -62,7 -63,18 +63,19 @@@ const ignoreReason = 
  
  const ignoredScenarios = {
    // An associative array containing the scenario name as key, for example:
-   // 'g_V_asXa_bX_out_asXcX_path_selectXkeysX': new IgnoreError(ignoreReason.embeddedListAssertion),
+   'g_V_pageRank_hasXpageRankX': new IgnoreError(ignoreReason.computerNotSupported),
+   'g_V_outXcreatedX_pageRank_byXbothEX_byXprojectRankX_timesX0X_valueMapXname_projectRankX': new IgnoreError(ignoreReason.computerNotSupported),
+   'g_V_pageRank_order_byXpageRank_decrX_byXnameX_name': new IgnoreError(ignoreReason.computerNotSupported),
+   'g_V_pageRank_order_byXpageRank_decrX_name_limitX2X': new IgnoreError(ignoreReason.computerNotSupported),
+   'g_V_pageRank_byXoutEXknowsXX_byXfriendRankX_valueMapXname_friendRankX': new IgnoreError(ignoreReason.computerNotSupported),
+   'g_V_hasLabelXpersonX_pageRank_byXpageRankX_order_byXpageRankX_valueMapXname_pageRankX': new IgnoreError(ignoreReason.computerNotSupported),
+   'g_V_pageRank_byXpageRankX_asXaX_outXknowsX_pageRank_asXbX_selectXa_bX': new IgnoreError(ignoreReason.computerNotSupported),
+   'g_V_hasLabelXsoftwareX_hasXname_rippleX_pageRankX1X_byXinEXcreatedXX_timesX1X_byXpriorsX_inXcreatedX_unionXboth__identityX_valueMapXname_priorsX': new IgnoreError(ignoreReason.computerNotSupported),
+   'g_V_outXcreatedX_groupXmX_byXlabelX_pageRankX1X_byXpageRankX_byXinEX_timesX1X_inXcreatedX_groupXmX_byXpageRankX_capXmX': new IgnoreError(ignoreReason.computerNotSupported),
+   'g_V_peerPressure_hasXclusterX': new IgnoreError(ignoreReason.computerNotSupported),
+   'g_V_peerPressure_byXclusterX_byXoutEXknowsXX_pageRankX1X_byXrankX_byXoutEXknowsXX_timesX2X_group_byXclusterX_byXrank_sumX_limitX100X': new IgnoreError(ignoreReason.computerNotSupported),
+   'g_V_hasXname_rippleX_inXcreatedX_peerPressure_byXoutEX_byXclusterX_repeatXunionXidentity__bothX_timesX2X_dedup_valueMapXname_clusterX': new IgnoreError(ignoreReason.computerNotSupported),
++  'g_V_hasXname_rippleX_inXcreatedX_peerPressure_withXEDGES_outEX_withXPROPERTY_NAME_clusterX_repeatXunionXidentity__bothX_timesX2X_dedup_valueMapXname_clusterX': new IgnoreError(ignoreReason.computerNotSupported),
  };
  
  defineSupportCode(function(methods) {

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f88ace14/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f88ace14/gremlin-test/features/map/PeerPressure.feature
----------------------------------------------------------------------
diff --cc gremlin-test/features/map/PeerPressure.feature
index 0000000,83f5bb2..d7368e9
mode 000000,100644..100644
--- a/gremlin-test/features/map/PeerPressure.feature
+++ b/gremlin-test/features/map/PeerPressure.feature
@@@ -1,0 -1,60 +1,77 @@@
+ # 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.
+ 
+ Feature: Step - peerPressure()
+                 
+   Scenario: g_V_peerPressure_hasXclusterX
+     Given the modern graph
+     And the traversal of
+       """
+       g.withComputer().V().peerPressure().has("gremlin.peerPressureVertexProgram.cluster")
+       """
+     When iterated to list
+     Then the result should be unordered
+       | result |
+       | v[marko] |
+       | v[vadas] |
+       | v[lop] |
+       | v[josh] |
+       | v[ripple] |
+       | v[peter] |
+     And the graph should return 6 for count of "g.withComputer().V().peerPressure().has(\"gremlin.peerPressureVertexProgram.cluster\")"
+ 
+   Scenario: g_V_peerPressure_byXclusterX_byXoutEXknowsXX_pageRankX1X_byXrankX_byXoutEXknowsXX_timesX2X_group_byXclusterX_byXrank_sumX_limitX100X
+     Given an unsupported test
+     Then nothing should happen because
+       """
+       The result returned is not supported under GraphSON 2.x and therefore cannot be properly asserted. More
+       specifically it has long keys which basically get toString()'d under GraphSON 2.x. This test can be supported
+       with GraphSON 3.x.
+       """
+ 
+   Scenario: g_V_hasXname_rippleX_inXcreatedX_peerPressure_byXoutEX_byXclusterX_repeatXunionXidentity__bothX_timesX2X_dedup_valueMapXname_clusterX
+     Given the modern graph
+     And the traversal of
+       """
+       g.withComputer().V().has("name", "ripple").in("created").peerPressure().by(__.outE()).by("cluster").repeat(__.union(__.identity(), __.both())).times(2).dedup().valueMap("name", "cluster")
+       """
+     When iterated to list
+     Then the result should be unordered
+       | result |
+       | m[{"name": ["marko"], "cluster": [1]}] |
+       | m[{"name": ["vadas"], "cluster": [2]}] |
+       | m[{"name": ["lop"], "cluster": [4]}] |
+       | m[{"name": ["josh"], "cluster": [4]}] |
+       | m[{"name": ["ripple"], "cluster": [4]}] |
+       | m[{"name": ["peter"], "cluster": [6]}] |
++
++  Scenario: g_V_hasXname_rippleX_inXcreatedX_peerPressure_withXEDGES_outEX_withXPROPERTY_NAME_clusterX_repeatXunionXidentity__bothX_timesX2X_dedup_valueMapXname_clusterX
++    Given the modern graph
++    And the traversal of
++      """
++      g.withComputer().V().has("name", "ripple").in("created").peerPressure().with("~tinkerpop.peerPressure.edges",__.outE()).with("~tinkerpop.peerPressure.propertyName", "cluster").repeat(__.union(__.identity(), __.both())).times(2).dedup().valueMap("name", "cluster")
++      """
++    When iterated to list
++    Then the result should be unordered
++      | result |
++      | m[{"name": ["marko"], "cluster": [1]}] |
++      | m[{"name": ["vadas"], "cluster": [2]}] |
++      | m[{"name": ["lop"], "cluster": [4]}] |
++      | m[{"name": ["josh"], "cluster": [4]}] |
++      | m[{"name": ["ripple"], "cluster": [4]}] |
++      | m[{"name": ["peter"], "cluster": [6]}] |
++

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f88ace14/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PageRankTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f88ace14/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PeerPressureTest.java
----------------------------------------------------------------------
diff --cc gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PeerPressureTest.java
index b70cb02,be4ce9a..d53ec3e
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PeerPressureTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PeerPressureTest.java
@@@ -22,8 -22,8 +22,9 @@@ package org.apache.tinkerpop.gremlin.pr
  import org.apache.tinkerpop.gremlin.LoadGraphWith;
  import org.apache.tinkerpop.gremlin.TestHelper;
  import org.apache.tinkerpop.gremlin.process.AbstractGremlinProcessTest;
+ import org.apache.tinkerpop.gremlin.process.GremlinProcessRunner;
  import org.apache.tinkerpop.gremlin.process.computer.clustering.peerpressure.PeerPressureVertexProgram;
 +import org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.PeerPressure;
  import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
  import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
  import org.apache.tinkerpop.gremlin.structure.Vertex;
@@@ -51,20 -54,12 +55,14 @@@ public abstract class PeerPressureTest 
  
      public abstract Traversal<Vertex, Map<String, List<Object>>> get_g_V_hasXname_rippleX_inXcreatedX_peerPressure_byXoutEX_byXclusterX_repeatXunionXidentity__bothX_timesX2X_dedup_valueMapXname_clusterX();
  
 +    public abstract Traversal<Vertex, Map<String, List<Object>>> get_g_V_hasXname_rippleX_inXcreatedX_peerPressure_withXedges_outEX_withXpropertyName_clusterX_repeatXunionXidentity__bothX_timesX2X_dedup_valueMapXname_clusterX();
 +
      @Test
      @LoadGraphWith(MODERN)
-     public void g_V_peerPressure() {
-         final Traversal<Vertex, Vertex> traversal = get_g_V_peerPressure();
+     public void g_V_peerPressure_hasXclusterX() {
+         final Traversal<Vertex, Vertex> traversal = get_g_V_peerPressure_hasXclusterX();
          printTraversalForm(traversal);
-         int counter = 0;
-         while (traversal.hasNext()) {
-             final Vertex vertex = traversal.next();
-             counter++;
-             assertTrue(vertex.property(PeerPressureVertexProgram.CLUSTER).isPresent());
-         }
-         assertEquals(6, counter);
+         assertEquals(6, IteratorUtils.count(traversal));
      }
  
      @Test
@@@ -102,29 -97,7 +100,29 @@@
          assertTrue(ids.contains(convertToVertexId("josh")));
          assertTrue(ids.contains(convertToVertexId("peter")));
      }
 -    
 +
 +    @Test
 +    @LoadGraphWith(MODERN)
 +    public void g_V_hasXname_rippleX_inXcreatedX_peerPressure_withXEDGES_outEX_withXPROPERTY_NAME_clusterX_repeatXunionXidentity__bothX_timesX2X_dedup_valueMapXname_clusterX() {
 +        TestHelper.assumeNonDeterministic();
 +        final Traversal<Vertex, Map<String, List<Object>>> traversal = get_g_V_hasXname_rippleX_inXcreatedX_peerPressure_withXedges_outEX_withXpropertyName_clusterX_repeatXunionXidentity__bothX_timesX2X_dedup_valueMapXname_clusterX();
 +        printTraversalForm(traversal);
 +        final List<Map<String, List<Object>>> results = traversal.toList();
 +        assertEquals(6, results.size());
 +        final Map<String, Object> clusters = new HashMap<>();
 +        results.forEach(m -> clusters.put((String) m.get("name").get(0), m.get("cluster").get(0)));
 +        assertEquals(2, results.get(0).size());
 +        assertEquals(6, clusters.size());
 +        assertEquals(clusters.get("josh"), clusters.get("ripple"));
 +        assertEquals(clusters.get("josh"), clusters.get("lop"));
 +        final Set<Object> ids = new HashSet<>(clusters.values());
 +        assertEquals(4, ids.size());
 +        assertTrue(ids.contains(convertToVertexId("marko")));
 +        assertTrue(ids.contains(convertToVertexId("vadas")));
 +        assertTrue(ids.contains(convertToVertexId("josh")));
 +        assertTrue(ids.contains(convertToVertexId("peter")));
 +    }
-     
++
      public static class Traversals extends PeerPressureTest {
  
          @Override

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f88ace14/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
----------------------------------------------------------------------
diff --cc gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
index 5739629,2cca50b..e09156b
--- a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
+++ b/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
@@@ -53,10 -53,11 +53,12 @@@ import org.apache.tinkerpop.gremlin.pro
  import org.apache.tinkerpop.gremlin.process.traversal.step.map.MeanTest;
  import org.apache.tinkerpop.gremlin.process.traversal.step.map.MinTest;
  import org.apache.tinkerpop.gremlin.process.traversal.step.map.OrderTest;
+ import org.apache.tinkerpop.gremlin.process.traversal.step.map.PageRankTest;
  import org.apache.tinkerpop.gremlin.process.traversal.step.map.PathTest;
+ import org.apache.tinkerpop.gremlin.process.traversal.step.map.PeerPressureTest;
  import org.apache.tinkerpop.gremlin.process.traversal.step.map.ProjectTest;
  import org.apache.tinkerpop.gremlin.process.traversal.step.map.PropertiesTest;
 +import org.apache.tinkerpop.gremlin.process.traversal.step.map.ReadTest;
  import org.apache.tinkerpop.gremlin.process.traversal.step.map.SelectTest;
  import org.apache.tinkerpop.gremlin.process.traversal.step.map.SumTest;
  import org.apache.tinkerpop.gremlin.process.traversal.step.map.UnfoldTest;


[20/50] tinkerpop git commit: Fix spelling mistake CTR

Posted by sp...@apache.org.
Fix spelling mistake CTR


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

Branch: refs/heads/TINKERPOP-1967
Commit: 72b264d0f5e4b8fca66ea77cde83982071f411b0
Parents: 18db9b8
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Aug 6 07:40:30 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Aug 6 07:40:30 2018 -0400

----------------------------------------------------------------------
 docs/src/upgrade/release-3.4.x.asciidoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/72b264d0/docs/src/upgrade/release-3.4.x.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade/release-3.4.x.asciidoc b/docs/src/upgrade/release-3.4.x.asciidoc
index 9951024..587e761 100644
--- a/docs/src/upgrade/release-3.4.x.asciidoc
+++ b/docs/src/upgrade/release-3.4.x.asciidoc
@@ -85,7 +85,7 @@ While `io()`-step is still single-threaded for OLTP style loading, it can be uti
 internally uses `CloneVertexProgram` and therefore any graph `InputFormat` or `OutputFormat` can be configured in
 conjunction with this step for parallel loads of large datasets.
 
-It is also worth noting that the `io()`-step may be overriden by graph providers to utilize their native bulk-loading
+It is also worth noting that the `io()`-step may be overridden by graph providers to utilize their native bulk-loading
 features, so consult the documentation of the implementation being used to determine if there are any improved
 efficiencies there.
 


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

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

Conflicts:
	gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyPageRankTest.groovy
	gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyPeerPressureTest.groovy
	gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/AbstractGremlinProcessTest.java
	gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PageRankTest.java


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

Branch: refs/heads/TINKERPOP-1967
Commit: b12a3fdd01f0505773d865538e987de66c74d044
Parents: fa7a7f6 a533878
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Aug 9 10:12:44 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Aug 9 10:12:44 2018 -0400

----------------------------------------------------------------------
 .../gremlin/process/remote/RemoteGraph.java     |  17 ---
 .../io/graphson/TraversalSerializersV2d0.java   |   4 -
 .../ModernGraphTypeInformation.cs               |   4 +
 .../DriverRemoteTraversalSideEffects.java       |   3 +-
 .../test/cucumber/feature-steps.js              |  14 +-
 .../glv/GraphTraversalSource.template           |   2 +-
 .../gremlin_python/process/graph_traversal.py   |   2 +-
 .../RemoteGraphGroovyTranslatorProvider.java    |   3 +-
 gremlin-test/features/map/PageRank.feature      | 132 +++++++++++++++++++
 gremlin-test/features/map/PeerPressure.feature  |  60 +++++++++
 .../process/AbstractGremlinProcessTest.java     |  26 ++--
 .../traversal/step/map/PageRankTest.java        |  37 +++---
 .../traversal/step/map/PeerPressureTest.java    |  25 ++--
 .../TranslationStrategyProcessTest.java         |   3 +
 .../gremlin/process/FeatureCoverageTest.java    |   6 +-
 15 files changed, 266 insertions(+), 72 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b12a3fdd/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/RemoteGraph.java
----------------------------------------------------------------------

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

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b12a3fdd/gremlin-python/glv/GraphTraversalSource.template
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b12a3fdd/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b12a3fdd/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/RemoteGraphGroovyTranslatorProvider.java
----------------------------------------------------------------------
diff --cc gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/RemoteGraphGroovyTranslatorProvider.java
index 6949426,e170cb1..38935a0
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/RemoteGraphGroovyTranslatorProvider.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/RemoteGraphGroovyTranslatorProvider.java
@@@ -35,28 -29,9 +35,29 @@@ import java.util.Set
   */
  public class RemoteGraphGroovyTranslatorProvider extends RemoteGraphProvider {
  
 +    private static boolean SKIP = false;
 +
 +    private static Set<String> SKIP_TESTS = new HashSet<>(Arrays.asList(
-             "g_injectXg_VX1X_propertiesXnameX_nextX_value"));
++            "g_injectXg_VX1X_propertiesXnameX_nextX_value",
++            "shouldNotHaveAnonymousTraversalMixups"));
 +
 +
 +    @Override
 +    public Map<String, Object> getBaseConfiguration(final String graphName, final Class<?> test, final String testMethodName,
 +                                                    final LoadGraphWith.GraphData loadGraphWith) {
 +
 +        final Map<String, Object> config = super.getBaseConfiguration(graphName, test, testMethodName, loadGraphWith);
 +        SKIP = SKIP_TESTS.contains(testMethodName) || SKIP_TESTS.contains(test.getCanonicalName());
 +        return config;
 +    }
 +
      @Override
      public GraphTraversalSource traversal(final Graph graph) {
 -        final GraphTraversalSource g = graph.traversal();
 -        return g.withStrategies(new TranslationStrategy(g, GroovyTranslator.of("g")));
 +        if (SKIP)
 +            return super.traversal(graph);
 +        else {
 +            final GraphTraversalSource g = super.traversal(graph);
 +            return g.withStrategies(new TranslationStrategy(g, GroovyTranslator.of("g")));
 +        }
      }
  }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b12a3fdd/gremlin-test/features/map/PageRank.feature
----------------------------------------------------------------------
diff --cc gremlin-test/features/map/PageRank.feature
index 0000000,bf2ed26..8ead2d4
mode 000000,100644..100644
--- a/gremlin-test/features/map/PageRank.feature
+++ b/gremlin-test/features/map/PageRank.feature
@@@ -1,0 -1,142 +1,132 @@@
+ # 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.
+ 
+ Feature: Step - pageRank()
+                 
+   Scenario: g_V_pageRank_hasXpageRankX
+     Given the modern graph
+     And the traversal of
+       """
+       g.withComputer().V().pageRank().has("gremlin.pageRankVertexProgram.pageRank")
+       """
+     When iterated to list
+     Then the result should be unordered
+       | result |
+       | v[marko] |
+       | v[vadas] |
+       | v[lop] |
+       | v[josh] |
+       | v[ripple] |
+       | v[peter] |
+     And the graph should return 6 for count of "g.withComputer().V().pageRank().has(\"gremlin.pageRankVertexProgram.pageRank\")"
+ 
+   Scenario: g_V_outXcreatedX_pageRank_byXbothEX_byXprojectRankX_timesX0X_valueMapXname_projectRankX
+     Given the modern graph
+     And the traversal of
+       """
+       g.withComputer().V().out("created").pageRank().by(__.bothE()).by("projectRank").times(0).valueMap("name", "projectRank")
+       """
+     When iterated to list
+     Then the result should be unordered
+       | result |
+       | m[{"name": ["lop"], "projectRank": [3.0]}] |
+       | m[{"name": ["lop"], "projectRank": [3.0]}] |
+       | m[{"name": ["lop"], "projectRank": [3.0]}] |
+       | m[{"name": ["ripple"], "projectRank": [1.0]}] |
+ 
+   Scenario: g_V_pageRank_order_byXpageRank_decrX_byXnameX_name
+     Given the modern graph
+     And the traversal of
+       """
+       g.withComputer().V().pageRank().order().by("gremlin.pageRankVertexProgram.pageRank", Order.decr).by("name").values("name")
+       """
+     When iterated to list
+     Then the result should be ordered
+       | result |
+       | lop    |
+       | ripple |
+       | josh   |
+       | vadas  |
+       | marko  |
+       | peter  |
+ 
+   Scenario: g_V_pageRank_order_byXpageRank_decrX_name_limitX2X
+     Given the modern graph
+     And the traversal of
+       """
+       g.withComputer().V().pageRank().order().by("gremlin.pageRankVertexProgram.pageRank", Order.decr).values("name").limit(2)
+       """
+     When iterated to list
+     Then the result should be ordered
+       | result |
+       | lop    |
+       | ripple |
+ 
+   Scenario: g_V_pageRank_byXoutEXknowsXX_byXfriendRankX_valueMapXname_friendRankX
+     Given the modern graph
+     And the traversal of
+       """
+       g.withComputer().V().pageRank().by(__.outE("knows")).by("friendRank").valueMap("name", "friendRank")
+       """
+     When iterated to list
+     Then the result should be unordered
+       | result |
 -      | m[{"name": ["marko"], "friendRank": [0.15000000000000002]}] |
 -      | m[{"name": ["vadas"], "friendRank": [0.21375000000000002]}] |
 -      | m[{"name": ["lop"], "friendRank": [0.15000000000000002]}] |
 -      | m[{"name": ["josh"], "friendRank": [0.21375000000000002]}] |
 -      | m[{"name": ["ripple"], "friendRank": [0.15000000000000002]}] |
 -      | m[{"name": ["peter"], "friendRank": [0.15000000000000002]}] |
++      | m[{"name": ["marko"], "friendRank": [0.14598537777608422]}] |
++      | m[{"name": ["vadas"], "friendRank": [0.20802924444783155]}] |
++      | m[{"name": ["lop"], "friendRank": [0.14598537777608422]}] |
++      | m[{"name": ["josh"], "friendRank": [0.20802924444783155]}] |
++      | m[{"name": ["ripple"], "friendRank": [0.14598537777608422]}] |
++      | m[{"name": ["peter"], "friendRank": [0.14598537777608422]}] |
+ 
+   Scenario: g_V_hasLabelXpersonX_pageRank_byXpageRankX_order_byXpageRankX_valueMapXname_pageRankX
 -    Given the modern graph
 -    And the traversal of
++    Given an unsupported test
++    Then nothing should happen because
+       """
 -      g.withComputer().V().hasLabel("person").pageRank().by("pageRank").order().by("pageRank").valueMap("name", "pageRank")
++      The result is not completely deterministic with respect to the decimals that pageRank() produces and the
++      GLV framework does not have a notion for asserting anything beyond an equals() sort of state.
+       """
 -    When iterated to list
 -    Then the result should be unordered
 -      | result |
 -      | m[{"name": ["marko"], "pageRank": [0.15000000000000002]}] |
 -      | m[{"name": ["vadas"], "pageRank": [0.19250000000000003]}] |
 -      | m[{"name": ["josh"], "pageRank": [0.19250000000000003]}] |
 -      | m[{"name": ["peter"], "pageRank": [0.15000000000000002]}] |
+ 
+   Scenario: g_V_pageRank_byXpageRankX_asXaX_outXknowsX_pageRank_asXbX_selectXa_bX
 -    Given the modern graph
 -    And the traversal of
++    Given an unsupported test
++    Then nothing should happen because
+       """
 -      g.withComputer().V().pageRank().by("pageRank").as("a").out("knows").values("pageRank").as("b").select("a", "b")
++      The result is not completely deterministic with respect to the decimals that pageRank() produces and the
++      GLV framework does not have a notion for asserting anything beyond an equals() sort of state.
+       """
 -    When iterated to list
 -    Then the result should be unordered
 -      | result |
 -      | m[{"a": "v[marko]", "b": 0.19250000000000003}] |
 -      | m[{"a": "v[marko]", "b": 0.19250000000000003}] |
+ 
+   Scenario: g_V_hasLabelXsoftwareX_hasXname_rippleX_pageRankX1X_byXinEXcreatedXX_timesX1X_byXpriorsX_inXcreatedX_unionXboth__identityX_valueMapXname_priorsX
+     Given the modern graph
+     And the traversal of
+       """
+       g.withComputer().V().hasLabel("software").has("name", "ripple").pageRank(1.0).by(__.inE("created")).times(1).by("priors").in("created").union(__.both(), __.identity()).valueMap("name", "priors")
+       """
+     When iterated to list
+     Then the result should be unordered
+       | result |
+       | m[{"name": ["josh"], "priors": [1.0]}] |
+       | m[{"name": ["marko"], "priors": [0.0]}] |
+       | m[{"name": ["lop"], "priors": [0.0]}] |
+       | m[{"name": ["ripple"], "priors": [0.0]}] |
+ 
+   Scenario: g_V_outXcreatedX_groupXmX_byXlabelX_pageRankX1X_byXpageRankX_byXinEX_timesX1X_inXcreatedX_groupXmX_byXpageRankX_capXmX()
+     Given an unsupported test
+     Then nothing should happen because
+       """
+       The result returned is not supported under GraphSON 2.x and therefore cannot be properly asserted. More
+       specifically it has long keys which basically get toString()'d under GraphSON 2.x. This test can be supported
+       with GraphSON 3.x.
+       """

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b12a3fdd/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/AbstractGremlinProcessTest.java
----------------------------------------------------------------------
diff --cc gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/AbstractGremlinProcessTest.java
index 2861724,c3f4dc2..4749e93
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/AbstractGremlinProcessTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/AbstractGremlinProcessTest.java
@@@ -128,9 -136,7 +136,9 @@@ public abstract class AbstractGremlinPr
  
          for (T t : results) {
              if (t instanceof Map) {
-                 assertThat("Checking map result existence: " + t, expectedResults.stream().filter(e -> e instanceof Map).filter(e -> internalCheckMap((Map) e, (Map) t)).findAny().isPresent(), is(true));
+                 assertThat("Checking map result existence: " + t, expectedResults.stream().filter(e -> e instanceof Map).anyMatch(e -> internalCheckMap((Map) e, (Map) t)), is(true));
 +            } else if (t instanceof List) {
-                 assertThat("Checking list result existence: " + t, expectedResults.stream().filter(e -> e instanceof List).filter(e -> internalCheckList((List) e, (List) t)).findAny().isPresent(), is(true));
++                assertThat("Checking list result existence: " + t, expectedResults.stream().filter(e -> e instanceof List).anyMatch(e -> internalCheckList((List) e, (List) t)), is(true));
              } else {
                  assertThat("Checking result existence: " + t, expectedResults.contains(t), is(true));
              }
@@@ -164,21 -170,9 +172,21 @@@
          }
      }
  
 +    private static <A> boolean internalCheckList(final List<A> expectedList, final List<A> actualList) {
 +        if (expectedList.size() != actualList.size()) {
 +            return false;
 +        }
 +        for (int i = 0; i < actualList.size(); i++) {
 +            if (!actualList.get(i).equals(expectedList.get(i))) {
 +                return false;
 +            }
 +        }
 +        return true;
 +    }
 +
      private static <A, B> boolean internalCheckMap(final Map<A, B> expectedMap, final Map<A, B> actualMap) {
-         final List<Map.Entry<A, B>> actualList = actualMap.entrySet().stream().sorted((a, b) -> a.getKey().toString().compareTo(b.getKey().toString())).collect(Collectors.toList());
-         final List<Map.Entry<A, B>> expectedList = expectedMap.entrySet().stream().sorted((a, b) -> a.getKey().toString().compareTo(b.getKey().toString())).collect(Collectors.toList());
+         final List<Map.Entry<A, B>> actualList = actualMap.entrySet().stream().sorted(Comparator.comparing(a -> a.getKey().toString())).collect(Collectors.toList());
+         final List<Map.Entry<A, B>> expectedList = expectedMap.entrySet().stream().sorted(Comparator.comparing(a -> a.getKey().toString())).collect(Collectors.toList());
  
          if (expectedList.size() != actualList.size()) {
              return false;

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b12a3fdd/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PageRankTest.java
----------------------------------------------------------------------
diff --cc gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PageRankTest.java
index 07a2b04,0c0a91d..620d0e3
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PageRankTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PageRankTest.java
@@@ -51,9 -52,9 +52,9 @@@ public abstract class PageRankTest exte
  
      public abstract Traversal<Vertex, Map<String, List<Object>>> get_g_V_outXcreatedX_pageRank_byXbothEX_byXprojectRankX_timesX0X_valueMapXname_projectRankX();
  
-     public abstract Traversal<Vertex, String> get_g_V_pageRank_order_byXpageRank_descX_name();
 -    public abstract Traversal<Vertex, String> get_g_V_pageRank_order_byXpageRank_decrX_byXnameX_name();
++    public abstract Traversal<Vertex, String> get_g_V_pageRank_order_byXpageRank_descX_byXnameX_name();
  
 -    public abstract Traversal<Vertex, String> get_g_V_pageRank_order_byXpageRank_decrX_name_limitX2X();
 +    public abstract Traversal<Vertex, String> get_g_V_pageRank_order_byXpageRank_descX_name_limitX2X();
  
      public abstract Traversal<Vertex, Map<String, List<Object>>> get_g_V_pageRank_byXoutEXknowsXX_byXfriendRankX_valueMapXname_friendRankX();
  
@@@ -99,8 -94,8 +94,8 @@@
  
      @Test
      @LoadGraphWith(MODERN)
-     public void g_V_pageRank_order_byXpageRank_descX_name() {
-         final Traversal<Vertex, String> traversal = get_g_V_pageRank_order_byXpageRank_descX_name();
 -    public void g_V_pageRank_order_byXpageRank_decrX_byXnameX_name() {
 -        final Traversal<Vertex, String> traversal = get_g_V_pageRank_order_byXpageRank_decrX_byXnameX_name();
++    public void g_V_pageRank_order_byXpageRank_descX_byXnameX_name() {
++        final Traversal<Vertex, String> traversal = get_g_V_pageRank_order_byXpageRank_descX_byXnameX_name();
          printTraversalForm(traversal);
          final List<String> names = traversal.toList();
          assertEquals(6, names.size());
@@@ -256,8 -251,8 +251,8 @@@
          }
  
          @Override
-         public Traversal<Vertex, String> get_g_V_pageRank_order_byXpageRank_descX_name() {
-             return g.V().pageRank().order().by(PageRankVertexProgram.PAGE_RANK, Order.desc).values("name");
 -        public Traversal<Vertex, String> get_g_V_pageRank_order_byXpageRank_decrX_byXnameX_name() {
 -            return g.V().pageRank().order().by(PageRankVertexProgram.PAGE_RANK, Order.decr).by("name").values("name");
++        public Traversal<Vertex, String> get_g_V_pageRank_order_byXpageRank_descX_byXnameX_name() {
++            return g.V().pageRank().order().by(PageRankVertexProgram.PAGE_RANK, Order.desc).by("name").values("name");
          }
  
          @Override

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b12a3fdd/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PeerPressureTest.java
----------------------------------------------------------------------


[12/50] tinkerpop git commit: Added entry for docker on website CTR

Posted by sp...@apache.org.
Added entry for docker on website CTR


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

Branch: refs/heads/TINKERPOP-1967
Commit: b63bacf4bbc04d220fb9cb7f6d2983fa4c10bea6
Parents: 665daa7
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Sat Aug 4 06:16:48 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Sat Aug 4 06:16:48 2018 -0400

----------------------------------------------------------------------
 docs/site/home/downloads.html | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b63bacf4/docs/site/home/downloads.html
----------------------------------------------------------------------
diff --git a/docs/site/home/downloads.html b/docs/site/home/downloads.html
index 24195bc..c6bdf72 100644
--- a/docs/site/home/downloads.html
+++ b/docs/site/home/downloads.html
@@ -24,10 +24,11 @@ limitations under the License.
     <p>
      As a convenience, TinkerPop also deploys packaged artifacts to:
      <ul>
+       <li><a href="https://hub.docker.com/u/tinkerpop/">Docker</a></li>
        <li><a href="http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.apache.tinkerpop%22">Maven Central</a></li>
        <li><a href="https://pypi.python.org/pypi/gremlinpython/">PyPI</a></li>
-       <li><a href="https://www.nuget.org/packages/Gremlin.Net/">NuGet</a></li>
        <li><a href="https://www.npmjs.com/package/gremlin">npm</a></li>
+       <li><a href="https://www.nuget.org/packages/Gremlin.Net/">NuGet</a></li>
      </ul>
     </p>
     <br/>


[30/50] tinkerpop git commit: TINKERPOP-1976 Modified the nature of the pageRank() order() test

Posted by sp...@apache.org.
TINKERPOP-1976 Modified the nature of the pageRank() order() test

The GLV test language doesn't support the kind of asserts that the java test was doing. Change the nature of the java test a bit to ensure it could be tested properly. Made the java test more succinct in the process.


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

Branch: refs/heads/TINKERPOP-1967
Commit: 5d9c3f1335375caa1b4c0bd0cd97094f787e9dac
Parents: 13440d6
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Aug 8 12:06:43 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Aug 9 07:28:09 2018 -0400

----------------------------------------------------------------------
 .../traversal/step/map/GroovyPageRankTest.groovy  |  2 +-
 .../test/cucumber/feature-steps.js                |  2 +-
 gremlin-test/features/map/PageRank.feature        | 10 ++++------
 .../process/traversal/step/map/PageRankTest.java  | 18 +++++++++---------
 4 files changed, 15 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5d9c3f13/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyPageRankTest.groovy
----------------------------------------------------------------------
diff --git a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyPageRankTest.groovy b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyPageRankTest.groovy
index 13787cc..78671da 100644
--- a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyPageRankTest.groovy
+++ b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyPageRankTest.groovy
@@ -41,7 +41,7 @@ public abstract class GroovyPageRankTest {
         }
 
         @Override
-        public Traversal<Vertex, String> get_g_V_pageRank_order_byXpageRank_decrX_name() {
+        public Traversal<Vertex, String> get_g_V_pageRank_order_byXpageRank_decrX_byXnameX_name() {
             new ScriptTraversal<>(g, "gremlin-groovy", "g.V.pageRank.order.by(PageRankVertexProgram.PAGE_RANK, decr).name")
         }
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5d9c3f13/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
----------------------------------------------------------------------
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
index e585fcc..fa609be 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
@@ -63,7 +63,7 @@ const ignoredScenarios = {
   // An associative array containing the scenario name as key, for example:
   'g_V_pageRank': new IgnoreError(ignoreReason.computerNotSupported),
   'g_V_outXcreatedX_pageRank_byXbothEX_byXprojectRankX_timesX0X_valueMapXname_projectRankX': new IgnoreError(ignoreReason.computerNotSupported),
-  'g_V_pageRank_order_byXpageRank_decrX_name': new IgnoreError(ignoreReason.computerNotSupported),
+  'g_V_pageRank_order_byXpageRank_decrX_byXnameX_name': new IgnoreError(ignoreReason.computerNotSupported),
   'g_V_pageRank_order_byXpageRank_decrX_name_limitX2X': new IgnoreError(ignoreReason.computerNotSupported),
   'g_V_pageRank_byXoutEXknowsXX_byXfriendRankX_valueMapXname_friendRankX': new IgnoreError(ignoreReason.computerNotSupported),
   'g_V_hasLabelXpersonX_pageRank_byXpageRankX_order_byXpageRankX_valueMapXname_pageRankX': new IgnoreError(ignoreReason.computerNotSupported),

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5d9c3f13/gremlin-test/features/map/PageRank.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/map/PageRank.feature b/gremlin-test/features/map/PageRank.feature
index 049b8c2..ebf6489 100644
--- a/gremlin-test/features/map/PageRank.feature
+++ b/gremlin-test/features/map/PageRank.feature
@@ -48,21 +48,19 @@ Feature: Step - pageRank()
       | m[{"name": ["lop"], "projectRank": [3.0]}] |
       | m[{"name": ["ripple"], "projectRank": [1.0]}] |
 
-  # can't fully assert order here because some ranks are equivalent. the java test does an "or" type assert to deal
-  # with this, which we can't express here in these tests. should probably change the test or
-  Scenario: g_V_pageRank_order_byXpageRank_decrX_name
+  Scenario: g_V_pageRank_order_byXpageRank_decrX_byXnameX_name
     Given the modern graph
     And the traversal of
       """
-      g.withComputer().V().pageRank().order().by("gremlin.pageRankVertexProgram.pageRank", Order.decr).values("name")
+      g.withComputer().V().pageRank().order().by("gremlin.pageRankVertexProgram.pageRank", Order.decr).by("name").values("name")
       """
     When iterated to list
-    Then the result should be unordered
+    Then the result should be ordered
       | result |
       | lop    |
       | ripple |
-      | vadas  |
       | josh   |
+      | vadas  |
       | marko  |
       | peter  |
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5d9c3f13/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PageRankTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PageRankTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PageRankTest.java
index 57a3b3f..8846099 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PageRankTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PageRankTest.java
@@ -51,7 +51,7 @@ public abstract class PageRankTest extends AbstractGremlinProcessTest {
 
     public abstract Traversal<Vertex, Map<String, List<Object>>> get_g_V_outXcreatedX_pageRank_byXbothEX_byXprojectRankX_timesX0X_valueMapXname_projectRankX();
 
-    public abstract Traversal<Vertex, String> get_g_V_pageRank_order_byXpageRank_decrX_name();
+    public abstract Traversal<Vertex, String> get_g_V_pageRank_order_byXpageRank_decrX_byXnameX_name();
 
     public abstract Traversal<Vertex, String> get_g_V_pageRank_order_byXpageRank_decrX_name_limitX2X();
 
@@ -99,17 +99,17 @@ public abstract class PageRankTest extends AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
-    public void g_V_pageRank_order_byXpageRank_decrX_name() {
-        final Traversal<Vertex, String> traversal = get_g_V_pageRank_order_byXpageRank_decrX_name();
+    public void g_V_pageRank_order_byXpageRank_decrX_byXnameX_name() {
+        final Traversal<Vertex, String> traversal = get_g_V_pageRank_order_byXpageRank_decrX_byXnameX_name();
         printTraversalForm(traversal);
         final List<String> names = traversal.toList();
         assertEquals(6, names.size());
         assertEquals("lop", names.get(0));
         assertEquals("ripple", names.get(1));
-        assertTrue(names.get(2).equals("josh") || names.get(2).equals("vadas"));
-        assertTrue(names.get(3).equals("josh") || names.get(3).equals("vadas"));
-        assertTrue(names.get(4).equals("marko") || names.get(4).equals("peter"));
-        assertTrue(names.get(5).equals("marko") || names.get(5).equals("peter"));
+        assertEquals("josh", names.get(2));
+        assertEquals("vadas", names.get(3));
+        assertEquals("marko", names.get(4));
+        assertEquals("peter", names.get(5));
     }
 
     @Test
@@ -256,8 +256,8 @@ public abstract class PageRankTest extends AbstractGremlinProcessTest {
         }
 
         @Override
-        public Traversal<Vertex, String> get_g_V_pageRank_order_byXpageRank_decrX_name() {
-            return g.V().pageRank().order().by(PageRankVertexProgram.PAGE_RANK, Order.decr).values("name");
+        public Traversal<Vertex, String> get_g_V_pageRank_order_byXpageRank_decrX_byXnameX_name() {
+            return g.V().pageRank().order().by(PageRankVertexProgram.PAGE_RANK, Order.decr).by("name").values("name");
         }
 
         @Override


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

Posted by sp...@apache.org.
Merge branch 'tp33'


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

Branch: refs/heads/TINKERPOP-1967
Commit: 891e7da50a3e6d3396e66a7a74c43934b325792d
Parents: 226ef6e 3e308f5
Author: Robert Dale <ro...@gmail.com>
Authored: Sat Aug 4 16:45:50 2018 -0400
Committer: Robert Dale <ro...@gmail.com>
Committed: Sat Aug 4 16:45:50 2018 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc     | 1 +
 gremlin-shaded/pom.xml | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


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

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/891e7da5/gremlin-shaded/pom.xml
----------------------------------------------------------------------


[16/50] tinkerpop git commit: Merge branch 'TINKERPOP-2016' into tp32

Posted by sp...@apache.org.
Merge branch 'TINKERPOP-2016' into tp32


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

Branch: refs/heads/TINKERPOP-1967
Commit: b98ff5e150c2da037780737c571c34215fe6c151
Parents: ce94738 1829318
Author: Robert Dale <ro...@gmail.com>
Authored: Sat Aug 4 16:44:00 2018 -0400
Committer: Robert Dale <ro...@gmail.com>
Committed: Sat Aug 4 16:44:00 2018 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc     | 1 +
 gremlin-shaded/pom.xml | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------



[03/50] tinkerpop git commit: dedup build-helper-maven-plugin - CTR

Posted by sp...@apache.org.
dedup build-helper-maven-plugin - CTR


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

Branch: refs/heads/TINKERPOP-1967
Commit: dfe79c24f4decb667ad20c729928a50f8cb1ec0b
Parents: c49c0cc
Author: Robert Dale <ro...@gmail.com>
Authored: Tue Jul 31 13:12:31 2018 -0400
Committer: Robert Dale <ro...@gmail.com>
Committed: Tue Jul 31 13:12:31 2018 -0400

----------------------------------------------------------------------
 pom.xml | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dfe79c24/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index b669872..f2629ad 100644
--- a/pom.xml
+++ b/pom.xml
@@ -305,6 +305,7 @@ limitations under the License.
                             <failIfNoMatch>false</failIfNoMatch>
                         </configuration>
                     </execution>
+                    <!-- Needed to figure out the version components when reading revapi API check config below -->
                     <execution>
                         <id>parse-version</id>
                         <goals>
@@ -407,21 +408,6 @@ limitations under the License.
                     </dependency>
                 </dependencies>
             </plugin>
-            <!-- Needed to figure out the version components when reading revapi API check config below -->
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>build-helper-maven-plugin</artifactId>
-		<version>3.0.0</version>
-                <executions>
-                    <execution>
-                        <id>parse-version</id>
-                        <goals>
-                            <goal>parse-version</goal>
-                        </goals>
-                        <phase>validate</phase>
-                    </execution>
-                </executions>
-            </plugin>
             <plugin>
                 <groupId>org.revapi</groupId>
                 <artifactId>revapi-maven-plugin</artifactId>


[41/50] tinkerpop git commit: TINKERPOP-1967 Added connectedComponent() step

Posted by sp...@apache.org.
TINKERPOP-1967 Added connectedComponent() step

Deprecated the recipe for "Connected Components" but left the old content present as I felt it had educational value.


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

Branch: refs/heads/TINKERPOP-1967
Commit: 0acceb90efc6516df20586d756765f94efc6cbf2
Parents: f88ace1
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu May 17 14:44:01 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Aug 9 10:54:40 2018 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |   1 +
 docs/src/recipes/connected-components.asciidoc  |   8 +-
 docs/src/reference/the-graphcomputer.asciidoc   |   6 +
 docs/src/reference/the-traversal.asciidoc       |  35 +++
 docs/src/upgrade/release-3.4.x.asciidoc         |  32 +++
 .../tinkerpop/gremlin/jsr223/CoreImports.java   |   4 +
 .../ConnectedComponentVertexProgram.java        | 234 +++++++++++++++++++
 .../traversal/step/map/ConnectedComponent.java  |  38 +++
 .../ConnectedComponentVertexProgramStep.java    |  98 ++++++++
 .../gremlin/process/remote/RemoteGraph.java     |   4 +
 .../traversal/dsl/graph/GraphTraversal.java     |  15 ++
 .../traversal/dsl/graph/GraphTraversalTest.java |   2 +-
 .../Process/Traversal/GraphTraversal.cs         |   9 +
 .../lib/process/graph-traversal.js              |  10 +
 .../gremlin_python/process/graph_traversal.py   |   4 +
 .../gremlin/process/ProcessComputerSuite.java   |   2 +
 .../step/map/ConnectedComponentTest.java        | 117 ++++++++++
 .../computer/SparkHadoopGraphProvider.java      |   2 +
 18 files changed, 619 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0acceb90/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 303d963..481a7d3 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -35,6 +35,7 @@ This release also includes changes from <<release-3-3-3, 3.3.3>>.
 * Replaced `Parameterizing.addPropertyMutations()` with `Configuring.configure()`.
 * Changed interface hierarchy for `Parameterizing` and `Mutating` interfaces as they are tightly related.
 * Introduced the `with()` step modulator which can supply configuration options to `Configuring` steps.
+* Added `connectedComponent()` step and related `VertexProgram`.
 * Added `supportsUpsert()` option to `VertexFeatures` and `EdgeFeatures`.
 * `min()` and `max()` now support all types implementing `Comparable`.
 * Change the `toString()` of `Path` to be standardized as other graph elements are.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0acceb90/docs/src/recipes/connected-components.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/recipes/connected-components.asciidoc b/docs/src/recipes/connected-components.asciidoc
index 46d61eb..70abdbd 100644
--- a/docs/src/recipes/connected-components.asciidoc
+++ b/docs/src/recipes/connected-components.asciidoc
@@ -18,7 +18,13 @@ limitations under the License.
 == Connected Components
 
 Gremlin can be used to find link:https://en.wikipedia.org/wiki/Connected_component_(graph_theory)[connected components]
-in a graph. Consider the following graph which has three connected components:
+in a graph. As of TinkerPop 3.4.0, the process has been simplified to the `connectedComponent()`-step which is
+described in more detail in the link:
+link:http://tinkerpop.apache.org/docs/x.y.z/reference/#connectedcomponent-step[Reference Documentation].
+
+The `connectedComponent()`-step replaces the original recipe described below from earlier versions of TinkerPop,
+however the algorithm from that old recipe remains interesting for educational purposes and has thus not been removed.
+The original recipe considers the following graph which has three connected components:
 
 image:connected-components.png[width=600]
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0acceb90/docs/src/reference/the-graphcomputer.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/the-graphcomputer.asciidoc b/docs/src/reference/the-graphcomputer.asciidoc
index 1d7586c..9cd1c76 100644
--- a/docs/src/reference/the-graphcomputer.asciidoc
+++ b/docs/src/reference/the-graphcomputer.asciidoc
@@ -403,6 +403,12 @@ g.V().peerPressure().by('cluster').valueMap()
 g.V().peerPressure().by(outE('knows')).by('cluster').valueMap()
 ----
 
+[[connectedcomponentvertexprogram]]
+=== ConnectedComponentVertexProgram
+
+The `ConnectedComponentVertexProgram` identifies link:https://en.wikipedia.org/wiki/Connected_component_(graph_theory)[Connected Component]
+instances in a graph. See <<connectedcomponent-step,`connectedComponent()`>>-step for more information.
+
 [[bulkdumpervertexprogram]]
 [[clonevertexprogram]]
 === CloneVertexProgram

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0acceb90/docs/src/reference/the-traversal.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc
index 7d385c8..4d5b48a 100644
--- a/docs/src/reference/the-traversal.asciidoc
+++ b/docs/src/reference/the-traversal.asciidoc
@@ -625,6 +625,41 @@ g.V().coin(1.0)
 
 link:++http://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.html#coin-double-++[`coin(double)`]
 
+[[connectedcomponent-step]]
+=== ConnectedComponent Step
+
+The `connectedComponent()` step performs a computation to identify link:https://en.wikipedia.org/wiki/Connected_component_(graph_theory)[Connected Component]
+instances in a graph. When this step completes, the vertices will be labelled with a component identifier to denote
+the component to which they are associated.
+
+IMPORTANT: The `connectedComponent()`-step is a `VertexComputing`-step and as such, can only be used against a graph
+that supports `GraphComputer` (OLAP).
+
+[gremlin-groovy,modern]
+----
+g = graph.traversal().withComputer()
+g.V().
+  connectedComponent().
+    with(ConnectedComponent.propertyName, 'component').
+  project('name','component').
+    by('name').
+    by('component')
+g.V().hasLabel('person').
+  connectedComponent().
+    with(ConnectedComponent.propertyName, 'component').
+    with(ConnectedComponent.edges, outE('knows')).
+  project('name','component').
+    by('name').
+    by('component')
+----
+
+Note the use of the `with()` modulating step which provides configuration options to the algorithm. It takes
+configuration keys from the `ConnectedComponent` class and is automatically imported to the Gremlin Console.
+
+*Additional References*
+
+link:++http://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.html#connectedComponent--++[`connectedComponent()`]
+
 [[constant-step]]
 === Constant Step
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0acceb90/docs/src/upgrade/release-3.4.x.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade/release-3.4.x.asciidoc b/docs/src/upgrade/release-3.4.x.asciidoc
index 587e761..00f2635 100644
--- a/docs/src/upgrade/release-3.4.x.asciidoc
+++ b/docs/src/upgrade/release-3.4.x.asciidoc
@@ -65,6 +65,38 @@ release where breaking changes are allowed.
 See: link:https://issues.apache.org/jira/browse/TINKERPOP-1975[TINKERPOP-1975],
 link:http://tinkerpop.apache.org/docs/3.4.0/reference/#with-step[Reference Documentation]
 
+==== connectedComponent() Step
+
+In prior version of TinkerPop, it was recommended that the identification of
+link:https://en.wikipedia.org/wiki/Connected_component_(graph_theory)[Connected Component] instances in a graph be
+computed by way of a reasonably complex bit of Gremlin that looked something like this:
+
+[source,groovy]
+----
+g.V().emit(cyclicPath().or().not(both())).repeat(both()).until(cyclicPath()).
+  path().aggregate("p").
+  unfold().dedup().
+  map(__.as("v").select("p").unfold().
+         filter(unfold().where(eq("v"))).
+         unfold().dedup().order().by(id).fold()).
+  dedup()
+----
+
+The above approach had a number of drawbacks that included a large execution cost as well as incompatibilities in OLAP.
+To simplify usage of this commonly use graph algorithm, TinkerPop 3.4.0 introduces the `connectedComponent()` step
+which reduces the above operation to:
+
+[source,groovy]
+----
+g.withComputer().V().connectedComponent()
+----
+
+It is important to note that this step does require the use of a `GraphComputer` to work, as it utilizes a
+`VertexProgram` behind the scenes.
+
+See: link:https://issues.apache.org/jira/browse/TINKERPOP-1967[TINKERPOP-1967],
+link:http://tinkerpop.apache.org/docs/x.y.z/reference/#connectedcomponent-step[Reference Documentation]
+
 ==== io() Step
 
 There have been some important changes to IO operations for reading and writing graph data. The use of `Graph.io()`

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0acceb90/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/CoreImports.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/CoreImports.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/CoreImports.java
index 72ad47a..eb3b831 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/CoreImports.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/CoreImports.java
@@ -42,6 +42,7 @@ import org.apache.tinkerpop.gremlin.process.computer.bulkloading.BulkLoaderVerte
 import org.apache.tinkerpop.gremlin.process.computer.bulkloading.IncrementalBulkLoader;
 import org.apache.tinkerpop.gremlin.process.computer.bulkloading.OneTimeBulkLoader;
 import org.apache.tinkerpop.gremlin.process.computer.clone.CloneVertexProgram;
+import org.apache.tinkerpop.gremlin.process.computer.clustering.connected.ConnectedComponentVertexProgram;
 import org.apache.tinkerpop.gremlin.process.computer.clustering.peerpressure.ClusterCountMapReduce;
 import org.apache.tinkerpop.gremlin.process.computer.clustering.peerpressure.ClusterPopulationMapReduce;
 import org.apache.tinkerpop.gremlin.process.computer.clustering.peerpressure.PeerPressureVertexProgram;
@@ -49,6 +50,7 @@ import org.apache.tinkerpop.gremlin.process.computer.ranking.pagerank.PageRankMa
 import org.apache.tinkerpop.gremlin.process.computer.ranking.pagerank.PageRankVertexProgram;
 import org.apache.tinkerpop.gremlin.process.computer.traversal.MemoryTraversalSideEffects;
 import org.apache.tinkerpop.gremlin.process.computer.traversal.TraversalVertexProgram;
+import org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.ConnectedComponent;
 import org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.PageRank;
 import org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.PeerPressure;
 import org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy;
@@ -251,6 +253,8 @@ public final class CoreImports {
         // graph computer
         CLASS_IMPORTS.add(Computer.class);
         CLASS_IMPORTS.add(ComputerResult.class);
+        CLASS_IMPORTS.add(ConnectedComponent.class);
+        CLASS_IMPORTS.add(ConnectedComponentVertexProgram.class);
         CLASS_IMPORTS.add(GraphComputer.class);
         CLASS_IMPORTS.add(Memory.class);
         CLASS_IMPORTS.add(VertexProgram.class);

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0acceb90/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/clustering/connected/ConnectedComponentVertexProgram.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/clustering/connected/ConnectedComponentVertexProgram.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/clustering/connected/ConnectedComponentVertexProgram.java
new file mode 100644
index 0000000..de718f1
--- /dev/null
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/clustering/connected/ConnectedComponentVertexProgram.java
@@ -0,0 +1,234 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.process.computer.clustering.connected;
+
+import org.apache.commons.configuration.BaseConfiguration;
+import org.apache.commons.configuration.Configuration;
+import org.apache.commons.configuration.ConfigurationUtils;
+import org.apache.tinkerpop.gremlin.process.computer.GraphComputer;
+import org.apache.tinkerpop.gremlin.process.computer.Memory;
+import org.apache.tinkerpop.gremlin.process.computer.MemoryComputeKey;
+import org.apache.tinkerpop.gremlin.process.computer.MessageScope;
+import org.apache.tinkerpop.gremlin.process.computer.Messenger;
+import org.apache.tinkerpop.gremlin.process.computer.VertexComputeKey;
+import org.apache.tinkerpop.gremlin.process.computer.VertexProgram;
+import org.apache.tinkerpop.gremlin.process.computer.traversal.TraversalVertexProgram;
+import org.apache.tinkerpop.gremlin.process.computer.util.AbstractVertexProgramBuilder;
+import org.apache.tinkerpop.gremlin.process.traversal.Operator;
+import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
+import org.apache.tinkerpop.gremlin.process.traversal.util.PureTraversal;
+import org.apache.tinkerpop.gremlin.structure.Direction;
+import org.apache.tinkerpop.gremlin.structure.Edge;
+import org.apache.tinkerpop.gremlin.structure.Graph;
+import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.tinkerpop.gremlin.structure.VertexProperty;
+
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+/**
+ * Identifies "Connected Component" instances in a graph by assigning a component identifier (the lexicographically
+ * least string value of the vertex in the component) to each vertex.
+ *
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ * @author Daniel Kuppitz (http://gremlin.guru)
+ */
+public class ConnectedComponentVertexProgram implements VertexProgram<String> {
+
+    public static final String COMPONENT = "gremlin.connectedComponentVertexProgram.component";
+    private static final String PROPERTY = "gremlin.connectedComponentVertexProgram.property";
+    private static final String EDGE_TRAVERSAL = "gremlin.pageRankVertexProgram.edgeTraversal";
+    private static final String HAS_HALTED = "gremlin.connectedComponentVertexProgram.hasHalted";
+    private static final String VOTE_TO_HALT = "gremlin.connectedComponentVertexProgram.voteToHalt";
+
+    private static final Set<MemoryComputeKey> MEMORY_COMPUTE_KEYS = Collections.singleton(MemoryComputeKey.of(VOTE_TO_HALT, Operator.and, false, true));
+    private MessageScope.Local<?> scope = MessageScope.Local.of(__::bothE);
+    private Set<MessageScope> scopes;
+    private String property = COMPONENT;
+    private boolean hasHalted = false;
+    private PureTraversal<Vertex, Edge> edgeTraversal = null;
+    private Configuration configuration;
+
+    private ConnectedComponentVertexProgram() {}
+
+    @Override
+    public void loadState(final Graph graph, final Configuration config) {
+        configuration = new BaseConfiguration();
+        if (config != null) {
+            ConfigurationUtils.copy(config, configuration);
+        }
+
+        if (configuration.containsKey(EDGE_TRAVERSAL)) {
+            this.edgeTraversal = PureTraversal.loadState(configuration, EDGE_TRAVERSAL, graph);
+            this.scope = MessageScope.Local.of(() -> this.edgeTraversal.get().clone());
+        }
+
+        scopes = new HashSet<>(Collections.singletonList(scope));
+
+        this.property = configuration.getString(PROPERTY, COMPONENT);
+        this.hasHalted = configuration.getBoolean(HAS_HALTED, false);
+    }
+
+    @Override
+    public void storeState(final Configuration config) {
+        VertexProgram.super.storeState(config);
+        if (configuration != null) {
+            ConfigurationUtils.copy(configuration, config);
+        }
+    }
+
+    @Override
+    public void setup(final Memory memory) {
+        memory.set(VOTE_TO_HALT, true);
+    }
+
+    @Override
+    public void execute(final Vertex vertex, final Messenger<String> messenger, final Memory memory) {
+        if (memory.isInitialIteration()) {
+            // on the first pass, just initialize the component to its own id then pass it to all adjacent vertices
+            // for evaluation
+            vertex.property(VertexProperty.Cardinality.single, property, vertex.id().toString());
+
+            // no need to send messages from traversers that were filtered - happens for stuff like
+            // g.V().hasLabel('software').connectedComponent() (i.e. when there is a TraversalVertexProgram in the mix
+            // halting traversers. only want to send messages from traversers that are still hanging about after
+            // the filter. the unfiltered vertices can only react to messages sent to them. of course, this can
+            // lead to weirdness in results. 
+            if (vertex.edges(Direction.BOTH).hasNext() && !(hasHalted && !vertex.property(TraversalVertexProgram.HALTED_TRAVERSERS).isPresent())) {
+                // since there was message passing we don't want to halt on the first round. this should only trigger
+                // a single pass finish if the graph is completely disconnected (technically, it won't even really
+                // work in cases where halted traversers come into play
+                messenger.sendMessage(scope, vertex.id().toString());
+                memory.add(VOTE_TO_HALT, false);
+            }
+        } else {
+            // by the second iteration all vertices that matter should have a component assigned
+            String currentComponent = vertex.value(property);
+            boolean different = false;
+
+            // iterate through messages received and determine if there is a component that has a lesser value than
+            // the currently assigned one
+            final Iterator<String> componentIterator = messenger.receiveMessages();
+            while(componentIterator.hasNext()) {
+                final String candidateComponent = componentIterator.next();
+                if (candidateComponent.compareTo(currentComponent) < 0) {
+                    currentComponent = candidateComponent;
+                    different = true;
+                }
+            }
+
+            // if there is a better component then assign it and notify adjacent vertices. triggering the message
+            // passing should not halt future executions
+            if (different) {
+                vertex.property(VertexProperty.Cardinality.single, property, currentComponent);
+                messenger.sendMessage(scope, currentComponent);
+                memory.add(VOTE_TO_HALT, false);
+            }
+        }
+    }
+
+    @Override
+    public Set<VertexComputeKey> getVertexComputeKeys() {
+        return new HashSet<>(Collections.singletonList(VertexComputeKey.of(property, false)));
+    }
+
+    @Override
+    public Set<MemoryComputeKey> getMemoryComputeKeys() {
+        return MEMORY_COMPUTE_KEYS;
+    }
+
+    @Override
+    public boolean terminate(final Memory memory) {
+        final boolean voteToHalt = memory.<Boolean>get(VOTE_TO_HALT);
+        if (voteToHalt) {
+            return true;
+        } else {
+            // it is basically always assumed that the program will want to halt, but if message passing occurs, the
+            // program will want to continue, thus reset false values to true for future iterations
+            memory.set(VOTE_TO_HALT, true);
+            return false;
+        }
+    }
+
+    @Override
+    public Set<MessageScope> getMessageScopes(final Memory memory) {
+        return scopes;
+    }
+
+    @Override
+    public GraphComputer.ResultGraph getPreferredResultGraph() {
+        return GraphComputer.ResultGraph.NEW;
+    }
+
+    @Override
+    public GraphComputer.Persist getPreferredPersist() {
+        return GraphComputer.Persist.VERTEX_PROPERTIES;
+    }
+
+
+    @Override
+    @SuppressWarnings("CloneDoesntCallSuperClone,CloneDoesntDeclareCloneNotSupportedException")
+    public ConnectedComponentVertexProgram clone() {
+        return this;
+    }
+
+    @Override
+    public Features getFeatures() {
+        return new Features() {
+            @Override
+            public boolean requiresLocalMessageScopes() {
+                return true;
+            }
+
+            @Override
+            public boolean requiresVertexPropertyAddition() {
+                return true;
+            }
+        };
+    }
+
+    public static ConnectedComponentVertexProgram.Builder build() {
+        return new ConnectedComponentVertexProgram.Builder();
+    }
+
+    public static final class Builder extends AbstractVertexProgramBuilder<ConnectedComponentVertexProgram.Builder> {
+
+        private Builder() {
+            super(ConnectedComponentVertexProgram.class);
+        }
+
+        public ConnectedComponentVertexProgram.Builder hasHalted(final boolean hasHalted) {
+            this.configuration.setProperty(HAS_HALTED, hasHalted);
+            return this;
+        }
+
+        public ConnectedComponentVertexProgram.Builder edges(final Traversal.Admin<Vertex, Edge> edgeTraversal) {
+            PureTraversal.storeState(this.configuration, EDGE_TRAVERSAL, edgeTraversal);
+            return this;
+        }
+
+        public ConnectedComponentVertexProgram.Builder property(final String key) {
+            this.configuration.setProperty(PROPERTY, key);
+            return this;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0acceb90/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/ConnectedComponent.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/ConnectedComponent.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/ConnectedComponent.java
new file mode 100644
index 0000000..85558bc
--- /dev/null
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/ConnectedComponent.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.process.computer.traversal.step.map;
+
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
+import org.apache.tinkerpop.gremlin.structure.Graph;
+
+/**
+ * Configuration options to be passed to the {@link GraphTraversal#with(String, Object)} step on
+ * {@link GraphTraversal#connectedComponent()} ()}.
+ */
+public class ConnectedComponent {
+    /**
+     * Configures the edge to traverse when calculating the pagerank.
+     */
+    public static final String edges = Graph.Hidden.hide("tinkerpop.connectedComponent.edges");
+
+    /**
+     * Configures the name of the property within which to store the pagerank value.
+     */
+    public static final String propertyName = Graph.Hidden.hide("tinkerpop.connectedComponent.propertyName");
+}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0acceb90/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/ConnectedComponentVertexProgramStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/ConnectedComponentVertexProgramStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/ConnectedComponentVertexProgramStep.java
new file mode 100644
index 0000000..edeb497
--- /dev/null
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/ConnectedComponentVertexProgramStep.java
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tinkerpop.gremlin.process.computer.traversal.step.map;
+
+import org.apache.tinkerpop.gremlin.process.computer.GraphFilter;
+import org.apache.tinkerpop.gremlin.process.computer.Memory;
+import org.apache.tinkerpop.gremlin.process.computer.clustering.connected.ConnectedComponentVertexProgram;
+import org.apache.tinkerpop.gremlin.process.computer.traversal.TraversalVertexProgram;
+import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
+import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategies;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
+import org.apache.tinkerpop.gremlin.process.traversal.step.Configuring;
+import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.Parameters;
+import org.apache.tinkerpop.gremlin.process.traversal.util.PureTraversal;
+import org.apache.tinkerpop.gremlin.structure.Edge;
+import org.apache.tinkerpop.gremlin.structure.Graph;
+import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.tinkerpop.gremlin.structure.util.StringFactory;
+
+/**
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+public final class ConnectedComponentVertexProgramStep extends VertexProgramStep implements TraversalParent, Configuring {
+
+    private Parameters parameters = new Parameters();
+    private PureTraversal<Vertex, Edge> edgeTraversal;
+    private String clusterProperty = ConnectedComponentVertexProgram.COMPONENT;
+
+    public ConnectedComponentVertexProgramStep(final Traversal.Admin traversal) {
+        super(traversal);
+        this.configure(ConnectedComponent.edges, __.<Vertex>bothE());
+    }
+
+    @Override
+    public void configure(final Object... keyValues) {
+        if (keyValues[0].equals(ConnectedComponent.edges)) {
+            if (!(keyValues[1] instanceof Traversal))
+                throw new IllegalArgumentException("ConnectedComponent.edges requires a Traversal as its argument");
+            this.edgeTraversal = new PureTraversal<>(((Traversal<Vertex,Edge>) keyValues[1]).asAdmin());
+            this.integrateChild(this.edgeTraversal.get());
+        } else if (keyValues[0].equals(ConnectedComponent.propertyName)) {
+            if (!(keyValues[1] instanceof String))
+                throw new IllegalArgumentException("ConnectedComponent.propertyName requires a String as its argument");
+            this.clusterProperty = (String) keyValues[1];
+        } else {
+            this.parameters.set(this, keyValues);
+        }
+    }
+
+    @Override
+    public Parameters getParameters() {
+        return parameters;
+    }
+
+    @Override
+    public int hashCode() {
+        return super.hashCode() ^ this.clusterProperty.hashCode();
+    }
+
+    @Override
+    public String toString() {
+        return StringFactory.stepString(this, this.clusterProperty, new GraphFilter(this.computer));
+    }
+
+    @Override
+    public ConnectedComponentVertexProgram generateProgram(final Graph graph, final Memory memory) {
+        final Traversal.Admin<Vertex, Edge> detachedTraversal = this.edgeTraversal.getPure();
+        detachedTraversal.setStrategies(TraversalStrategies.GlobalCache.getStrategies(graph.getClass()));
+        return ConnectedComponentVertexProgram.build().
+                hasHalted(memory.exists(TraversalVertexProgram.HALTED_TRAVERSERS)).
+                edges(detachedTraversal).
+                property(this.clusterProperty).create(graph);
+    }
+
+    @Override
+    public ConnectedComponentVertexProgramStep clone() {
+        return (ConnectedComponentVertexProgramStep) super.clone();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0acceb90/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/RemoteGraph.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/RemoteGraph.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/RemoteGraph.java
index f19d5fa..9bc1771 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/RemoteGraph.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/RemoteGraph.java
@@ -48,6 +48,10 @@ import java.util.Iterator;
 @Graph.OptIn(Graph.OptIn.SUITE_PROCESS_STANDARD)
 @Graph.OptIn(Graph.OptIn.SUITE_PROCESS_COMPUTER)
 @Graph.OptOut(
+        test = "org.apache.tinkerpop.gremlin.process.traversal.step.map.ConnectedComponentTest",
+        method = "*",
+        reason = "hmmmm")
+@Graph.OptOut(
         test = "org.apache.tinkerpop.gremlin.process.traversal.CoreTraversalTest",
         method = "*",
         reason = "The test suite does not support profiling or lambdas and for groovy tests: 'Could not locate method: GraphTraversalSource.withStrategies([{traversalCategory=interface org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy$DecorationStrategy}])'")

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0acceb90/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
index a675ad1..4fd247f 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
@@ -19,6 +19,8 @@
 package org.apache.tinkerpop.gremlin.process.traversal.dsl.graph;
 
 import org.apache.tinkerpop.gremlin.process.computer.VertexProgram;
+import org.apache.tinkerpop.gremlin.process.computer.clustering.connected.ConnectedComponentVertexProgram;
+import org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.ConnectedComponentVertexProgramStep;
 import org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.PageRankVertexProgramStep;
 import org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.PeerPressureVertexProgramStep;
 import org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.ProgramVertexProgramStep;
@@ -2452,6 +2454,18 @@ public interface GraphTraversal<S, E> extends Traversal<S, E> {
     }
 
     /**
+     * Executes a Connected Component algorithm over the graph.
+     *
+     * @return the traversal with the appended {@link ConnectedComponentVertexProgram}
+     * @see <a href="http://tinkerpop.apache.org/docs/${project.version}/reference/#connectedcomponent-step" target="_blank">Reference Documentation - ConnectedComponent Step</a>
+     * @since 3.4.0
+     */
+    public default GraphTraversal<S, E> connectedComponent() {
+        this.asAdmin().getBytecode().addStep(Symbols.connectedComponent);
+        return this.asAdmin().addStep((Step<E, E>) new ConnectedComponentVertexProgramStep(this.asAdmin()));
+    }
+
+    /**
      * Executes an arbitrary {@link VertexProgram} over the graph.
      *
      * @return the traversal with the appended {@link ProgramVertexProgramStep}
@@ -2882,6 +2896,7 @@ public interface GraphTraversal<S, E> extends Traversal<S, E> {
 
         public static final String pageRank = "pageRank";
         public static final String peerPressure = "peerPressure";
+        public static final String connectedComponent = "connectedComponent";
         public static final String program = "program";
 
         public static final String by = "by";

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0acceb90/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalTest.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalTest.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalTest.java
index 3d9a549..40ca312 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalTest.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalTest.java
@@ -43,7 +43,7 @@ import static org.junit.Assert.assertEquals;
 public class GraphTraversalTest {
     private static final Logger logger = LoggerFactory.getLogger(GraphTraversalTest.class);
 
-    private static Set<String> NO_GRAPH = new HashSet<>(Arrays.asList("asAdmin", "by", "read", "write", "with", "option", "iterate", "to", "from", "profile", "pageRank", "peerPressure", "program", "none"));
+    private static Set<String> NO_GRAPH = new HashSet<>(Arrays.asList("asAdmin", "by", "read", "write", "with", "option", "iterate", "to", "from", "profile", "pageRank", "connectedComponent", "peerPressure", "program", "none"));
     private static Set<String> NO_ANONYMOUS = new HashSet<>(Arrays.asList("start", "__"));
     private static Set<String> IGNORES_BYTECODE = new HashSet<>(Arrays.asList("asAdmin", "read", "write", "iterate", "mapValues", "mapKeys"));
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0acceb90/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
index 361b246..e2fa3e1 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
@@ -401,6 +401,15 @@ namespace Gremlin.Net.Process.Traversal
         }
 
         /// <summary>
+        ///     Adds the connectedComponent step to this <see cref="GraphTraversal{SType, EType}" />.
+        /// </summary>
+        public GraphTraversal<S, E> ConnectedComponent ()
+        {
+            Bytecode.AddStep("connectedComponent");
+            return Wrap<S, E>(this);
+        }
+
+        /// <summary>
         ///     Adds the constant step to this <see cref="GraphTraversal{SType, EType}" />.
         /// </summary>
         public GraphTraversal<S, E2> Constant<E2> (E2 e)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0acceb90/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/process/graph-traversal.js
----------------------------------------------------------------------
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/process/graph-traversal.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/process/graph-traversal.js
index 4f39fa5..1c8d639 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/process/graph-traversal.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/process/graph-traversal.js
@@ -353,6 +353,16 @@ class GraphTraversal extends Traversal {
   }
   
   /**
+   * Graph traversal connectedComponent method.
+   * @param {...Object} args
+   * @returns {GraphTraversal}
+   */
+  connectedComponent(...args) {
+    this.bytecode.addStep('connectedComponent', args);
+    return this;
+  }
+  
+  /**
    * Graph traversal constant method.
    * @param {...Object} args
    * @returns {GraphTraversal}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0acceb90/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py b/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py
index f8b8285..b073aa8 100644
--- a/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py
+++ b/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py
@@ -194,6 +194,10 @@ class GraphTraversal(Traversal):
         self.bytecode.add_step("coin", *args)
         return self
 
+    def connectedComponent(self, *args):
+        self.bytecode.add_step("connectedComponent", *args)
+        return self
+
     def constant(self, *args):
         self.bytecode.add_step("constant", *args)
         return self

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0acceb90/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessComputerSuite.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessComputerSuite.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessComputerSuite.java
index eab562d..6466ae8 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessComputerSuite.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessComputerSuite.java
@@ -50,6 +50,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.filter.TailTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.filter.WhereTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.AddEdgeTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.CoalesceTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.ConnectedComponentTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.ConstantTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.CountTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.FlatMapTest;
@@ -143,6 +144,7 @@ public class ProcessComputerSuite extends AbstractGremlinSuite {
 
             // map
             CoalesceTest.Traversals.class,
+            ConnectedComponentTest.Traversals.class,
             ConstantTest.Traversals.class,
             CountTest.Traversals.class,
             FlatMapTest.Traversals.class,

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0acceb90/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ConnectedComponentTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ConnectedComponentTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ConnectedComponentTest.java
new file mode 100644
index 0000000..25e618a
--- /dev/null
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ConnectedComponentTest.java
@@ -0,0 +1,117 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.process.traversal.step.map;
+
+import org.apache.tinkerpop.gremlin.LoadGraphWith;
+import org.apache.tinkerpop.gremlin.process.computer.clustering.connected.ConnectedComponentVertexProgram;
+import org.apache.tinkerpop.gremlin.process.AbstractGremlinProcessTest;
+import org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.ConnectedComponent;
+import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
+import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.junit.Test;
+
+import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData.MODERN;
+import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.bothE;
+import static org.junit.Assert.assertEquals;
+
+/**
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+public abstract class ConnectedComponentTest extends AbstractGremlinProcessTest {
+
+    public abstract Traversal<Vertex, Vertex> get_g_V_connectedComponent();
+
+    public abstract Traversal<Vertex, Vertex> get_g_V_hasLabelXsoftwareX_connectedComponent();
+
+    public abstract Traversal<Vertex, Vertex> get_g_V_connectedComponent_withXedges_bothEXknowsXX_withXpropertyName_clusterX();
+
+    @Test
+    @LoadGraphWith(MODERN)
+    public void g_V_connectedComponent() {
+        final Traversal<Vertex, Vertex> traversal = get_g_V_connectedComponent();
+        printTraversalForm(traversal);
+        int counter = 0;
+        while (traversal.hasNext()) {
+            final Vertex vertex = traversal.next();
+            counter++;
+            assertEquals("1", vertex.value(ConnectedComponentVertexProgram.COMPONENT));
+        }
+        assertEquals(6, counter);
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
+    public void g_V_hasLabelXsoftwareX_connectedComponent() {
+        final Traversal<Vertex, Vertex> traversal = get_g_V_hasLabelXsoftwareX_connectedComponent();
+        printTraversalForm(traversal);
+        int counter = 0;
+        while (traversal.hasNext()) {
+            final Vertex vertex = traversal.next();
+            final String name = vertex.value("name");
+            switch (name) {
+                case "lop":
+                case "ripple":
+                    assertEquals("3", vertex.value(ConnectedComponentVertexProgram.COMPONENT));
+                    break;
+            }
+            counter++;
+        }
+        assertEquals(2, counter);
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
+    public void g_V_connectedComponent_withXEDGES_bothEXknowsXX_withXPROPERTY_NAME_clusterX() {
+        final Traversal<Vertex, Vertex> traversal = get_g_V_connectedComponent_withXedges_bothEXknowsXX_withXpropertyName_clusterX();
+        printTraversalForm(traversal);
+        int counter = 0;
+        while (traversal.hasNext()) {
+            final Vertex vertex = traversal.next();
+            final String name = vertex.value("name");
+            switch (name) {
+                case "marko":
+                case "vadas":
+                case "josh":
+                    assertEquals("1", vertex.value("cluster"));
+                    break;
+                case "peter":
+                    assertEquals("6", vertex.value("cluster"));
+                    break;
+            }
+            counter++;
+        }
+        assertEquals(4, counter);
+    }
+
+    public static class Traversals extends ConnectedComponentTest {
+        @Override
+        public Traversal<Vertex, Vertex> get_g_V_connectedComponent() {
+            return g.V().connectedComponent();
+        }
+
+        @Override
+        public Traversal<Vertex, Vertex> get_g_V_hasLabelXsoftwareX_connectedComponent() {
+            return g.V().hasLabel("software").connectedComponent();
+        }
+        @Override
+        public Traversal<Vertex, Vertex> get_g_V_connectedComponent_withXedges_bothEXknowsXX_withXpropertyName_clusterX() {
+            return g.V().hasLabel("person").connectedComponent().with(ConnectedComponent.edges, bothE("knows")).with(ConnectedComponent.propertyName, "cluster");
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0acceb90/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkHadoopGraphProvider.java
----------------------------------------------------------------------
diff --git a/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkHadoopGraphProvider.java b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkHadoopGraphProvider.java
index c778c6d..2f727c8 100644
--- a/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkHadoopGraphProvider.java
+++ b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkHadoopGraphProvider.java
@@ -39,6 +39,7 @@ import org.apache.tinkerpop.gremlin.process.computer.Computer;
 import org.apache.tinkerpop.gremlin.process.computer.GraphComputer;
 import org.apache.tinkerpop.gremlin.process.computer.util.ComputerGraph;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.ConnectedComponentTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.PageRankTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.PeerPressureTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.ProgramTest;
@@ -115,6 +116,7 @@ public class SparkHadoopGraphProvider extends AbstractFileGraphProvider {
         if (null != loadGraphWith &&
                 !test.equals(ProgramTest.Traversals.class) &&
                 !test.equals(PageRankTest.Traversals.class) &&
+                !test.equals(ConnectedComponentTest.Traversals.class) &&
                 !test.equals(PeerPressureTest.Traversals.class) &&
                 !test.equals(FileSystemStorageCheck.class) &&
                 !testMethodName.equals("shouldSupportJobChaining") &&  // GraphComputerTest.shouldSupportJobChaining


[31/50] tinkerpop git commit: TINKERPOP-1976 Minor refactoring and test message improvement

Posted by sp...@apache.org.
TINKERPOP-1976 Minor refactoring and test message improvement


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

Branch: refs/heads/TINKERPOP-1967
Commit: c03b575fe27f8e917f705e593e66250962dcfdf4
Parents: f7ccb67
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Sat Aug 4 06:01:53 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Aug 9 07:28:09 2018 -0400

----------------------------------------------------------------------
 .../io/graphson/TraversalSerializersV2d0.java         |  4 ----
 .../gremlin/process/AbstractGremlinProcessTest.java   | 14 +++++++-------
 2 files changed, 7 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c03b575f/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/TraversalSerializersV2d0.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/TraversalSerializersV2d0.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/TraversalSerializersV2d0.java
index 040fd1d..2a07723 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/TraversalSerializersV2d0.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/TraversalSerializersV2d0.java
@@ -37,18 +37,14 @@ import org.apache.tinkerpop.shaded.jackson.core.JsonParser;
 import org.apache.tinkerpop.shaded.jackson.core.JsonProcessingException;
 import org.apache.tinkerpop.shaded.jackson.core.JsonToken;
 import org.apache.tinkerpop.shaded.jackson.databind.DeserializationContext;
-import org.apache.tinkerpop.shaded.jackson.databind.JavaType;
-import org.apache.tinkerpop.shaded.jackson.databind.JsonNode;
 import org.apache.tinkerpop.shaded.jackson.databind.SerializerProvider;
 import org.apache.tinkerpop.shaded.jackson.databind.deser.std.StdDeserializer;
 import org.apache.tinkerpop.shaded.jackson.databind.jsontype.TypeSerializer;
 import org.apache.tinkerpop.shaded.jackson.databind.ser.std.StdScalarSerializer;
 import org.apache.tinkerpop.shaded.jackson.databind.ser.std.StdSerializer;
-import org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory;
 
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collection;
 import java.util.List;
 import java.util.Map;

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c03b575f/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/AbstractGremlinProcessTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/AbstractGremlinProcessTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/AbstractGremlinProcessTest.java
index 9dbf261..96dee1d 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/AbstractGremlinProcessTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/AbstractGremlinProcessTest.java
@@ -30,6 +30,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import java.util.ArrayList;
+import java.util.Comparator;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -40,7 +41,6 @@ import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.core.Is.is;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
 import static org.junit.Assume.assumeTrue;
 
 /**
@@ -81,7 +81,7 @@ public abstract class AbstractGremlinProcessTest extends AbstractGremlinTest {
             final String methodName = testName.contains("[") ? testName.substring(0, testName.indexOf('[')) : testName;
             final IgnoreEngine ignoreEngine = this.getClass().getMethod(methodName).getAnnotation(IgnoreEngine.class);
             if (ignoreEngine != null)
-                assumeTrue(String.format("This test is ignored for %s", ignoreEngine.value()), !ignoreEngine.value().equals(GraphManager.getTraversalEngineType()));
+                assumeTrue(String.format("%s.%s is ignored for %s", this.getClass().getName(), testName, ignoreEngine.value()), !ignoreEngine.value().equals(GraphManager.getTraversalEngineType()));
         } catch (NoSuchMethodException nsme) {
             // some tests are parameterized
             throw new RuntimeException(String.format("Could not find test method %s in test case %s", name.getMethodName(), this.getClass().getName()));
@@ -128,7 +128,7 @@ public abstract class AbstractGremlinProcessTest extends AbstractGremlinTest {
 
         for (T t : results) {
             if (t instanceof Map) {
-                assertThat("Checking map result existence: " + t, expectedResults.stream().filter(e -> e instanceof Map).filter(e -> internalCheckMap((Map) e, (Map) t)).findAny().isPresent(), is(true));
+                assertThat("Checking map result existence: " + t, expectedResults.stream().filter(e -> e instanceof Map).anyMatch(e -> internalCheckMap((Map) e, (Map) t)), is(true));
             } else {
                 assertThat("Checking result existence: " + t, expectedResults.contains(t), is(true));
             }
@@ -153,8 +153,8 @@ public abstract class AbstractGremlinProcessTest extends AbstractGremlinTest {
     }
 
     public static <A, B> void checkMap(final Map<A, B> expectedMap, final Map<A, B> actualMap) {
-        final List<Map.Entry<A, B>> actualList = actualMap.entrySet().stream().sorted((a, b) -> a.getKey().toString().compareTo(b.getKey().toString())).collect(Collectors.toList());
-        final List<Map.Entry<A, B>> expectedList = expectedMap.entrySet().stream().sorted((a, b) -> a.getKey().toString().compareTo(b.getKey().toString())).collect(Collectors.toList());
+        final List<Map.Entry<A, B>> actualList = actualMap.entrySet().stream().sorted(Comparator.comparing(a -> a.getKey().toString())).collect(Collectors.toList());
+        final List<Map.Entry<A, B>> expectedList = expectedMap.entrySet().stream().sorted(Comparator.comparing(a -> a.getKey().toString())).collect(Collectors.toList());
         assertEquals(expectedList.size(), actualList.size());
         for (int i = 0; i < actualList.size(); i++) {
             assertEquals(expectedList.get(i).getKey(), actualList.get(i).getKey());
@@ -163,8 +163,8 @@ public abstract class AbstractGremlinProcessTest extends AbstractGremlinTest {
     }
 
     private static <A, B> boolean internalCheckMap(final Map<A, B> expectedMap, final Map<A, B> actualMap) {
-        final List<Map.Entry<A, B>> actualList = actualMap.entrySet().stream().sorted((a, b) -> a.getKey().toString().compareTo(b.getKey().toString())).collect(Collectors.toList());
-        final List<Map.Entry<A, B>> expectedList = expectedMap.entrySet().stream().sorted((a, b) -> a.getKey().toString().compareTo(b.getKey().toString())).collect(Collectors.toList());
+        final List<Map.Entry<A, B>> actualList = actualMap.entrySet().stream().sorted(Comparator.comparing(a -> a.getKey().toString())).collect(Collectors.toList());
+        final List<Map.Entry<A, B>> expectedList = expectedMap.entrySet().stream().sorted(Comparator.comparing(a -> a.getKey().toString())).collect(Collectors.toList());
 
         if (expectedList.size() != actualList.size()) {
             return false;


[44/50] tinkerpop git commit: Merged vtslab recipe for connected components

Posted by sp...@apache.org.
Merged vtslab recipe for connected components


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

Branch: refs/heads/TINKERPOP-1967
Commit: 002560a5d9584119d5a5af7f874d110583390741
Parents: 0acceb9
Author: HadoopMarc <vt...@xs4all.nl>
Authored: Mon May 21 14:03:54 2018 +0200
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Aug 9 10:54:41 2018 -0400

----------------------------------------------------------------------
 docs/src/recipes/connected-components.asciidoc | 123 +++++++++++++-------
 1 file changed, 83 insertions(+), 40 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/002560a5/docs/src/recipes/connected-components.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/recipes/connected-components.asciidoc b/docs/src/recipes/connected-components.asciidoc
index 70abdbd..edbeec5 100644
--- a/docs/src/recipes/connected-components.asciidoc
+++ b/docs/src/recipes/connected-components.asciidoc
@@ -14,17 +14,31 @@ 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.
 ////
+
+// @author Daniel Kuppitz (anwer on gremlin user list)
+// @author Robert Dale (answer on gremlin user list)
+// @author Marc de Lignie
+
 [[connected-components]]
 == Connected Components
 
 Gremlin can be used to find link:https://en.wikipedia.org/wiki/Connected_component_(graph_theory)[connected components]
-in a graph. As of TinkerPop 3.4.0, the process has been simplified to the `connectedComponent()`-step which is
-described in more detail in the link:
-link:http://tinkerpop.apache.org/docs/x.y.z/reference/#connectedcomponent-step[Reference Documentation].
+in a graph. In a directed graph like in TinkerPop, components can be weakly or strongly connected. This recipe is
+restricted to finding link:https://en.wikipedia.org/wiki/Directed_graph#Directed_graph_connectivity[weakly
+connected components], in which the direction of edges is not taken into account.
+
+Depending on the size of the graph, three solution regimes can be discriminated:
+
+1. Small graphs that fit in the memory of a single machine
+
+2. Medium graphs backed by storage for which a linear scan is still feasible. This regime is left to third party
+TinkerPop implementations, since TinkerPop itself has no storage-backed reference implementations. The idea is that
+component membership is stored in the graph, rather than in memory.
 
-The `connectedComponent()`-step replaces the original recipe described below from earlier versions of TinkerPop,
-however the algorithm from that old recipe remains interesting for educational purposes and has thus not been removed.
-The original recipe considers the following graph which has three connected components:
+3. Large graphs requiring an OLAP approach to yield results in a reasonable time.
+
+
+These regimes are discussed separately using the following graph with three weakly connected components:
 
 image:connected-components.png[width=600]
 
@@ -41,46 +55,75 @@ g.addV().property(id, "A").as("a").
   addE("link").from("d").to("e").iterate()
 ----
 
-One way to detect the various subgraphs would be to do something like this:
+
+===== Small graphs
+
+Connected components in a small graph can be determined with both an OLTP traversal and the OLAP
+`connectedComponent()`-step. The `connectedComponent()`-step is available as of TinkerPop 3.4.0 and is
+described in more detail in the
+link:http://tinkerpop.apache.org/docs/x.y.z/reference/#connectedcomponent-step[Reference Documentation].
+
+A straightforward way to detect the various subgraphs with an OLTP traversal is to do this:
 
 [gremlin-groovy,existing]
 ----
-g.V().emit(cyclicPath().or().not(both())).repeat(both()).until(cyclicPath()).  <1>
-  path().aggregate("p").                                                       <2>
-  unfold().dedup().                                                            <3>
-  map(__.as("v").select("p").unfold().                                         <4>
-         filter(unfold().where(eq("v"))).
-         unfold().dedup().order().by(id).fold()).
-  dedup()                                                                      <5>
+g.V().emit(cyclicPath().or().not(both())).                                    <1>
+    repeat(__.where(without('a')).store('a').both()).until(cyclicPath()).     <2>
+    group().by(path().unfold().limit(1)).                                     <3>
+    by(path().unfold().dedup().fold()).                                       <4>
+    select(values).unfold()                                                   <5>
 ----
 
-<1> Iterate all vertices and repeatedly traverse over both incoming and outgoing edges (TinkerPop doesn't support
-unidirectional graphs directly so it must be simulated by ignoring the direction with `both`). Note the use of `emit`
-prior to `repeat` as this allows for return of a single length path.
-<2> Aggregate the `path()` of the emitted vertices to "p". It is within these paths that the list of connected
-components will be identified. Obviously the paths list are duplicative in the sense that they contains different
-paths traveled over the same vertices.
-<3> Unroll the elements in the path list with `unfold` and `dedup`.
-<4> Use the first vertex in each path to filter against the paths stored in "p". When a path is found that has the
-vertex in it, dedup the vertices in the path, order it by the identifier. Each path output from this `map` step
-represents a connected component.
-<5> The connected component list is duplicative given the nature of the paths in "p", but now that the vertices within
-the paths are ordered, a final `dedup` will make the list of connective components unique.
-
-NOTE: This is a nice example of where running smaller pieces of a large Gremlin statement make it easier to see what
-is happening at each step. Consider running this example one line at a time (or perhaps even in a step at a time) to
-see the output at each point.
-
-While the above approach returns results nicely, the traversal doesn't appear to work with OLAP. A less efficient
-approach, but one more suited for OLAP execution looks quite similar but does not use `dedup` as heavily (thus
-`GraphComputer` is forced to analyze far more paths):
+<1> The initial emit() step allows for output of isolated vertices, in addition to the discovery of
+components as described in (2).
+
+<2> The entire component to which the first returned vertex belongs, is visited. To allow for components of any
+structure, a repeat loop is applied that only stops for a particular branch of the component when it detects a cyclic
+path.  Collection `'a'` is used to keep track of visited vertices, for both subtraversals within a component
+and new traversals resulting from the `g.V()` linear scan.
+
+<3> While `'a'` nicely keeps track of vertices already visited, the actual components need to be extracted from the
+path information of surviving traversers. The `path().unfold().limit(1)` closure provides the starting vertex
+of surviving traversers, which can be used to group the components.
+
+<4> This clause collects the unique vertices from all paths with the same starting vertex, thus from the same
+weak component.
+
+<5> The values of the groupby map contain the lists of vertices making up the requested components.
+
+This algorithm completes in linear time with the number of vertices and edges, because a traversal is started for each
+vertex and each edge with its associated out-vertex is visited exactly once.
+
+
+==== Large graphs
+
+Large graphs require an OLAP solution with a custom VertexProgram that can be run using a graph implementation's
+GraphComputer, in particular `SparkGraphComputer` on a `HadoopGraph`. The OLAP solution also runs faster for most
+medium-sized graphs, that is when these graph have a 'natural' structure with a limited maximum path length.
+
+The TinkerPop library of vertex programs contains the `WeakComponentsVertexProgram` which can be run in the same
+way as the link:http://tinkerpop.apache.org/docs/x.y.z/reference/#peerpressurevertexprogram[PeerPressureVertexProgram]:
 
 [gremlin-groovy,existing]
 ----
-g.withComputer().V().emit(cyclicPath().or().not(both())).repeat(both()).until(cyclicPath()).
-  aggregate("p").by(path()).cap("p").unfold().limit(local, 1).
-  map(__.as("v").select("p").unfold().
-         filter(unfold().where(eq("v"))).
-         unfold().dedup().order().by(id).fold()
-  ).toSet()
+result = g.getGraph().compute().
+    program(WeakComponentsVertexProgram.build().maxIterations(100).create()).
+    mapReduce(ClusterPopulationMapReduce.build().create()).
+    mapReduce(ClusterCountMapReduce.build().create()).
+    submit().get()
+result.memory().clusterPopulation
+gResult = result.graph().traversal()
+gResult.V().valueMap(true)
 ----
+
+The vertex program has interconnected vertices exchange id's and store the lowest id until no vertex receives a
+lower id. This algorithm is commonly applied in
+link:https://en.wikipedia.org/wiki/Bulk_synchronous_parallel[bulk synchronous parallel] systems, e.g. in
+link:https://spark.apache.org/graphx[Apache Spark GraphX].
+
+==== Scalability
+
+ToDo:
+ - limits and run time regime 1
+ - test of friendster graph regime 3
+ - discuss: link:http://www.vldb.org/pvldb/vol7/p1821-yan.pdf[http://www.vldb.org/pvldb/vol7/p1821-yan.pdf]
\ No newline at end of file


[09/50] tinkerpop git commit: TINKERPOP-2016 Bumped to Jackson 2.9.6

Posted by sp...@apache.org.
TINKERPOP-2016 Bumped to Jackson 2.9.6


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

Branch: refs/heads/TINKERPOP-1967
Commit: 1829318f6bfce1bc360818c6a0c34492fa69ec9a
Parents: 7fce137
Author: Robert Dale <ro...@gmail.com>
Authored: Wed Aug 1 20:02:14 2018 -0400
Committer: Robert Dale <ro...@gmail.com>
Committed: Wed Aug 1 20:02:14 2018 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc     | 1 +
 gremlin-shaded/pom.xml | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1829318f/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index b6e85ce..8137b45 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -44,6 +44,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 * Added concrete configuration methods to `SparkGraphComputer` to make a more clear API for configuring it.
 * Fixed a bug in `TinkerGraphCountStrategy`, which didn't consider that certain map steps may not emit an element.
 * Fixed a bug in JavaScript GLV where DriverRemoteConnection close() method didn't returned a Promise instance.
+* Bumped to Jackson 2.9.6.
 
 [[release-3-2-9]]
 === TinkerPop 3.2.9 (Release Date: May 8, 2018)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1829318f/gremlin-shaded/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-shaded/pom.xml b/gremlin-shaded/pom.xml
index 192262d..3f41b30 100644
--- a/gremlin-shaded/pom.xml
+++ b/gremlin-shaded/pom.xml
@@ -49,8 +49,8 @@ limitations under the License.
         <dependency>
             <groupId>com.fasterxml.jackson.core</groupId>
             <artifactId>jackson-databind</artifactId>
-            <!-- Update the shade plugin config whenever you change this version -->
-            <version>2.9.4</version>
+            <!-- Update the shade plugin config whenever you change this version; update what exactly? -->
+            <version>2.9.6</version>
             <optional>true</optional>
         </dependency>
     </dependencies>


[43/50] tinkerpop git commit: TINKERPOP-1967 Added a test for regressions on halted traversers

Posted by sp...@apache.org.
TINKERPOP-1967 Added a test for regressions on halted traversers


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

Branch: refs/heads/TINKERPOP-1967
Commit: 0eb6cb1a0d7df0790cb5c2f82a792cd80bef6f3f
Parents: dd7fc26
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Jul 30 14:13:33 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Aug 9 10:54:41 2018 -0400

----------------------------------------------------------------------
 .../step/map/ConnectedComponentTest.java        | 21 ++++++++++++++++++++
 1 file changed, 21 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0eb6cb1a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ConnectedComponentTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ConnectedComponentTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ConnectedComponentTest.java
index 8b1904f..3133382 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ConnectedComponentTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ConnectedComponentTest.java
@@ -39,6 +39,8 @@ public abstract class ConnectedComponentTest extends AbstractGremlinProcessTest
 
     public abstract Traversal<Vertex, Vertex> get_g_V_hasLabelXsoftwareX_connectedComponent();
 
+    public abstract Traversal<Vertex, Vertex> get_g_V_dedup_connectedComponent();
+
     public abstract Traversal<Vertex, Vertex> get_g_V_connectedComponent_withXedges_bothEXknowsXX_withXpropertyName_clusterX();
 
     @Test
@@ -57,6 +59,20 @@ public abstract class ConnectedComponentTest extends AbstractGremlinProcessTest
 
     @Test
     @LoadGraphWith(MODERN)
+    public void g_V_dedup_connectedComponent() {
+        final Traversal<Vertex, Vertex> traversal = get_g_V_dedup_connectedComponent();
+        printTraversalForm(traversal);
+        int counter = 0;
+        while (traversal.hasNext()) {
+            final Vertex vertex = traversal.next();
+            counter++;
+            assertEquals("1", vertex.value(ConnectedComponentVertexProgram.COMPONENT));
+        }
+        assertEquals(6, counter);
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
     public void g_V_hasLabelXsoftwareX_connectedComponent() {
         final Traversal<Vertex, Vertex> traversal = get_g_V_hasLabelXsoftwareX_connectedComponent();
         printTraversalForm(traversal);
@@ -106,6 +122,11 @@ public abstract class ConnectedComponentTest extends AbstractGremlinProcessTest
         }
 
         @Override
+        public Traversal<Vertex, Vertex> get_g_V_dedup_connectedComponent() {
+            return g.V().dedup().connectedComponent();
+        }
+
+        @Override
         public Traversal<Vertex, Vertex> get_g_V_hasLabelXsoftwareX_connectedComponent() {
             return g.V().hasLabel("software").connectedComponent();
         }


[49/50] tinkerpop git commit: TINKERPOP-1967 fixed up halted traversers

Posted by sp...@apache.org.
TINKERPOP-1967 fixed up halted traversers


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

Branch: refs/heads/TINKERPOP-1967
Commit: b2cb187470794bfca352c8a9c7d0c444d102e46b
Parents: 8954c27
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Jul 30 10:51:35 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Aug 9 10:54:41 2018 -0400

----------------------------------------------------------------------
 .../ConnectedComponentVertexProgram.java        | 42 +++++++++++++++-----
 .../ConnectedComponentVertexProgramStep.java    | 26 ++++++++++--
 .../step/map/ConnectedComponentTest.java        |  2 +-
 3 files changed, 57 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b2cb1874/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/clustering/connected/ConnectedComponentVertexProgram.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/clustering/connected/ConnectedComponentVertexProgram.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/clustering/connected/ConnectedComponentVertexProgram.java
index de718f1..82907eb 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/clustering/connected/ConnectedComponentVertexProgram.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/clustering/connected/ConnectedComponentVertexProgram.java
@@ -32,7 +32,10 @@ import org.apache.tinkerpop.gremlin.process.computer.traversal.TraversalVertexPr
 import org.apache.tinkerpop.gremlin.process.computer.util.AbstractVertexProgramBuilder;
 import org.apache.tinkerpop.gremlin.process.traversal.Operator;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
+import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
+import org.apache.tinkerpop.gremlin.process.traversal.traverser.util.IndexedTraverserSet;
+import org.apache.tinkerpop.gremlin.process.traversal.traverser.util.TraverserSet;
 import org.apache.tinkerpop.gremlin.process.traversal.util.PureTraversal;
 import org.apache.tinkerpop.gremlin.structure.Direction;
 import org.apache.tinkerpop.gremlin.structure.Edge;
@@ -40,6 +43,8 @@ import org.apache.tinkerpop.gremlin.structure.Graph;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.apache.tinkerpop.gremlin.structure.VertexProperty;
 
+import java.util.Arrays;
+import java.util.Collection;
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.Iterator;
@@ -61,12 +66,14 @@ public class ConnectedComponentVertexProgram implements VertexProgram<String> {
     private static final String VOTE_TO_HALT = "gremlin.connectedComponentVertexProgram.voteToHalt";
 
     private static final Set<MemoryComputeKey> MEMORY_COMPUTE_KEYS = Collections.singleton(MemoryComputeKey.of(VOTE_TO_HALT, Operator.and, false, true));
+
     private MessageScope.Local<?> scope = MessageScope.Local.of(__::bothE);
     private Set<MessageScope> scopes;
     private String property = COMPONENT;
-    private boolean hasHalted = false;
     private PureTraversal<Vertex, Edge> edgeTraversal = null;
     private Configuration configuration;
+    private TraverserSet<Vertex> haltedTraversers;
+    private IndexedTraverserSet<Vertex, Vertex> haltedTraversersIndex;
 
     private ConnectedComponentVertexProgram() {}
 
@@ -85,7 +92,12 @@ public class ConnectedComponentVertexProgram implements VertexProgram<String> {
         scopes = new HashSet<>(Collections.singletonList(scope));
 
         this.property = configuration.getString(PROPERTY, COMPONENT);
-        this.hasHalted = configuration.getBoolean(HAS_HALTED, false);
+
+        this.haltedTraversers = TraversalVertexProgram.loadHaltedTraversers(configuration);
+        this.haltedTraversersIndex = new IndexedTraverserSet<>(v -> v);
+        for (final Traverser.Admin<Vertex> traverser : this.haltedTraversers) {
+            this.haltedTraversersIndex.add(traverser.split());
+        }
     }
 
     @Override
@@ -104,6 +116,8 @@ public class ConnectedComponentVertexProgram implements VertexProgram<String> {
     @Override
     public void execute(final Vertex vertex, final Messenger<String> messenger, final Memory memory) {
         if (memory.isInitialIteration()) {
+            copyHaltedTraversersFromMemory(vertex);
+
             // on the first pass, just initialize the component to its own id then pass it to all adjacent vertices
             // for evaluation
             vertex.property(VertexProperty.Cardinality.single, property, vertex.id().toString());
@@ -113,7 +127,7 @@ public class ConnectedComponentVertexProgram implements VertexProgram<String> {
             // halting traversers. only want to send messages from traversers that are still hanging about after
             // the filter. the unfiltered vertices can only react to messages sent to them. of course, this can
             // lead to weirdness in results. 
-            if (vertex.edges(Direction.BOTH).hasNext() && !(hasHalted && !vertex.property(TraversalVertexProgram.HALTED_TRAVERSERS).isPresent())) {
+            if (vertex.edges(Direction.BOTH).hasNext()) {
                 // since there was message passing we don't want to halt on the first round. this should only trigger
                 // a single pass finish if the graph is completely disconnected (technically, it won't even really
                 // work in cases where halted traversers come into play
@@ -148,7 +162,9 @@ public class ConnectedComponentVertexProgram implements VertexProgram<String> {
 
     @Override
     public Set<VertexComputeKey> getVertexComputeKeys() {
-        return new HashSet<>(Collections.singletonList(VertexComputeKey.of(property, false)));
+        return new HashSet<>(Arrays.asList(
+                VertexComputeKey.of(property, false),
+                VertexComputeKey.of(TraversalVertexProgram.HALTED_TRAVERSERS, false)));
     }
 
     @Override
@@ -158,6 +174,10 @@ public class ConnectedComponentVertexProgram implements VertexProgram<String> {
 
     @Override
     public boolean terminate(final Memory memory) {
+        if (memory.isInitialIteration() && this.haltedTraversersIndex != null) {
+            this.haltedTraversersIndex.clear();
+        }
+
         final boolean voteToHalt = memory.<Boolean>get(VOTE_TO_HALT);
         if (voteToHalt) {
             return true;
@@ -206,6 +226,15 @@ public class ConnectedComponentVertexProgram implements VertexProgram<String> {
         };
     }
 
+    private void copyHaltedTraversersFromMemory(final Vertex vertex) {
+        final Collection<Traverser.Admin<Vertex>> traversers = this.haltedTraversersIndex.get(vertex);
+        if (traversers != null) {
+            final TraverserSet<Vertex> newHaltedTraversers = new TraverserSet<>();
+            newHaltedTraversers.addAll(traversers);
+            vertex.property(VertexProperty.Cardinality.single, TraversalVertexProgram.HALTED_TRAVERSERS, newHaltedTraversers);
+        }
+    }
+
     public static ConnectedComponentVertexProgram.Builder build() {
         return new ConnectedComponentVertexProgram.Builder();
     }
@@ -216,11 +245,6 @@ public class ConnectedComponentVertexProgram implements VertexProgram<String> {
             super(ConnectedComponentVertexProgram.class);
         }
 
-        public ConnectedComponentVertexProgram.Builder hasHalted(final boolean hasHalted) {
-            this.configuration.setProperty(HAS_HALTED, hasHalted);
-            return this;
-        }
-
         public ConnectedComponentVertexProgram.Builder edges(final Traversal.Admin<Vertex, Edge> edgeTraversal) {
             PureTraversal.storeState(this.configuration, EDGE_TRAVERSAL, edgeTraversal);
             return this;

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b2cb1874/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/ConnectedComponentVertexProgramStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/ConnectedComponentVertexProgramStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/ConnectedComponentVertexProgramStep.java
index edeb497..c222cfa 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/ConnectedComponentVertexProgramStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/ConnectedComponentVertexProgramStep.java
@@ -29,11 +29,16 @@ import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
 import org.apache.tinkerpop.gremlin.process.traversal.step.Configuring;
 import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent;
 import org.apache.tinkerpop.gremlin.process.traversal.step.util.Parameters;
+import org.apache.tinkerpop.gremlin.process.traversal.traverser.util.TraverserSet;
 import org.apache.tinkerpop.gremlin.process.traversal.util.PureTraversal;
 import org.apache.tinkerpop.gremlin.structure.Edge;
 import org.apache.tinkerpop.gremlin.structure.Graph;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.apache.tinkerpop.gremlin.structure.util.StringFactory;
+import org.apache.tinkerpop.gremlin.util.Serializer;
+
+import java.io.IOException;
+import java.util.Base64;
 
 /**
  * @author Stephen Mallette (http://stephen.genoprime.com)
@@ -84,10 +89,25 @@ public final class ConnectedComponentVertexProgramStep extends VertexProgramStep
     public ConnectedComponentVertexProgram generateProgram(final Graph graph, final Memory memory) {
         final Traversal.Admin<Vertex, Edge> detachedTraversal = this.edgeTraversal.getPure();
         detachedTraversal.setStrategies(TraversalStrategies.GlobalCache.getStrategies(graph.getClass()));
-        return ConnectedComponentVertexProgram.build().
-                hasHalted(memory.exists(TraversalVertexProgram.HALTED_TRAVERSERS)).
+
+        final ConnectedComponentVertexProgram.Builder builder = ConnectedComponentVertexProgram.build().
                 edges(detachedTraversal).
-                property(this.clusterProperty).create(graph);
+                property(this.clusterProperty);
+
+        if (memory.exists(TraversalVertexProgram.HALTED_TRAVERSERS)) {
+            final TraverserSet<?> haltedTraversers = memory.get(TraversalVertexProgram.HALTED_TRAVERSERS);
+            if (!haltedTraversers.isEmpty()) {
+                Object haltedTraversersValue;
+                try {
+                    haltedTraversersValue = Base64.getEncoder().encodeToString(Serializer.serializeObject(haltedTraversers));
+                } catch (final IOException ignored) {
+                    haltedTraversersValue = haltedTraversers;
+                }
+                builder.configure(TraversalVertexProgram.HALTED_TRAVERSERS, haltedTraversersValue);
+            }
+        }
+
+        return builder.create(graph);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b2cb1874/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ConnectedComponentTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ConnectedComponentTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ConnectedComponentTest.java
index 25e618a..8b1904f 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ConnectedComponentTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ConnectedComponentTest.java
@@ -67,7 +67,7 @@ public abstract class ConnectedComponentTest extends AbstractGremlinProcessTest
             switch (name) {
                 case "lop":
                 case "ripple":
-                    assertEquals("3", vertex.value(ConnectedComponentVertexProgram.COMPONENT));
+                    assertEquals("1", vertex.value(ConnectedComponentVertexProgram.COMPONENT));
                     break;
             }
             counter++;


[27/50] tinkerpop git commit: Updated changelog CTR

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


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

Branch: refs/heads/TINKERPOP-1967
Commit: 37476a2b46467c2d704cbef977225d8da3cddd64
Parents: 387cf69
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Aug 7 10:52:29 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Aug 7 10:52:29 2018 -0400

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


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/37476a2b/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 495abd7..f6413e2 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -23,6 +23,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 [[release-3-2-10]]
 === TinkerPop 3.2.10 (Release Date: NOT OFFICIALLY RELEASED YET)
 
+* Fixed problem with Gremlin Server sometimes returning an additional message after a failure.
 * Added an system error code for failed plugin installs for Gremlin Server `-i` option.
 * Match numbers in `choose()` options using `NumberHelper` (match values, ignore data type).
 * Added support for GraphSON serialization of `Date` in Javascript.


[36/50] tinkerpop git commit: TINKERPOP-1976 Added pageRank() test for GLVs

Posted by sp...@apache.org.
TINKERPOP-1976 Added pageRank() test for GLVs


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

Branch: refs/heads/TINKERPOP-1967
Commit: 85fbd7cd471a5f4276ba19fddb28f3f4d376e643
Parents: 682bdde
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Aug 7 08:53:32 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Aug 9 07:28:09 2018 -0400

----------------------------------------------------------------------
 .../ModernGraphTypeInformation.cs               |   3 +
 .../test/cucumber/feature-steps.js              |  11 +-
 .../glv/GraphTraversalSource.template           |   2 +-
 .../gremlin_python/process/graph_traversal.py   |   2 +-
 gremlin-test/features/map/PageRank.feature      | 142 +++++++++++++++++++
 .../gremlin/process/FeatureCoverageTest.java    |   3 +-
 6 files changed, 159 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/85fbd7cd/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/ModernGraphTypeInformation.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/ModernGraphTypeInformation.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/ModernGraphTypeInformation.cs
index 7489b44..75dd37c 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/ModernGraphTypeInformation.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/ModernGraphTypeInformation.cs
@@ -38,6 +38,9 @@ namespace Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation
             {"name", typeof(string)},
             {"lang", typeof(string)},
             {"weight", typeof(float)},
+            {"gremlin.pageRankVertexProgram.pageRank", typeof(double)},
+            {"friendRank", typeof(double)},
+            {"pageRank", typeof(double)},
             {"foo", typeof(object)}, // used when for invalid property key lookups
             {"friendWeight", typeof(float)},  // used in an AddVertex.feature test
             {"performances", typeof(int)} // grateful dead graph

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/85fbd7cd/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
----------------------------------------------------------------------
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
index 3976348..3f76052 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
@@ -55,12 +55,21 @@ const parsers = [
 
 const ignoreReason = {
   lambdaNotSupported: 'Lambdas are not supported on gremlin-javascript',
+  computerNotSupported: "withComputer() is not supported on gremlin-javascript",
   needsFurtherInvestigation: '',
 };
 
 const ignoredScenarios = {
   // An associative array containing the scenario name as key, for example:
-  // 'g_V_asXa_bX_out_asXcX_path_selectXkeysX': new IgnoreError(ignoreReason.embeddedListAssertion),
+  'g_V_pageRank': new IgnoreError(ignoreReason.computerNotSupported),
+  'g_V_outXcreatedX_pageRank_byXbothEX_byXprojectRankX_timesX0X_valueMapXname_projectRankX': new IgnoreError(ignoreReason.computerNotSupported),
+  'g_V_pageRank_order_byXpageRank_decrX_name': new IgnoreError(ignoreReason.computerNotSupported),
+  'g_V_pageRank_order_byXpageRank_decrX_name_limitX2X': new IgnoreError(ignoreReason.computerNotSupported),
+  'g_V_pageRank_byXoutEXknowsXX_byXfriendRankX_valueMapXname_friendRankX': new IgnoreError(ignoreReason.computerNotSupported),
+  'g_V_hasLabelXpersonX_pageRank_byXpageRankX_order_byXpageRankX_valueMapXname_pageRankX': new IgnoreError(ignoreReason.computerNotSupported),
+  'g_V_pageRank_byXpageRankX_asXaX_outXknowsX_pageRank_asXbX_selectXa_bX': new IgnoreError(ignoreReason.computerNotSupported),
+  'g_V_hasLabelXsoftwareX_hasXname_rippleX_pageRankX1X_byXinEXcreatedXX_timesX1X_byXpriorsX_inXcreatedX_unionXboth__identityX_valueMapXname_priorsX': new IgnoreError(ignoreReason.computerNotSupported),
+  'g_V_outXcreatedX_groupXmX_byXlabelX_pageRankX1X_byXpageRankX_byXinEX_timesX1X_inXcreatedX_groupXmX_byXpageRankX_capXmX': new IgnoreError(ignoreReason.computerNotSupported),
 };
 
 defineSupportCode(function(methods) {

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/85fbd7cd/gremlin-python/glv/GraphTraversalSource.template
----------------------------------------------------------------------
diff --git a/gremlin-python/glv/GraphTraversalSource.template b/gremlin-python/glv/GraphTraversalSource.template
index 54b339e..d7ef973 100644
--- a/gremlin-python/glv/GraphTraversalSource.template
+++ b/gremlin-python/glv/GraphTraversalSource.template
@@ -52,9 +52,9 @@ class GraphTraversalSource(object):
         source = self.get_graph_traversal_source()
         source.traversal_strategies.add_strategies([RemoteStrategy(remote_connection)])
         return source
+
     def withComputer(self,graph_computer=None, workers=None, result=None, persist=None, vertices=None, edges=None, configuration=None):
         return self.withStrategies(VertexProgramStrategy(graph_computer,workers,result,persist,vertices,edges,configuration))
-
 <% sourceSpawnMethods.each { method -> %>
     def <%= method %>(self, *args):
         traversal = self.get_graph_traversal()

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/85fbd7cd/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py b/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py
index b1056f0..b515e95 100644
--- a/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py
+++ b/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py
@@ -77,10 +77,10 @@ class GraphTraversalSource(object):
         source = self.get_graph_traversal_source()
         source.traversal_strategies.add_strategies([RemoteStrategy(remote_connection)])
         return source
+
     def withComputer(self,graph_computer=None, workers=None, result=None, persist=None, vertices=None, edges=None, configuration=None):
         return self.withStrategies(VertexProgramStrategy(graph_computer,workers,result,persist,vertices,edges,configuration))
 
-
     def E(self, *args):
         traversal = self.get_graph_traversal()
         traversal.bytecode.add_step("E", *args)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/85fbd7cd/gremlin-test/features/map/PageRank.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/map/PageRank.feature b/gremlin-test/features/map/PageRank.feature
new file mode 100644
index 0000000..76af1ed
--- /dev/null
+++ b/gremlin-test/features/map/PageRank.feature
@@ -0,0 +1,142 @@
+# 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.
+
+Feature: Step - pageRank()
+                
+  Scenario: g_V_pageRank
+    Given the modern graph
+    And the traversal of
+      """
+      g.withComputer().V().pageRank()
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | v[marko] |
+      | v[vadas] |
+      | v[lop] |
+      | v[josh] |
+      | v[ripple] |
+      | v[peter] |
+    And the graph should return 6 for count of "g.withComputer().V().pageRank().has(\"gremlin.pageRankVertexProgram.pageRank\")"
+
+  Scenario: g_V_outXcreatedX_pageRank_byXbothEX_byXprojectRankX_timesX0X_valueMapXname_projectRankX
+    Given the modern graph
+    And the traversal of
+      """
+      g.withComputer().V().out("created").pageRank().by(__.bothE()).by("projectRank").times(0).valueMap("name", "projectRank")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"name": ["lop"], "projectRank": [3.0]}] |
+      | m[{"name": ["lop"], "projectRank": [3.0]}] |
+      | m[{"name": ["lop"], "projectRank": [3.0]}] |
+      | m[{"name": ["ripple"], "projectRank": [1.0]}] |
+
+  Scenario: g_V_pageRank_order_byXpageRank_decrX_name
+    Given the modern graph
+    And the traversal of
+      """
+      g.withComputer().V().pageRank().order().by("gremlin.pageRankVertexProgram.pageRank", Order.decr).values("name")
+      """
+    When iterated to list
+    Then the result should be ordered
+      | result |
+      | lop    |
+      | ripple |
+      | vadas  |
+      | josh   |
+      | marko  |
+      | peter  |
+
+  Scenario: g_V_pageRank_order_byXpageRank_decrX_name_limitX2X
+    Given the modern graph
+    And the traversal of
+      """
+      g.withComputer().V().pageRank().order().by("gremlin.pageRankVertexProgram.pageRank", Order.decr).values("name").limit(2)
+      """
+    When iterated to list
+    Then the result should be ordered
+      | result |
+      | lop    |
+      | ripple |
+
+  Scenario: g_V_pageRank_byXoutEXknowsXX_byXfriendRankX_valueMapXname_friendRankX
+    Given the modern graph
+    And the traversal of
+      """
+      g.withComputer().V().pageRank().by(__.outE("knows")).by("friendRank").valueMap("name", "friendRank")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"name": ["marko"], "friendRank": [0.15000000000000002]}] |
+      | m[{"name": ["vadas"], "friendRank": [0.21375000000000002]}] |
+      | m[{"name": ["lop"], "friendRank": [0.15000000000000002]}] |
+      | m[{"name": ["josh"], "friendRank": [0.21375000000000002]}] |
+      | m[{"name": ["ripple"], "friendRank": [0.15000000000000002]}] |
+      | m[{"name": ["peter"], "friendRank": [0.15000000000000002]}] |
+
+  Scenario: g_V_hasLabelXpersonX_pageRank_byXpageRankX_order_byXpageRankX_valueMapXname_pageRankX
+    Given the modern graph
+    And the traversal of
+      """
+      g.withComputer().V().hasLabel("person").pageRank().by("pageRank").order().by("pageRank").valueMap("name", "pageRank")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"name": ["marko"], "pageRank": [0.15000000000000002]}] |
+      | m[{"name": ["vadas"], "pageRank": [0.19250000000000003]}] |
+      | m[{"name": ["josh"], "pageRank": [0.19250000000000003]}] |
+      | m[{"name": ["peter"], "pageRank": [0.15000000000000002]}] |
+
+  Scenario: g_V_pageRank_byXpageRankX_asXaX_outXknowsX_pageRank_asXbX_selectXa_bX
+    Given the modern graph
+    And the traversal of
+      """
+      g.withComputer().V().pageRank().by("pageRank").as("a").out("knows").values("pageRank").as("b").select("a", "b")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a": "v[marko]", "b": 0.19250000000000003}] |
+      | m[{"a": "v[marko]", "b": 0.19250000000000003}] |
+
+  Scenario: g_V_hasLabelXsoftwareX_hasXname_rippleX_pageRankX1X_byXinEXcreatedXX_timesX1X_byXpriorsX_inXcreatedX_unionXboth__identityX_valueMapXname_priorsX
+    Given the modern graph
+    And the traversal of
+      """
+      g.withComputer().V().hasLabel("software").has("name", "ripple").pageRank(1.0).by(__.inE("created")).times(1).by("priors").in("created").union(__.both(), __.identity()).valueMap("name", "priors")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"name": ["josh"], "priors": [1.0]}] |
+      | m[{"name": ["marko"], "priors": [0.0]}] |
+      | m[{"name": ["lop"], "priors": [0.0]}] |
+      | m[{"name": ["ripple"], "priors": [0.0]}] |
+
+  Scenario: g_V_outXcreatedX_groupXmX_byXlabelX_pageRankX1X_byXpageRankX_byXinEX_timesX1X_inXcreatedX_groupXmX_byXpageRankX_capXmX()
+    Given an unsupported test
+    Then nothing should happen because
+      """
+      The result returned is not supported under GraphSON 2.x and therefore cannot be properly asserted. More
+      specifically it has long keys which basically get toString()'d under GraphSON 2.x. This test can be supported
+      with GraphSON 3.x.
+      """

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/85fbd7cd/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java b/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
index 503df77..6a45d38 100644
--- a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
+++ b/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
@@ -53,6 +53,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.map.MaxTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.MeanTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.MinTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.OrderTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.PageRankTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.PathTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.ProjectTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.PropertiesTest;
@@ -140,7 +141,7 @@ public class FeatureCoverageTest {
                 MeanTest.class,
                 MinTest.class,
                 OrderTest.class,
-                //PageRankTest.class,
+                PageRankTest.class,
                 PathTest.class,
                 // PeerPressureTest.class,
                 // ProfileTest.class,


[22/50] tinkerpop git commit: Added a system error code for failed plugin installs to Gremlin Server CTR

Posted by sp...@apache.org.
Added a system error code for failed plugin installs to Gremlin Server CTR


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

Branch: refs/heads/TINKERPOP-1967
Commit: 2d315e828149a132ecabf406af91acc3caec064c
Parents: b98ff5e
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Aug 7 06:28:56 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Aug 7 06:30:08 2018 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                                                | 1 +
 .../tinkerpop/gremlin/server/util/GremlinServerInstall.java       | 3 +++
 2 files changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2d315e82/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 8137b45..495abd7 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -23,6 +23,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 [[release-3-2-10]]
 === TinkerPop 3.2.10 (Release Date: NOT OFFICIALLY RELEASED YET)
 
+* Added an system error code for failed plugin installs for Gremlin Server `-i` option.
 * Match numbers in `choose()` options using `NumberHelper` (match values, ignore data type).
 * Added support for GraphSON serialization of `Date` in Javascript.
 * Fixed bug in Java driver where an disorderly shutdown of the server would cause the client to hang.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2d315e82/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/GremlinServerInstall.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/GremlinServerInstall.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/GremlinServerInstall.java
index 03317d3..58532a0 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/GremlinServerInstall.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/GremlinServerInstall.java
@@ -23,6 +23,8 @@ import org.apache.tinkerpop.gremlin.groovy.util.DependencyGrabber;
 import groovy.lang.GroovyClassLoader;
 
 /**
+ * Command line installer for plugins to Gremlin Server.
+ *
  * @author Stephen Mallette (http://stephen.genoprime.com)
  */
 public class GremlinServerInstall {
@@ -39,6 +41,7 @@ public class GremlinServerInstall {
             } catch (Exception iae) {
                 System.out.println(String.format("Could not install the dependency: %s", iae.getMessage()));
                 iae.printStackTrace();
+                System.exit(1);
             }
 
         }


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

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


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

Branch: refs/heads/TINKERPOP-1967
Commit: 3e308f5226e6254122f782cb55571e0103f9a9ff
Parents: b779a2a b98ff5e
Author: Robert Dale <ro...@gmail.com>
Authored: Sat Aug 4 16:44:41 2018 -0400
Committer: Robert Dale <ro...@gmail.com>
Committed: Sat Aug 4 16:44:41 2018 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc     | 1 +
 gremlin-shaded/pom.xml | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


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

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3e308f52/gremlin-shaded/pom.xml
----------------------------------------------------------------------


[11/50] tinkerpop git commit: This closes #891

Posted by sp...@apache.org.
This closes #891


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

Branch: refs/heads/TINKERPOP-1967
Commit: 665daa7f28e677ad0da29301d981b2cb82709013
Parents: 8f1fe6d
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Sat Aug 4 06:06:44 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Sat Aug 4 06:06:44 2018 -0400

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

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



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

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


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

Branch: refs/heads/TINKERPOP-1967
Commit: 2cf551f089221f29e38627cf684fd89d6b3a3cea
Parents: 3e308f5 2d315e8
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Aug 7 06:30:22 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Aug 7 06:30:22 2018 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                                                | 1 +
 .../tinkerpop/gremlin/server/util/GremlinServerInstall.java       | 3 +++
 2 files changed, 4 insertions(+)
----------------------------------------------------------------------


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

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2cf551f0/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/GremlinServerInstall.java
----------------------------------------------------------------------


[37/50] tinkerpop git commit: TINKERPOP-1976 Added GLV test for peerPressure()

Posted by sp...@apache.org.
TINKERPOP-1976 Added GLV test for peerPressure()


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

Branch: refs/heads/TINKERPOP-1967
Commit: 0a5d8ceb6931e3ab2165cba8cd8414e8f4575ce9
Parents: 85fbd7c
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Aug 7 13:45:39 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Aug 9 07:28:09 2018 -0400

----------------------------------------------------------------------
 .../ModernGraphTypeInformation.cs               |  1 +
 .../test/cucumber/feature-steps.js              |  3 +
 gremlin-test/features/map/PeerPressure.feature  | 60 ++++++++++++++++++++
 .../gremlin/process/FeatureCoverageTest.java    |  3 +-
 4 files changed, 66 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0a5d8ceb/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/ModernGraphTypeInformation.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/ModernGraphTypeInformation.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/ModernGraphTypeInformation.cs
index 75dd37c..77ed4eb 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/ModernGraphTypeInformation.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/ModernGraphTypeInformation.cs
@@ -39,6 +39,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation
             {"lang", typeof(string)},
             {"weight", typeof(float)},
             {"gremlin.pageRankVertexProgram.pageRank", typeof(double)},
+            {"gremlin.peerPressureVertexProgram.cluster", typeof(int)},
             {"friendRank", typeof(double)},
             {"pageRank", typeof(double)},
             {"foo", typeof(object)}, // used when for invalid property key lookups

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0a5d8ceb/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
----------------------------------------------------------------------
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
index 3f76052..e585fcc 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
@@ -70,6 +70,9 @@ const ignoredScenarios = {
   'g_V_pageRank_byXpageRankX_asXaX_outXknowsX_pageRank_asXbX_selectXa_bX': new IgnoreError(ignoreReason.computerNotSupported),
   'g_V_hasLabelXsoftwareX_hasXname_rippleX_pageRankX1X_byXinEXcreatedXX_timesX1X_byXpriorsX_inXcreatedX_unionXboth__identityX_valueMapXname_priorsX': new IgnoreError(ignoreReason.computerNotSupported),
   'g_V_outXcreatedX_groupXmX_byXlabelX_pageRankX1X_byXpageRankX_byXinEX_timesX1X_inXcreatedX_groupXmX_byXpageRankX_capXmX': new IgnoreError(ignoreReason.computerNotSupported),
+  'g_V_peerPressure': new IgnoreError(ignoreReason.computerNotSupported),
+  'g_V_peerPressure_byXclusterX_byXoutEXknowsXX_pageRankX1X_byXrankX_byXoutEXknowsXX_timesX2X_group_byXclusterX_byXrank_sumX_limitX100X': new IgnoreError(ignoreReason.computerNotSupported),
+  'g_V_hasXname_rippleX_inXcreatedX_peerPressure_byXoutEX_byXclusterX_repeatXunionXidentity__bothX_timesX2X_dedup_valueMapXname_clusterX': new IgnoreError(ignoreReason.computerNotSupported),
 };
 
 defineSupportCode(function(methods) {

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0a5d8ceb/gremlin-test/features/map/PeerPressure.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/map/PeerPressure.feature b/gremlin-test/features/map/PeerPressure.feature
new file mode 100644
index 0000000..d23fa31
--- /dev/null
+++ b/gremlin-test/features/map/PeerPressure.feature
@@ -0,0 +1,60 @@
+# 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.
+
+Feature: Step - peerPressure()
+                
+  Scenario: g_V_peerPressure
+    Given the modern graph
+    And the traversal of
+      """
+      g.withComputer().V().peerPressure()
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | v[marko] |
+      | v[vadas] |
+      | v[lop] |
+      | v[josh] |
+      | v[ripple] |
+      | v[peter] |
+    And the graph should return 6 for count of "g.withComputer().V().peerPressure().has(\"gremlin.peerPressureVertexProgram.cluster\")"
+
+  Scenario: g_V_peerPressure_byXclusterX_byXoutEXknowsXX_pageRankX1X_byXrankX_byXoutEXknowsXX_timesX2X_group_byXclusterX_byXrank_sumX_limitX100X
+    Given an unsupported test
+    Then nothing should happen because
+      """
+      The result returned is not supported under GraphSON 2.x and therefore cannot be properly asserted. More
+      specifically it has long keys which basically get toString()'d under GraphSON 2.x. This test can be supported
+      with GraphSON 3.x.
+      """
+
+  Scenario: g_V_hasXname_rippleX_inXcreatedX_peerPressure_byXoutEX_byXclusterX_repeatXunionXidentity__bothX_timesX2X_dedup_valueMapXname_clusterX
+    Given the modern graph
+    And the traversal of
+      """
+      g.withComputer().V().has("name", "ripple").in("created").peerPressure().by(__.outE()).by("cluster").repeat(__.union(__.identity(), __.both())).times(2).dedup().valueMap("name", "cluster")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"name": ["marko"], "cluster": [1]}] |
+      | m[{"name": ["vadas"], "cluster": [2]}] |
+      | m[{"name": ["lop"], "cluster": [4]}] |
+      | m[{"name": ["josh"], "cluster": [4]}] |
+      | m[{"name": ["ripple"], "cluster": [4]}] |
+      | m[{"name": ["peter"], "cluster": [6]}] |

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0a5d8ceb/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java b/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
index 6a45d38..2cca50b 100644
--- a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
+++ b/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
@@ -55,6 +55,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.map.MinTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.OrderTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.PageRankTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.PathTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.PeerPressureTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.ProjectTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.PropertiesTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.SelectTest;
@@ -143,7 +144,7 @@ public class FeatureCoverageTest {
                 OrderTest.class,
                 PageRankTest.class,
                 PathTest.class,
-                // PeerPressureTest.class,
+                PeerPressureTest.class,
                 // ProfileTest.class,
                 // ProgramTest.class,
                 ProjectTest.class,


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

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


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

Branch: refs/heads/TINKERPOP-1967
Commit: 8af7837286c7eba82c831576a3291c77bfb727e9
Parents: dfe79c2 7fce137
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Wed Aug 1 11:27:04 2018 -0700
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Wed Aug 1 11:27:04 2018 -0700

----------------------------------------------------------------------
 docker/Dockerfile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------



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

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


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

Branch: refs/heads/TINKERPOP-1967
Commit: b779a2a3e26c2b5c9c961b083b0bc1a89ead6440
Parents: 8af7837 ce94738
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Sat Aug 4 06:28:10 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Sat Aug 4 06:28:10 2018 -0400

----------------------------------------------------------------------
 .../apache/tinkerpop/gremlin/driver/Client.java  | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)
----------------------------------------------------------------------



[42/50] tinkerpop git commit: TINKERPOP-1967 Minor text cleanup for connectedComponent() docs

Posted by sp...@apache.org.
TINKERPOP-1967 Minor text cleanup for connectedComponent() docs


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

Branch: refs/heads/TINKERPOP-1967
Commit: 16231d6ed9b6c5f00a6f28da6f03a96d664fcf99
Parents: a011964
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Jun 15 08:24:22 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Aug 9 10:54:41 2018 -0400

----------------------------------------------------------------------
 docs/src/recipes/connected-components.asciidoc | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/16231d6e/docs/src/recipes/connected-components.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/recipes/connected-components.asciidoc b/docs/src/recipes/connected-components.asciidoc
index 850c31f..e6d0f7a 100644
--- a/docs/src/recipes/connected-components.asciidoc
+++ b/docs/src/recipes/connected-components.asciidoc
@@ -37,7 +37,6 @@ component membership is stored in the graph, rather than in memory.
 
 3. Large graphs requiring an approach with `HadoopGraph` and `SparkGraphComputer` to yield results in a reasonable time.
 
-
 These regimes are discussed separately using the following graph with three weakly connected components:
 
 image:connected-components.png[width=600]
@@ -70,6 +69,7 @@ g.withComputer().V().connectedComponent().
 ----
 
 A straightforward way to detect the various subgraphs with an OLTP traversal is to do this:
+
 [gremlin-groovy,existing]
 ----
 g.V().emit(cyclicPath().or().not(both())).                                    <1>
@@ -95,8 +95,6 @@ weak component.
 
 <5> The values of the groupby map contain the lists of vertices making up the requested components.
 
-
-
 ==== Small graph scalability
 
 The scalability of the OLTP traversal and the `connectedComponent()`-step for in-memory graphs is shown in the figures
@@ -118,7 +116,6 @@ every cycle each vertex has to be checked for being
 pure depth-first-search or breadth-first-search implementations, connected-component algotithms should scale
 as [.big]##O##(V+E). For the traversals in the figure above this is almost the case.
 
-
 [[cc-scale-ratio]]
 .Run times for finding connected components in a randomly generated graph with 10 components, each consisting of 6400 vertices
 image::cc-scale-ratio.png[width=600]
@@ -130,7 +127,6 @@ characteristics show clearly from the graph. Indeed, for a given number of verti
 `connectedComponent()`-step does not depend on the number of edges, but rather on the maximum shortest path length in
 the graph.
 
-
 ==== Large graphs
 
 Large graphs in TinkerPop require distributed processing by `SparkGraphComputer` to get results in a reasonable time (OLAP
@@ -142,10 +138,8 @@ either with the `gremlin.hadoop.defaultGraphComputer` property or as part of the
 
 Scalability of the the `connectedComponent()`-step with `SparkGraphComputer` is high, but note that:
 
-* the graph should fit in the memory of the Spark cluster to allow the VertexProgram to run its cycles without spilling
-intermediate results to disk and loosing most of the gains from the distributed processing
-
-* as discussed for small graphs, the BSP algorithm does not play well with graphs having a large shortest path between
+* The graph should fit in the memory of the Spark cluster to allow the VertexProgram to run its cycles without spilling
+intermediate results to disk and loosing most of the gains from the distributed processing.
+* As discussed for small graphs, the BSP algorithm does not play well with graphs having a large shortest path between
 any pair of vertices. Overcoming this limitation is still a
-link:http://www.vldb.org/pvldb/vol7/p1821-yan.pdf[subject of academic research].
-
+link:http://www.vldb.org/pvldb/vol7/p1821-yan.pdf[subject of academic research].
\ No newline at end of file


[47/50] tinkerpop git commit: TINKERPOP-1967 Referenced TINKERPOP-1976 in OptOut for connectedComponent on RemoteGraph

Posted by sp...@apache.org.
TINKERPOP-1967 Referenced TINKERPOP-1976 in OptOut for connectedComponent on RemoteGraph


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

Branch: refs/heads/TINKERPOP-1967
Commit: dd7fc261fde9837bde954962b4e7777a57a01327
Parents: b2cb187
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Jul 30 11:22:25 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Aug 9 10:54:41 2018 -0400

----------------------------------------------------------------------
 .../org/apache/tinkerpop/gremlin/process/remote/RemoteGraph.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dd7fc261/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/RemoteGraph.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/RemoteGraph.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/RemoteGraph.java
index 9bc1771..bf59651 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/RemoteGraph.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/RemoteGraph.java
@@ -50,7 +50,7 @@ import java.util.Iterator;
 @Graph.OptOut(
         test = "org.apache.tinkerpop.gremlin.process.traversal.step.map.ConnectedComponentTest",
         method = "*",
-        reason = "hmmmm")
+        reason = "https://issues.apache.org/jira/browse/TINKERPOP-1976")
 @Graph.OptOut(
         test = "org.apache.tinkerpop.gremlin.process.traversal.CoreTraversalTest",
         method = "*",


[26/50] tinkerpop git commit: Merge branch 'pr-899' into tp32

Posted by sp...@apache.org.
Merge branch 'pr-899' into tp32


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

Branch: refs/heads/TINKERPOP-1967
Commit: 387cf69323b1ea0a7194033fe951db8f9e43b799
Parents: 2d315e8 fe9c26f
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Aug 7 10:51:23 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Aug 7 10:51:23 2018 -0400

----------------------------------------------------------------------
 .../driver/message/ResponseStatusCode.java      |   7 +
 .../driver/message/ResponseStatusCodeTest.java  |  36 +++++
 .../gremlin/server/ResponseHandlerContext.java  |  85 +++++++++++
 .../server/op/AbstractEvalOpProcessor.java      |  40 ++++--
 .../gremlin/server/op/AbstractOpProcessor.java  |  34 ++++-
 .../AbstractGremlinServerIntegrationTest.java   |  20 ++-
 .../server/GremlinServerIntegrateTest.java      |  51 +++++++
 .../server/ResponseHandlerContextTest.java      | 143 +++++++++++++++++++
 .../server/op/AbstractEvalOpProcessorTest.java  |  62 ++++++++
 .../server/op/AbstractOpProcessorTest.java      |  73 ++++++++++
 10 files changed, 535 insertions(+), 16 deletions(-)
----------------------------------------------------------------------



[45/50] tinkerpop git commit: TINKERPOP-1967 Added ConnectedComponentVertexProgram to core javadoc

Posted by sp...@apache.org.
TINKERPOP-1967 Added ConnectedComponentVertexProgram to core javadoc


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

Branch: refs/heads/TINKERPOP-1967
Commit: eb6a4de63ac62181d8237c0ad7ec5b3aa072e0b7
Parents: 0eb6cb1
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Aug 2 08:20:17 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Aug 9 10:54:41 2018 -0400

----------------------------------------------------------------------
 pom.xml | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/eb6a4de6/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 4badaa1..ea42197 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1262,6 +1262,9 @@ limitations under the License.
                                         <include>org/apache/tinkerpop/gremlin/process/computer/*.java
                                         </include>
                                         <include>
+                                            org/apache/tinkerpop/gremlin/process/computer/clustering/connected/ConnectedComponentVertexProgram.java
+                                        </include>
+                                        <include>
                                             org/apache/tinkerpop/gremlin/process/computer/clustering/peerpressure/PeerPressureVertexProgram.java
                                         </include>
                                         <include>


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

Posted by sp...@apache.org.
Merge branch 'tp33'

Conflicts:
	gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractOpProcessor.java


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

Branch: refs/heads/TINKERPOP-1967
Commit: 9357d6a1fd91cac4bd7149b94ed757399aa810a4
Parents: 1e8baec fa7a7f6
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Aug 7 12:54:18 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Aug 7 12:54:18 2018 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |   1 +
 .../driver/message/ResponseStatusCode.java      |   7 +
 .../driver/message/ResponseStatusCodeTest.java  |  36 +++++
 .../gremlin/server/ResponseHandlerContext.java  |  85 +++++++++++
 .../server/op/AbstractEvalOpProcessor.java      |  38 ++++-
 .../gremlin/server/op/AbstractOpProcessor.java  |  34 ++++-
 .../AbstractGremlinServerIntegrationTest.java   |  20 ++-
 .../server/GremlinServerIntegrateTest.java      |  51 +++++++
 .../server/ResponseHandlerContextTest.java      | 143 +++++++++++++++++++
 .../server/op/AbstractEvalOpProcessorTest.java  |  62 ++++++++
 .../server/op/AbstractOpProcessorTest.java      |  53 +++++++
 11 files changed, 515 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


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

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9357d6a1/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractOpProcessor.java
----------------------------------------------------------------------
diff --cc gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractOpProcessor.java
index bb368c5,38ca3e1..331b762
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractOpProcessor.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractOpProcessor.java
@@@ -66,8 -72,20 +67,20 @@@ public abstract class AbstractOpProcess
       *
       * @param context The Gremlin Server {@link Context} object containing settings, request message, etc.
       * @param itty The result to iterator
+      * @throws TimeoutException if the time taken to serialize the entire result set exceeds the allowable time.
+      * @see #handleIterator(ResponseHandlerContext, Iterator)
       */
 -    protected void handleIterator(final Context context, final Iterator itty) throws TimeoutException, InterruptedException {
 +    protected void handleIterator(final Context context, final Iterator itty) throws InterruptedException {
+         handleIterator(new ResponseHandlerContext(context), itty);
+     }
+ 
+     /**
+      * A variant of {@link #handleIterator(Context, Iterator)} that is suitable for use in situations when multiple
+      * threads may produce {@link ResponseStatusCode#isFinalResponse() final} response messages concurrently.
+      * @see #handleIterator(Context, Iterator)
+      */
 -    protected void handleIterator(final ResponseHandlerContext rhc, final Iterator itty) throws TimeoutException, InterruptedException {
++    protected void handleIterator(final ResponseHandlerContext rhc, final Iterator itty) throws InterruptedException {
+         final Context context = rhc.getContext();
          final ChannelHandlerContext ctx = context.getChannelHandlerContext();
          final RequestMessage msg = context.getRequestMessage();
          final Settings settings = context.getSettings();
@@@ -228,9 -261,32 +241,22 @@@
          return Collections.emptyMap();
      }
  
+     /**
 -     * @deprecated As of release 3.2.2, replaced by {@link #makeFrame(ChannelHandlerContext, RequestMessage, MessageSerializer, boolean, List, ResponseStatusCode, Map)}.
 -     */
 -    @Deprecated
 -    protected static Frame makeFrame(final ChannelHandlerContext ctx, final RequestMessage msg,
 -                                     final MessageSerializer serializer, final boolean useBinary, final List<Object> aggregate,
 -                                     final ResponseStatusCode code) throws Exception {
 -        return makeFrame(ctx, msg, serializer, useBinary, aggregate, code, Collections.emptyMap());
 -    }
 -
 -    /**
+      * Caution: {@link #makeFrame(ResponseHandlerContext, RequestMessage, MessageSerializer, boolean, List, ResponseStatusCode, Map)}
+      * should be used instead of this method whenever a {@link ResponseHandlerContext} is available.
+      */
      protected static Frame makeFrame(final ChannelHandlerContext ctx, final RequestMessage msg,
 -                                   final MessageSerializer serializer, final boolean useBinary, final List<Object> aggregate,
 -                                   final ResponseStatusCode code, final Map<String,Object> responseMetaData) throws Exception {
 +                                     final MessageSerializer serializer, final boolean useBinary, final List<Object> aggregate,
 +                                     final ResponseStatusCode code, final Map<String,Object> responseMetaData) throws Exception {
+         final Context context = new Context(msg, ctx, null, null, null, null); // dummy context, good only for writing response messages to the channel
+         final ResponseHandlerContext rhc = new ResponseHandlerContext(context);
+         return makeFrame(rhc, msg, serializer, useBinary, aggregate, code, responseMetaData);
+     }
+ 
+     protected static Frame makeFrame(final ResponseHandlerContext rhc, final RequestMessage msg,
 -                                   final MessageSerializer serializer, final boolean useBinary, final List<Object> aggregate,
 -                                   final ResponseStatusCode code, final Map<String,Object> responseMetaData) throws Exception {
++                                     final MessageSerializer serializer, final boolean useBinary, final List<Object> aggregate,
++                                     final ResponseStatusCode code, final Map<String,Object> responseMetaData) throws Exception {
+         final ChannelHandlerContext ctx = rhc.getContext().getChannelHandlerContext();
          try {
              if (useBinary) {
                  return new Frame(serializer.serializeResponseAsBinary(ResponseMessage.build(msg)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9357d6a1/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
----------------------------------------------------------------------
diff --cc gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
index 08b8526,67ad021..f97fb1f
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
@@@ -69,7 -71,9 +70,8 @@@ import org.junit.Test
  
  import java.lang.reflect.Field;
  import java.nio.channels.ClosedChannelException;
 -import java.util.ArrayList;
  import java.util.HashMap;
+ import java.util.Iterator;
  import java.util.List;
  import java.util.Map;
  import java.util.Set;

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9357d6a1/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/op/AbstractOpProcessorTest.java
----------------------------------------------------------------------
diff --cc gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/op/AbstractOpProcessorTest.java
index 0000000,a7cee1a..aba1603
mode 000000,100644..100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/op/AbstractOpProcessorTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/op/AbstractOpProcessorTest.java
@@@ -1,0 -1,73 +1,53 @@@
+ /*
+  * 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.server.op;
+ 
+ import io.netty.channel.ChannelHandlerContext;
+ 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.junit.Test;
+ import org.mockito.ArgumentCaptor;
+ import org.mockito.Mockito;
+ 
+ import static org.junit.Assert.assertEquals;
+ import static org.junit.Assert.fail;
+ 
+ public class AbstractOpProcessorTest {
+ 
+     @Test
 -    public void deprecatedMakeFrameMethodShouldRedirectCorrectly() throws Exception {
 -        final ChannelHandlerContext ctx = Mockito.mock(ChannelHandlerContext.class);
 -        final RequestMessage request = RequestMessage.build("test").create();
 -        final ArgumentCaptor<ResponseMessage> responseCaptor = ArgumentCaptor.forClass(ResponseMessage.class);
 -
 -        try {
 -            // Induce a NullPointerException to validate error response message writing
 -            //noinspection deprecation
 -            AbstractOpProcessor.makeFrame(ctx, request, null, true, null, ResponseStatusCode.PARTIAL_CONTENT);
 -            fail("Expected a NullPointerException");
 -        } catch (NullPointerException expected) {
 -            // nop
 -        }
 -
 -        Mockito.verify(ctx, Mockito.times(1)).writeAndFlush(responseCaptor.capture());
 -        assertEquals(ResponseStatusCode.SERVER_ERROR_SERIALIZATION, responseCaptor.getValue().getStatus().getCode());
 -        assertEquals(request.getRequestId(), responseCaptor.getValue().getRequestId());
 -    }
 -
 -    @Test
+     public void alternativeMakeFrameMethodShouldRedirectCorrectly() throws Exception {
+         final ChannelHandlerContext ctx = Mockito.mock(ChannelHandlerContext.class);
+         final RequestMessage request = RequestMessage.build("test").create();
+         final ArgumentCaptor<ResponseMessage> responseCaptor = ArgumentCaptor.forClass(ResponseMessage.class);
+ 
+         try {
+             // Induce a NullPointerException to validate error response message writing
+             AbstractOpProcessor.makeFrame(ctx, request, null, true, null, ResponseStatusCode.PARTIAL_CONTENT, null);
+             fail("Expected a NullPointerException");
+         } catch (NullPointerException expected) {
+             // nop
+         }
+ 
+         Mockito.verify(ctx, Mockito.times(1)).writeAndFlush(responseCaptor.capture());
+         assertEquals(ResponseStatusCode.SERVER_ERROR_SERIALIZATION, responseCaptor.getValue().getStatus().getCode());
+         assertEquals(request.getRequestId(), responseCaptor.getValue().getRequestId());
+     }
+ 
+ }


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

Posted by sp...@apache.org.
Merge branch 'tp33'


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

Branch: refs/heads/TINKERPOP-1967
Commit: f50aeb6d62009845f42d9558b7cc8e576c91cf4e
Parents: a2db39c dfe79c2
Author: Robert Dale <ro...@gmail.com>
Authored: Tue Jul 31 13:12:40 2018 -0400
Committer: Robert Dale <ro...@gmail.com>
Committed: Tue Jul 31 13:12:40 2018 -0400

----------------------------------------------------------------------
 pom.xml | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)
----------------------------------------------------------------------


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


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

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

Conflicts:
	gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java


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

Branch: refs/heads/TINKERPOP-1967
Commit: fa7a7f61308acc675e4a4c4a6dc863cf9818c3f9
Parents: 2cf551f 37476a2
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Aug 7 12:08:39 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Aug 7 12:08:39 2018 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |   1 +
 .../driver/message/ResponseStatusCode.java      |   7 +
 .../driver/message/ResponseStatusCodeTest.java  |  36 +++++
 .../gremlin/server/ResponseHandlerContext.java  |  85 +++++++++++
 .../server/op/AbstractEvalOpProcessor.java      |  38 ++++-
 .../gremlin/server/op/AbstractOpProcessor.java  |  34 ++++-
 .../AbstractGremlinServerIntegrationTest.java   |  20 ++-
 .../server/GremlinServerIntegrateTest.java      |  51 +++++++
 .../server/ResponseHandlerContextTest.java      | 143 +++++++++++++++++++
 .../server/op/AbstractEvalOpProcessorTest.java  |  62 ++++++++
 .../server/op/AbstractOpProcessorTest.java      |  73 ++++++++++
 11 files changed, 535 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


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

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/fa7a7f61/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java
----------------------------------------------------------------------
diff --cc gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java
index 74e9478,ca1ee53..dbf7a44
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java
@@@ -242,14 -287,9 +266,14 @@@ public abstract class AbstractEvalOpPro
                      final Iterator itty = IteratorUtils.asIterator(o);
  
                      logger.debug("Preparing to iterate results from - {} - in thread [{}]", msg, Thread.currentThread().getName());
 +                    if (settings.authentication.enableAuditLog) {
 +                        String address = context.getChannelHandlerContext().channel().remoteAddress().toString();
 +                        if (address.startsWith("/") && address.length() > 1) address = address.substring(1);
 +                        auditLogger.info("User with address {} requested: {}", address, script);
 +                    }
  
                      try {
-                         handleIterator(context, itty);
+                         handleIterator(rhc, itty);
                      } catch (Exception ex) {
                          if (managedTransactionsForRequest) attemptRollback(msg, context.getGraphManager(), settings.strictTransactionManagement);
  
@@@ -271,9 -311,16 +295,9 @@@
                      // occurs when the TimedInterruptCustomizerProvider is in play
                      final String errorMessage = String.format("A timeout occurred within the script during evaluation of [%s] - consider increasing the limit given to TimedInterruptCustomizerProvider", msg);
                      logger.warn(errorMessage);
-                     ctx.writeAndFlush(ResponseMessage.build(msg).code(ResponseStatusCode.SERVER_ERROR_TIMEOUT)
+                     rhc.writeAndFlush(ResponseMessage.build(msg).code(ResponseStatusCode.SERVER_ERROR_TIMEOUT)
                              .statusMessage("Timeout during script evaluation triggered by TimedInterruptCustomizerProvider")
                              .statusAttributeException(t).create());
 -                } else if (t instanceof org.apache.tinkerpop.gremlin.groovy.jsr223.TimedInterruptTimeoutException) {
 -                    // occurs when the TimedInterruptCustomizerProvider is in play
 -                    final String errorMessage = String.format("A timeout occurred within the script during evaluation of [%s] - consider increasing the limit given to TimedInterruptCustomizerProvider", msg);
 -                    logger.warn(errorMessage);
 -                    rhc.writeAndFlush(ResponseMessage.build(msg).code(ResponseStatusCode.SERVER_ERROR_TIMEOUT)
 -                            .statusMessage("Timeout during script evaluation triggered by TimedInterruptCustomizerProvider")
 -                            .statusAttributeException(t).create());
                  } else if (t instanceof TimeoutException) {
                      final String errorMessage = String.format("Script evaluation exceeded the configured threshold for request [%s]", msg);
                      logger.warn(errorMessage, t);

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/fa7a7f61/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
----------------------------------------------------------------------
diff --cc gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
index a1689e9,eb5def9..67ad021
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
@@@ -71,7 -74,9 +72,8 @@@ import org.junit.Test
  import java.lang.reflect.Field;
  import java.nio.channels.ClosedChannelException;
  import java.util.ArrayList;
 -import java.util.Collections;
  import java.util.HashMap;
+ import java.util.Iterator;
  import java.util.List;
  import java.util.Map;
  import java.util.Set;


[48/50] tinkerpop git commit: TINKERPOP-1967 Removed some dead comments/code

Posted by sp...@apache.org.
TINKERPOP-1967 Removed some dead comments/code


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

Branch: refs/heads/TINKERPOP-1967
Commit: cbae0a30093303aeab1257c8ff344abd62f806cb
Parents: eb6a4de
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Aug 3 06:51:55 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Aug 9 10:54:41 2018 -0400

----------------------------------------------------------------------
 .../clustering/connected/ConnectedComponentVertexProgram.java | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/cbae0a30/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/clustering/connected/ConnectedComponentVertexProgram.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/clustering/connected/ConnectedComponentVertexProgram.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/clustering/connected/ConnectedComponentVertexProgram.java
index 82907eb..acc8f3c 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/clustering/connected/ConnectedComponentVertexProgram.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/clustering/connected/ConnectedComponentVertexProgram.java
@@ -62,7 +62,6 @@ public class ConnectedComponentVertexProgram implements VertexProgram<String> {
     public static final String COMPONENT = "gremlin.connectedComponentVertexProgram.component";
     private static final String PROPERTY = "gremlin.connectedComponentVertexProgram.property";
     private static final String EDGE_TRAVERSAL = "gremlin.pageRankVertexProgram.edgeTraversal";
-    private static final String HAS_HALTED = "gremlin.connectedComponentVertexProgram.hasHalted";
     private static final String VOTE_TO_HALT = "gremlin.connectedComponentVertexProgram.voteToHalt";
 
     private static final Set<MemoryComputeKey> MEMORY_COMPUTE_KEYS = Collections.singleton(MemoryComputeKey.of(VOTE_TO_HALT, Operator.and, false, true));
@@ -122,11 +121,7 @@ public class ConnectedComponentVertexProgram implements VertexProgram<String> {
             // for evaluation
             vertex.property(VertexProperty.Cardinality.single, property, vertex.id().toString());
 
-            // no need to send messages from traversers that were filtered - happens for stuff like
-            // g.V().hasLabel('software').connectedComponent() (i.e. when there is a TraversalVertexProgram in the mix
-            // halting traversers. only want to send messages from traversers that are still hanging about after
-            // the filter. the unfiltered vertices can only react to messages sent to them. of course, this can
-            // lead to weirdness in results. 
+            // vertices that have no edges remain in their own component - nothing to message pass here
             if (vertex.edges(Direction.BOTH).hasNext()) {
                 // since there was message passing we don't want to halt on the first round. this should only trigger
                 // a single pass finish if the graph is completely disconnected (technically, it won't even really


[06/50] tinkerpop git commit: CTR: Fixed build by adding python3-dev dependency to the base image Dockerfile

Posted by sp...@apache.org.
CTR: Fixed build by adding python3-dev dependency to the base image Dockerfile


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

Branch: refs/heads/TINKERPOP-1967
Commit: 7fce1377f70190954f858901c7a3698dbd17cf82
Parents: e3018fb
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Wed Aug 1 11:26:51 2018 -0700
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Wed Aug 1 11:26:51 2018 -0700

----------------------------------------------------------------------
 docker/Dockerfile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7fce1377/docker/Dockerfile
----------------------------------------------------------------------
diff --git a/docker/Dockerfile b/docker/Dockerfile
index dbc06ef..9ae74aa 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -30,7 +30,7 @@ RUN apt-get update \
     && apt-get update \
     && apt-get install -y oracle-java8-installer curl gawk git maven openssh-server subversion zip \
     && sh -c 'curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/microsoft.gpg' \
-    && apt-get install -y --force-yes dotnet-sdk-2.1.101 python python-dev python-pip build-essential mono-devel \
+    && apt-get install -y --force-yes dotnet-sdk-2.1.101 python python-dev python3-dev python-pip build-essential mono-devel \
     && pip install virtualenv virtualenvwrapper \
     && pip install --upgrade pip \
     && rm -rf /var/lib/apt/lists/* /var/cache/oracle-jdk8-installer


[10/50] tinkerpop git commit: Added Huawei Graph Engine Service to listing - CTR

Posted by sp...@apache.org.
Added Huawei Graph Engine Service to listing - CTR


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

Branch: refs/heads/TINKERPOP-1967
Commit: 8f1fe6d8ebd753dc1fb708da53ba7a60354dbaf7
Parents: 69b6f96
Author: Robert Dale <ro...@gmail.com>
Authored: Wed Aug 1 22:33:57 2018 -0400
Committer: Robert Dale <ro...@gmail.com>
Committed: Wed Aug 1 22:33:57 2018 -0400

----------------------------------------------------------------------
 docs/site/home/index.html | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8f1fe6d8/docs/site/home/index.html
----------------------------------------------------------------------
diff --git a/docs/site/home/index.html b/docs/site/home/index.html
index 4ff692c..472e77a 100644
--- a/docs/site/home/index.html
+++ b/docs/site/home/index.html
@@ -224,6 +224,7 @@ limitations under the License.
             <li><a href="https://grakn.ai/">GRAKN.AI</a> - Distributed OLTP/OLAP knowledge graph system.</li>
             <li><a href="http://tinkerpop.apache.org/docs/current/reference/#sparkgraphcomputer">Hadoop (Spark)</a> - OLAP graph processor using Spark.</li>
             <li><a href="https://github.com/rayokota/hgraphdb">HGraphDB</a> - OLTP graph database running on Apache HBase.</li>
+            <li><a href="https://www.huaweicloud.com/en-us/product/ges.html">Huawei Graph Engine Service</a> - Fully-managed, distributed, at-scale graph query and analysis service that provides a visualized interactive analytics platform.</li>
             <li><a href="https://console.ng.bluemix.net/catalog/services/ibm-graph/">IBM Graph</a> - OLTP graph database as a service.</li>
             <li><a href="http://janusgraph.org/">JanusGraph</a> - Distributed OLTP and OLAP graph database with BerkeleyDB, Apache Cassandra and Apache HBase support.</li>
             <li><a href="https://github.com/awslabs/dynamodb-janusgraph-storage-backend//">JanusGraph (Amazon)</a> - The Amazon DynamoDB Storage Backend for JanusGraph.</li>


[34/50] tinkerpop git commit: TINKERPOP-1976 Removed some OptOuts on RemoteGraph

Posted by sp...@apache.org.
TINKERPOP-1976 Removed some OptOuts on RemoteGraph

Some tests needed to use the "process" runner apparently


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

Branch: refs/heads/TINKERPOP-1967
Commit: f7ccb67b13547edba2986f53993d862576db59c4
Parents: 37476a2
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Aug 2 19:44:50 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Aug 9 07:28:09 2018 -0400

----------------------------------------------------------------------
 .../tinkerpop/gremlin/process/remote/RemoteGraph.java  | 13 -------------
 .../process/traversal/step/map/PeerPressureTest.java   |  6 ++++--
 .../decoration/TranslationStrategyProcessTest.java     |  3 +++
 3 files changed, 7 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f7ccb67b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/RemoteGraph.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/RemoteGraph.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/RemoteGraph.java
index 4b23475..1ea7d42 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/RemoteGraph.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/RemoteGraph.java
@@ -24,7 +24,6 @@ import org.apache.tinkerpop.gremlin.process.computer.GraphComputer;
 import org.apache.tinkerpop.gremlin.process.remote.traversal.strategy.decoration.RemoteStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalSource;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategies;
-import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
 import org.apache.tinkerpop.gremlin.structure.Edge;
 import org.apache.tinkerpop.gremlin.structure.Graph;
 import org.apache.tinkerpop.gremlin.structure.Transaction;
@@ -53,18 +52,6 @@ import java.util.Iterator;
         method = "g_V_hasXnoX_groupCountXaX_capXaX",
         reason = "This test asserts an empty side-effect which reflects as a null rather than an \"empty\" and thus doesn't assert")
 @Graph.OptOut(
-        test = "org.apache.tinkerpop.gremlin.process.traversal.step.map.PeerPressureTest",
-        method = "*",
-        reason = "https://issues.apache.org/jira/browse/TINKERPOP-1976")
-@Graph.OptOut(
-        test = "org.apache.tinkerpop.gremlin.process.traversal.step.map.PageRankTest",
-        method = "*",
-        reason = "https://issues.apache.org/jira/browse/TINKERPOP-1976")
-@Graph.OptOut(
-        test = "org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.TranslationStrategyProcessTest",
-        method = "*",
-        reason = "hmmmm")
-@Graph.OptOut(
         test = "org.apache.tinkerpop.gremlin.process.traversal.CoreTraversalTest",
         method = "*",
         reason = "The test suite does not support profiling or lambdas and for groovy tests: 'Could not locate method: GraphTraversalSource.withStrategies([{traversalCategory=interface org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy$DecorationStrategy}])'")

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f7ccb67b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PeerPressureTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PeerPressureTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PeerPressureTest.java
index 996be6d..67ed267 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PeerPressureTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PeerPressureTest.java
@@ -22,11 +22,13 @@ package org.apache.tinkerpop.gremlin.process.traversal.step.map;
 import org.apache.tinkerpop.gremlin.LoadGraphWith;
 import org.apache.tinkerpop.gremlin.TestHelper;
 import org.apache.tinkerpop.gremlin.process.AbstractGremlinProcessTest;
+import org.apache.tinkerpop.gremlin.process.GremlinProcessRunner;
 import org.apache.tinkerpop.gremlin.process.computer.clustering.peerpressure.PeerPressureVertexProgram;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.junit.Test;
+import org.junit.runner.RunWith;
 
 import java.util.HashMap;
 import java.util.HashSet;
@@ -42,6 +44,7 @@ import static org.junit.Assert.assertTrue;
 /**
  * @author Marko A. Rodriguez (http://markorodriguez.com)
  */
+@RunWith(GremlinProcessRunner.class)
 public abstract class PeerPressureTest extends AbstractGremlinProcessTest {
 
     public abstract Traversal<Vertex, Vertex> get_g_V_peerPressure();
@@ -99,8 +102,7 @@ public abstract class PeerPressureTest extends AbstractGremlinProcessTest {
         assertTrue(ids.contains(convertToVertexId("josh")));
         assertTrue(ids.contains(convertToVertexId("peter")));
     }
-
-
+    
     public static class Traversals extends PeerPressureTest {
 
         @Override

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f7ccb67b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/TranslationStrategyProcessTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/TranslationStrategyProcessTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/TranslationStrategyProcessTest.java
index a280a9c..0b81cce 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/TranslationStrategyProcessTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/TranslationStrategyProcessTest.java
@@ -21,9 +21,11 @@ package org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration;
 
 import org.apache.tinkerpop.gremlin.LoadGraphWith;
 import org.apache.tinkerpop.gremlin.process.AbstractGremlinProcessTest;
+import org.apache.tinkerpop.gremlin.process.GremlinProcessRunner;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
 import org.junit.Test;
+import org.junit.runner.RunWith;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -33,6 +35,7 @@ import static org.junit.Assert.assertEquals;
 /**
  * @author Marko A. Rodriguez (http://markorodriguez.com)
  */
+@RunWith(GremlinProcessRunner.class)
 public class TranslationStrategyProcessTest extends AbstractGremlinProcessTest {
     private static final Logger logger = LoggerFactory.getLogger(TranslationStrategyProcessTest.class);
 


[38/50] tinkerpop git commit: TINKERPOP-1976 Changed the context of tests to be better suited to GLVs

Posted by sp...@apache.org.
TINKERPOP-1976 Changed the context of tests to be better suited to GLVs


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

Branch: refs/heads/TINKERPOP-1967
Commit: a533878cb71eef970bdca366ed1c4ae1e5d87f20
Parents: 8c2313e
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Aug 9 08:32:17 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Aug 9 08:32:17 2018 -0400

----------------------------------------------------------------------
 .../traversal/step/map/GroovyPageRankTest.groovy |  4 ++--
 .../step/map/GroovyPeerPressureTest.groovy       |  4 ++--
 .../test/cucumber/feature-steps.js               |  4 ++--
 gremlin-test/features/map/PageRank.feature       |  4 ++--
 gremlin-test/features/map/PeerPressure.feature   |  4 ++--
 .../process/traversal/step/map/PageRankTest.java | 19 +++++++------------
 .../traversal/step/map/PeerPressureTest.java     | 19 +++++++------------
 7 files changed, 24 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a533878c/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyPageRankTest.groovy
----------------------------------------------------------------------
diff --git a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyPageRankTest.groovy b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyPageRankTest.groovy
index 7554092..6b8d7b2 100644
--- a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyPageRankTest.groovy
+++ b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyPageRankTest.groovy
@@ -31,8 +31,8 @@ public abstract class GroovyPageRankTest {
     public static class Traversals extends PageRankTest {
 
         @Override
-        public Traversal<Vertex, Vertex> get_g_V_pageRank() {
-            new ScriptTraversal<>(g, "gremlin-groovy", "g.V.pageRank")
+        public Traversal<Vertex, Vertex> get_g_V_pageRank_hasXpageRankX() {
+            new ScriptTraversal<>(g, "gremlin-groovy", "g.V.pageRank.has(PageRankVertexProgram.PAGE_RANK)")
         }
 
         @Override

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a533878c/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyPeerPressureTest.groovy
----------------------------------------------------------------------
diff --git a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyPeerPressureTest.groovy b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyPeerPressureTest.groovy
index 6ec0750..cdd383c 100644
--- a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyPeerPressureTest.groovy
+++ b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyPeerPressureTest.groovy
@@ -31,8 +31,8 @@ public abstract class GroovyPeerPressureTest {
     public static class Traversals extends PeerPressureTest {
 
         @Override
-        public Traversal<Vertex, Vertex> get_g_V_peerPressure() {
-            new ScriptTraversal<>(g, "gremlin-groovy", "g.V.peerPressure")
+        public Traversal<Vertex, Vertex> get_g_V_peerPressure_hasXclusterX() {
+            new ScriptTraversal<>(g, "gremlin-groovy", "g.V.peerPressure.has(PeerPressureVertexProgram.CLUSTER)")
         }
 
         @Override

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a533878c/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
----------------------------------------------------------------------
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
index fa609be..3e6824c 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
@@ -61,7 +61,7 @@ const ignoreReason = {
 
 const ignoredScenarios = {
   // An associative array containing the scenario name as key, for example:
-  'g_V_pageRank': new IgnoreError(ignoreReason.computerNotSupported),
+  'g_V_pageRank_hasXpageRankX': new IgnoreError(ignoreReason.computerNotSupported),
   'g_V_outXcreatedX_pageRank_byXbothEX_byXprojectRankX_timesX0X_valueMapXname_projectRankX': new IgnoreError(ignoreReason.computerNotSupported),
   'g_V_pageRank_order_byXpageRank_decrX_byXnameX_name': new IgnoreError(ignoreReason.computerNotSupported),
   'g_V_pageRank_order_byXpageRank_decrX_name_limitX2X': new IgnoreError(ignoreReason.computerNotSupported),
@@ -70,7 +70,7 @@ const ignoredScenarios = {
   'g_V_pageRank_byXpageRankX_asXaX_outXknowsX_pageRank_asXbX_selectXa_bX': new IgnoreError(ignoreReason.computerNotSupported),
   'g_V_hasLabelXsoftwareX_hasXname_rippleX_pageRankX1X_byXinEXcreatedXX_timesX1X_byXpriorsX_inXcreatedX_unionXboth__identityX_valueMapXname_priorsX': new IgnoreError(ignoreReason.computerNotSupported),
   'g_V_outXcreatedX_groupXmX_byXlabelX_pageRankX1X_byXpageRankX_byXinEX_timesX1X_inXcreatedX_groupXmX_byXpageRankX_capXmX': new IgnoreError(ignoreReason.computerNotSupported),
-  'g_V_peerPressure': new IgnoreError(ignoreReason.computerNotSupported),
+  'g_V_peerPressure_hasXclusterX': new IgnoreError(ignoreReason.computerNotSupported),
   'g_V_peerPressure_byXclusterX_byXoutEXknowsXX_pageRankX1X_byXrankX_byXoutEXknowsXX_timesX2X_group_byXclusterX_byXrank_sumX_limitX100X': new IgnoreError(ignoreReason.computerNotSupported),
   'g_V_hasXname_rippleX_inXcreatedX_peerPressure_byXoutEX_byXclusterX_repeatXunionXidentity__bothX_timesX2X_dedup_valueMapXname_clusterX': new IgnoreError(ignoreReason.computerNotSupported),
 };

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a533878c/gremlin-test/features/map/PageRank.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/map/PageRank.feature b/gremlin-test/features/map/PageRank.feature
index ebf6489..bf2ed26 100644
--- a/gremlin-test/features/map/PageRank.feature
+++ b/gremlin-test/features/map/PageRank.feature
@@ -17,11 +17,11 @@
 
 Feature: Step - pageRank()
                 
-  Scenario: g_V_pageRank
+  Scenario: g_V_pageRank_hasXpageRankX
     Given the modern graph
     And the traversal of
       """
-      g.withComputer().V().pageRank()
+      g.withComputer().V().pageRank().has("gremlin.pageRankVertexProgram.pageRank")
       """
     When iterated to list
     Then the result should be unordered

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a533878c/gremlin-test/features/map/PeerPressure.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/map/PeerPressure.feature b/gremlin-test/features/map/PeerPressure.feature
index d23fa31..83f5bb2 100644
--- a/gremlin-test/features/map/PeerPressure.feature
+++ b/gremlin-test/features/map/PeerPressure.feature
@@ -17,11 +17,11 @@
 
 Feature: Step - peerPressure()
                 
-  Scenario: g_V_peerPressure
+  Scenario: g_V_peerPressure_hasXclusterX
     Given the modern graph
     And the traversal of
       """
-      g.withComputer().V().peerPressure()
+      g.withComputer().V().peerPressure().has("gremlin.peerPressureVertexProgram.cluster")
       """
     When iterated to list
     Then the result should be unordered

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a533878c/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PageRankTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PageRankTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PageRankTest.java
index 8846099..0c0a91d 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PageRankTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PageRankTest.java
@@ -28,6 +28,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
 import org.apache.tinkerpop.gremlin.structure.T;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -47,7 +48,7 @@ import static org.junit.Assert.fail;
 @RunWith(GremlinProcessRunner.class)
 public abstract class PageRankTest extends AbstractGremlinProcessTest {
 
-    public abstract Traversal<Vertex, Vertex> get_g_V_pageRank();
+    public abstract Traversal<Vertex, Vertex> get_g_V_pageRank_hasXpageRankX();
 
     public abstract Traversal<Vertex, Map<String, List<Object>>> get_g_V_outXcreatedX_pageRank_byXbothEX_byXprojectRankX_timesX0X_valueMapXname_projectRankX();
 
@@ -67,16 +68,10 @@ public abstract class PageRankTest extends AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
-    public void g_V_pageRank() {
-        final Traversal<Vertex, Vertex> traversal = get_g_V_pageRank();
+    public void g_V_pageRank_hasXpageRankX() {
+        final Traversal<Vertex, Vertex> traversal = get_g_V_pageRank_hasXpageRankX();
         printTraversalForm(traversal);
-        int counter = 0;
-        while (traversal.hasNext()) {
-            final Vertex vertex = traversal.next();
-            counter++;
-            assertTrue(vertex.property(PageRankVertexProgram.PAGE_RANK).isPresent());
-        }
-        assertEquals(6, counter);
+        assertEquals(6, IteratorUtils.count(traversal));
     }
 
     @Test
@@ -241,8 +236,8 @@ public abstract class PageRankTest extends AbstractGremlinProcessTest {
     public static class Traversals extends PageRankTest {
 
         @Override
-        public Traversal<Vertex, Vertex> get_g_V_pageRank() {
-            return g.V().pageRank();
+        public Traversal<Vertex, Vertex> get_g_V_pageRank_hasXpageRankX() {
+            return g.V().pageRank().has(PageRankVertexProgram.PAGE_RANK);
         }
 
         @Override

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a533878c/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PeerPressureTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PeerPressureTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PeerPressureTest.java
index 67ed267..e19f96d 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PeerPressureTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PeerPressureTest.java
@@ -27,6 +27,7 @@ import org.apache.tinkerpop.gremlin.process.computer.clustering.peerpressure.Pee
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -47,7 +48,7 @@ import static org.junit.Assert.assertTrue;
 @RunWith(GremlinProcessRunner.class)
 public abstract class PeerPressureTest extends AbstractGremlinProcessTest {
 
-    public abstract Traversal<Vertex, Vertex> get_g_V_peerPressure();
+    public abstract Traversal<Vertex, Vertex> get_g_V_peerPressure_hasXclusterX();
 
     public abstract Traversal<Vertex, Map<Object, Number>> get_g_V_peerPressure_byXclusterX_byXoutEXknowsXX_pageRankX1X_byXrankX_byXoutEXknowsXX_timesX2X_group_byXclusterX_byXrank_sumX_limitX100X();
 
@@ -55,16 +56,10 @@ public abstract class PeerPressureTest extends AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
-    public void g_V_peerPressure() {
-        final Traversal<Vertex, Vertex> traversal = get_g_V_peerPressure();
+    public void g_V_peerPressure_hasXclusterX() {
+        final Traversal<Vertex, Vertex> traversal = get_g_V_peerPressure_hasXclusterX();
         printTraversalForm(traversal);
-        int counter = 0;
-        while (traversal.hasNext()) {
-            final Vertex vertex = traversal.next();
-            counter++;
-            assertTrue(vertex.property(PeerPressureVertexProgram.CLUSTER).isPresent());
-        }
-        assertEquals(6, counter);
+        assertEquals(6, IteratorUtils.count(traversal));
     }
 
     @Test
@@ -106,8 +101,8 @@ public abstract class PeerPressureTest extends AbstractGremlinProcessTest {
     public static class Traversals extends PeerPressureTest {
 
         @Override
-        public Traversal<Vertex, Vertex> get_g_V_peerPressure() {
-            return g.V().peerPressure();
+        public Traversal<Vertex, Vertex> get_g_V_peerPressure_hasXclusterX() {
+            return g.V().peerPressure().has(PeerPressureVertexProgram.CLUSTER);
         }
 
         @Override


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

Posted by sp...@apache.org.
Merge branch 'tp33'


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

Branch: refs/heads/TINKERPOP-1967
Commit: 226ef6e4fbcecdc3a08b2ae55c15aca163efe412
Parents: b63bacf b779a2a
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Sat Aug 4 06:28:19 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Sat Aug 4 06:28:19 2018 -0400

----------------------------------------------------------------------
 .../apache/tinkerpop/gremlin/driver/Client.java  | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


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


[46/50] tinkerpop git commit: TINKERPOP-1967 Added a component field to the ConnectedComponent class

Posted by sp...@apache.org.
TINKERPOP-1967 Added a component field to the ConnectedComponent class

In this way the user can access the default more readily and is available in GLVs


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

Branch: refs/heads/TINKERPOP-1967
Commit: 8954c2713d6b2b2736b2892c03b0fe6dbe6bf018
Parents: 16231d6
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Jul 30 08:29:13 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Aug 9 10:54:41 2018 -0400

----------------------------------------------------------------------
 docs/src/recipes/connected-components.asciidoc                | 5 ++++-
 .../computer/traversal/step/map/ConnectedComponent.java       | 7 +++++++
 2 files changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8954c271/docs/src/recipes/connected-components.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/recipes/connected-components.asciidoc b/docs/src/recipes/connected-components.asciidoc
index e6d0f7a..c46180f 100644
--- a/docs/src/recipes/connected-components.asciidoc
+++ b/docs/src/recipes/connected-components.asciidoc
@@ -64,10 +64,13 @@ The traversal looks like:
 [gremlin-groovy,existing]
 ----
 g.withComputer().V().connectedComponent().
-    group().by('gremlin.connectedComponentVertexProgram.component').
+    group().by(component).
     select(values).unfold()
 ----
 
+NOTE: The `component` option passed to `by()` is statically imported from `ConnectedComponent` and refers to the
+default property key within which the result of the algorithm is stored.
+
 A straightforward way to detect the various subgraphs with an OLTP traversal is to do this:
 
 [gremlin-groovy,existing]

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8954c271/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/ConnectedComponent.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/ConnectedComponent.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/ConnectedComponent.java
index 85558bc..a2223d8 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/ConnectedComponent.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/ConnectedComponent.java
@@ -18,6 +18,7 @@
  */
 package org.apache.tinkerpop.gremlin.process.computer.traversal.step.map;
 
+import org.apache.tinkerpop.gremlin.process.computer.clustering.connected.ConnectedComponentVertexProgram;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
 import org.apache.tinkerpop.gremlin.structure.Graph;
 
@@ -26,6 +27,12 @@ import org.apache.tinkerpop.gremlin.structure.Graph;
  * {@link GraphTraversal#connectedComponent()} ()}.
  */
 public class ConnectedComponent {
+
+    /**
+     * The default property key name that will hold the result of the algorithm.
+     */
+    public static final String component = ConnectedComponentVertexProgram.COMPONENT;
+
     /**
      * Configures the edge to traverse when calculating the pagerank.
      */


[21/50] tinkerpop git commit: Update bulk import/export section for graph providers given g.io() CTR

Posted by sp...@apache.org.
Update bulk import/export section for graph providers given g.io() CTR


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

Branch: refs/heads/TINKERPOP-1967
Commit: a5d1aa660b28a5c126b3f7dec945f8558d42816c
Parents: 72b264d
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Aug 6 07:46:58 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Aug 6 07:46:58 2018 -0400

----------------------------------------------------------------------
 docs/src/dev/provider/index.asciidoc | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a5d1aa66/docs/src/dev/provider/index.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/dev/provider/index.asciidoc b/docs/src/dev/provider/index.asciidoc
index ab57020..49bc7c7 100644
--- a/docs/src/dev/provider/index.asciidoc
+++ b/docs/src/dev/provider/index.asciidoc
@@ -620,12 +620,17 @@ reason to implement this interface.
 ==== Bulk Import Export
 
 When it comes to doing "bulk" operations, the diverse nature of the available graph databases and their specific
-capabilities, prevents TinkerPop from doing a good job of generalizing that capability well. TinkerPop refers users to
-the bulk import/export facilities of specific graph providers as they tend to be more efficient and easier to use than
-the options TinkerPop has tried to generalize in the past.
+capabilities, prevents TinkerPop from doing a good job of generalizing that capability well. TinkerPop thus maintains
+two positions on the concept of import and export:
 
-That said, for graph providers that don't have a special bulk loading feature, they can get a basic bulk loader from
-TinkerPop using the link:http://tinkerpop.apache.org/docs/x.y.z/reference/#clonevertexprogram[CloneVertexProgram].
+1. TinkerPop refers users to the bulk import/export facilities of specific graph providers as they tend to be more
+efficient and easier to use than the options TinkerPop has tried to generalize in the past.
+2. TinkerPop encourages graph providers to expose those capabilities via `g.io()` and the `IoStep` by way of a
+`TraversalStrategy`.
+
+That said, for graph providers that don't have a special bulk loading feature, they can either rely on the default
+OLTP (single-threaded) `GraphReader` and `GraphWriter` options that are embedded in `IoStep` or get a basic bulk loader
+from TinkerPop using the link:http://tinkerpop.apache.org/docs/x.y.z/reference/#clonevertexprogram[CloneVertexProgram].
 Simply provide a `InputFormat` and `OutputFormat` that can be referenced by a `HadoopGraph` instance as discussed
 in the link:http://tinkerpop.apache.org/docs/x.y.z/reference/#clonevertexprogram[Reference Documentation].