tinkerpop git commit: TINKERPOP-1996 Deprecated Graph.io() and related infrastructure.
Repository: tinkerpop Updated Branches: refs/heads/TINKERPOP-1996 302dbc624 -> e9ad6820e TINKERPOP-1996 Deprecated Graph.io() and related infrastructure. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/e9ad6820 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/e9ad6820 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/e9ad6820 Branch: refs/heads/TINKERPOP-1996 Commit: e9ad6820e3bb68d7c42c36f3782fcfd3fa5eb85c Parents: 302dbc6 Author: Stephen Mallette Authored: Thu Jul 12 14:33:03 2018 -0400 Committer: Stephen Mallette Committed: Thu Jul 12 14:33:03 2018 -0400 -- CHANGELOG.asciidoc| 2 ++ .../main/java/org/apache/tinkerpop/gremlin/structure/Graph.java | 3 +++ .../main/java/org/apache/tinkerpop/gremlin/structure/io/Io.java | 3 +++ .../java/org/apache/tinkerpop/gremlin/structure/io/IoCore.java| 3 +++ .../apache/tinkerpop/gremlin/structure/io/graphml/GraphMLIo.java | 3 +++ .../tinkerpop/gremlin/structure/io/graphson/GraphSONIo.java | 3 +++ .../org/apache/tinkerpop/gremlin/structure/io/gryo/GryoIo.java| 3 +++ 7 files changed, 20 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e9ad6820/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 301a2f1..09ff8e2 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -25,6 +25,8 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima This release also includes changes from <>. +* Added the `io()` start step and `read()` and `write()` termination steps to the Gremlin language. +* Deprecated `Graph.io()` and related infrastructure. * Moved `Parameterizing` interface to the `org.apache.tinkerpop.gremlin.process.traversal.step` package with other marker interfaces of its type. * Replaced `Parameterizing.addPropertyMutations()` with `Configuring.configure()`. * Changed interface hierarchy for `Parameterizing` and `Mutating` interfaces as they are tightly related. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e9ad6820/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java index dc14cc6..f1fc54a 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java @@ -300,7 +300,10 @@ public interface Graph extends AutoCloseable, Host { * For those graphs that do not need to register any custom serializers, the default implementation should suffice. * If the default is overridden, take care to register the current graph via the * {@link org.apache.tinkerpop.gremlin.structure.io.Io.Builder#graph(Graph)} method. + * + * @deprecated As of release 3.4.0, replaced by {@link GraphTraversalSource#io(String)}. */ +@Deprecated public default I io(final Io.Builder builder) { return (I) builder.graph(this).create(); } http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e9ad6820/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/Io.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/Io.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/Io.java index bae56c5..0971e31 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/Io.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/Io.java @@ -18,6 +18,7 @@ */ package org.apache.tinkerpop.gremlin.structure.io; +import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource; import org.apache.tinkerpop.gremlin.structure.Graph; import java.io.IOException; @@ -31,7 +32,9 @@ import java.util.function.Consumer; * internal {@link Mapper} (if the format has such capability). * * @author Stephen Mallette (http://stephen.genoprime.com) + * @deprecated As of release 3.4.0, replaced by {@link GraphTraversalSource#io(String)}. */ +@Deprecated public interface Io { /** http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e9ad6820/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/IoCore.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/IoCore.java
tinkerpop git commit: TINKERPOP-1996 Added IO to imports and javadoc fixes
Repository: tinkerpop Updated Branches: refs/heads/TINKERPOP-1996 f78c87da3 -> 302dbc624 TINKERPOP-1996 Added IO to imports and javadoc fixes Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/302dbc62 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/302dbc62 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/302dbc62 Branch: refs/heads/TINKERPOP-1996 Commit: 302dbc62449d8e760fb73b5e215341fc0a8589cb Parents: f78c87d Author: Stephen Mallette Authored: Thu Jul 12 11:19:10 2018 -0400 Committer: Stephen Mallette Committed: Thu Jul 12 11:19:10 2018 -0400 -- .../tinkerpop/gremlin/jsr223/CoreImports.java | 2 ++ .../tinkerpop/gremlin/process/traversal/IO.java | 34 2 files changed, 30 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/302dbc62/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 9d7eb52..72ad47a 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 @@ -56,6 +56,7 @@ import org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.optimiza import org.apache.tinkerpop.gremlin.process.remote.RemoteConnection; import org.apache.tinkerpop.gremlin.process.remote.RemoteGraph; import org.apache.tinkerpop.gremlin.process.traversal.Bindings; +import org.apache.tinkerpop.gremlin.process.traversal.IO; import org.apache.tinkerpop.gremlin.process.traversal.Operator; import org.apache.tinkerpop.gremlin.process.traversal.Order; import org.apache.tinkerpop.gremlin.process.traversal.P; @@ -184,6 +185,7 @@ public final class CoreImports { CLASS_IMPORTS.add(GraphReader.class); CLASS_IMPORTS.add(GraphWriter.class); CLASS_IMPORTS.add(Io.class); +CLASS_IMPORTS.add(IO.class); CLASS_IMPORTS.add(IoCore.class); CLASS_IMPORTS.add(Storage.class); CLASS_IMPORTS.add(GraphMLIo.class); http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/302dbc62/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/IO.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/IO.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/IO.java index f76c2bc..6668cf1 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/IO.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/IO.java @@ -23,6 +23,12 @@ import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSo import org.apache.tinkerpop.gremlin.structure.Graph; import org.apache.tinkerpop.gremlin.structure.io.GraphReader; import org.apache.tinkerpop.gremlin.structure.io.GraphWriter; +import org.apache.tinkerpop.gremlin.structure.io.graphml.GraphMLReader; +import org.apache.tinkerpop.gremlin.structure.io.graphml.GraphMLWriter; +import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONReader; +import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONWriter; +import org.apache.tinkerpop.gremlin.structure.io.gryo.GryoReader; +import org.apache.tinkerpop.gremlin.structure.io.gryo.GryoWriter; /** * Fields that can be provided to the {@link GraphTraversalSource#io(String)} using the @@ -34,21 +40,37 @@ public class IO { private IO() {} +/** + * A value to supply to {@link IO#reader} or {@link IO#writer} to indicate the format to use. Using this shorthand + * will configure a default {@link GraphSONReader} or {@link GraphSONWriter} respectively, + */ public static final String graphson = "graphson"; + +/** + * A value to supply to {@link IO#reader} or {@link IO#writer} to indicate the format to use. Using this shorthand + * will configure a default {@link GryoReader} or {@link GryoWriter} respectively, + */ public static final String gryo = "gryo"; + +/** + * A value to supply to {@link IO#reader} or {@link IO#writer} to indicate the format to use. Using this shorthand + * will configure a default {@link GraphMLReader} or {@link GraphMLWriter} respectively, + */ public static final String graphml = "graphml"; /** - * The specific {@link GraphReader} instance to use or the name of the fully qualified classname of such an - * instance. If this value is not specified then
[15/26] tinkerpop git commit: TINKERPOP-1999 Prevented java driver from hanging on disorderly server shutdown
TINKERPOP-1999 Prevented java driver from hanging on disorderly server shutdown We didn't see this before because all tests had assumed an orderly shutdown. In orderly shutdown the server actually manages to send a kill message which the driver respects. In disorderly shutdown, the channel just goes inactive and as described in TINKERPOP-1999 that event was not being handled properly on the driver causing it to hang. I tried to write a test for this but was unable to as I can't figure out how to write an "disorderly shutdown" which basically involves "pulling the plug" on the server. CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/3dcabd4f Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/3dcabd4f Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/3dcabd4f Branch: refs/heads/TINKERPOP-1996 Commit: 3dcabd4f1b23fecde28c79a10502ad562d934c8d Parents: b0c836b Author: Stephen Mallette Authored: Thu Jul 12 10:07:04 2018 -0400 Committer: Stephen Mallette Committed: Thu Jul 12 10:07:04 2018 -0400 -- CHANGELOG.asciidoc | 1 + .../java/org/apache/tinkerpop/gremlin/driver/Handler.java| 8 .../gremlin/driver/handler/WebSocketClientHandler.java | 5 - 3 files changed, 9 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3dcabd4f/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index ee49c09..a25e7a5 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 bug in Java driver where an disorderly shutdown of the server would cause the client to hang. * Added a dotnet template project that should make it easier to get started with Gremlin.Net. * Removed `ThreadInterruptCustomizerProvider` from documentation as a way to timeout. * Added Docker images for Gremlin Console and Gremlin Server. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3dcabd4f/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Handler.java -- diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Handler.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Handler.java index 1bd0a3b..a6528b2 100644 --- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Handler.java +++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Handler.java @@ -201,6 +201,14 @@ final class Handler { } @Override +public void channelInactive(final ChannelHandlerContext ctx) throws Exception { +// occurs when the server shutsdown in a disorderly fashion, otherwise in an orderly shutdown the server +// should fire off a close message which will properly release the driver. +super.channelInactive(ctx); +throw new IllegalStateException("Connection to server is no longer active"); +} + +@Override protected void channelRead0(final ChannelHandlerContext channelHandlerContext, final ResponseMessage response) throws Exception { try { final ResponseStatusCode statusCode = response.getStatus().getCode(); http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3dcabd4f/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/handler/WebSocketClientHandler.java -- diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/handler/WebSocketClientHandler.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/handler/WebSocketClientHandler.java index 0a1f2f7..7b5858b 100644 --- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/handler/WebSocketClientHandler.java +++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/handler/WebSocketClientHandler.java @@ -62,11 +62,6 @@ public final class WebSocketClientHandler extends SimpleChannelInboundHandler
[17/26] tinkerpop git commit: Merge branch 'tp33'
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/8c05c19e Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/8c05c19e Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/8c05c19e Branch: refs/heads/TINKERPOP-1996 Commit: 8c05c19ea816b5671778187a94721a82fd1bbc92 Parents: 3cd352e a6ba2d5 Author: Stephen Mallette Authored: Thu Jul 12 10:51:35 2018 -0400 Committer: Stephen Mallette Committed: Thu Jul 12 10:51:35 2018 -0400 -- CHANGELOG.asciidoc | 1 + .../java/org/apache/tinkerpop/gremlin/driver/Handler.java| 8 .../gremlin/driver/handler/WebSocketClientHandler.java | 5 - 3 files changed, 9 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8c05c19e/CHANGELOG.asciidoc --
[19/26] tinkerpop git commit: TINKERPOP-1996 Have the basics of OLAP read()/write() steps working
TINKERPOP-1996 Have the basics of OLAP read()/write() steps working This is still fairly skeletal at this point. Just trying to make sure things work properly before building read()/write() out fully. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/23815ec2 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/23815ec2 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/23815ec2 Branch: refs/heads/TINKERPOP-1996 Commit: 23815ec2878f84cf86aa3408d4414ca4aa2065ca Parents: 3641e91 Author: Stephen Mallette Authored: Tue Jul 10 12:21:52 2018 -0400 Committer: Stephen Mallette Committed: Thu Jul 12 10:59:38 2018 -0400 -- .../decoration/VertexProgramStrategy.java | 34 .../process/traversal/TraversalStrategies.java | 2 + .../gremlin/process/traversal/step/Reading.java | 27 +++ .../gremlin/process/traversal/step/Writing.java | 26 +++ .../process/traversal/step/map/ReadStep.java| 10 ++- .../process/traversal/step/map/WriteStep.java | 8 +- .../strategy/verification/IoUsageStrategy.java | 8 ++ .../decoration/VertexProgramStrategyTest.java | 3 + .../gremlin/process/ProcessStandardSuite.java | 2 + .../process/traversal/step/map/ReadTest.java| 64 +++ .../traversal/step/map/HadoopReadStep.java | 82 .../traversal/step/map/HadoopWriteStep.java | 82 .../traversal/strategy/HadoopIoStrategy.java| 68 .../gremlin/hadoop/structure/HadoopGraph.java | 8 ++ 14 files changed, 407 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/23815ec2/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/decoration/VertexProgramStrategy.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/decoration/VertexProgramStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/decoration/VertexProgramStrategy.java index 89e40cb..c83039a 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/decoration/VertexProgramStrategy.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/decoration/VertexProgramStrategy.java @@ -34,6 +34,8 @@ import org.apache.tinkerpop.gremlin.process.traversal.TraversalSource; import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategies; import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__; +import org.apache.tinkerpop.gremlin.process.traversal.step.Reading; +import org.apache.tinkerpop.gremlin.process.traversal.step.Writing; import org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphStep; import org.apache.tinkerpop.gremlin.process.traversal.step.util.EmptyStep; import org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy; @@ -100,23 +102,26 @@ public final class VertexProgramStrategy extends AbstractTraversalStrategy computerTraversal = new DefaultTraversal<>(); -Step firstLegalOLAPStep = getFirstLegalOLAPStep(currentStep); -Step lastLegalOLAPStep = getLastLegalOLAPStep(currentStep); -if (!(firstLegalOLAPStep instanceof EmptyStep)) { -int index = TraversalHelper.stepIndex(firstLegalOLAPStep, traversal); -TraversalHelper.removeToTraversal(firstLegalOLAPStep, lastLegalOLAPStep.getNextStep(), (Traversal.Admin) computerTraversal); -final TraversalVertexProgramStep traversalVertexProgramStep = new TraversalVertexProgramStep(traversal, computerTraversal); -traversal.addStep(index, traversalVertexProgramStep); -} -currentStep = traversal.getStartStep(); +if (!(currentStep instanceof Reading) && !(currentStep instanceof Writing)) { while (!(currentStep instanceof EmptyStep)) { -if (!(currentStep instanceof VertexComputing)) -break; -currentStep = currentStep.getNextStep(); +final Traversal.Admin computerTraversal = new DefaultTraversal<>(); +final Step firstLegalOLAPStep = getFirstLegalOLAPStep(currentStep); +final Step lastLegalOLAPStep = getLastLegalOLAPStep(currentStep); +if (!(firstLegalOLAPStep instanceof EmptyStep)) { +final int index = TraversalHelper.stepIndex(firstLegalOLAPStep, traversal); +TraversalHelper.removeToTraversal(firstLegalOLAPStep,
[14/26] tinkerpop git commit: Merge branch 'tp33'
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/3cd352ee Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/3cd352ee Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/3cd352ee Branch: refs/heads/TINKERPOP-1996 Commit: 3cd352eeb2503d6c5e3ff9b8d8256eb92f28692d Parents: 2fd11a1 bf07f13 Author: Jorge Bay Gondra Authored: Thu Jul 12 11:53:19 2018 +0200 Committer: Jorge Bay Gondra Committed: Thu Jul 12 11:53:19 2018 +0200 -- CHANGELOG.asciidoc | 1 + .../lib/driver/driver-remote-connection.js | 20 ++-- 2 files changed, 11 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3cd352ee/CHANGELOG.asciidoc --
[16/26] tinkerpop git commit: Merge branch 'tp32' into tp33
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/a6ba2d5b Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/a6ba2d5b Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/a6ba2d5b Branch: refs/heads/TINKERPOP-1996 Commit: a6ba2d5b225de0cba79370774bc211d572516bfc Parents: bf07f13 3dcabd4 Author: Stephen Mallette Authored: Thu Jul 12 10:51:23 2018 -0400 Committer: Stephen Mallette Committed: Thu Jul 12 10:51:23 2018 -0400 -- CHANGELOG.asciidoc | 1 + .../java/org/apache/tinkerpop/gremlin/driver/Handler.java| 8 .../gremlin/driver/handler/WebSocketClientHandler.java | 5 - 3 files changed, 9 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a6ba2d5b/CHANGELOG.asciidoc -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a6ba2d5b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Handler.java --
[25/26] tinkerpop git commit: TINKERPOP-1996 Added with() options for io()
TINKERPOP-1996 Added with() options for io() Included GraphReader and GraphWriter detection and added tests Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/28c7fad2 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/28c7fad2 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/28c7fad2 Branch: refs/heads/TINKERPOP-1996 Commit: 28c7fad2ccf2af8e21644723b85bd4fdd41a587d Parents: 1fd43c6 Author: Stephen Mallette Authored: Wed Jul 11 15:40:39 2018 -0400 Committer: Stephen Mallette Committed: Thu Jul 12 10:59:39 2018 -0400 -- .../tinkerpop/gremlin/process/traversal/IO.java | 54 ++ .../process/traversal/step/map/IoStep.java | 132 -- .../traversal/dsl/graph/GraphTraversalTest.java | 5 +- .../decoration/VertexProgramStrategyTest.java | 7 +- .../Process/Traversal/GraphTraversal.cs | 18 ++ .../Process/Traversal/GraphTraversalSource.cs | 17 +- .../groovy/jsr223/GroovyTranslatorProvider.java | 6 + .../lib/process/graph-traversal.js | 36 ++-- .../gremlin_python/process/graph_traversal.py | 17 +- .../gremlin/process/ProcessStandardSuite.java | 2 + .../process/traversal/step/map/ReadTest.java| 114 ++-- .../process/traversal/step/map/WriteTest.java | 175 +++ .../ElementIdStrategyProcessTest.java | 1 - .../gremlin/hadoop/structure/HadoopGraph.java | 10 ++ .../structure/TinkerGraphPlayTest.java | 12 +- ...ctTinkerGraphGraphSONTranslatorProvider.java | 5 + .../gryo/TinkerGraphGryoTranslatorProvider.java | 7 +- 17 files changed, 542 insertions(+), 76 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/28c7fad2/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/IO.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/IO.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/IO.java new file mode 100644 index 000..f76c2bc --- /dev/null +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/IO.java @@ -0,0 +1,54 @@ +/* + * 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; + +import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal; +import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource; +import org.apache.tinkerpop.gremlin.structure.Graph; +import org.apache.tinkerpop.gremlin.structure.io.GraphReader; +import org.apache.tinkerpop.gremlin.structure.io.GraphWriter; + +/** + * Fields that can be provided to the {@link GraphTraversalSource#io(String)} using the + * {@link GraphTraversal#with(String,Object)} step modulator to provide additional configurations. + * + * @author Stephen Mallette (http://stephen.genoprime.com) + */ +public class IO { + +private IO() {} + +public static final String graphson = "graphson"; +public static final String gryo = "gryo"; +public static final String graphml = "graphml"; + +/** + * The specific {@link GraphReader} instance to use or the name of the fully qualified classname of such an + * instance. If this value is not specified then {@link GraphTraversalSource#io(String)} will attempt to construct + * a default {@link GraphReader} based on the file extension provided to it. + */ +public static final String reader = Graph.Hidden.hide("tinkerpop.io.reader"); + +/** + * The specific {@link GraphWriter} instance to use or the name of the fully qualified classname of such an + * instance. If this value is not specified then {@link GraphTraversalSource#io(String)} will attempt to construct + * a default {@link GraphWriter} based on the file extension provided to it. + */ +public static final String writer = Graph.Hidden.hide("tinkerpop.io.writer"); +}
[24/26] tinkerpop git commit: TINKERPOP-1996 none() doesn't need to be removed in HadoopIoStrategy
TINKERPOP-1996 none() doesn't need to be removed in HadoopIoStrategy Not sure why this was there in the first place. Removing it not allows Hadoop integration tests to pass, but seems to have no real effect on existing operations. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/f78c87da Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/f78c87da Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/f78c87da Branch: refs/heads/TINKERPOP-1996 Commit: f78c87da3b7b4f98b168880070d2592a39aed2e9 Parents: 28c7fad Author: Stephen Mallette Authored: Thu Jul 12 08:17:56 2018 -0400 Committer: Stephen Mallette Committed: Thu Jul 12 10:59:39 2018 -0400 -- .../process/computer/traversal/strategy/HadoopIoStrategy.java | 3 --- 1 file changed, 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f78c87da/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/process/computer/traversal/strategy/HadoopIoStrategy.java -- diff --git a/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/process/computer/traversal/strategy/HadoopIoStrategy.java b/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/process/computer/traversal/strategy/HadoopIoStrategy.java index 38d5a7f..89ee04b 100644 --- a/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/process/computer/traversal/strategy/HadoopIoStrategy.java +++ b/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/process/computer/traversal/strategy/HadoopIoStrategy.java @@ -60,9 +60,6 @@ public final class HadoopIoStrategy extends AbstractTraversalStrategy
[12/26] tinkerpop git commit: Include JavaScript GLV DriverRemoteConnection close() fix in CHANGELOG
Include JavaScript GLV DriverRemoteConnection close() fix in CHANGELOG Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/b0c836b4 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/b0c836b4 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/b0c836b4 Branch: refs/heads/TINKERPOP-1996 Commit: b0c836b4e6d13bb973ce84588683d68bb36f92dc Parents: 59d2f10 Author: Jorge Bay Gondra Authored: Thu Jul 12 11:52:41 2018 +0200 Committer: Jorge Bay Gondra Committed: Thu Jul 12 11:52:41 2018 +0200 -- CHANGELOG.asciidoc | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b0c836b4/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 1d05615..ee49c09 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -38,6 +38,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima * Fixed bug in `GroovyTranslator` that didn't properly handle empty `Map` objects. * 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. [[release-3-2-9]] === TinkerPop 3.2.9 (Release Date: May 8, 2018)
[13/26] tinkerpop git commit: Merge branch 'tp32' into tp33
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/bf07f13b Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/bf07f13b Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/bf07f13b Branch: refs/heads/TINKERPOP-1996 Commit: bf07f13b50ad9ac49d6815bebc5ab82ed4b2e8a7 Parents: 1f15781 b0c836b Author: Jorge Bay Gondra Authored: Thu Jul 12 11:52:54 2018 +0200 Committer: Jorge Bay Gondra Committed: Thu Jul 12 11:52:54 2018 +0200 -- CHANGELOG.asciidoc | 1 + .../lib/driver/driver-remote-connection.js | 20 ++-- 2 files changed, 11 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/bf07f13b/CHANGELOG.asciidoc -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/bf07f13b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js --
[23/26] tinkerpop git commit: TINKERPOP-1996 Added some javadoc and code formatting
TINKERPOP-1996 Added some javadoc and code formatting Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/1fd43c6a Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/1fd43c6a Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/1fd43c6a Branch: refs/heads/TINKERPOP-1996 Commit: 1fd43c6a941c426c34273ab3122a8852b75f84b3 Parents: 2e6c170 Author: Stephen Mallette Authored: Wed Jul 11 10:36:11 2018 -0400 Committer: Stephen Mallette Committed: Thu Jul 12 10:59:39 2018 -0400 -- .../traversal/dsl/graph/GraphTraversalSource.java | 14 ++ .../gremlin/process/traversal/step/ReadWriting.java | 8 .../gremlin/process/traversal/step/map/IoStep.java| 2 ++ .../computer/traversal/step/map/HadoopIoStep.java | 4 .../computer/traversal/strategy/HadoopIoStrategy.java | 7 +++ .../tinkergraph/structure/TinkerGraphPlayTest.java| 2 -- 6 files changed, 35 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1fd43c6a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java index aa4995d..7357418 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java @@ -391,6 +391,20 @@ public class GraphTraversalSource implements TraversalSource { return traversal.addStep(new GraphStep<>(traversal, Edge.class, true, edgesIds)); } +/** + * Performs a read or write based operation on the {@link Graph} backing this {@code GraphTraversalSource}. This + * step can be accompanied by the {@link GraphTraversal#with(String, Object)} modulator for further configuration + * and must be accompanied by a {@link GraphTraversal#read()} or {@link GraphTraversal#write()} modulator step + * which will terminate the traversal. + * + * @param file the name of file for which the read or write will apply - note that the context of how this + * parameter is used is wholly dependent on the implementation + * @return the traversal with the {@link IoStep} added + * @see http://tinkerpop.apache.org/docs/${project.version}/reference/#io-step; target="_blank">Reference Documentation - IO Step + * @see http://tinkerpop.apache.org/docs/${project.version}/reference/#read-step; target="_blank">Reference Documentation - Read Step + * @see http://tinkerpop.apache.org/docs/${project.version}/reference/#write-step; target="_blank">Reference Documentation - Write Step + * @since 3.4.0 + */ public GraphTraversal io(final String file) { final GraphTraversalSource clone = this.clone(); clone.bytecode.addStep(GraphTraversal.Symbols.io, file); http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1fd43c6a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/ReadWriting.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/ReadWriting.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/ReadWriting.java index 18de925..d0e8bbf 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/ReadWriting.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/ReadWriting.java @@ -18,11 +18,19 @@ */ package org.apache.tinkerpop.gremlin.process.traversal.step; +import org.apache.tinkerpop.gremlin.process.traversal.Step; +import org.apache.tinkerpop.gremlin.structure.Graph; + /** + * An interface that defines a {@link Step} as one that handles IO based operations for a {@link Graph}. + * * @author Stephen Mallette (http://stephen.genoprime.com) */ public interface ReadWriting extends Configuring { +/** + * Determines the mode of the the IO operation as being for reading or writing (or by default "unset") + */ public enum Mode { UNSET, READING, http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1fd43c6a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/IoStep.java -- diff --git
[11/26] tinkerpop git commit: Merge pull request #888 from elliotttf/fix-close-return-tp32
Merge pull request #888 from elliotttf/fix-close-return-tp32 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/59d2f104 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/59d2f104 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/59d2f104 Branch: refs/heads/TINKERPOP-1996 Commit: 59d2f1048f2041045dff6ff2b546fd3caa9937a2 Parents: 309957b f6e50ae Author: Jorge Bay Gondra Authored: Thu Jul 12 11:48:43 2018 +0200 Committer: Jorge Bay Gondra Committed: Thu Jul 12 11:48:43 2018 +0200 -- .../lib/driver/driver-remote-connection.js | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) --
[21/26] tinkerpop git commit: TINKERPOP-1996 read()/write() api changes for return type
TINKERPOP-1996 read()/write() api changes for return type No more weird Map status return for read() and write(). Both just work like a terminator and self iterate to return nothing. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/f02daaf5 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/f02daaf5 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/f02daaf5 Branch: refs/heads/TINKERPOP-1996 Commit: f02daaf55cf847f1d47080653857e824eb804feb Parents: 585980b Author: Stephen Mallette Authored: Tue Jul 10 14:53:52 2018 -0400 Committer: Stephen Mallette Committed: Thu Jul 12 10:59:38 2018 -0400 -- .../traversal/dsl/graph/GraphTraversalSource.java | 18 ++ .../process/traversal/step/map/ReadStep.java | 12 .../process/traversal/step/map/WriteStep.java | 13 - .../strategy/verification/IoUsageStrategy.java| 10 -- .../Process/Traversal/GraphTraversalSource.cs | 12 ++-- .../traversal/strategy/HadoopIoStrategy.java | 4 .../structure/TinkerGraphPlayTest.java| 10 ++ 7 files changed, 46 insertions(+), 33 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f02daaf5/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java index 9b82108..49e012f 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java @@ -24,6 +24,7 @@ import org.apache.tinkerpop.gremlin.process.computer.GraphComputer; import org.apache.tinkerpop.gremlin.process.remote.RemoteConnection; import org.apache.tinkerpop.gremlin.process.remote.traversal.strategy.decoration.RemoteStrategy; import org.apache.tinkerpop.gremlin.process.traversal.Bytecode; +import org.apache.tinkerpop.gremlin.process.traversal.Step; import org.apache.tinkerpop.gremlin.process.traversal.Traversal; import org.apache.tinkerpop.gremlin.process.traversal.TraversalSource; import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategies; @@ -43,6 +44,7 @@ import org.apache.tinkerpop.gremlin.structure.Vertex; import org.apache.tinkerpop.gremlin.structure.util.StringFactory; import java.util.Map; +import java.util.NoSuchElementException; import java.util.Optional; import java.util.function.BinaryOperator; import java.util.function.Supplier; @@ -393,18 +395,18 @@ public class GraphTraversalSource implements TraversalSource { return traversal.addStep(new GraphStep<>(traversal, Edge.class, true, edgesIds)); } -public GraphTraversal, Map> read(final String localFile) { +public GraphTraversal read(final String file) { final GraphTraversalSource clone = this.clone(); -clone.bytecode.addStep(GraphTraversal.Symbols.read, localFile); -final GraphTraversal.Admin, Map> traversal = new DefaultGraphTraversal<>(clone); -return traversal.addStep(new ReadStep(traversal, localFile)); +clone.bytecode.addStep(GraphTraversal.Symbols.read, file); +final GraphTraversal.Admin traversal = new DefaultGraphTraversal<>(clone); +return traversal.addStep(new ReadStep(traversal, file)).iterate(); } -public GraphTraversal, Map> write(final String localFile) { +public GraphTraversal write(final String file) { final GraphTraversalSource clone = this.clone(); -clone.bytecode.addStep(GraphTraversal.Symbols.write, localFile); -final GraphTraversal.Admin, Map> traversal = new DefaultGraphTraversal<>(clone); -return traversal.addStep(new WriteStep(traversal, localFile)); +clone.bytecode.addStep(GraphTraversal.Symbols.write, file); +final GraphTraversal.Admin traversal = new DefaultGraphTraversal<>(clone); +return traversal.addStep(new WriteStep(traversal, file)).iterate(); } /** http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f02daaf5/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ReadStep.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ReadStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ReadStep.java index
[18/26] tinkerpop git commit: Merge branch 'TINKERPOP-1986'
Merge branch 'TINKERPOP-1986' Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/3852c873 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/3852c873 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/3852c873 Branch: refs/heads/TINKERPOP-1996 Commit: 3852c87343bacce513fc5cfb1cf9095fa759cb43 Parents: 8c05c19 3108016 Author: Stephen Mallette Authored: Thu Jul 12 10:54:47 2018 -0400 Committer: Stephen Mallette Committed: Thu Jul 12 10:54:47 2018 -0400 -- CHANGELOG.asciidoc | 3 +- docs/src/reference/gremlin-variants.asciidoc| 4 +-- docs/src/upgrade/release-3.4.x.asciidoc | 7 - .../gremlin/jsr223/GremlinScriptEngine.java | 25 --- .../gremlin/jsr223/ImportCustomizer.java| 8 - .../strategy/decoration/PartitionStrategy.java | 12 .../strategy/decoration/SubgraphStrategy.java | 16 -- .../decoration/PartitionStrategyTest.java | 8 ++--- .../PartitionStrategyTraverseTest.java | 2 +- .../SubgraphStrategyTraverseTest.java | 2 +- .../Strategy/Decoration/SubgraphStrategy.cs | 22 +++--- .../DriverRemoteConnection/StrategiesTests.cs | 20 ++-- .../PartitionStrategyProcessTest.java | 32 ++-- .../decoration/SubgraphStrategyProcessTest.java | 8 ++--- .../decoration/TranslationStrategy.java | 2 +- 15 files changed, 58 insertions(+), 113 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3852c873/CHANGELOG.asciidoc --
[06/26] tinkerpop git commit: Added some javadoc CTR
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/309957bc Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/309957bc Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/309957bc Branch: refs/heads/TINKERPOP-1996 Commit: 309957bc210eacc93114a261e3dbf1bb0db40231 Parents: 34a648b Author: Stephen Mallette Authored: Sat Jun 30 06:24:23 2018 -0400 Committer: Stephen Mallette Committed: Sat Jun 30 06:24:23 2018 -0400 -- .../dsl/graph/GraphTraversalSource.java | 84 +++- 1 file changed, 83 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/309957bc/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java index 1b6a218..baba19c 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java @@ -122,11 +122,17 @@ public class GraphTraversalSource implements TraversalSource { CONFIGURATIONS +/** + * {@inheritDoc} + */ @Override public GraphTraversalSource withStrategies(final TraversalStrategy... traversalStrategies) { return (GraphTraversalSource) TraversalSource.super.withStrategies(traversalStrategies); } +/** + * {@inheritDoc} + */ @Override @SuppressWarnings({"unchecked"}) public GraphTraversalSource withoutStrategies(final Class... traversalStrategyClasses) { @@ -139,76 +145,121 @@ public class GraphTraversalSource implements TraversalSource { return (GraphTraversalSource) TraversalSource.super.withBindings(bindings); } +/** + * {@inheritDoc} + */ @Override public GraphTraversalSource withComputer(final Computer computer) { return (GraphTraversalSource) TraversalSource.super.withComputer(computer); } +/** + * {@inheritDoc} + */ @Override public GraphTraversalSource withComputer(final Class graphComputerClass) { return (GraphTraversalSource) TraversalSource.super.withComputer(graphComputerClass); } +/** + * {@inheritDoc} + */ @Override public GraphTraversalSource withComputer() { return (GraphTraversalSource) TraversalSource.super.withComputer(); } +/** + * {@inheritDoc} + */ @Override public GraphTraversalSource withSideEffect(final String key, final Supplier initialValue, final BinaryOperator reducer) { return (GraphTraversalSource) TraversalSource.super.withSideEffect(key, initialValue, reducer); } +/** + * {@inheritDoc} + */ @Override public GraphTraversalSource withSideEffect(final String key, final A initialValue, final BinaryOperator reducer) { return (GraphTraversalSource) TraversalSource.super.withSideEffect(key, initialValue, reducer); } +/** + * {@inheritDoc} + */ @Override public GraphTraversalSource withSideEffect(final String key, final A initialValue) { return (GraphTraversalSource) TraversalSource.super.withSideEffect(key, initialValue); } +/** + * {@inheritDoc} + */ @Override public GraphTraversalSource withSideEffect(final String key, final Supplier initialValue) { return (GraphTraversalSource) TraversalSource.super.withSideEffect(key, initialValue); } +/** + * {@inheritDoc} + */ @Override public GraphTraversalSource withSack(final Supplier initialValue, final UnaryOperator splitOperator, final BinaryOperator mergeOperator) { return (GraphTraversalSource) TraversalSource.super.withSack(initialValue, splitOperator, mergeOperator); } +/** + * {@inheritDoc} + */ @Override public GraphTraversalSource withSack(final A initialValue, final UnaryOperator splitOperator, final BinaryOperator mergeOperator) { return (GraphTraversalSource) TraversalSource.super.withSack(initialValue, splitOperator, mergeOperator); } +/** + * {@inheritDoc} + */ @Override public GraphTraversalSource withSack(final A initialValue) { return (GraphTraversalSource) TraversalSource.super.withSack(initialValue); } +/** + * {@inheritDoc} + */ @Override public
[22/26] tinkerpop git commit: TINKERPOP-1996 Introduce read() and write() steps
TINKERPOP-1996 Introduce read() and write() steps Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/3641e910 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/3641e910 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/3641e910 Branch: refs/heads/TINKERPOP-1996 Commit: 3641e9106141cc52b4266ce0179637f1660ab680 Parents: 3852c87 Author: Stephen Mallette Authored: Fri Jun 29 15:04:17 2018 -0400 Committer: Stephen Mallette Committed: Thu Jul 12 10:59:38 2018 -0400 -- .../traversal/dsl/graph/GraphTraversal.java | 2 + .../dsl/graph/GraphTraversalSource.java | 17 +++ .../process/traversal/step/map/ReadStep.java| 112 +++ .../process/traversal/step/map/WriteStep.java | 111 ++ .../strategy/verification/IoUsageStrategy.java | 60 ++ .../verification/IoUsageStrategyTest.java | 93 +++ .../glv/GraphTraversalSource.template | 4 +- gremlin-dotnet/glv/generate.groovy | 5 +- .../Process/Traversal/GraphTraversalSource.cs | 22 .../lib/process/graph-traversal.js | 20 .../gremlin_python/process/graph_traversal.py | 10 ++ 11 files changed, 452 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3641e910/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 7d1e7e4..6d75745 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 @@ -2789,6 +2789,8 @@ public interface GraphTraversal extends Traversal { public static final String skip = "skip"; public static final String tail = "tail"; public static final String coin = "coin"; +public static final String read = "read"; +public static final String write = "write"; public static final String timeLimit = "timeLimit"; public static final String simplePath = "simplePath"; http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3641e910/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java index bc3ef9e..9b82108 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java @@ -31,6 +31,8 @@ import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy; import org.apache.tinkerpop.gremlin.process.traversal.step.map.AddEdgeStartStep; import org.apache.tinkerpop.gremlin.process.traversal.step.map.AddVertexStartStep; import org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphStep; +import org.apache.tinkerpop.gremlin.process.traversal.step.map.ReadStep; +import org.apache.tinkerpop.gremlin.process.traversal.step.map.WriteStep; import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.InjectStep; import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.RequirementsStrategy; import org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement; @@ -40,6 +42,7 @@ import org.apache.tinkerpop.gremlin.structure.Transaction; import org.apache.tinkerpop.gremlin.structure.Vertex; import org.apache.tinkerpop.gremlin.structure.util.StringFactory; +import java.util.Map; import java.util.Optional; import java.util.function.BinaryOperator; import java.util.function.Supplier; @@ -390,6 +393,20 @@ public class GraphTraversalSource implements TraversalSource { return traversal.addStep(new GraphStep<>(traversal, Edge.class, true, edgesIds)); } +public GraphTraversal, Map> read(final String localFile) { +final GraphTraversalSource clone = this.clone(); +clone.bytecode.addStep(GraphTraversal.Symbols.read, localFile); +final GraphTraversal.Admin, Map> traversal = new DefaultGraphTraversal<>(clone); +return traversal.addStep(new ReadStep(traversal,
[04/26] tinkerpop git commit: Merge branch 'tp33'
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/734b01f3 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/734b01f3 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/734b01f3 Branch: refs/heads/TINKERPOP-1996 Commit: 734b01f358c59c9e16b2479c5bcdfb95a7e75e78 Parents: ec7e27e 65ba04f Author: Stephen Mallette Authored: Fri Jun 29 15:21:49 2018 -0400 Committer: Stephen Mallette Committed: Fri Jun 29 15:21:49 2018 -0400 -- gremlin-dotnet/glv/generate.groovy | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) --
[07/26] tinkerpop git commit: Merge branch 'tp32' into tp33
Merge branch 'tp32' into tp33 Conflicts: gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/1f15781a Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/1f15781a Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/1f15781a Branch: refs/heads/TINKERPOP-1996 Commit: 1f15781ac049008e50b63e3632c86158e570ef15 Parents: 65ba04f 309957b Author: Stephen Mallette Authored: Sat Jun 30 06:28:22 2018 -0400 Committer: Stephen Mallette Committed: Sat Jun 30 06:28:22 2018 -0400 -- .../dsl/graph/GraphTraversalSource.java | 94 +++- 1 file changed, 93 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1f15781a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java -- diff --cc gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java index 81a0a71,baba19c..bc3ef9e --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java @@@ -127,6 -139,15 +133,9 @@@ public class GraphTraversalSource imple return (GraphTraversalSource) TraversalSource.super.withoutStrategies(traversalStrategyClasses); } -@Override -@Deprecated -public GraphTraversalSource withBindings(final Bindings bindings) { -return (GraphTraversalSource) TraversalSource.super.withBindings(bindings); -} - + /** + * {@inheritDoc} + */ @Override public GraphTraversalSource withComputer(final Computer computer) { return (GraphTraversalSource) TraversalSource.super.withComputer(computer); @@@ -247,6 -319,30 +307,10 @@@ SPAWNS -/** - * @deprecated As of release 3.1.0, replaced by {@link #addV()} - */ -@Deprecated -public GraphTraversal addV(final Object... keyValues) { -ElementHelper.legalPropertyKeyValueArray(keyValues); -if (keyValues.length != 0 && keyValues[0].equals(T.label)) { -final GraphTraversal traversal = this.addV(keyValues[1].toString()); -for (int i = 2; i < keyValues.length; i = i + 2) { -traversal.property(keyValues[i], keyValues[i + 1]); -} -return traversal; -} else { -final GraphTraversal traversal = this.addV(); -for (int i = 0; i < keyValues.length; i = i + 2) { -traversal.property(keyValues[i], keyValues[i + 1]); -} -return traversal; -} -} + + /** + * Spawns a {@link GraphTraversal} by adding a vertex with the specified label. + */ public GraphTraversal addV(final String label) { final GraphTraversalSource clone = this.clone(); clone.bytecode.addStep(GraphTraversal.Symbols.addV, label); @@@ -254,34 -350,19 +318,49 @@@ return traversal.addStep(new AddVertexStartStep(traversal, label)); } + /** ++ * Spawns a {@link GraphTraversal} by adding a vertex with the label as determined by a {@link Traversal}. ++ */ +public GraphTraversal addV(final Traversal vertexLabelTraversal) { +final GraphTraversalSource clone = this.clone(); +clone.bytecode.addStep(GraphTraversal.Symbols.addV, vertexLabelTraversal); +final GraphTraversal.Admin traversal = new DefaultGraphTraversal<>(clone); +return traversal.addStep(new AddVertexStartStep(traversal, vertexLabelTraversal)); +} + ++/** + * Spawns a {@link GraphTraversal} by adding a vertex with the default label. + */ public GraphTraversal addV() { final GraphTraversalSource clone = this.clone(); clone.bytecode.addStep(GraphTraversal.Symbols.addV); final GraphTraversal.Admin traversal = new DefaultGraphTraversal<>(clone); -return traversal.addStep(new AddVertexStartStep(traversal, null)); +return traversal.addStep(new AddVertexStartStep(traversal, (String)null)); +} + ++/** ++ * Spawns a {@link GraphTraversal} by adding a edge with the specified label. ++ */ +public GraphTraversal addE(final String label) { +final GraphTraversalSource clone = this.clone(); +clone.bytecode.addStep(GraphTraversal.Symbols.addE, label); +final GraphTraversal.Admin traversal = new DefaultGraphTraversal<>(clone); +return
[05/26] tinkerpop git commit: The GraphTraversal in .NET got out of sync somehow. CTR
The GraphTraversal in .NET got out of sync somehow. CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/1f240fe2 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/1f240fe2 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/1f240fe2 Branch: refs/heads/TINKERPOP-1996 Commit: 1f240fe2593524211553c222deadc4f95628f33a Parents: 734b01f Author: Stephen Mallette Authored: Fri Jun 29 16:04:26 2018 -0400 Committer: Stephen Mallette Committed: Fri Jun 29 16:04:26 2018 -0400 -- .../src/Gremlin.Net/Process/Traversal/GraphTraversal.cs | 9 + 1 file changed, 9 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1f240fe2/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 9952455..537cdbe 100644 --- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs +++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs @@ -1676,5 +1676,14 @@ namespace Gremlin.Net.Process.Traversal return Wrap(this); } +/// +/// Adds the with step to this . +/// +public GraphTraversal With (string key, object value) +{ +Bytecode.AddStep("with", key, value); +return Wrap(this); +} + } } \ No newline at end of file
[08/26] tinkerpop git commit: Merge branch 'tp33'
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/11895ceb Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/11895ceb Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/11895ceb Branch: refs/heads/TINKERPOP-1996 Commit: 11895ceb1de2fd918ae51b16875e18712ecf Parents: 1f240fe 1f15781 Author: Stephen Mallette Authored: Sat Jun 30 06:28:31 2018 -0400 Committer: Stephen Mallette Committed: Sat Jun 30 06:28:31 2018 -0400 -- .../dsl/graph/GraphTraversalSource.java | 94 +++- 1 file changed, 93 insertions(+), 1 deletion(-) --
[02/26] tinkerpop git commit: Removed some unneeded semi-colons from groovy script CTR
Removed some unneeded semi-colons from groovy script CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/34a648b1 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/34a648b1 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/34a648b1 Branch: refs/heads/TINKERPOP-1996 Commit: 34a648b1bb36475beddbad4d673f5bed9c77ed4a Parents: 4160b04 Author: Stephen Mallette Authored: Fri Jun 29 15:21:21 2018 -0400 Committer: Stephen Mallette Committed: Fri Jun 29 15:21:21 2018 -0400 -- gremlin-dotnet/glv/generate.groovy | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/34a648b1/gremlin-dotnet/glv/generate.groovy -- diff --git a/gremlin-dotnet/glv/generate.groovy b/gremlin-dotnet/glv/generate.groovy index 8f5fa44..29f9ec7 100644 --- a/gremlin-dotnet/glv/generate.groovy +++ b/gremlin-dotnet/glv/generate.groovy @@ -61,7 +61,7 @@ def toCSharpTypeMap = ["Long": "long", "Comparator": "IComparator", "VertexProgram": "object"] -def useE2 = ["E2", "E2"]; +def useE2 = ["E2", "E2"] def methodsWithSpecificTypes = ["constant": useE2, "limit": useE2, "mean": useE2, @@ -92,17 +92,17 @@ def getCSharpGenericTypeParam = { typeName -> } def toCSharpType = { name -> -String typeName = toCSharpTypeMap.getOrDefault(name, name); +String typeName = toCSharpTypeMap.getOrDefault(name, name) if (typeName.equals(name) && (typeName.contains("? extends") || typeName.equals("Tree"))) { typeName = "E2" } -return typeName; +return typeName } def toCSharpMethodName = { symbol -> (String) Character.toUpperCase(symbol.charAt(0)) + symbol.substring(1) } def getJavaGenericTypeParameterTypeNames = { method -> -def typeArguments = method.genericReturnType.actualTypeArguments; +def typeArguments = method.genericReturnType.actualTypeArguments return typeArguments. collect { (it instanceof Class) ? ((Class)it).simpleName : it.typeName }. collect { name -> @@ -110,7 +110,7 @@ def getJavaGenericTypeParameterTypeNames = { method -> name = "object" } else if (name.equals("B")) { -name = "E2"; +name = "E2" } name } @@ -124,18 +124,18 @@ def getJavaParameterTypeNames = { method -> } def toCSharpParamString = { param, genTypeName -> -String csharpParamTypeName = genTypeName; +String csharpParamTypeName = genTypeName if (csharpParamTypeName == null){ csharpParamTypeName = toCSharpType(param.type.simpleName) } else if (csharpParamTypeName == "M") { -csharpParamTypeName = "object"; +csharpParamTypeName = "object" } else if (csharpParamTypeName == "A[]") { -csharpParamTypeName = "object[]"; +csharpParamTypeName = "object[]" } else if (csharpParamTypeName == "A" || csharpParamTypeName == "B") { -csharpParamTypeName = "E2"; +csharpParamTypeName = "E2" } "${csharpParamTypeName} ${param.name}" } @@ -152,11 +152,11 @@ def getCSharpParamTypeString = { method -> } def getCSharpParamString = { method, useGenericParams -> -def parameters = method.parameters; +def parameters = method.parameters if (parameters.length == 0) return "" -def genericTypes = method.getGenericParameterTypes(); +def genericTypes = method.getGenericParameterTypes() def csharpParameters = parameters. toList().indexed(). collect { index, param -> @@ -174,11 +174,11 @@ def getCSharpParamString = { method, useGenericParams -> } toCSharpParamString(param, genTypeName) }. -toArray(); +toArray() if (method.isVarArgs()) { -def lastIndex = csharpParameters.length-1; -csharpParameters[lastIndex] = "params " + csharpParameters[lastIndex]; +def lastIndex = csharpParameters.length-1 +csharpParameters[lastIndex] = "params " + csharpParameters[lastIndex] } csharpParameters.join(", ")
[26/26] tinkerpop git commit: TINKERPOP-1996 Made read()/write() terminator steps
TINKERPOP-1996 Made read()/write() terminator steps Without this approach the with() operator couldn't be used because the traversal would already be iterated on the call to read() and write(). In this way read() and write() are both terminators and modulators at the same time. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/2e6c1708 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/2e6c1708 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/2e6c1708 Branch: refs/heads/TINKERPOP-1996 Commit: 2e6c1708bc9526df6d3ac5af1657720d9702868e Parents: f02daaf Author: Stephen Mallette Authored: Wed Jul 11 10:20:39 2018 -0400 Committer: Stephen Mallette Committed: Thu Jul 12 10:59:39 2018 -0400 -- .../decoration/VertexProgramStrategy.java | 5 +- .../process/traversal/TraversalStrategies.java | 2 - .../traversal/dsl/graph/GraphTraversal.java | 34 + .../dsl/graph/GraphTraversalSource.java | 19 +-- .../process/traversal/step/ReadWriting.java | 40 ++ .../gremlin/process/traversal/step/Reading.java | 32 - .../gremlin/process/traversal/step/Writing.java | 32 - .../process/traversal/step/map/IoStep.java | 135 +++ .../process/traversal/step/map/ReadStep.java| 113 .../process/traversal/step/map/WriteStep.java | 111 --- .../strategy/verification/IoUsageStrategy.java | 74 -- .../decoration/VertexProgramStrategyTest.java | 4 +- .../verification/IoUsageStrategyTest.java | 93 - .../process/traversal/step/map/ReadTest.java| 8 +- .../traversal/step/map/HadoopIoStep.java| 110 +++ .../traversal/step/map/HadoopReadStep.java | 82 --- .../traversal/step/map/HadoopWriteStep.java | 82 --- .../traversal/strategy/HadoopIoStrategy.java| 30 ++--- .../structure/TinkerGraphPlayTest.java | 2 +- 19 files changed, 343 insertions(+), 665 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2e6c1708/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/decoration/VertexProgramStrategy.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/decoration/VertexProgramStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/decoration/VertexProgramStrategy.java index c83039a..cb99652 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/decoration/VertexProgramStrategy.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/decoration/VertexProgramStrategy.java @@ -34,8 +34,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.TraversalSource; import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategies; import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__; -import org.apache.tinkerpop.gremlin.process.traversal.step.Reading; -import org.apache.tinkerpop.gremlin.process.traversal.step.Writing; +import org.apache.tinkerpop.gremlin.process.traversal.step.ReadWriting; import org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphStep; import org.apache.tinkerpop.gremlin.process.traversal.step.util.EmptyStep; import org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy; @@ -102,7 +101,7 @@ public final class VertexProgramStrategy extends AbstractTraversalStrategy computerTraversal = new DefaultTraversal<>(); final Step firstLegalOLAPStep = getFirstLegalOLAPStep(currentStep); http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2e6c1708/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalStrategies.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalStrategies.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalStrategies.java index 66b0236..ef3e841 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalStrategies.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalStrategies.java @@ -36,7 +36,6 @@ import org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.Path import org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.CountStrategy; import
[10/26] tinkerpop git commit: fix(DriverRemoteConnection): return the promise on close
fix(DriverRemoteConnection): return the promise on close Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/f6e50ae2 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/f6e50ae2 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/f6e50ae2 Branch: refs/heads/TINKERPOP-1996 Commit: f6e50ae231ebd6cf9e488522967ad1d483de4781 Parents: 309957b Author: Elliott Foster Authored: Tue Jul 3 12:35:55 2018 -0500 Committer: GitHub Committed: Tue Jul 3 12:35:55 2018 -0500 -- .../lib/driver/driver-remote-connection.js | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f6e50ae2/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js -- diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js index d9e6000..0f7cedb 100644 --- a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js +++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js @@ -190,16 +190,16 @@ class DriverRemoteConnection extends RemoteConnection { * @return {Promise} */ close() { -if (this._closePromise) { - return this._closePromise; -} -this._closePromise = new Promise(resolve => { - this._ws.on('close', function () { -this.isOpen = false; -resolve(); +if (!this._closePromise) { + this._closePromise = new Promise(resolve => { +this._ws.on('close', function () { + this.isOpen = false; + resolve(); +}); +this._ws.close(); }); - this._ws.close(); -}); +} +return this._closePromise; } } @@ -226,4 +226,4 @@ const bufferFromString = (Int8Array.from !== Buffer.from && Buffer.from) || func return new Buffer(text, 'utf8'); }; -module.exports = DriverRemoteConnection; \ No newline at end of file +module.exports = DriverRemoteConnection;
[03/26] tinkerpop git commit: Merge branch 'tp32' into tp33
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/65ba04f1 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/65ba04f1 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/65ba04f1 Branch: refs/heads/TINKERPOP-1996 Commit: 65ba04f19dd218f10dbf45ee169db7f688357721 Parents: ef888a1 34a648b Author: Stephen Mallette Authored: Fri Jun 29 15:21:42 2018 -0400 Committer: Stephen Mallette Committed: Fri Jun 29 15:21:42 2018 -0400 -- gremlin-dotnet/glv/generate.groovy | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/65ba04f1/gremlin-dotnet/glv/generate.groovy --
[09/26] tinkerpop git commit: Added spring-data-gremlin and kotlin-gremlin-ogm to home page listing CTR
Added spring-data-gremlin and kotlin-gremlin-ogm to home page listing CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/2fd11a14 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/2fd11a14 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/2fd11a14 Branch: refs/heads/TINKERPOP-1996 Commit: 2fd11a1458ea274b2308d1a5863406c303537732 Parents: 11895ce Author: Stephen Mallette Authored: Mon Jul 2 09:00:43 2018 -0400 Committer: Stephen Mallette Committed: Mon Jul 2 09:00:43 2018 -0400 -- docs/site/home/index.html | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2fd11a14/docs/site/home/index.html -- diff --git a/docs/site/home/index.html b/docs/site/home/index.html index e67306e..4ff692c 100644 --- a/docs/site/home/index.html +++ b/docs/site/home/index.html @@ -255,10 +255,12 @@ limitations under the License. https://github.com/karthicks/gremlin-ogm;>gremlin-objects (java/dsl) - An Object Graph Mapping Library For Gremlin. https://github.com/jbmusso/gremlin-template-string;>gremlin-template-string (js/variant) - A Gremlin language builder. https://github.com/davebshow/ipython-gremlin;>ipython-gremlin (python/variant) - Gremlin in IPython and Jupyter. +https://github.com/pm-dev/kotlin-gremlin-ogm;>kotlin-gremlin-ogm (kotlin/dsl) - An Object Graph Mapping Library for Kotlin and Gremlin. http://ogre.clojurewerkz.org/;>ogre (clojure/variant) - A Clojure language wrapper for TinkerPop3. http://bayofmany.github.io/;>Peapod (java/dsl) - An object-graph-wrapper. -https://github.com/LITMUS-Benchmark-Suite/sparql-to-gremlin;>sparql-gremlin (sparql/distinct) - A SPARQL to Gremlin traversal transpiler. -https://github.com/twilmes/sql-gremlin;>sql-gremlin (sql/distinct) - An SQL to Gremlin traversal transpiler. +https://github.com/LITMUS-Benchmark-Suite/sparql-to-gremlin;>sparql-gremlin (sparql/distinct) - A SPARQL to Gremlin traversal compiler. +https://github.com/Microsoft/spring-data-gremlin;>spring-data-gremlin (java/dsl) - Spring Data support for TinkerPop-enabled graph systems. +https://github.com/twilmes/sql-gremlin;>sql-gremlin (sql/distinct) - An SQL to Gremlin traversal compiler. Language Drivers
[01/26] tinkerpop git commit: TINKERPOP-1986 Removed deprecated methods and updated docs accordingly [Forced Update!]
Repository: tinkerpop Updated Branches: refs/heads/TINKERPOP-1996 caa2d1d86 -> f78c87da3 (forced update) TINKERPOP-1986 Removed deprecated methods and updated docs accordingly Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/31080169 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/31080169 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/31080169 Branch: refs/heads/TINKERPOP-1996 Commit: 310801695ab97b60f8032e2c0c15b6617e954234 Parents: b475d12 Author: Stephen Mallette Authored: Mon Jun 18 12:38:45 2018 -0400 Committer: Stephen Mallette Committed: Mon Jun 18 13:32:44 2018 -0400 -- CHANGELOG.asciidoc | 3 +- docs/src/reference/gremlin-variants.asciidoc| 4 +-- docs/src/upgrade/release-3.4.x.asciidoc | 7 - .../gremlin/jsr223/GremlinScriptEngine.java | 25 --- .../gremlin/jsr223/ImportCustomizer.java| 8 - .../strategy/decoration/PartitionStrategy.java | 12 .../strategy/decoration/SubgraphStrategy.java | 16 -- .../decoration/PartitionStrategyTest.java | 8 ++--- .../PartitionStrategyTraverseTest.java | 2 +- .../SubgraphStrategyTraverseTest.java | 2 +- .../Strategy/Decoration/SubgraphStrategy.cs | 22 +++--- .../DriverRemoteConnection/StrategiesTests.cs | 20 ++-- .../PartitionStrategyProcessTest.java | 32 ++-- .../decoration/SubgraphStrategyProcessTest.java | 8 ++--- .../decoration/TranslationStrategy.java | 2 +- 15 files changed, 58 insertions(+), 113 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/31080169/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index f7429fe..428a279 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -36,10 +36,11 @@ This release also includes changes from <>. * Allowed `GraphProvider` to expose a cached `Graph.Feature` object so that the test suite could re-use them to speed test runs. * Fixed a bug in `ReducingBarrierStep`, that returned the provided seed value despite no elements being available. * Changed the order of `select()` scopes. The order is now: maps, side-effects, paths. -* Removed previously deprecated Credentials DSL infrastructure. * Moved `TraversalEngine` to `gremlin-test` as it has long been only used in testing infrastructure. * Events from `EventStrategy` raised from "new" mutations will now return a `KeyedVertexProperty` or `KeyedProperty` as is appropriate. * `MutationListener#vertexPropertyChanged(Vertex, VertexProperty, Object, Object...)` no longer has a default implementation. +* Removed previously deprecated methods in `SubgraphStrategy` and `PartitionStrategy` builders. +* Removed previously deprecated Credentials DSL infrastructure. * Removed previously deprecated `MutationListener#vertexPropertyChanged(Vertex, Property, Object, Object...)`. * Removed previously deprecated `OpSelectorHandler` constructor. * Removed previously deprecated `close()` from `GremlinGroovyScriptEngine` which no longer implements `AutoCloseable`. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/31080169/docs/src/reference/gremlin-variants.asciidoc -- diff --git a/docs/src/reference/gremlin-variants.asciidoc b/docs/src/reference/gremlin-variants.asciidoc index 8aa2435..9f8a216 100644 --- a/docs/src/reference/gremlin-variants.asciidoc +++ b/docs/src/reference/gremlin-variants.asciidoc @@ -417,8 +417,8 @@ class along with a collection of subclasses that mirror the standard Gremlin-Jav [source,csharp] -g = g.WithStrategies(new SubgraphStrategy(vertexCriterion: HasLabel("person"), -edgeCriterion: Has("weight", Gt(0.5; +g = g.WithStrategies(new SubgraphStrategy(vertices: HasLabel("person"), +edges: Has("weight", Gt(0.5; var names = g.V().Values("name").ToList(); // names: [marko, vadas, josh, peter] g = g.WithoutStrategies(typeof(SubgraphStrategy)); http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/31080169/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 8829569..06d5c4a 100644 --- a/docs/src/upgrade/release-3.4.x.asciidoc +++ b/docs/src/upgrade/release-3.4.x.asciidoc @@ -139,8 +139,12 @@ link:https://issues.apache.org/jira/browse/TINKERPOP-1831[TINKERPOP-1831] The following deprecated classes, methods or fields have been removed in this version: * `gremlin-core` +**
[20/26] tinkerpop git commit: TINKERPOP-1996 Minor refactoring of Reading/Writing and javadoc
TINKERPOP-1996 Minor refactoring of Reading/Writing and javadoc Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/585980bb Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/585980bb Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/585980bb Branch: refs/heads/TINKERPOP-1996 Commit: 585980bbb1c9e545c6bf0baf7bc2cfb9847901ec Parents: 23815ec Author: Stephen Mallette Authored: Tue Jul 10 12:55:06 2018 -0400 Committer: Stephen Mallette Committed: Thu Jul 12 10:59:38 2018 -0400 -- .../gremlin/process/traversal/step/Reading.java | 7 - .../gremlin/process/traversal/step/Writing.java | 8 +- .../process/traversal/step/map/ReadStep.java| 27 ++-- .../process/traversal/step/map/WriteStep.java | 25 +- .../traversal/step/map/HadoopReadStep.java | 2 +- .../traversal/step/map/HadoopWriteStep.java | 2 +- .../traversal/strategy/HadoopIoStrategy.java| 4 +-- 7 files changed, 42 insertions(+), 33 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/585980bb/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/Reading.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/Reading.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/Reading.java index b79378b..3f7c714 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/Reading.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/Reading.java @@ -19,9 +19,14 @@ package org.apache.tinkerpop.gremlin.process.traversal.step; /** + * An interface for describing steps that will read a graph from some specified location. + * * @author Stephen Mallette (http://stephen.genoprime.com) */ public interface Reading extends Configuring { -public String getLocalFile(); +/** + * Get the file location to read from. + */ +public String getFile(); } http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/585980bb/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/Writing.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/Writing.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/Writing.java index 7b455f2..fe56363 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/Writing.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/Writing.java @@ -19,8 +19,14 @@ package org.apache.tinkerpop.gremlin.process.traversal.step; /** + * An interface for describing steps that will write a graph to some specified location. + * * @author Stephen Mallette (http://stephen.genoprime.com) */ public interface Writing extends Configuring { -public String getLocalFile(); + +/** + * Get the file location to write to. + */ +public String getFile(); } http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/585980bb/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ReadStep.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ReadStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ReadStep.java index 2612d18..7c71ab5 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ReadStep.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ReadStep.java @@ -21,7 +21,6 @@ package org.apache.tinkerpop.gremlin.process.traversal.step.map; import org.apache.tinkerpop.gremlin.process.traversal.Traversal; import org.apache.tinkerpop.gremlin.process.traversal.Traverser; import org.apache.tinkerpop.gremlin.process.traversal.TraverserGenerator; -import org.apache.tinkerpop.gremlin.process.traversal.step.Configuring; import org.apache.tinkerpop.gremlin.process.traversal.step.Reading; import org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep; import org.apache.tinkerpop.gremlin.process.traversal.step.util.Parameters; @@ -48,20 +47,20 @@ public class ReadStep extends AbstractStep, Map, Map, Maphttp://git-wip-us.apache.org/repos/asf/tinkerpop/blob/585980bb/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/WriteStep.java -- diff --git
[1/2] tinkerpop git commit: TINKERPOP-1986 Removed deprecated methods and updated docs accordingly
Repository: tinkerpop Updated Branches: refs/heads/master 8c05c19ea -> 3852c8734 TINKERPOP-1986 Removed deprecated methods and updated docs accordingly Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/31080169 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/31080169 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/31080169 Branch: refs/heads/master Commit: 310801695ab97b60f8032e2c0c15b6617e954234 Parents: b475d12 Author: Stephen Mallette Authored: Mon Jun 18 12:38:45 2018 -0400 Committer: Stephen Mallette Committed: Mon Jun 18 13:32:44 2018 -0400 -- CHANGELOG.asciidoc | 3 +- docs/src/reference/gremlin-variants.asciidoc| 4 +-- docs/src/upgrade/release-3.4.x.asciidoc | 7 - .../gremlin/jsr223/GremlinScriptEngine.java | 25 --- .../gremlin/jsr223/ImportCustomizer.java| 8 - .../strategy/decoration/PartitionStrategy.java | 12 .../strategy/decoration/SubgraphStrategy.java | 16 -- .../decoration/PartitionStrategyTest.java | 8 ++--- .../PartitionStrategyTraverseTest.java | 2 +- .../SubgraphStrategyTraverseTest.java | 2 +- .../Strategy/Decoration/SubgraphStrategy.cs | 22 +++--- .../DriverRemoteConnection/StrategiesTests.cs | 20 ++-- .../PartitionStrategyProcessTest.java | 32 ++-- .../decoration/SubgraphStrategyProcessTest.java | 8 ++--- .../decoration/TranslationStrategy.java | 2 +- 15 files changed, 58 insertions(+), 113 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/31080169/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index f7429fe..428a279 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -36,10 +36,11 @@ This release also includes changes from <>. * Allowed `GraphProvider` to expose a cached `Graph.Feature` object so that the test suite could re-use them to speed test runs. * Fixed a bug in `ReducingBarrierStep`, that returned the provided seed value despite no elements being available. * Changed the order of `select()` scopes. The order is now: maps, side-effects, paths. -* Removed previously deprecated Credentials DSL infrastructure. * Moved `TraversalEngine` to `gremlin-test` as it has long been only used in testing infrastructure. * Events from `EventStrategy` raised from "new" mutations will now return a `KeyedVertexProperty` or `KeyedProperty` as is appropriate. * `MutationListener#vertexPropertyChanged(Vertex, VertexProperty, Object, Object...)` no longer has a default implementation. +* Removed previously deprecated methods in `SubgraphStrategy` and `PartitionStrategy` builders. +* Removed previously deprecated Credentials DSL infrastructure. * Removed previously deprecated `MutationListener#vertexPropertyChanged(Vertex, Property, Object, Object...)`. * Removed previously deprecated `OpSelectorHandler` constructor. * Removed previously deprecated `close()` from `GremlinGroovyScriptEngine` which no longer implements `AutoCloseable`. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/31080169/docs/src/reference/gremlin-variants.asciidoc -- diff --git a/docs/src/reference/gremlin-variants.asciidoc b/docs/src/reference/gremlin-variants.asciidoc index 8aa2435..9f8a216 100644 --- a/docs/src/reference/gremlin-variants.asciidoc +++ b/docs/src/reference/gremlin-variants.asciidoc @@ -417,8 +417,8 @@ class along with a collection of subclasses that mirror the standard Gremlin-Jav [source,csharp] -g = g.WithStrategies(new SubgraphStrategy(vertexCriterion: HasLabel("person"), -edgeCriterion: Has("weight", Gt(0.5; +g = g.WithStrategies(new SubgraphStrategy(vertices: HasLabel("person"), +edges: Has("weight", Gt(0.5; var names = g.V().Values("name").ToList(); // names: [marko, vadas, josh, peter] g = g.WithoutStrategies(typeof(SubgraphStrategy)); http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/31080169/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 8829569..06d5c4a 100644 --- a/docs/src/upgrade/release-3.4.x.asciidoc +++ b/docs/src/upgrade/release-3.4.x.asciidoc @@ -139,8 +139,12 @@ link:https://issues.apache.org/jira/browse/TINKERPOP-1831[TINKERPOP-1831] The following deprecated classes, methods or fields have been removed in this version: * `gremlin-core` +** `org.apache.tinkerpop.gremlin.jsr223.ImportCustomizer#GREMLIN_CORE` **
[2/2] tinkerpop git commit: Merge branch 'TINKERPOP-1986'
Merge branch 'TINKERPOP-1986' Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/3852c873 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/3852c873 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/3852c873 Branch: refs/heads/master Commit: 3852c87343bacce513fc5cfb1cf9095fa759cb43 Parents: 8c05c19 3108016 Author: Stephen Mallette Authored: Thu Jul 12 10:54:47 2018 -0400 Committer: Stephen Mallette Committed: Thu Jul 12 10:54:47 2018 -0400 -- CHANGELOG.asciidoc | 3 +- docs/src/reference/gremlin-variants.asciidoc| 4 +-- docs/src/upgrade/release-3.4.x.asciidoc | 7 - .../gremlin/jsr223/GremlinScriptEngine.java | 25 --- .../gremlin/jsr223/ImportCustomizer.java| 8 - .../strategy/decoration/PartitionStrategy.java | 12 .../strategy/decoration/SubgraphStrategy.java | 16 -- .../decoration/PartitionStrategyTest.java | 8 ++--- .../PartitionStrategyTraverseTest.java | 2 +- .../SubgraphStrategyTraverseTest.java | 2 +- .../Strategy/Decoration/SubgraphStrategy.cs | 22 +++--- .../DriverRemoteConnection/StrategiesTests.cs | 20 ++-- .../PartitionStrategyProcessTest.java | 32 ++-- .../decoration/SubgraphStrategyProcessTest.java | 8 ++--- .../decoration/TranslationStrategy.java | 2 +- 15 files changed, 58 insertions(+), 113 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3852c873/CHANGELOG.asciidoc --
[1/2] tinkerpop git commit: TINKERPOP-1999 Prevented java driver from hanging on disorderly server shutdown
Repository: tinkerpop Updated Branches: refs/heads/tp33 bf07f13b5 -> a6ba2d5b2 TINKERPOP-1999 Prevented java driver from hanging on disorderly server shutdown We didn't see this before because all tests had assumed an orderly shutdown. In orderly shutdown the server actually manages to send a kill message which the driver respects. In disorderly shutdown, the channel just goes inactive and as described in TINKERPOP-1999 that event was not being handled properly on the driver causing it to hang. I tried to write a test for this but was unable to as I can't figure out how to write an "disorderly shutdown" which basically involves "pulling the plug" on the server. CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/3dcabd4f Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/3dcabd4f Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/3dcabd4f Branch: refs/heads/tp33 Commit: 3dcabd4f1b23fecde28c79a10502ad562d934c8d Parents: b0c836b Author: Stephen Mallette Authored: Thu Jul 12 10:07:04 2018 -0400 Committer: Stephen Mallette Committed: Thu Jul 12 10:07:04 2018 -0400 -- CHANGELOG.asciidoc | 1 + .../java/org/apache/tinkerpop/gremlin/driver/Handler.java| 8 .../gremlin/driver/handler/WebSocketClientHandler.java | 5 - 3 files changed, 9 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3dcabd4f/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index ee49c09..a25e7a5 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 bug in Java driver where an disorderly shutdown of the server would cause the client to hang. * Added a dotnet template project that should make it easier to get started with Gremlin.Net. * Removed `ThreadInterruptCustomizerProvider` from documentation as a way to timeout. * Added Docker images for Gremlin Console and Gremlin Server. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3dcabd4f/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Handler.java -- diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Handler.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Handler.java index 1bd0a3b..a6528b2 100644 --- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Handler.java +++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Handler.java @@ -201,6 +201,14 @@ final class Handler { } @Override +public void channelInactive(final ChannelHandlerContext ctx) throws Exception { +// occurs when the server shutsdown in a disorderly fashion, otherwise in an orderly shutdown the server +// should fire off a close message which will properly release the driver. +super.channelInactive(ctx); +throw new IllegalStateException("Connection to server is no longer active"); +} + +@Override protected void channelRead0(final ChannelHandlerContext channelHandlerContext, final ResponseMessage response) throws Exception { try { final ResponseStatusCode statusCode = response.getStatus().getCode(); http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3dcabd4f/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/handler/WebSocketClientHandler.java -- diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/handler/WebSocketClientHandler.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/handler/WebSocketClientHandler.java index 0a1f2f7..7b5858b 100644 --- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/handler/WebSocketClientHandler.java +++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/handler/WebSocketClientHandler.java @@ -62,11 +62,6 @@ public final class WebSocketClientHandler extends SimpleChannelInboundHandler
tinkerpop git commit: TINKERPOP-1999 Prevented java driver from hanging on disorderly server shutdown
Repository: tinkerpop Updated Branches: refs/heads/tp32 b0c836b4e -> 3dcabd4f1 TINKERPOP-1999 Prevented java driver from hanging on disorderly server shutdown We didn't see this before because all tests had assumed an orderly shutdown. In orderly shutdown the server actually manages to send a kill message which the driver respects. In disorderly shutdown, the channel just goes inactive and as described in TINKERPOP-1999 that event was not being handled properly on the driver causing it to hang. I tried to write a test for this but was unable to as I can't figure out how to write an "disorderly shutdown" which basically involves "pulling the plug" on the server. CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/3dcabd4f Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/3dcabd4f Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/3dcabd4f Branch: refs/heads/tp32 Commit: 3dcabd4f1b23fecde28c79a10502ad562d934c8d Parents: b0c836b Author: Stephen Mallette Authored: Thu Jul 12 10:07:04 2018 -0400 Committer: Stephen Mallette Committed: Thu Jul 12 10:07:04 2018 -0400 -- CHANGELOG.asciidoc | 1 + .../java/org/apache/tinkerpop/gremlin/driver/Handler.java| 8 .../gremlin/driver/handler/WebSocketClientHandler.java | 5 - 3 files changed, 9 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3dcabd4f/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index ee49c09..a25e7a5 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 bug in Java driver where an disorderly shutdown of the server would cause the client to hang. * Added a dotnet template project that should make it easier to get started with Gremlin.Net. * Removed `ThreadInterruptCustomizerProvider` from documentation as a way to timeout. * Added Docker images for Gremlin Console and Gremlin Server. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3dcabd4f/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Handler.java -- diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Handler.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Handler.java index 1bd0a3b..a6528b2 100644 --- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Handler.java +++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Handler.java @@ -201,6 +201,14 @@ final class Handler { } @Override +public void channelInactive(final ChannelHandlerContext ctx) throws Exception { +// occurs when the server shutsdown in a disorderly fashion, otherwise in an orderly shutdown the server +// should fire off a close message which will properly release the driver. +super.channelInactive(ctx); +throw new IllegalStateException("Connection to server is no longer active"); +} + +@Override protected void channelRead0(final ChannelHandlerContext channelHandlerContext, final ResponseMessage response) throws Exception { try { final ResponseStatusCode statusCode = response.getStatus().getCode(); http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3dcabd4f/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/handler/WebSocketClientHandler.java -- diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/handler/WebSocketClientHandler.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/handler/WebSocketClientHandler.java index 0a1f2f7..7b5858b 100644 --- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/handler/WebSocketClientHandler.java +++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/handler/WebSocketClientHandler.java @@ -62,11 +62,6 @@ public final class WebSocketClientHandler extends SimpleChannelInboundHandler
[2/2] tinkerpop git commit: Merge branch 'tp32' into tp33
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/a6ba2d5b Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/a6ba2d5b Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/a6ba2d5b Branch: refs/heads/tp33 Commit: a6ba2d5b225de0cba79370774bc211d572516bfc Parents: bf07f13 3dcabd4 Author: Stephen Mallette Authored: Thu Jul 12 10:51:23 2018 -0400 Committer: Stephen Mallette Committed: Thu Jul 12 10:51:23 2018 -0400 -- CHANGELOG.asciidoc | 1 + .../java/org/apache/tinkerpop/gremlin/driver/Handler.java| 8 .../gremlin/driver/handler/WebSocketClientHandler.java | 5 - 3 files changed, 9 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a6ba2d5b/CHANGELOG.asciidoc -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a6ba2d5b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Handler.java --
[2/3] tinkerpop git commit: Merge branch 'tp32' into tp33
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/a6ba2d5b Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/a6ba2d5b Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/a6ba2d5b Branch: refs/heads/master Commit: a6ba2d5b225de0cba79370774bc211d572516bfc Parents: bf07f13 3dcabd4 Author: Stephen Mallette Authored: Thu Jul 12 10:51:23 2018 -0400 Committer: Stephen Mallette Committed: Thu Jul 12 10:51:23 2018 -0400 -- CHANGELOG.asciidoc | 1 + .../java/org/apache/tinkerpop/gremlin/driver/Handler.java| 8 .../gremlin/driver/handler/WebSocketClientHandler.java | 5 - 3 files changed, 9 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a6ba2d5b/CHANGELOG.asciidoc -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a6ba2d5b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Handler.java --
[1/3] tinkerpop git commit: TINKERPOP-1999 Prevented java driver from hanging on disorderly server shutdown
Repository: tinkerpop Updated Branches: refs/heads/master 3cd352eeb -> 8c05c19ea TINKERPOP-1999 Prevented java driver from hanging on disorderly server shutdown We didn't see this before because all tests had assumed an orderly shutdown. In orderly shutdown the server actually manages to send a kill message which the driver respects. In disorderly shutdown, the channel just goes inactive and as described in TINKERPOP-1999 that event was not being handled properly on the driver causing it to hang. I tried to write a test for this but was unable to as I can't figure out how to write an "disorderly shutdown" which basically involves "pulling the plug" on the server. CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/3dcabd4f Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/3dcabd4f Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/3dcabd4f Branch: refs/heads/master Commit: 3dcabd4f1b23fecde28c79a10502ad562d934c8d Parents: b0c836b Author: Stephen Mallette Authored: Thu Jul 12 10:07:04 2018 -0400 Committer: Stephen Mallette Committed: Thu Jul 12 10:07:04 2018 -0400 -- CHANGELOG.asciidoc | 1 + .../java/org/apache/tinkerpop/gremlin/driver/Handler.java| 8 .../gremlin/driver/handler/WebSocketClientHandler.java | 5 - 3 files changed, 9 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3dcabd4f/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index ee49c09..a25e7a5 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 bug in Java driver where an disorderly shutdown of the server would cause the client to hang. * Added a dotnet template project that should make it easier to get started with Gremlin.Net. * Removed `ThreadInterruptCustomizerProvider` from documentation as a way to timeout. * Added Docker images for Gremlin Console and Gremlin Server. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3dcabd4f/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Handler.java -- diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Handler.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Handler.java index 1bd0a3b..a6528b2 100644 --- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Handler.java +++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Handler.java @@ -201,6 +201,14 @@ final class Handler { } @Override +public void channelInactive(final ChannelHandlerContext ctx) throws Exception { +// occurs when the server shutsdown in a disorderly fashion, otherwise in an orderly shutdown the server +// should fire off a close message which will properly release the driver. +super.channelInactive(ctx); +throw new IllegalStateException("Connection to server is no longer active"); +} + +@Override protected void channelRead0(final ChannelHandlerContext channelHandlerContext, final ResponseMessage response) throws Exception { try { final ResponseStatusCode statusCode = response.getStatus().getCode(); http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3dcabd4f/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/handler/WebSocketClientHandler.java -- diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/handler/WebSocketClientHandler.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/handler/WebSocketClientHandler.java index 0a1f2f7..7b5858b 100644 --- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/handler/WebSocketClientHandler.java +++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/handler/WebSocketClientHandler.java @@ -62,11 +62,6 @@ public final class WebSocketClientHandler extends SimpleChannelInboundHandler
[3/3] tinkerpop git commit: Merge branch 'tp33'
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/8c05c19e Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/8c05c19e Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/8c05c19e Branch: refs/heads/master Commit: 8c05c19ea816b5671778187a94721a82fd1bbc92 Parents: 3cd352e a6ba2d5 Author: Stephen Mallette Authored: Thu Jul 12 10:51:35 2018 -0400 Committer: Stephen Mallette Committed: Thu Jul 12 10:51:35 2018 -0400 -- CHANGELOG.asciidoc | 1 + .../java/org/apache/tinkerpop/gremlin/driver/Handler.java| 8 .../gremlin/driver/handler/WebSocketClientHandler.java | 5 - 3 files changed, 9 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8c05c19e/CHANGELOG.asciidoc --
tinkerpop git commit: TINKERPOP-1996 none() doesn't need to be removed in HadoopIoStrategy
Repository: tinkerpop Updated Branches: refs/heads/TINKERPOP-1996 435ebdc1f -> caa2d1d86 TINKERPOP-1996 none() doesn't need to be removed in HadoopIoStrategy Not sure why this was there in the first place. Removing it not allows Hadoop integration tests to pass, but seems to have no real effect on existing operations. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/caa2d1d8 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/caa2d1d8 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/caa2d1d8 Branch: refs/heads/TINKERPOP-1996 Commit: caa2d1d867248c38f6407cc0063af4864e11d163 Parents: 435ebdc Author: Stephen Mallette Authored: Thu Jul 12 08:17:56 2018 -0400 Committer: Stephen Mallette Committed: Thu Jul 12 08:17:56 2018 -0400 -- .../process/computer/traversal/strategy/HadoopIoStrategy.java | 3 --- 1 file changed, 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/caa2d1d8/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/process/computer/traversal/strategy/HadoopIoStrategy.java -- diff --git a/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/process/computer/traversal/strategy/HadoopIoStrategy.java b/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/process/computer/traversal/strategy/HadoopIoStrategy.java index 38d5a7f..89ee04b 100644 --- a/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/process/computer/traversal/strategy/HadoopIoStrategy.java +++ b/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/process/computer/traversal/strategy/HadoopIoStrategy.java @@ -60,9 +60,6 @@ public final class HadoopIoStrategy extends AbstractTraversalStrategy
[3/5] tinkerpop git commit: Include JavaScript GLV DriverRemoteConnection close() fix in CHANGELOG
Include JavaScript GLV DriverRemoteConnection close() fix in CHANGELOG Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/b0c836b4 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/b0c836b4 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/b0c836b4 Branch: refs/heads/master Commit: b0c836b4e6d13bb973ce84588683d68bb36f92dc Parents: 59d2f10 Author: Jorge Bay Gondra Authored: Thu Jul 12 11:52:41 2018 +0200 Committer: Jorge Bay Gondra Committed: Thu Jul 12 11:52:41 2018 +0200 -- CHANGELOG.asciidoc | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b0c836b4/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 1d05615..ee49c09 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -38,6 +38,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima * Fixed bug in `GroovyTranslator` that didn't properly handle empty `Map` objects. * 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. [[release-3-2-9]] === TinkerPop 3.2.9 (Release Date: May 8, 2018)
[4/5] tinkerpop git commit: Merge branch 'tp32' into tp33
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/bf07f13b Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/bf07f13b Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/bf07f13b Branch: refs/heads/master Commit: bf07f13b50ad9ac49d6815bebc5ab82ed4b2e8a7 Parents: 1f15781 b0c836b Author: Jorge Bay Gondra Authored: Thu Jul 12 11:52:54 2018 +0200 Committer: Jorge Bay Gondra Committed: Thu Jul 12 11:52:54 2018 +0200 -- CHANGELOG.asciidoc | 1 + .../lib/driver/driver-remote-connection.js | 20 ++-- 2 files changed, 11 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/bf07f13b/CHANGELOG.asciidoc -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/bf07f13b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js --
[5/5] tinkerpop git commit: Merge branch 'tp33'
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/3cd352ee Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/3cd352ee Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/3cd352ee Branch: refs/heads/master Commit: 3cd352eeb2503d6c5e3ff9b8d8256eb92f28692d Parents: 2fd11a1 bf07f13 Author: Jorge Bay Gondra Authored: Thu Jul 12 11:53:19 2018 +0200 Committer: Jorge Bay Gondra Committed: Thu Jul 12 11:53:19 2018 +0200 -- CHANGELOG.asciidoc | 1 + .../lib/driver/driver-remote-connection.js | 20 ++-- 2 files changed, 11 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3cd352ee/CHANGELOG.asciidoc --
[1/5] tinkerpop git commit: fix(DriverRemoteConnection): return the promise on close
Repository: tinkerpop Updated Branches: refs/heads/master 2fd11a145 -> 3cd352eeb fix(DriverRemoteConnection): return the promise on close Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/f6e50ae2 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/f6e50ae2 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/f6e50ae2 Branch: refs/heads/master Commit: f6e50ae231ebd6cf9e488522967ad1d483de4781 Parents: 309957b Author: Elliott Foster Authored: Tue Jul 3 12:35:55 2018 -0500 Committer: GitHub Committed: Tue Jul 3 12:35:55 2018 -0500 -- .../lib/driver/driver-remote-connection.js | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f6e50ae2/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js -- diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js index d9e6000..0f7cedb 100644 --- a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js +++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js @@ -190,16 +190,16 @@ class DriverRemoteConnection extends RemoteConnection { * @return {Promise} */ close() { -if (this._closePromise) { - return this._closePromise; -} -this._closePromise = new Promise(resolve => { - this._ws.on('close', function () { -this.isOpen = false; -resolve(); +if (!this._closePromise) { + this._closePromise = new Promise(resolve => { +this._ws.on('close', function () { + this.isOpen = false; + resolve(); +}); +this._ws.close(); }); - this._ws.close(); -}); +} +return this._closePromise; } } @@ -226,4 +226,4 @@ const bufferFromString = (Int8Array.from !== Buffer.from && Buffer.from) || func return new Buffer(text, 'utf8'); }; -module.exports = DriverRemoteConnection; \ No newline at end of file +module.exports = DriverRemoteConnection;
[2/5] tinkerpop git commit: Merge pull request #888 from elliotttf/fix-close-return-tp32
Merge pull request #888 from elliotttf/fix-close-return-tp32 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/59d2f104 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/59d2f104 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/59d2f104 Branch: refs/heads/master Commit: 59d2f1048f2041045dff6ff2b546fd3caa9937a2 Parents: 309957b f6e50ae Author: Jorge Bay Gondra Authored: Thu Jul 12 11:48:43 2018 +0200 Committer: Jorge Bay Gondra Committed: Thu Jul 12 11:48:43 2018 +0200 -- .../lib/driver/driver-remote-connection.js | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) --
[1/3] tinkerpop git commit: fix(DriverRemoteConnection): return the promise on close
Repository: tinkerpop Updated Branches: refs/heads/tp32 309957bc2 -> b0c836b4e fix(DriverRemoteConnection): return the promise on close Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/f6e50ae2 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/f6e50ae2 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/f6e50ae2 Branch: refs/heads/tp32 Commit: f6e50ae231ebd6cf9e488522967ad1d483de4781 Parents: 309957b Author: Elliott Foster Authored: Tue Jul 3 12:35:55 2018 -0500 Committer: GitHub Committed: Tue Jul 3 12:35:55 2018 -0500 -- .../lib/driver/driver-remote-connection.js | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f6e50ae2/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js -- diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js index d9e6000..0f7cedb 100644 --- a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js +++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js @@ -190,16 +190,16 @@ class DriverRemoteConnection extends RemoteConnection { * @return {Promise} */ close() { -if (this._closePromise) { - return this._closePromise; -} -this._closePromise = new Promise(resolve => { - this._ws.on('close', function () { -this.isOpen = false; -resolve(); +if (!this._closePromise) { + this._closePromise = new Promise(resolve => { +this._ws.on('close', function () { + this.isOpen = false; + resolve(); +}); +this._ws.close(); }); - this._ws.close(); -}); +} +return this._closePromise; } } @@ -226,4 +226,4 @@ const bufferFromString = (Int8Array.from !== Buffer.from && Buffer.from) || func return new Buffer(text, 'utf8'); }; -module.exports = DriverRemoteConnection; \ No newline at end of file +module.exports = DriverRemoteConnection;
[4/4] tinkerpop git commit: Merge branch 'tp32' into tp33
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/bf07f13b Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/bf07f13b Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/bf07f13b Branch: refs/heads/tp33 Commit: bf07f13b50ad9ac49d6815bebc5ab82ed4b2e8a7 Parents: 1f15781 b0c836b Author: Jorge Bay Gondra Authored: Thu Jul 12 11:52:54 2018 +0200 Committer: Jorge Bay Gondra Committed: Thu Jul 12 11:52:54 2018 +0200 -- CHANGELOG.asciidoc | 1 + .../lib/driver/driver-remote-connection.js | 20 ++-- 2 files changed, 11 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/bf07f13b/CHANGELOG.asciidoc -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/bf07f13b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js --
[2/4] tinkerpop git commit: Merge pull request #888 from elliotttf/fix-close-return-tp32
Merge pull request #888 from elliotttf/fix-close-return-tp32 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/59d2f104 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/59d2f104 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/59d2f104 Branch: refs/heads/tp33 Commit: 59d2f1048f2041045dff6ff2b546fd3caa9937a2 Parents: 309957b f6e50ae Author: Jorge Bay Gondra Authored: Thu Jul 12 11:48:43 2018 +0200 Committer: Jorge Bay Gondra Committed: Thu Jul 12 11:48:43 2018 +0200 -- .../lib/driver/driver-remote-connection.js | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) --
[2/3] tinkerpop git commit: Merge pull request #888 from elliotttf/fix-close-return-tp32
Merge pull request #888 from elliotttf/fix-close-return-tp32 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/59d2f104 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/59d2f104 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/59d2f104 Branch: refs/heads/tp32 Commit: 59d2f1048f2041045dff6ff2b546fd3caa9937a2 Parents: 309957b f6e50ae Author: Jorge Bay Gondra Authored: Thu Jul 12 11:48:43 2018 +0200 Committer: Jorge Bay Gondra Committed: Thu Jul 12 11:48:43 2018 +0200 -- .../lib/driver/driver-remote-connection.js | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) --
[1/4] tinkerpop git commit: fix(DriverRemoteConnection): return the promise on close
Repository: tinkerpop Updated Branches: refs/heads/tp33 1f15781ac -> bf07f13b5 fix(DriverRemoteConnection): return the promise on close Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/f6e50ae2 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/f6e50ae2 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/f6e50ae2 Branch: refs/heads/tp33 Commit: f6e50ae231ebd6cf9e488522967ad1d483de4781 Parents: 309957b Author: Elliott Foster Authored: Tue Jul 3 12:35:55 2018 -0500 Committer: GitHub Committed: Tue Jul 3 12:35:55 2018 -0500 -- .../lib/driver/driver-remote-connection.js | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f6e50ae2/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js -- diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js index d9e6000..0f7cedb 100644 --- a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js +++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js @@ -190,16 +190,16 @@ class DriverRemoteConnection extends RemoteConnection { * @return {Promise} */ close() { -if (this._closePromise) { - return this._closePromise; -} -this._closePromise = new Promise(resolve => { - this._ws.on('close', function () { -this.isOpen = false; -resolve(); +if (!this._closePromise) { + this._closePromise = new Promise(resolve => { +this._ws.on('close', function () { + this.isOpen = false; + resolve(); +}); +this._ws.close(); }); - this._ws.close(); -}); +} +return this._closePromise; } } @@ -226,4 +226,4 @@ const bufferFromString = (Int8Array.from !== Buffer.from && Buffer.from) || func return new Buffer(text, 'utf8'); }; -module.exports = DriverRemoteConnection; \ No newline at end of file +module.exports = DriverRemoteConnection;
[3/4] tinkerpop git commit: Include JavaScript GLV DriverRemoteConnection close() fix in CHANGELOG
Include JavaScript GLV DriverRemoteConnection close() fix in CHANGELOG Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/b0c836b4 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/b0c836b4 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/b0c836b4 Branch: refs/heads/tp33 Commit: b0c836b4e6d13bb973ce84588683d68bb36f92dc Parents: 59d2f10 Author: Jorge Bay Gondra Authored: Thu Jul 12 11:52:41 2018 +0200 Committer: Jorge Bay Gondra Committed: Thu Jul 12 11:52:41 2018 +0200 -- CHANGELOG.asciidoc | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b0c836b4/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 1d05615..ee49c09 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -38,6 +38,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima * Fixed bug in `GroovyTranslator` that didn't properly handle empty `Map` objects. * 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. [[release-3-2-9]] === TinkerPop 3.2.9 (Release Date: May 8, 2018)
[3/3] tinkerpop git commit: Include JavaScript GLV DriverRemoteConnection close() fix in CHANGELOG
Include JavaScript GLV DriverRemoteConnection close() fix in CHANGELOG Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/b0c836b4 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/b0c836b4 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/b0c836b4 Branch: refs/heads/tp32 Commit: b0c836b4e6d13bb973ce84588683d68bb36f92dc Parents: 59d2f10 Author: Jorge Bay Gondra Authored: Thu Jul 12 11:52:41 2018 +0200 Committer: Jorge Bay Gondra Committed: Thu Jul 12 11:52:41 2018 +0200 -- CHANGELOG.asciidoc | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b0c836b4/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 1d05615..ee49c09 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -38,6 +38,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima * Fixed bug in `GroovyTranslator` that didn't properly handle empty `Map` objects. * 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. [[release-3-2-9]] === TinkerPop 3.2.9 (Release Date: May 8, 2018)