[3/8] tinkerpop git commit: Merge branch 'TINKERPOP-1610' into tp32
Merge branch 'TINKERPOP-1610' into tp32 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/70cf34b2 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/70cf34b2 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/70cf34b2 Branch: refs/heads/TINKERPOP-1602 Commit: 70cf34b2c6f92220e96e9c2e113ac21e0a3eb217 Parents: f84f454 168d5b3 Author: Stephen MalletteAuthored: Mon Jan 23 10:05:35 2017 -0500 Committer: Stephen Mallette Committed: Mon Jan 23 10:05:35 2017 -0500 -- CHANGELOG.asciidoc | 1 + .../upgrade/release-3.2.x-incubating.asciidoc | 17 +++-- .../tinkerpop/gremlin/structure/Graph.java | 20 .../groovy/GroovyEnvironmentIntegrateSuite.java | 2 ++ .../gremlin/groovy/GroovyEnvironmentSuite.java | 2 ++ .../process/GroovyProcessComputerSuite.java | 2 ++ .../process/GroovyProcessStandardSuite.java | 2 ++ 7 files changed, 44 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/70cf34b2/CHANGELOG.asciidoc -- diff --cc CHANGELOG.asciidoc index fb0f8da,21486e9..9453158 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@@ -26,12 -26,8 +26,13 @@@ image::https://raw.githubusercontent.co TinkerPop 3.2.4 (Release Date: NOT OFFICIALLY RELEASED YET) ~~~ +* Fixed a bug associated with user-provided maps and `GroupSideEffectStep`. +* `GroupBiOperator` no longer maintains a detached traversal and thus, no more side-effect related OLAP inconsistencies. +* Added `ProjectedTraverser` which wraps a traverser with a `List` of projected data. +* Fixed an optimization bug in `CollectionBarrierSteps` where the barrier was being consumed on each `addBarrier()`. +* `OrderGlobalStep` and `SampleGlobalStep` use `ProjectedTraverser` and now can work up to the local star graph in OLAP. * SASL negotiation supports both a byte array and Base64 encoded bytes as a string for authentication to Gremlin Server. + * Deprecated all test suites in `gremlin-groovy-test` - Graph Providers no longer need to implement these. * Deprecated `TinkerIoRegistry` replacing it with the more consistently named `TinkerIoRegistryV1d0`. * Made error messaging more consistent during result iteration timeouts in Gremlin Server. * `PathRetractionStrategy` does not add a `NoOpBarrierStep` to the end of local children as its wasted computation in 99% of traversals.
[4/8] tinkerpop git commit: fix wrong python package name
fix wrong python package name change 'gremlin_python' to 'gremlinpython' https://pypi.python.org/pypi/gremlinpython/3.2.3 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/fe5f557a Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/fe5f557a Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/fe5f557a Branch: refs/heads/TINKERPOP-1602 Commit: fe5f557a79e5464b8b8732107ce129e956274323 Parents: 70cf34b Author: Ranger TsaoAuthored: Tue Jan 24 00:33:21 2017 +0800 Committer: GitHub Committed: Tue Jan 24 00:33:21 2017 +0800 -- docs/src/tutorials/gremlin-language-variants/index.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/fe5f557a/docs/src/tutorials/gremlin-language-variants/index.asciidoc -- diff --git a/docs/src/tutorials/gremlin-language-variants/index.asciidoc b/docs/src/tutorials/gremlin-language-variants/index.asciidoc index abd402b..cb419d5 100644 --- a/docs/src/tutorials/gremlin-language-variants/index.asciidoc +++ b/docs/src/tutorials/gremlin-language-variants/index.asciidoc @@ -308,7 +308,7 @@ VM communicates with the JVM. [source,bash] # sudo easy_install pip -$ pip install gremlin_python +$ pip install gremlinpython The Groovy source code below uses Java reflection to generate a Python class that is in 1-to-1 correspondence with
[8/8] tinkerpop git commit: added tests
added tests Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/705c9341 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/705c9341 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/705c9341 Branch: refs/heads/TINKERPOP-1602 Commit: 705c934123830c08b25b1682a028bd0218618829 Parents: b812a2d Author: Robert DaleAuthored: Mon Jan 23 14:27:37 2017 -0500 Committer: Robert Dale Committed: Mon Jan 23 14:36:19 2017 -0500 -- .../server/GremlinServerIntegrateTest.java | 87 +++- gremlin-server/src/test/resources/client.crt| 40 + .../src/test/resources/client.key.pk8 | 47 +++ gremlin-server/src/test/resources/server.crt| 41 + .../src/test/resources/server.key.pk8 | 47 +++ 5 files changed, 261 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/705c9341/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java -- diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java index 1743e89..6e6d1ff 100644 --- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java +++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java @@ -18,6 +18,7 @@ */ package org.apache.tinkerpop.gremlin.server; +import io.netty.handler.ssl.ClientAuth; import io.netty.handler.ssl.SslContext; import io.netty.handler.ssl.SslContextBuilder; import io.netty.handler.ssl.SslProvider; @@ -105,7 +106,13 @@ import static org.junit.Assert.assertEquals; */ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegrationTest { -private Log4jRecordingAppender recordingAppender = null; + private static final String SERVER_KEY = "src/test/resources/server.key.pk8"; + private static final String SERVER_CRT = "src/test/resources/server.crt"; + private static final String KEY_PASS = "changeit"; + private static final String CLIENT_KEY = "src/test/resources/client.key.pk8"; + private static final String CLIENT_CRT = "src/test/resources/client.crt"; + + private Log4jRecordingAppender recordingAppender = null; private final Supplier graphGetter = () -> server.getServerGremlinExecutor().getGraphManager().getGraphs().get("graph"); private final Configuration conf = new BaseConfiguration() {{ setProperty(Graph.GRAPH, RemoteGraph.class.getName()); @@ -165,6 +172,36 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration settings.ssl.enabled = true; settings.ssl.overrideSslContext(createServerSslContext()); break; +case "shouldEnableSslAndClientCertificateAuth": +settings.ssl = new Settings.SslSettings(); +settings.ssl.enabled = true; +settings.ssl.needClientAuth = ClientAuth.REQUIRE; +settings.ssl.keyCertChainFile = SERVER_CRT; +settings.ssl.keyFile = SERVER_KEY; +settings.ssl.keyPassword =KEY_PASS; +// Trust the client +settings.ssl.trustCertChainFile = CLIENT_CRT; + break; +case "shouldEnableSslAndClientCertificateAuthAndFailWithoutCert": +settings.ssl = new Settings.SslSettings(); +settings.ssl.enabled = true; +settings.ssl.needClientAuth = ClientAuth.REQUIRE; +settings.ssl.keyCertChainFile = SERVER_CRT; +settings.ssl.keyFile = SERVER_KEY; +settings.ssl.keyPassword =KEY_PASS; +// Trust the client +settings.ssl.trustCertChainFile = CLIENT_CRT; + break; +case "shouldEnableSslAndClientCertificateAuthAndFailWithoutTrustedClientCert": +settings.ssl = new Settings.SslSettings(); +settings.ssl.enabled = true; +settings.ssl.needClientAuth = ClientAuth.REQUIRE; +settings.ssl.keyCertChainFile = SERVER_CRT; +settings.ssl.keyFile = SERVER_KEY; +settings.ssl.keyPassword =KEY_PASS; +// Trust ONLY the server cert +settings.ssl.trustCertChainFile = SERVER_CRT; + break; case "shouldStartWithDefaultSettings": // test with defaults exception for port because we want to keep testing off of 8182
[1/8] tinkerpop git commit: TINKERPOP-1610 Deprecated Groovy test suites [Forced Update!]
Repository: tinkerpop Updated Branches: refs/heads/TINKERPOP-1602 1633bd945 -> 705c93412 (forced update) TINKERPOP-1610 Deprecated Groovy test suites Graph Providers no longer need to implement these going forward. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/168d5b37 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/168d5b37 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/168d5b37 Branch: refs/heads/TINKERPOP-1602 Commit: 168d5b37e97b15afc1c9c599035f879e92d6c1c1 Parents: 97cc07d Author: Stephen MalletteAuthored: Fri Jan 20 14:59:25 2017 -0500 Committer: Stephen Mallette Committed: Fri Jan 20 14:59:25 2017 -0500 -- CHANGELOG.asciidoc | 1 + .../upgrade/release-3.2.x-incubating.asciidoc | 17 +++-- .../tinkerpop/gremlin/structure/Graph.java | 20 .../groovy/GroovyEnvironmentIntegrateSuite.java | 2 ++ .../gremlin/groovy/GroovyEnvironmentSuite.java | 2 ++ .../process/GroovyProcessComputerSuite.java | 2 ++ .../process/GroovyProcessStandardSuite.java | 2 ++ 7 files changed, 44 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/168d5b37/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 4f3f9ce..21486e9 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -27,6 +27,7 @@ TinkerPop 3.2.4 (Release Date: NOT OFFICIALLY RELEASED YET) ~~~ * SASL negotiation supports both a byte array and Base64 encoded bytes as a string for authentication to Gremlin Server. +* Deprecated all test suites in `gremlin-groovy-test` - Graph Providers no longer need to implement these. * Deprecated `TinkerIoRegistry` replacing it with the more consistently named `TinkerIoRegistryV1d0`. * Made error messaging more consistent during result iteration timeouts in Gremlin Server. * `PathRetractionStrategy` does not add a `NoOpBarrierStep` to the end of local children as its wasted computation in 99% of traversals. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/168d5b37/docs/src/upgrade/release-3.2.x-incubating.asciidoc -- diff --git a/docs/src/upgrade/release-3.2.x-incubating.asciidoc b/docs/src/upgrade/release-3.2.x-incubating.asciidoc index b478b96..7b5d638 100644 --- a/docs/src/upgrade/release-3.2.x-incubating.asciidoc +++ b/docs/src/upgrade/release-3.2.x-incubating.asciidoc @@ -199,8 +199,8 @@ multi-properties have more flexibility in describing their graph capabilities. See: link:https://issues.apache.org/jira/browse/TINKERPOP-919[TINKERPOP-919] -Deprecated Performance OptIn - +Deprecated OptIn + In 3.2.1, all `junit-benchmark` performance tests were deprecated. At that time, the `OptIn` representations of these tests should have been deprecated as well, but they were not. That omission has been remedied now. Specifically, the @@ -210,6 +210,19 @@ following fields were deprecated: * `OptIn.SUITE_PROCESS_PERFORMANCE` * `OptIn.SUITE_STRUCTURE_PERFORMANCE` +As of 3.2.4, the following test suites were also deprecated: + +* `OptIn.SUITE_GROOVY_PROCESS_STANDARD` +* `OptIn.SUITE_GROOVY_PROCESS_COMPUTER` +* `OptIn.SUITE_GROOVY_ENVIRONMENT` +* `OptIn.SUITE_GROOVY_ENVIRONMENT_INTEGRATE` + +Future testing of `gremlin-groovy` (and language variants in general) will be handled differently and will not require +a Graph Provider to validate its operations with it. Graph Providers may now choose to remove these tests from their +test suites, which should reduce the testing burden. + +See: link:https://issues.apache.org/jira/browse/TINKERPOP-1610[TINKERPOP-1610] + Deprecated getInstance() http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/168d5b37/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 255fbca..1027e9b 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 @@ -1226,9 +1226,29 @@ public interface Graph extends AutoCloseable, Host { */ @Deprecated public static String SUITE_PROCESS_PERFORMANCE = "org.apache.tinkerpop.gremlin.process.ProcessPerformanceSuite"; + +/** +
[5/8] tinkerpop git commit: Support SSL client auth
Support SSL client auth Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/e120e9f7 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/e120e9f7 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/e120e9f7 Branch: refs/heads/TINKERPOP-1602 Commit: e120e9f76982941bdcb1bac66c038d492c3609aa Parents: fe5f557 Author: Robert DaleAuthored: Tue Jan 17 14:24:00 2017 -0500 Committer: Robert Dale Committed: Mon Jan 23 14:36:18 2017 -0500 -- .../apache/tinkerpop/gremlin/server/AbstractChannelizer.java | 4 +++- .../java/org/apache/tinkerpop/gremlin/server/Settings.java | 6 ++ 2 files changed, 9 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e120e9f7/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java -- diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java index 57c6994..d28fd4f 100644 --- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java +++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java @@ -242,8 +242,10 @@ public abstract class AbstractChannelizer extends ChannelInitializerhttp://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e120e9f7/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java -- diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java index 97e2875..a3b9545 100644 --- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java +++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java @@ -18,6 +18,7 @@ */ package org.apache.tinkerpop.gremlin.server; +import io.netty.handler.ssl.ClientAuth; import io.netty.handler.ssl.SslContext; import org.apache.tinkerpop.gremlin.driver.MessageSerializer; import org.apache.tinkerpop.gremlin.jsr223.GremlinPlugin; @@ -420,6 +421,11 @@ public class Settings { * contain an X.509 certificate chain in PEM format. {@code null} uses the system default. */ public String trustCertChainFile = null; + +/** + * Require client certificate authentication + */ +public ClientAuth needClientAuth = ClientAuth.NONE; private SslContext sslContext;
[2/8] tinkerpop git commit: Fixed and simplified 'language not supported' formatting
Fixed and simplified 'language not supported' formatting Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/f84f454e Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/f84f454e Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/f84f454e Branch: refs/heads/TINKERPOP-1602 Commit: f84f454ec456ec0d3ad39fc01c0d71b1fa217d4b Parents: 62785dc Author: Joshua ShinavierAuthored: Fri Jan 20 22:24:29 2017 -0800 Committer: Stephen Mallette Committed: Mon Jan 23 07:32:23 2017 -0500 -- .../tinkerpop/gremlin/groovy/engine/ScriptEngines.java | 12 1 file changed, 8 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f84f454e/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/ScriptEngines.java -- diff --git a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/ScriptEngines.java b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/ScriptEngines.java index 6911419..7dcfc5c 100644 --- a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/ScriptEngines.java +++ b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/ScriptEngines.java @@ -110,8 +110,7 @@ public class ScriptEngines implements AutoCloseable { * Evaluate a script with {@code Bindings} for a particular language. */ public Object eval(final String script, final Bindings bindings, final String language) throws ScriptException { -if (!scriptEngines.containsKey(language)) -throw new IllegalArgumentException(String.format("Language [%s] not supported", language)); +checkLanguageIsSupported(language); awaitControlOp(); @@ -126,8 +125,7 @@ public class ScriptEngines implements AutoCloseable { */ public Object eval(final Reader reader, final Bindings bindings, final String language) throws ScriptException { -if (!scriptEngines.containsKey(language)) -throw new IllegalArgumentException("Language [%s] not supported"); +checkLanguageIsSupported(language); awaitControlOp(); @@ -454,4 +452,10 @@ public class ScriptEngines implements AutoCloseable { all.putAll(bindings); return all; } + +private void checkLanguageIsSupported(final String language) { +if (!scriptEngines.containsKey(language)) { +throw new IllegalArgumentException(String.format("Language [%s] not supported", language)); +} +} }
[6/8] tinkerpop git commit: updated doc for ssl client auth
updated doc for ssl client auth Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/18a52d62 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/18a52d62 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/18a52d62 Branch: refs/heads/TINKERPOP-1602 Commit: 18a52d62f271e9db1b2db358928799ae8d04970d Parents: e120e9f Author: Robert DaleAuthored: Tue Jan 17 14:39:32 2017 -0500 Committer: Robert Dale Committed: Mon Jan 23 14:36:18 2017 -0500 -- docs/src/reference/gremlin-applications.asciidoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/18a52d62/docs/src/reference/gremlin-applications.asciidoc -- diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc index e515ef7..2454581 100644 --- a/docs/src/reference/gremlin-applications.asciidoc +++ b/docs/src/reference/gremlin-applications.asciidoc @@ -1036,7 +1036,8 @@ The following table describes the various configuration options that Gremlin Ser |ssl.keyCertChainFile |The X.509 certificate chain file in PEM format. If this value is not present and `ssl.enabled` is `true` a self-signed certificate will be used (not suitable for production). |_none_ |ssl.keyFile |The `PKCS#8` private key file in PEM format. If this value is not present and `ssl.enabled` is `true` a self-signed certificate will be used (not suitable for production). |_none_ |ssl.keyPassword |The password of the `keyFile` if it is password-protected |_none_ -|ssl.trustCertChainFile |Trusted certificates for verifying the remote endpoint's certificate. The file should contain an X.509 certificate chain in PEM format. A system default will be used if this setting is not present. (Not supported) |_none_ +|ssl.needClientAuth | Optional. One of NONE, OPTIONAL, REQUIRE. Enables client certificate authentication at the level specified. Can be used in combination with Authenticator. |_none_ +|ssl.trustCertChainFile | Required when needClientAuth is OPTIONAL or REQUIRE. Trusted certificates for verifying the remote endpoint's certificate. The file should contain an X.509 certificate chain in PEM format. |_none_ |strictTransactionManagement |Set to `true` to require `aliases` to be submitted on every requests, where the `aliases` become the scope of transaction management. |false |threadPoolBoss |The number of threads available to Gremlin Server for accepting connections. Should always be set to `1`. |1 |threadPoolWorker |The number of threads available to Gremlin Server for processing non-blocking reads and writes. |1
[7/8] tinkerpop git commit: updated docs
updated docs Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/b812a2d3 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/b812a2d3 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/b812a2d3 Branch: refs/heads/TINKERPOP-1602 Commit: b812a2d32165cedca493f7dccd1fce6139461700 Parents: 18a52d6 Author: Robert DaleAuthored: Wed Jan 18 09:08:19 2017 -0500 Committer: Robert Dale Committed: Mon Jan 23 14:36:19 2017 -0500 -- CHANGELOG.asciidoc | 1 + docs/src/reference/gremlin-applications.asciidoc | 2 +- docs/src/upgrade/release-3.2.x-incubating.asciidoc | 9 + 3 files changed, 11 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b812a2d3/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 9453158..78abcfe 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -100,6 +100,7 @@ TinkerPop 3.2.4 (Release Date: NOT OFFICIALLY RELEASED YET) * Fixed a severe bug where `GraphComputer` strategies are not being loaded until the second use of the traversal source. * The root traversal now throws regular `NoSuchElementException` instead of `FastNoSuchElementException`. (*breaking*) * Added a short sleep to prevent traversal from finishing before it can be interrupted during `TraversalInterruptionComputerTest`. +* Added support for SSL client authentication [[release-3-2-3]] TinkerPop 3.2.3 (Release Date: October 17, 2016) http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b812a2d3/docs/src/reference/gremlin-applications.asciidoc -- diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc index 2454581..5cea36b 100644 --- a/docs/src/reference/gremlin-applications.asciidoc +++ b/docs/src/reference/gremlin-applications.asciidoc @@ -1036,7 +1036,7 @@ The following table describes the various configuration options that Gremlin Ser |ssl.keyCertChainFile |The X.509 certificate chain file in PEM format. If this value is not present and `ssl.enabled` is `true` a self-signed certificate will be used (not suitable for production). |_none_ |ssl.keyFile |The `PKCS#8` private key file in PEM format. If this value is not present and `ssl.enabled` is `true` a self-signed certificate will be used (not suitable for production). |_none_ |ssl.keyPassword |The password of the `keyFile` if it is password-protected |_none_ -|ssl.needClientAuth | Optional. One of NONE, OPTIONAL, REQUIRE. Enables client certificate authentication at the level specified. Can be used in combination with Authenticator. |_none_ +|ssl.needClientAuth | Optional. One of NONE, OPTIONAL, REQUIRE. Enables client certificate authentication at the enforcement level specified. Can be used in combination with Authenticator. |_none_ |ssl.trustCertChainFile | Required when needClientAuth is OPTIONAL or REQUIRE. Trusted certificates for verifying the remote endpoint's certificate. The file should contain an X.509 certificate chain in PEM format. |_none_ |strictTransactionManagement |Set to `true` to require `aliases` to be submitted on every requests, where the `aliases` become the scope of transaction management. |false |threadPoolBoss |The number of threads available to Gremlin Server for accepting connections. Should always be set to `1`. |1 http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b812a2d3/docs/src/upgrade/release-3.2.x-incubating.asciidoc -- diff --git a/docs/src/upgrade/release-3.2.x-incubating.asciidoc b/docs/src/upgrade/release-3.2.x-incubating.asciidoc index 7b5d638..401d67a 100644 --- a/docs/src/upgrade/release-3.2.x-incubating.asciidoc +++ b/docs/src/upgrade/release-3.2.x-incubating.asciidoc @@ -141,6 +141,15 @@ removed. See: link:https://issues.apache.org/jira/browse/TINKERPOP-1562[TINKERPOP-1562] + +SSL Client Authentication +^ + +Added new server configuration option `ssl.needClientAuth`. + +See: link:https://issues.apache.org/jira/browse/TINKERPOP-1602[TINKERPOP-1602] + + Upgrading for Providers ~~~
[07/29] tinkerpop git commit: GremlinExecutor wasn't constructing plugins properly
GremlinExecutor wasn't constructing plugins properly Wasn't properly doing type comparisons properly to deal with primitive arguments. CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/470c656a Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/470c656a Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/470c656a Branch: refs/heads/TINKERPOP-1602 Commit: 470c656ac2ac0822d5b561eadef3b25eaacef558 Parents: e3889bf Author: Stephen MalletteAuthored: Tue Jan 24 15:08:07 2017 -0500 Committer: Stephen Mallette Committed: Tue Jan 24 15:08:07 2017 -0500 -- .../tinkerpop/gremlin/groovy/engine/GremlinExecutor.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/470c656a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutor.java -- diff --git a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutor.java b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutor.java index 567a248..349af8e 100644 --- a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutor.java +++ b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutor.java @@ -18,11 +18,11 @@ */ package org.apache.tinkerpop.gremlin.groovy.engine; +import org.apache.commons.lang.ClassUtils; import org.apache.commons.lang.exception.ExceptionUtils; import org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine; import org.apache.commons.lang3.concurrent.BasicThreadFactory; import org.apache.tinkerpop.gremlin.jsr223.CachedGremlinScriptEngineManager; -import org.apache.tinkerpop.gremlin.jsr223.DefaultBindingsCustomizer; import org.apache.tinkerpop.gremlin.jsr223.GremlinPlugin; import org.apache.tinkerpop.gremlin.jsr223.GremlinScriptEngineManager; import org.apache.tinkerpop.gremlin.process.traversal.Bytecode; @@ -469,9 +469,9 @@ public class GremlinExecutor implements AutoCloseable { final Method configMethod = Stream.of(methods).filter(m -> { final Class type = customizerConfig.getValue().getClass(); return m.getName().equals(customizerConfig.getKey()) && m.getParameters().length <= 1 -&& m.getParameters()[0].getType().isAssignableFrom(type); +&& ClassUtils.isAssignable(type, m.getParameters()[0].getType(), true); }).findFirst() -.orElseThrow(() -> new IllegalStateException("Could not find builder method on " + builderClazz.getCanonicalName())); +.orElseThrow(() -> new IllegalStateException("Could not find builder method '" + customizerConfig.getKey() + "' on " + builderClazz.getCanonicalName())); if (null == customizerConfig.getValue()) pluginBuilder = configMethod.invoke(pluginBuilder); else
[15/29] tinkerpop git commit: Added check for MatchStep.Select.FilterStep pattern so that MatchStep start and end keys are preserved correctly.
Added check for MatchStep.Select.FilterStep pattern so that MatchStep start and end keys are preserved correctly. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/cf7a0777 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/cf7a0777 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/cf7a0777 Branch: refs/heads/TINKERPOP-1602 Commit: cf7a0777d4a1d0053e5b6c5a8e7fa6ca5166d05a Parents: da762df Author: Ted WilmesAuthored: Fri Jan 27 08:21:34 2017 -0600 Committer: Ted Wilmes Committed: Fri Jan 27 08:21:34 2017 -0600 -- .../strategy/optimization/PathRetractionStrategy.java | 9 - .../strategy/optimization/PathRetractionStrategyTest.java | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/cf7a0777/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategy.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategy.java index fc7eb8a..da6fd0e 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategy.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategy.java @@ -27,8 +27,12 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.PathProcessor; import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent; import org.apache.tinkerpop.gremlin.process.traversal.step.branch.RepeatStep; import org.apache.tinkerpop.gremlin.process.traversal.step.filter.DedupGlobalStep; +import org.apache.tinkerpop.gremlin.process.traversal.step.filter.FilterStep; +import org.apache.tinkerpop.gremlin.process.traversal.step.filter.TraversalFilterStep; +import org.apache.tinkerpop.gremlin.process.traversal.step.filter.WhereTraversalStep; import org.apache.tinkerpop.gremlin.process.traversal.step.map.MatchStep; import org.apache.tinkerpop.gremlin.process.traversal.step.map.NoOpBarrierStep; +import org.apache.tinkerpop.gremlin.process.traversal.step.map.SelectOneStep; import org.apache.tinkerpop.gremlin.process.traversal.step.util.EmptyStep; import org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy; import org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement; @@ -95,7 +99,10 @@ public final class PathRetractionStrategy extends AbstractTraversalStrategyhttp://git-wip-us.apache.org/repos/asf/tinkerpop/blob/cf7a0777/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategyTest.java -- diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategyTest.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategyTest.java index 71b0ad5..d12b621 100644 --- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategyTest.java +++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategyTest.java @@ -179,7 +179,7 @@ public class PathRetractionStrategyTest { "[[[z, seen]], [[z, seen]]]", null}, {__.V().as("a").optional(bothE().dedup().as("b")). choose(select("b"), select("a","b"), project("a").by(select("a"))), -"[[[a, b]], [[a, b]], [[a, b]], [[[a, b]]], [[a, b]]]", null} +"[[[a, b]], [[a, b]], [[a, b]], [[[a, b]]], [[a, b]]]", null}, }); } }
[27/29] tinkerpop git commit: updated docs
updated docs Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/c05e0729 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/c05e0729 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/c05e0729 Branch: refs/heads/TINKERPOP-1602 Commit: c05e072940a1f4bc55521a7240c0b67640ab2651 Parents: 9b279c6 Author: Robert DaleAuthored: Wed Jan 18 09:08:19 2017 -0500 Committer: Robert Dale Committed: Fri Jan 27 16:26:33 2017 -0500 -- CHANGELOG.asciidoc | 1 + docs/src/reference/gremlin-applications.asciidoc | 2 +- docs/src/upgrade/release-3.2.x-incubating.asciidoc | 9 + 3 files changed, 11 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c05e0729/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index d523ae2..76d9ef5 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -103,6 +103,7 @@ TinkerPop 3.2.4 (Release Date: NOT OFFICIALLY RELEASED YET) * Fixed a severe bug where `GraphComputer` strategies are not being loaded until the second use of the traversal source. * The root traversal now throws regular `NoSuchElementException` instead of `FastNoSuchElementException`. (*breaking*) * Added a short sleep to prevent traversal from finishing before it can be interrupted during `TraversalInterruptionComputerTest`. +* Added support for SSL client authentication [[release-3-2-3]] TinkerPop 3.2.3 (Release Date: October 17, 2016) http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c05e0729/docs/src/reference/gremlin-applications.asciidoc -- diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc index 2454581..5cea36b 100644 --- a/docs/src/reference/gremlin-applications.asciidoc +++ b/docs/src/reference/gremlin-applications.asciidoc @@ -1036,7 +1036,7 @@ The following table describes the various configuration options that Gremlin Ser |ssl.keyCertChainFile |The X.509 certificate chain file in PEM format. If this value is not present and `ssl.enabled` is `true` a self-signed certificate will be used (not suitable for production). |_none_ |ssl.keyFile |The `PKCS#8` private key file in PEM format. If this value is not present and `ssl.enabled` is `true` a self-signed certificate will be used (not suitable for production). |_none_ |ssl.keyPassword |The password of the `keyFile` if it is password-protected |_none_ -|ssl.needClientAuth | Optional. One of NONE, OPTIONAL, REQUIRE. Enables client certificate authentication at the level specified. Can be used in combination with Authenticator. |_none_ +|ssl.needClientAuth | Optional. One of NONE, OPTIONAL, REQUIRE. Enables client certificate authentication at the enforcement level specified. Can be used in combination with Authenticator. |_none_ |ssl.trustCertChainFile | Required when needClientAuth is OPTIONAL or REQUIRE. Trusted certificates for verifying the remote endpoint's certificate. The file should contain an X.509 certificate chain in PEM format. |_none_ |strictTransactionManagement |Set to `true` to require `aliases` to be submitted on every requests, where the `aliases` become the scope of transaction management. |false |threadPoolBoss |The number of threads available to Gremlin Server for accepting connections. Should always be set to `1`. |1 http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c05e0729/docs/src/upgrade/release-3.2.x-incubating.asciidoc -- diff --git a/docs/src/upgrade/release-3.2.x-incubating.asciidoc b/docs/src/upgrade/release-3.2.x-incubating.asciidoc index 7b5d638..401d67a 100644 --- a/docs/src/upgrade/release-3.2.x-incubating.asciidoc +++ b/docs/src/upgrade/release-3.2.x-incubating.asciidoc @@ -141,6 +141,15 @@ removed. See: link:https://issues.apache.org/jira/browse/TINKERPOP-1562[TINKERPOP-1562] + +SSL Client Authentication +^ + +Added new server configuration option `ssl.needClientAuth`. + +See: link:https://issues.apache.org/jira/browse/TINKERPOP-1602[TINKERPOP-1602] + + Upgrading for Providers ~~~
[13/29] tinkerpop git commit: Added resource file for GiraphGremlinPlugin CTR
Added resource file for GiraphGremlinPlugin CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/91759a52 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/91759a52 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/91759a52 Branch: refs/heads/TINKERPOP-1602 Commit: 91759a5236a3f2121bfe24098d9a2f35478dfccf Parents: 47e5ae2 Author: Stephen MalletteAuthored: Thu Jan 26 10:37:29 2017 -0500 Committer: Stephen Mallette Committed: Thu Jan 26 10:37:29 2017 -0500 -- .../services/org.apache.tinkerpop.gremlin.jsr223.GremlinPlugin | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/91759a52/giraph-gremlin/src/main/resources/META-INF/services/org.apache.tinkerpop.gremlin.jsr223.GremlinPlugin -- diff --git a/giraph-gremlin/src/main/resources/META-INF/services/org.apache.tinkerpop.gremlin.jsr223.GremlinPlugin b/giraph-gremlin/src/main/resources/META-INF/services/org.apache.tinkerpop.gremlin.jsr223.GremlinPlugin new file mode 100644 index 000..9a92905 --- /dev/null +++ b/giraph-gremlin/src/main/resources/META-INF/services/org.apache.tinkerpop.gremlin.jsr223.GremlinPlugin @@ -0,0 +1 @@ +org.apache.tinkerpop.gremlin.giraph.jsr223.GiraphGremlinPlugin \ No newline at end of file
[11/29] tinkerpop git commit: Fixed how plugins are bound to a scriptengine.
Fixed how plugins are bound to a scriptengine. Didn't have the reflection code right for finding the appliesTo method CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/28dffda6 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/28dffda6 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/28dffda6 Branch: refs/heads/TINKERPOP-1602 Commit: 28dffda6b55dae775215ed08d5bcd2cfa280b07b Parents: 956f350 Author: Stephen MalletteAuthored: Wed Jan 25 13:20:53 2017 -0500 Committer: Stephen Mallette Committed: Wed Jan 25 13:20:53 2017 -0500 -- .../apache/tinkerpop/gremlin/groovy/engine/GremlinExecutor.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/28dffda6/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutor.java -- diff --git a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutor.java b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutor.java index 349af8e..8fdb86e 100644 --- a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutor.java +++ b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutor.java @@ -40,6 +40,7 @@ import java.io.FileReader; import java.io.IOException; import java.lang.reflect.Method; import java.util.ArrayList; +import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; @@ -479,8 +480,8 @@ public class GremlinExecutor implements AutoCloseable { } try { -final Method appliesTo = builderClazz.getMethod("appliesTo"); -pluginBuilder = appliesTo.invoke(pluginBuilder, language); +final Method appliesTo = builderClazz.getMethod("appliesTo", Collection.class); +pluginBuilder = appliesTo.invoke(pluginBuilder, Collections.singletonList(language)); } catch (NoSuchMethodException ignored) { }
[17/29] tinkerpop git commit: Finalized variables and arguments.
Finalized variables and arguments. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/4dfba770 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/4dfba770 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/4dfba770 Branch: refs/heads/TINKERPOP-1602 Commit: 4dfba770877d564637417df668fdb9cddebce36b Parents: cbd Author: Ted WilmesAuthored: Fri Jan 27 14:12:51 2017 -0600 Committer: Ted Wilmes Committed: Fri Jan 27 14:12:51 2017 -0600 -- .../strategy/optimization/PathRetractionStrategy.java | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4dfba770/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategy.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategy.java index 439d568..91f07f9 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategy.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategy.java @@ -132,7 +132,7 @@ public final class PathRetractionStrategy extends AbstractTraversalStrategy parent = traversal.getParent().asStep(); final List > parentKeeperPairs = new ArrayList<>(); while (!parent.equals(EmptyStep.instance())) { -Set parentKeepLabels = new HashSet<>(PathUtil.getReferencedLabels(parent)); +final Set parentKeepLabels = new HashSet<>(PathUtil.getReferencedLabels(parent)); parentKeepLabels.addAll(PathUtil.getReferencedLabelsAfterStep(parent)); parentKeeperPairs.add(new Pair<>(parent, parentKeepLabels)); parent = parent.getTraversal().getParent().asStep(); @@ -214,21 +214,21 @@ public final class PathRetractionStrategy extends AbstractTraversalStrategy keepLabels, List > children) { -for (Traversal.Admin
[12/29] tinkerpop git commit: Had to trap an exception better in ServerGremlinExecutor during init CTR
Had to trap an exception better in ServerGremlinExecutor during init CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/47e5ae2f Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/47e5ae2f Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/47e5ae2f Branch: refs/heads/TINKERPOP-1602 Commit: 47e5ae2f319fb6eb20fa131a8136ded682b8045b Parents: 28dffda Author: Stephen MalletteAuthored: Wed Jan 25 16:39:38 2017 -0500 Committer: Stephen Mallette Committed: Wed Jan 25 16:39:38 2017 -0500 -- .../tinkerpop/gremlin/server/util/ServerGremlinExecutor.java | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/47e5ae2f/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/ServerGremlinExecutor.java -- diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/ServerGremlinExecutor.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/ServerGremlinExecutor.java index 199c9f8..b9b7280 100644 --- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/ServerGremlinExecutor.java +++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/ServerGremlinExecutor.java @@ -149,7 +149,13 @@ public class ServerGremlinExecutor { // the GremlinExecutor is using the GremlinScriptEngineManager. this is a bit of hack, but it at least allows // the global bindings to become available after the init scripts are run (DefaultGremlinScriptEngineManager // runs the init scripts when the GremlinScriptEngine is created. -settings.scriptEngines.keySet().forEach(engineName -> gremlinExecutor.eval("1+1", engineName, Collections.emptyMap()).join()); +settings.scriptEngines.keySet().forEach(engineName -> { +try { +gremlinExecutor.eval("1+1", engineName, Collections.emptyMap()).join(); +} catch (Exception ex) { +logger.warn(String.format("Could not initialize {} ScriptEngine as script could not be evaluated - %s", engineName), ex); +} +}); // script engine init may have altered the graph bindings or maybe even created new ones - need to // re-apply those references back
[28/29] tinkerpop git commit: format, organize imports only
format, organize imports only Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/33253dc6 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/33253dc6 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/33253dc6 Branch: refs/heads/TINKERPOP-1602 Commit: 33253dc6b76aa5c3d5cb428a35a4379890e4a7a2 Parents: 67f7026 Author: Robert DaleAuthored: Wed Jan 25 06:27:43 2017 -0500 Committer: Robert Dale Committed: Fri Jan 27 16:26:33 2017 -0500 -- .../gremlin/server/GremlinServerIntegrateTest.java | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/33253dc6/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java -- diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java index 6e6d1ff..fe00a43 100644 --- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java +++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java @@ -55,7 +55,6 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.util.BulkSet; import org.apache.tinkerpop.gremlin.structure.Graph; import org.apache.tinkerpop.gremlin.structure.T; import org.apache.tinkerpop.gremlin.server.channel.NioChannelizer; -import org.apache.tinkerpop.gremlin.structure.Vertex; import org.apache.tinkerpop.gremlin.structure.util.detached.DetachedVertex; import org.apache.tinkerpop.gremlin.structure.util.empty.EmptyGraph; import org.apache.tinkerpop.gremlin.util.Log4jRecordingAppender; @@ -80,7 +79,6 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; -import java.util.function.Function; import java.util.function.Supplier; import java.util.stream.Collectors; import java.util.stream.IntStream; @@ -96,7 +94,6 @@ import static org.hamcrest.core.StringStartsWith.startsWith; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; -import static org.junit.Assume.assumeThat; import static org.junit.Assert.assertEquals; /** @@ -106,13 +103,13 @@ import static org.junit.Assert.assertEquals; */ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegrationTest { - private static final String SERVER_KEY = "src/test/resources/server.key.pk8"; - private static final String SERVER_CRT = "src/test/resources/server.crt"; - private static final String KEY_PASS = "changeit"; - private static final String CLIENT_KEY = "src/test/resources/client.key.pk8"; - private static final String CLIENT_CRT = "src/test/resources/client.crt"; +private static final String SERVER_KEY = "src/test/resources/server.key.pk8"; +private static final String SERVER_CRT = "src/test/resources/server.crt"; +private static final String KEY_PASS = "changeit"; +private static final String CLIENT_KEY = "src/test/resources/client.key.pk8"; +private static final String CLIENT_CRT = "src/test/resources/client.crt"; - private Log4jRecordingAppender recordingAppender = null; +private Log4jRecordingAppender recordingAppender = null; private final Supplier graphGetter = () -> server.getServerGremlinExecutor().getGraphManager().getGraphs().get("graph"); private final Configuration conf = new BaseConfiguration() {{ setProperty(Graph.GRAPH, RemoteGraph.class.getName());
[04/29] tinkerpop git commit: TINKERPOP-1433 CTR: added release manager key setup docs.
TINKERPOP-1433 CTR: added release manager key setup docs. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/aa262d6b Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/aa262d6b Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/aa262d6b Branch: refs/heads/TINKERPOP-1602 Commit: aa262d6bdfc6177b24bcced4346e1cc2f2cb505f Parents: fe5f557 Author: Ted WilmesAuthored: Mon Jan 23 16:47:00 2017 -0600 Committer: Ted Wilmes Committed: Mon Jan 23 16:47:00 2017 -0600 -- docs/src/dev/developer/release.asciidoc | 23 +++ 1 file changed, 23 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/aa262d6b/docs/src/dev/developer/release.asciidoc -- diff --git a/docs/src/dev/developer/release.asciidoc b/docs/src/dev/developer/release.asciidoc index ec1fdf6..b78e860 100644 --- a/docs/src/dev/developer/release.asciidoc +++ b/docs/src/dev/developer/release.asciidoc @@ -22,6 +22,7 @@ manager" (a committer fulfills this role), who ensures that the steps in this do multi-phased and can therefore take several weeks to complete given the time needed for Apache voting and community feedback. Once a release point has been identified, the following phases represent the flow of "release": +* Release manager key setup. * Pre-flight check. * Optionally, produce a release candidate for community feedback. * Submit the official release for PMC vote. @@ -66,6 +67,28 @@ IMPORTANT: The `clean` in the above commands is more important to the pypi deplo anything found in the `target/python-packaged/dist` directory. Since the names of the artifacts are based on timestamps, they will not overwrite one another and multiple artifacts will get uploaded. +Release Manager Requirements + + +If this is your first time as release manager, you will need to setup keys for signing purposes per the Apache +release process. Generally speaking, this will mean that you will need to generate a key-pair and then upload your +public key to a public keyserver. + +For a general overview of key basics, refer to link:https://www.apache.org/dev/release-signing.html#key-basics[this]. For detailed +step-by-step instructions, please follow the instructions link:https://www.apache.org/dev/openpgp.html#generate-key[here]. + +After completing the key-pair setup instructions, be sure to add yourself to the `PGP signature` section of `bin/validate-distribution.sh`. + +[source,text] + +echo -n " * PGP signature ... " +[ `gpg ${ZIP_FILENAME}.asc 2>&1 | grep -c '^gpg: Good signature from "Stephen Mallette "$'` -eq 1 ] || \ +[ `gpg ${ZIP_FILENAME}.asc 2>&1 | grep -c '^gpg: Good signature from "Marko Rodriguez "$'` -eq 1 ] || \ +[ `gpg ${ZIP_FILENAME}.asc 2>&1 | grep -c '^gpg: Good signature from "Theodore Ratte Wilmes (CODE SIGNING KEY) "'` -eq 1 ] || \ +{ echo "failed"; exit 1; } +echo "OK" + + Pre-flight Check
[20/29] tinkerpop git commit: Added SingleIterationStrategy which is able to rewrite a set of traversals to not use message passing in OLAP. This is signficant for all GraphComputers as message passin
Added SingleIterationStrategy which is able to rewrite a set of traversals to not use message passing in OLAP. This is signficant for all GraphComputers as message passing is expense and furthermore, for SparkGraphComputer as without message-passing, there is no need to cache or partition the graph once loaded. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/f6b66977 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/f6b66977 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/f6b66977 Branch: refs/heads/TINKERPOP-1602 Commit: f6b669778ec058a555623c6119e0feaaac59c8be Parents: f0875d7 Author: Marko A. RodriguezAuthored: Thu Jan 26 12:57:58 2017 -0700 Committer: Marko A. Rodriguez Committed: Fri Jan 27 14:24:18 2017 -0700 -- CHANGELOG.asciidoc | 3 +- .../step/map/TraversalVertexProgramStep.java| 5 + .../optimization/SingleIterationStrategy.java | 132 +++ .../process/traversal/TraversalStrategies.java | 2 + .../SingleIterationStrategyTest.java| 100 ++ .../SparkSingleIterationStrategy.java | 48 ++- .../SparkSingleIterationStrategyTest.java | 89 +++-- 7 files changed, 362 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f6b66977/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 95cfb71..860d401 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -26,7 +26,8 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima TinkerPop 3.2.4 (Release Date: NOT OFFICIALLY RELEASED YET) ~~~ -* Fixed a bug where `keepLabels` were not being pushed down into child traversals by `PathRetractionStrategy`. +* Fixed a bug where `PathProcessor.keepLabels` were not being pushed down into child traversals by `PathRetractionStrategy`. +* Added `SingleIterationStrategy` as a default `GraphComputer` strategy that can re-write some traversals to not require message passing. * Fixed a bug associated with user-provided maps and `GroupSideEffectStep`. * `GroupBiOperator` no longer maintains a detached traversal and thus, no more side-effect related OLAP inconsistencies. * Added `ProjectedTraverser` which wraps a traverser with a `List` of projected data. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f6b66977/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/TraversalVertexProgramStep.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/TraversalVertexProgramStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/TraversalVertexProgramStep.java index cb7db29..e866ce2 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/TraversalVertexProgramStep.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/TraversalVertexProgramStep.java @@ -54,6 +54,11 @@ public final class TraversalVertexProgramStep extends VertexProgramStep implemen return Collections.singletonList(this.computerTraversal.get()); } +public void setComputerTraversal(final Traversal.Admin computerTraversal) { +this.computerTraversal = new PureTraversal<>(computerTraversal); +this.integrateChild(this.computerTraversal.get()); +} + @Override public String toString() { return StringFactory.stepString(this, this.computerTraversal.get(), new GraphFilter(this.computer)); http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f6b66977/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/optimization/SingleIterationStrategy.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/optimization/SingleIterationStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/optimization/SingleIterationStrategy.java new file mode 100644 index 000..efcbe9a --- /dev/null +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/optimization/SingleIterationStrategy.java @@ -0,0 +1,132 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + *
[02/29] tinkerpop git commit: Fixed up betweeness graphic based on the revised example.
Fixed up betweeness graphic based on the revised example. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/841fc30a Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/841fc30a Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/841fc30a Branch: refs/heads/TINKERPOP-1602 Commit: 841fc30a5e8f4b9c1b98ca5056c26d0d26b67115 Parents: 5577ea5 Author: Stephen MalletteAuthored: Mon Jan 23 11:15:30 2017 -0500 Committer: Stephen Mallette Committed: Mon Jan 23 11:15:30 2017 -0500 -- docs/static/images/betweeness-example.png | Bin 8465 -> 9961 bytes 1 file changed, 0 insertions(+), 0 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/841fc30a/docs/static/images/betweeness-example.png -- diff --git a/docs/static/images/betweeness-example.png b/docs/static/images/betweeness-example.png old mode 100644 new mode 100755 index 650ee53..a086a65 Binary files a/docs/static/images/betweeness-example.png and b/docs/static/images/betweeness-example.png differ
[06/29] tinkerpop git commit: Some minor fixes to plugin infrastructure
Some minor fixes to plugin infrastructure Graph plugins needed instance() methods to be properly instantiated at runtime. Hooked up ScriptCustomizer in the GremlinScriptEngineManager. Added BindingsGremlinPlugin to expose the various "bindings" customizers. None of these changes are breaking and really aren't meant for usage alongs the 3.2.x line. CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/e3889bf2 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/e3889bf2 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/e3889bf2 Branch: refs/heads/TINKERPOP-1602 Commit: e3889bf2401b42c3afbc85eabc2fbcebf2588974 Parents: 9d88304 Author: Stephen MalletteAuthored: Tue Jan 24 11:05:13 2017 -0500 Committer: Stephen Mallette Committed: Tue Jan 24 11:09:12 2017 -0500 -- .../gremlin/jsr223/BindingsGremlinPlugin.java | 63 .../DefaultGremlinScriptEngineManager.java | 20 +++ .../gremlin/jsr223/ScriptCustomizer.java| 4 ++ .../gremlin/groovy/engine/GremlinExecutor.java | 11 +++- .../neo4j/jsr223/Neo4jGremlinPlugin.java| 6 ++ .../spark/jsr223/SparkGremlinPlugin.java| 6 ++ .../jsr223/TinkerGraphGremlinPlugin.java| 42 +++-- 7 files changed, 132 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e3889bf2/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/BindingsGremlinPlugin.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/BindingsGremlinPlugin.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/BindingsGremlinPlugin.java new file mode 100644 index 000..feb501d --- /dev/null +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/BindingsGremlinPlugin.java @@ -0,0 +1,63 @@ +/* + * 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.jsr223; + +import javax.script.Bindings; +import javax.script.SimpleBindings; +import java.util.Map; +import java.util.function.Supplier; + +/** + * @author Stephen Mallette (http://stephen.genoprime.com) + */ +public class BindingsGremlinPlugin extends AbstractGremlinPlugin { +private static final String NAME = "tinkerpop.bindings"; + +private BindingsGremlinPlugin(final Builder builder) { +this(builder.bindings); +} + +public BindingsGremlinPlugin(final Bindings bindings) { +super(NAME, new DefaultBindingsCustomizer(bindings)); +} + +public BindingsGremlinPlugin(final Supplier bindingsSupplier) { +super(NAME, new LazyBindingsCustomizer(bindingsSupplier)); +} + +public static BindingsGremlinPlugin.Builder build() { +return new Builder(); +} + +public static final class Builder { + +private Bindings bindings = new SimpleBindings(); + +private Builder() {} + +public Builder bindings(final Map bindings) { +this.bindings = new SimpleBindings(bindings); +return this; +} + +public BindingsGremlinPlugin create() { +return new BindingsGremlinPlugin(this); +} +} +} http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e3889bf2/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/DefaultGremlinScriptEngineManager.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/DefaultGremlinScriptEngineManager.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/DefaultGremlinScriptEngineManager.java index 86b72f2..436deac 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/DefaultGremlinScriptEngineManager.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/DefaultGremlinScriptEngineManager.java @@ -23,11 +23,13 @@ import
[14/29] tinkerpop git commit: Made some improvements to the BindingsGremlinPlugin
Made some improvements to the BindingsGremlinPlugin Made it possible to specify scopes to apply the bindings to. Added tests. CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/c958b220 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/c958b220 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/c958b220 Branch: refs/heads/TINKERPOP-1602 Commit: c958b220b9559bb5fedbcc6e5c17f2dc142fb430 Parents: 91759a5 Author: Stephen MalletteAuthored: Thu Jan 26 14:46:36 2017 -0500 Committer: Stephen Mallette Committed: Thu Jan 26 14:46:36 2017 -0500 -- .../gremlin/jsr223/BindingsCustomizer.java | 11 ++- .../gremlin/jsr223/BindingsGremlinPlugin.java | 48 -- .../jsr223/DefaultBindingsCustomizer.java | 20 - .../DefaultGremlinScriptEngineManager.java | 16 +++- .../gremlin/jsr223/LazyBindingsCustomizer.java | 20 + .../gremlin/jsr223/ScriptFileGremlinPlugin.java | 4 +- .../jsr223/BindingsScriptEngineTest.java| 95 .../jsr223/GremlinScriptEngineSuite.java| 1 + 8 files changed, 206 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c958b220/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/BindingsCustomizer.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/BindingsCustomizer.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/BindingsCustomizer.java index 02c129e..e8dd9f3 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/BindingsCustomizer.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/BindingsCustomizer.java @@ -21,7 +21,9 @@ package org.apache.tinkerpop.gremlin.jsr223; import javax.script.Bindings; /** - * Provides a way to alter the bindings on a {@link GremlinScriptEngine}. + * Provides a way to alter the bindings on a {@link GremlinScriptEngine}. Those implementing {@link GremlinScriptEngine} + * instances need to be concerned with accounting for this {@link Customizer}. It is handled automatically by the + * {@link DefaultGremlinScriptEngineManager}. * * @author Stephen Mallette (http://stephen.genoprime.com) */ @@ -30,4 +32,11 @@ public interface BindingsCustomizer extends Customizer { * Gets the bindings to add to a {@link GremlinScriptEngine}. */ public Bindings getBindings(); + +/** + * Gets the scope to which the bindings apply. The scope is determined by the {@code ScriptContext} values where + * "100" is {@code EngineScope} (bindings apply to the current {@link GremlinScriptEngine}) and "200" is + * {@code GlobalScope} (bindings apply to the engines created by the current {@link GremlinScriptEngineManager}. + */ +public int getScope(); } http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c958b220/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/BindingsGremlinPlugin.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/BindingsGremlinPlugin.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/BindingsGremlinPlugin.java index feb501d..59304df 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/BindingsGremlinPlugin.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/BindingsGremlinPlugin.java @@ -19,26 +19,48 @@ package org.apache.tinkerpop.gremlin.jsr223; import javax.script.Bindings; +import javax.script.ScriptContext; import javax.script.SimpleBindings; +import java.util.Collection; +import java.util.HashSet; import java.util.Map; +import java.util.Set; import java.util.function.Supplier; /** + * A module that allows {@code Bindings} to be applied to a {@link GremlinScriptEngine}. The bindings are controled by + * their {@code scope} which are determined by the {@code ScriptContext} values where "100" is {@code ENGINE_SCOPE} + * (bindings apply to the current {@link GremlinScriptEngine}) and "200" is {@code GLOBAL_SCOPE} (bindings apply to the + * engines created by the current {@link GremlinScriptEngineManager}. + * + * Note that bindings are applied in the following order: + * + * The order in which the {@link GremlinScriptEngine} is requested from the {@link GremlinScriptEngineManager} + * The order in which the {@code BindingsGremlinPlugin} instances are added to the {@link GremlinScriptEngineManager} + * + * + * Moreover, they will override one another within a scope and among scopes. For instance, {@code ENGINE_SCOPE} bindings + * will override {@code
[24/29] tinkerpop git commit: realize that we can generalized SingleIterationStrategy to 1) work with GraphActors and 2) work at every walk-step. Thus, given that GraphActors isn't about Iterations an
realize that we can generalized SingleIterationStrategy to 1) work with GraphActors and 2) work at every walk-step. Thus, given that GraphActors isn't about Iterations and we can make this work for multi-stages, I renamed the strategy MessagePassingReductionStrategy. This way we won't have to name change in the future. Also, I did some more code cleanups and added a bunch more test cases. This is perhaps the most tested strategy. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/c2a42e27 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/c2a42e27 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/c2a42e27 Branch: refs/heads/TINKERPOP-1602 Commit: c2a42e27f901b95c66e31562940a176b9f932692 Parents: 1819e05 Author: Marko A. RodriguezAuthored: Fri Jan 27 11:30:15 2017 -0700 Committer: Marko A. Rodriguez Committed: Fri Jan 27 14:24:35 2017 -0700 -- CHANGELOG.asciidoc | 1 + .../MessagePassingReductionStrategy.java| 162 +++ .../optimization/SingleIterationStrategy.java | 151 - .../process/traversal/TraversalStrategies.java | 4 +- .../MessagePassingReductionStrategyTest.java| 135 .../SingleIterationStrategyTest.java| 128 --- .../SparkSingleIterationStrategy.java | 42 + .../SparkSingleIterationStrategyTest.java | 17 +- 8 files changed, 314 insertions(+), 326 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c2a42e27/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 860d401..d523ae2 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -28,6 +28,7 @@ TinkerPop 3.2.4 (Release Date: NOT OFFICIALLY RELEASED YET) * Fixed a bug where `PathProcessor.keepLabels` were not being pushed down into child traversals by `PathRetractionStrategy`. * Added `SingleIterationStrategy` as a default `GraphComputer` strategy that can re-write some traversals to not require message passing. +* Added default `MessagePassingReductionStrategy` for `GraphComputer` that can reduce the number of message passing iterations. * Fixed a bug associated with user-provided maps and `GroupSideEffectStep`. * `GroupBiOperator` no longer maintains a detached traversal and thus, no more side-effect related OLAP inconsistencies. * Added `ProjectedTraverser` which wraps a traverser with a `List` of projected data. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c2a42e27/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/optimization/MessagePassingReductionStrategy.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/optimization/MessagePassingReductionStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/optimization/MessagePassingReductionStrategy.java new file mode 100644 index 000..cff152e --- /dev/null +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/optimization/MessagePassingReductionStrategy.java @@ -0,0 +1,162 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.optimization; + +import org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.TraversalVertexProgramStep; +import org.apache.tinkerpop.gremlin.process.computer.util.EmptyMemory; +import org.apache.tinkerpop.gremlin.process.traversal.Step; +import org.apache.tinkerpop.gremlin.process.traversal.Traversal; +import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy; +import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.DefaultGraphTraversal; +import
[18/29] tinkerpop git commit: Merge branch 'TINKERPOP-1583' into tp32
Merge branch 'TINKERPOP-1583' into tp32 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/f0875d7b Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/f0875d7b Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/f0875d7b Branch: refs/heads/TINKERPOP-1602 Commit: f0875d7be6c0549a091656fa1bd7da22ed3409b0 Parents: c958b22 4dfba77 Author: Ted WilmesAuthored: Fri Jan 27 14:39:17 2017 -0600 Committer: Ted Wilmes Committed: Fri Jan 27 14:39:17 2017 -0600 -- CHANGELOG.asciidoc | 1 + .../optimization/PathRetractionStrategy.java| 66 +--- .../PathRetractionStrategyTest.java | 18 -- 3 files changed, 71 insertions(+), 14 deletions(-) --
[23/29] tinkerpop git commit: done for day. minor clean up push. nothing major.
done for day. minor clean up push. nothing major. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/9dee11d6 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/9dee11d6 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/9dee11d6 Branch: refs/heads/TINKERPOP-1602 Commit: 9dee11d6534943e1953016a3e0a92549609d7252 Parents: 989237f Author: Marko A. RodriguezAuthored: Thu Jan 26 15:10:49 2017 -0700 Committer: Marko A. Rodriguez Committed: Fri Jan 27 14:24:18 2017 -0700 -- .../optimization/SingleIterationStrategy.java | 56 +--- 1 file changed, 25 insertions(+), 31 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9dee11d6/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/optimization/SingleIterationStrategy.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/optimization/SingleIterationStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/optimization/SingleIterationStrategy.java index 19d9854..eed1104 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/optimization/SingleIterationStrategy.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/optimization/SingleIterationStrategy.java @@ -28,7 +28,6 @@ import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.DefaultGraphTraversal; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__; import org.apache.tinkerpop.gremlin.process.traversal.step.Barrier; -import org.apache.tinkerpop.gremlin.process.traversal.step.LambdaHolder; import org.apache.tinkerpop.gremlin.process.traversal.step.SideEffectCapable; import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent; import org.apache.tinkerpop.gremlin.process.traversal.step.branch.LocalStep; @@ -91,36 +90,31 @@ public final class SingleIterationStrategy extends AbstractTraversalStrategy !parent.getGlobalChildren().isEmpty()).findAny().isPresent())) { - -final Traversal.Admin newComputerTraversal = step.computerTraversal.getPure(); -final Traversal.Admin localTraversal = new DefaultGraphTraversal<>(); -final Step barrier = (Step) TraversalHelper.getFirstStepOfAssignableClass(Barrier.class, newComputerTraversal).orElse(null); -if (null == barrier || !(barrier instanceof TraversalParent && (barrier.getPreviousStep() instanceof VertexStep || barrier.getPreviousStep() instanceof EdgeVertexStep))) { - TraversalHelper.removeToTraversal(newComputerTraversal.getStartStep().getNextStep(), null == barrier ? EmptyStep.instance() : barrier, localTraversal); -assert !localTraversal.getSteps().isEmpty(); // given the if() constraints, this is impossible -if (localTraversal.getSteps().size() > 1) { // if its just a single step, a local wrap will not alter its locus of computation -if (null == barrier) -TraversalHelper.insertTraversal(0, (Traversal.Admin) __.local(localTraversal), newComputerTraversal); -else - TraversalHelper.insertTraversal(barrier.getPreviousStep(), (Traversal.Admin) __.local(localTraversal), newComputerTraversal); -step.setComputerTraversal(newComputerTraversal); -} +} +if (doesMessagePass && // if the traversal doesn't message pass, then don't try and localize it as its just wasted computation +TraversalHelper.isLocalStarGraph(computerTraversal) && // if we move beyond the star graph, then localization is not possible. +(computerTraversal.getStartStep() instanceof GraphStep) && // while GraphComputer requires GraphStep starts, this is just a precaution when inject() starts are supported +!(computerTraversal.getStartStep().getNextStep() instanceof EmptyStep) && // if its just a g.V()/E(), then don't localize +!(computerTraversal.getStartStep().getNextStep() instanceof
[03/29] tinkerpop git commit: Fixed up betweeness example graphic - for real this time.
Fixed up betweeness example graphic - for real this time. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/1756461c Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/1756461c Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/1756461c Branch: refs/heads/TINKERPOP-1602 Commit: 1756461cef6f51a1610702c813b759b40de2a849 Parents: 841fc30 Author: Stephen MalletteAuthored: Mon Jan 23 11:30:44 2017 -0500 Committer: Stephen Mallette Committed: Mon Jan 23 11:30:44 2017 -0500 -- docs/static/images/betweeness-example.png | Bin 9961 -> 21283 bytes 1 file changed, 0 insertions(+), 0 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1756461c/docs/static/images/betweeness-example.png -- diff --git a/docs/static/images/betweeness-example.png b/docs/static/images/betweeness-example.png index a086a65..fa58b5d 100755 Binary files a/docs/static/images/betweeness-example.png and b/docs/static/images/betweeness-example.png differ
[08/29] tinkerpop git commit: Sessions were not constucting GremlinExecutor with new plugin system CTR
Sessions were not constucting GremlinExecutor with new plugin system CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/d08a68f3 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/d08a68f3 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/d08a68f3 Branch: refs/heads/TINKERPOP-1602 Commit: d08a68f32c4ad497b6dbbdad5ae916cb659ff019 Parents: 470c656 Author: Stephen MalletteAuthored: Tue Jan 24 15:11:50 2017 -0500 Committer: Stephen Mallette Committed: Tue Jan 24 15:11:50 2017 -0500 -- .../gremlin/server/op/session/Session.java | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d08a68f3/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/Session.java -- diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/Session.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/Session.java index 8f4da66..9b16a3b 100644 --- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/Session.java +++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/Session.java @@ -228,11 +228,18 @@ public class Session { .scheduledExecutorService(scheduledExecutorService); settings.scriptEngines.forEach((k, v) -> { -// make sure that server related classes are available at init - not really necessary here because -// lifecycle hooks are not executed per session, but there should be some consistency i guess -v.imports.add(LifeCycleHook.class.getCanonicalName()); -v.imports.add(LifeCycleHook.Context.class.getCanonicalName()); -gremlinExecutorBuilder.addEngineSettings(k, v.imports, v.staticImports, v.scripts, v.config); +// use plugins if they are present and the old approach if not +if (v.plugins.isEmpty()) { +// make sure that server related classes are available at init - ultimately this body of code will be +// deleted when deprecation is removed +v.imports.add(LifeCycleHook.class.getCanonicalName()); +v.imports.add(LifeCycleHook.Context.class.getCanonicalName()); +gremlinExecutorBuilder.addEngineSettings(k, v.imports, v.staticImports, v.scripts, v.config); +} else { +// make sure that server related classes are available at init - new approach. the LifeCycleHook stuff +// will be added explicitly via configuration using GremlinServerGremlinModule in the yaml +gremlinExecutorBuilder.addPlugins(k, v.plugins); +} }); return gremlinExecutorBuilder;
[25/29] tinkerpop git commit: updated doc for ssl client auth
updated doc for ssl client auth Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/9b279c6b Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/9b279c6b Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/9b279c6b Branch: refs/heads/TINKERPOP-1602 Commit: 9b279c6b738f1cbe8eceab88f0269ceb971b615a Parents: c62480b Author: Robert DaleAuthored: Tue Jan 17 14:39:32 2017 -0500 Committer: Robert Dale Committed: Fri Jan 27 16:26:32 2017 -0500 -- docs/src/reference/gremlin-applications.asciidoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9b279c6b/docs/src/reference/gremlin-applications.asciidoc -- diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc index e515ef7..2454581 100644 --- a/docs/src/reference/gremlin-applications.asciidoc +++ b/docs/src/reference/gremlin-applications.asciidoc @@ -1036,7 +1036,8 @@ The following table describes the various configuration options that Gremlin Ser |ssl.keyCertChainFile |The X.509 certificate chain file in PEM format. If this value is not present and `ssl.enabled` is `true` a self-signed certificate will be used (not suitable for production). |_none_ |ssl.keyFile |The `PKCS#8` private key file in PEM format. If this value is not present and `ssl.enabled` is `true` a self-signed certificate will be used (not suitable for production). |_none_ |ssl.keyPassword |The password of the `keyFile` if it is password-protected |_none_ -|ssl.trustCertChainFile |Trusted certificates for verifying the remote endpoint's certificate. The file should contain an X.509 certificate chain in PEM format. A system default will be used if this setting is not present. (Not supported) |_none_ +|ssl.needClientAuth | Optional. One of NONE, OPTIONAL, REQUIRE. Enables client certificate authentication at the level specified. Can be used in combination with Authenticator. |_none_ +|ssl.trustCertChainFile | Required when needClientAuth is OPTIONAL or REQUIRE. Trusted certificates for verifying the remote endpoint's certificate. The file should contain an X.509 certificate chain in PEM format. |_none_ |strictTransactionManagement |Set to `true` to require `aliases` to be submitted on every requests, where the `aliases` become the scope of transaction management. |false |threadPoolBoss |The number of threads available to Gremlin Server for accepting connections. Should always be set to `1`. |1 |threadPoolWorker |The number of threads available to Gremlin Server for processing non-blocking reads and writes. |1
[16/29] tinkerpop git commit: Removed unused and wildcard imports.
Removed unused and wildcard imports. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/cbd1 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/cbd1 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/cbd1 Branch: refs/heads/TINKERPOP-1602 Commit: cbd1343e7b867e0db8c712e2bf5f0392b961 Parents: cf7a077 Author: Ted WilmesAuthored: Fri Jan 27 13:15:02 2017 -0600 Committer: Ted Wilmes Committed: Fri Jan 27 13:15:02 2017 -0600 -- .../optimization/PathRetractionStrategy.java | 3 --- .../optimization/PathRetractionStrategyTest.java | 19 +++ 2 files changed, 15 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/cbd1/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategy.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategy.java index da6fd0e..439d568 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategy.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategy.java @@ -28,8 +28,6 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent; import org.apache.tinkerpop.gremlin.process.traversal.step.branch.RepeatStep; import org.apache.tinkerpop.gremlin.process.traversal.step.filter.DedupGlobalStep; import org.apache.tinkerpop.gremlin.process.traversal.step.filter.FilterStep; -import org.apache.tinkerpop.gremlin.process.traversal.step.filter.TraversalFilterStep; -import org.apache.tinkerpop.gremlin.process.traversal.step.filter.WhereTraversalStep; import org.apache.tinkerpop.gremlin.process.traversal.step.map.MatchStep; import org.apache.tinkerpop.gremlin.process.traversal.step.map.NoOpBarrierStep; import org.apache.tinkerpop.gremlin.process.traversal.step.map.SelectOneStep; @@ -38,7 +36,6 @@ import org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversal import org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement; import org.apache.tinkerpop.gremlin.process.traversal.util.PathUtil; import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper; -import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils; import org.javatuples.Pair; import java.util.ArrayList; http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/cbd1/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategyTest.java -- diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategyTest.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategyTest.java index d12b621..2f99fd2 100644 --- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategyTest.java +++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategyTest.java @@ -37,8 +37,19 @@ import java.util.Arrays; import java.util.List; import java.util.Set; -import static org.apache.tinkerpop.gremlin.process.traversal.P.*; -import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.*; +import static org.apache.tinkerpop.gremlin.process.traversal.P.eq; +import static org.apache.tinkerpop.gremlin.process.traversal.P.gte; +import static org.apache.tinkerpop.gremlin.process.traversal.P.neq; +import static org.apache.tinkerpop.gremlin.process.traversal.P.without; +import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.as; +import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.bothE; +import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.limit; +import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.out; +import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.project; +import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.select; +import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.store; +import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.values; +import static
[01/29] tinkerpop git commit: Updated the closeness and betweeness centrality recipes. [Forced Update!]
Repository: tinkerpop Updated Branches: refs/heads/TINKERPOP-1602 b18f59cd7 -> 33253dc6b (forced update) Updated the closeness and betweeness centrality recipes. 1) added a disclaimer that both recipes should be used with care (only on small (sub)graphs) 2) optimized the execution plan 3) took multiple shortest paths between a pair of vertices into account 4) updated the sample graph to one that has multiple shortest paths between certain pairs of vertices Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/5577ea56 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/5577ea56 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/5577ea56 Branch: refs/heads/TINKERPOP-1602 Commit: 5577ea564e8a9634d3b0699cbddee59b039db90f Parents: 8ad2911 Author: Daniel KuppitzAuthored: Fri Jan 20 16:36:42 2017 +0100 Committer: Daniel Kuppitz Committed: Fri Jan 20 16:41:09 2017 +0100 -- docs/src/recipes/centrality.asciidoc | 121 +- 1 file changed, 67 insertions(+), 54 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5577ea56/docs/src/recipes/centrality.asciidoc -- diff --git a/docs/src/recipes/centrality.asciidoc b/docs/src/recipes/centrality.asciidoc index cbce418..f6fba30 100644 --- a/docs/src/recipes/centrality.asciidoc +++ b/docs/src/recipes/centrality.asciidoc @@ -67,43 +67,48 @@ image:betweeness-example.png[width=600] [gremlin-groovy ] -g.addV('name','a').as('a'). - addV('name','b').as('b'). - addV('name','c').as('c'). - addV('name','d').as('d'). - addV('name','e').as('e'). +g.addV(id,'A').as('a'). + addV(id,'B').as('b'). + addV(id,'C').as('c'). + addV(id,'D').as('d'). + addV(id,'E').as('e'). + addV(id,'F').as('f'). addE('next').from('a').to('b'). addE('next').from('b').to('c'). - addE('next').from('c').to('d'). - addE('next').from('d').to('e').iterate() -g.withSack(0).V().store("x").repeat(both().simplePath()).emit().path(). <1> - group().by(project("a","b").by(limit(local, 1)). <2> - by(tail(local, 1))). - by(order().by(count(local))). <3> - select(values).as("shortestPaths"). <4> - select("x").unfold().as("v"). <5> - select("shortestPaths"). <6> -map(unfold().filter(unfold().where(eq("v"))).count()). <7> -sack(sum).sack().as("betweeness"). <8> - select("v","betweeness") + addE('next').from('b').to('d'). + addE('next').from('c').to('e'). + addE('next').from('d').to('e'). + addE('next').from('e').to('f').iterate() +g.V().as("v"). <1> + repeat(both().simplePath().as("v")).emit(). <2> + filter(project("x","y","z").by(select(first, "v")). <3> + by(select(last, "v")). + by(select(all, "v").count(local)).as("triple"). + coalesce(select("x","y").as("a"). <4> +select("triples").unfold().as("t"). +select("x","y").where(eq("a")). +select("t"), + store("triples")). <5> + select("z").as("length"). + select("triple").select("z").where(eq("length"))). <6> + select(all, "v").unfold(). <7> + groupCount().next() <8> -<1> Defines a Gremlin link:http://tinkerpop.apache.org/docs/x.y.z/reference/#sack-step[sack] with a value of zero, -which represents the initial betweeness score for each vertex, and traverses on both incoming and outgoing edges -avoiding < >. -<2> Group each path by the first and last vertex. -<3> Reduce the list of paths to the shortest path between the first and last vertex by ordering on their lengths. -<4> Recall that at this point, there is a `Map` keyed by first and last vertex and with a value of just the shortest -path. Extract the shortest path with `select(values)`, since that's the only portion required for the remainder of -the traversal. -<5> The "x" key contains the list of vertices stored from step 1 - unfold that list into "v" for later use. This step -will unwrap the vertex that is stored in the `Traverser` as
[19/29] tinkerpop git commit: I just made SingleIterationStrategy a whole lot smarter. Not only is the code simpler with less checks, we now support out().count() -> out().id().count() and out().dedup
I just made SingleIterationStrategy a whole lot smarter. Not only is the code simpler with less checks, we now support out().count() -> out().id().count() and out().dedup().count() as out().id().dedup().count(). This will constrain numerous star local traversers from message passing in all GraphComputer implementations. Again, for Spark, this means we don't have to worry about caching the graph and save lots of clock cycles on many typical queries. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/1819e05a Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/1819e05a Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/1819e05a Branch: refs/heads/TINKERPOP-1602 Commit: 1819e05aa1545f14ae97a78c3626d38b732ead9d Parents: b2f2a9d Author: Marko A. RodriguezAuthored: Fri Jan 27 06:26:22 2017 -0700 Committer: Marko A. Rodriguez Committed: Fri Jan 27 14:24:18 2017 -0700 -- .../optimization/SingleIterationStrategy.java | 105 +++ .../SingleIterationStrategyTest.java| 38 --- .../SparkSingleIterationStrategyTest.java | 20 ++-- 3 files changed, 97 insertions(+), 66 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1819e05a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/optimization/SingleIterationStrategy.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/optimization/SingleIterationStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/optimization/SingleIterationStrategy.java index 96a2a0a..6b509ef 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/optimization/SingleIterationStrategy.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/optimization/SingleIterationStrategy.java @@ -21,7 +21,6 @@ package org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.optimiz import org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.TraversalVertexProgramStep; import org.apache.tinkerpop.gremlin.process.computer.util.EmptyMemory; -import org.apache.tinkerpop.gremlin.process.traversal.Scope; import org.apache.tinkerpop.gremlin.process.traversal.Step; import org.apache.tinkerpop.gremlin.process.traversal.Traversal; import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy; @@ -29,14 +28,18 @@ import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.DefaultGraphTrav import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__; import org.apache.tinkerpop.gremlin.process.traversal.step.Barrier; import org.apache.tinkerpop.gremlin.process.traversal.step.LambdaHolder; -import org.apache.tinkerpop.gremlin.process.traversal.step.SideEffectCapable; import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent; import org.apache.tinkerpop.gremlin.process.traversal.step.branch.LocalStep; +import org.apache.tinkerpop.gremlin.process.traversal.step.filter.DedupGlobalStep; +import org.apache.tinkerpop.gremlin.process.traversal.step.filter.FilterStep; +import org.apache.tinkerpop.gremlin.process.traversal.step.map.CountGlobalStep; import org.apache.tinkerpop.gremlin.process.traversal.step.map.EdgeVertexStep; import org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphStep; -import org.apache.tinkerpop.gremlin.process.traversal.step.map.LambdaFlatMapStep; -import org.apache.tinkerpop.gremlin.process.traversal.step.map.LambdaMapStep; +import org.apache.tinkerpop.gremlin.process.traversal.step.map.IdStep; +import org.apache.tinkerpop.gremlin.process.traversal.step.map.TraversalFlatMapStep; +import org.apache.tinkerpop.gremlin.process.traversal.step.map.TraversalMapStep; import org.apache.tinkerpop.gremlin.process.traversal.step.map.VertexStep; +import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SideEffectStep; import org.apache.tinkerpop.gremlin.process.traversal.step.util.EmptyStep; import org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy; import org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.AdjacentToIncidentStrategy; @@ -45,7 +48,6 @@ import org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.Inci import org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.InlineFilterStrategy; import org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement; import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper; -import
[29/29] tinkerpop git commit: added tests
added tests Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/67f70260 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/67f70260 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/67f70260 Branch: refs/heads/TINKERPOP-1602 Commit: 67f70260f7062672b49f9b9b8f5d6b82915988ec Parents: c05e072 Author: Robert DaleAuthored: Mon Jan 23 14:27:37 2017 -0500 Committer: Robert Dale Committed: Fri Jan 27 16:26:33 2017 -0500 -- .../server/GremlinServerIntegrateTest.java | 87 +++- gremlin-server/src/test/resources/client.crt| 40 + .../src/test/resources/client.key.pk8 | 47 +++ gremlin-server/src/test/resources/server.crt| 41 + .../src/test/resources/server.key.pk8 | 47 +++ 5 files changed, 261 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/67f70260/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java -- diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java index 1743e89..6e6d1ff 100644 --- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java +++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java @@ -18,6 +18,7 @@ */ package org.apache.tinkerpop.gremlin.server; +import io.netty.handler.ssl.ClientAuth; import io.netty.handler.ssl.SslContext; import io.netty.handler.ssl.SslContextBuilder; import io.netty.handler.ssl.SslProvider; @@ -105,7 +106,13 @@ import static org.junit.Assert.assertEquals; */ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegrationTest { -private Log4jRecordingAppender recordingAppender = null; + private static final String SERVER_KEY = "src/test/resources/server.key.pk8"; + private static final String SERVER_CRT = "src/test/resources/server.crt"; + private static final String KEY_PASS = "changeit"; + private static final String CLIENT_KEY = "src/test/resources/client.key.pk8"; + private static final String CLIENT_CRT = "src/test/resources/client.crt"; + + private Log4jRecordingAppender recordingAppender = null; private final Supplier graphGetter = () -> server.getServerGremlinExecutor().getGraphManager().getGraphs().get("graph"); private final Configuration conf = new BaseConfiguration() {{ setProperty(Graph.GRAPH, RemoteGraph.class.getName()); @@ -165,6 +172,36 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration settings.ssl.enabled = true; settings.ssl.overrideSslContext(createServerSslContext()); break; +case "shouldEnableSslAndClientCertificateAuth": +settings.ssl = new Settings.SslSettings(); +settings.ssl.enabled = true; +settings.ssl.needClientAuth = ClientAuth.REQUIRE; +settings.ssl.keyCertChainFile = SERVER_CRT; +settings.ssl.keyFile = SERVER_KEY; +settings.ssl.keyPassword =KEY_PASS; +// Trust the client +settings.ssl.trustCertChainFile = CLIENT_CRT; + break; +case "shouldEnableSslAndClientCertificateAuthAndFailWithoutCert": +settings.ssl = new Settings.SslSettings(); +settings.ssl.enabled = true; +settings.ssl.needClientAuth = ClientAuth.REQUIRE; +settings.ssl.keyCertChainFile = SERVER_CRT; +settings.ssl.keyFile = SERVER_KEY; +settings.ssl.keyPassword =KEY_PASS; +// Trust the client +settings.ssl.trustCertChainFile = CLIENT_CRT; + break; +case "shouldEnableSslAndClientCertificateAuthAndFailWithoutTrustedClientCert": +settings.ssl = new Settings.SslSettings(); +settings.ssl.enabled = true; +settings.ssl.needClientAuth = ClientAuth.REQUIRE; +settings.ssl.keyCertChainFile = SERVER_CRT; +settings.ssl.keyFile = SERVER_KEY; +settings.ssl.keyPassword =KEY_PASS; +// Trust ONLY the server cert +settings.ssl.trustCertChainFile = SERVER_CRT; + break; case "shouldStartWithDefaultSettings": // test with defaults exception for port because we want to keep testing off of 8182
[26/29] tinkerpop git commit: Support SSL client auth
Support SSL client auth Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/c62480bb Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/c62480bb Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/c62480bb Branch: refs/heads/TINKERPOP-1602 Commit: c62480bbd563b9904654c23abdc66c4b4828b64e Parents: c2a42e2 Author: Robert DaleAuthored: Tue Jan 17 14:24:00 2017 -0500 Committer: Robert Dale Committed: Fri Jan 27 16:26:32 2017 -0500 -- .../apache/tinkerpop/gremlin/server/AbstractChannelizer.java | 4 +++- .../java/org/apache/tinkerpop/gremlin/server/Settings.java | 6 ++ 2 files changed, 9 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c62480bb/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java -- diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java index 57c6994..d28fd4f 100644 --- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java +++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java @@ -242,8 +242,10 @@ public abstract class AbstractChannelizer extends ChannelInitializerhttp://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c62480bb/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java -- diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java index 97e2875..a3b9545 100644 --- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java +++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java @@ -18,6 +18,7 @@ */ package org.apache.tinkerpop.gremlin.server; +import io.netty.handler.ssl.ClientAuth; import io.netty.handler.ssl.SslContext; import org.apache.tinkerpop.gremlin.driver.MessageSerializer; import org.apache.tinkerpop.gremlin.jsr223.GremlinPlugin; @@ -420,6 +421,11 @@ public class Settings { * contain an X.509 certificate chain in PEM format. {@code null} uses the system default. */ public String trustCertChainFile = null; + +/** + * Require client certificate authentication + */ +public ClientAuth needClientAuth = ClientAuth.NONE; private SslContext sslContext;
[22/29] tinkerpop git commit: dah. my last tweak made a buggy. now I'm done for the day.
dah. my last tweak made a buggy. now I'm done for the day. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/b2f2a9d6 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/b2f2a9d6 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/b2f2a9d6 Branch: refs/heads/TINKERPOP-1602 Commit: b2f2a9d692392b6eac672c109128ffcb45345150 Parents: 9dee11d Author: Marko A. RodriguezAuthored: Thu Jan 26 15:18:31 2017 -0700 Committer: Marko A. Rodriguez Committed: Fri Jan 27 14:24:18 2017 -0700 -- .../strategy/optimization/SingleIterationStrategy.java | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b2f2a9d6/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/optimization/SingleIterationStrategy.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/optimization/SingleIterationStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/optimization/SingleIterationStrategy.java index eed1104..96a2a0a 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/optimization/SingleIterationStrategy.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/optimization/SingleIterationStrategy.java @@ -28,6 +28,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.DefaultGraphTraversal; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__; import org.apache.tinkerpop.gremlin.process.traversal.step.Barrier; +import org.apache.tinkerpop.gremlin.process.traversal.step.LambdaHolder; import org.apache.tinkerpop.gremlin.process.traversal.step.SideEffectCapable; import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent; import org.apache.tinkerpop.gremlin.process.traversal.step.branch.LocalStep; @@ -93,13 +94,14 @@ public final class SingleIterationStrategy extends AbstractTraversalStrategy !parent.getGlobalChildren().isEmpty()).findAny().isPresent())) {
[09/29] tinkerpop git commit: Fixed a bug where keepLabels were not being pushed down into child traversals by PathRetractionStrategy.
Fixed a bug where keepLabels were not being pushed down into child traversals by PathRetractionStrategy. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/da762dfe Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/da762dfe Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/da762dfe Branch: refs/heads/TINKERPOP-1602 Commit: da762dfee9b0ed05fd1185d80403e1be41873b58 Parents: e3889bf Author: Ted WilmesAuthored: Tue Jan 24 14:57:07 2017 -0600 Committer: Ted Wilmes Committed: Tue Jan 24 14:57:07 2017 -0600 -- CHANGELOG.asciidoc | 1 + .../optimization/PathRetractionStrategy.java| 58 +--- .../PathRetractionStrategyTest.java | 19 +++ 3 files changed, 60 insertions(+), 18 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/da762dfe/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 9453158..95cfb71 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima TinkerPop 3.2.4 (Release Date: NOT OFFICIALLY RELEASED YET) ~~~ +* Fixed a bug where `keepLabels` were not being pushed down into child traversals by `PathRetractionStrategy`. * Fixed a bug associated with user-provided maps and `GroupSideEffectStep`. * `GroupBiOperator` no longer maintains a detached traversal and thus, no more side-effect related OLAP inconsistencies. * Added `ProjectedTraverser` which wraps a traverser with a `List` of projected data. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/da762dfe/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategy.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategy.java index fcc22a4..fc7eb8a 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategy.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategy.java @@ -24,6 +24,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy; import org.apache.tinkerpop.gremlin.process.traversal.step.Barrier; import org.apache.tinkerpop.gremlin.process.traversal.step.LambdaHolder; import org.apache.tinkerpop.gremlin.process.traversal.step.PathProcessor; +import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent; import org.apache.tinkerpop.gremlin.process.traversal.step.branch.RepeatStep; import org.apache.tinkerpop.gremlin.process.traversal.step.filter.DedupGlobalStep; import org.apache.tinkerpop.gremlin.process.traversal.step.map.MatchStep; @@ -33,6 +34,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversal import org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement; import org.apache.tinkerpop.gremlin.process.traversal.util.PathUtil; import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper; +import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils; import org.javatuples.Pair; import java.util.ArrayList; @@ -96,8 +98,12 @@ public final class PathRetractionStrategy extends AbstractTraversalStrategy(keepLabels)); +} else { +if (pathProcessor.getKeepLabels() == null) +pathProcessor.setKeepLabels(new HashSet<>(keepLabels)); +else +pathProcessor.getKeepLabels().addAll(new HashSet<>(keepLabels)); +} if (currentStep.getTraversal().getParent() instanceof MatchStep) { pathProcessor.setKeepLabels(((MatchStep) currentStep.getTraversal().getParent().asStep()).getMatchStartLabels()); @@ -111,6 +117,7 @@ public final class PathRetractionStrategy extends AbstractTraversalStrategy(traversal, this.standardBarrierSize), currentStep, traversal); } } @@ -141,16 +148,29 @@ public final class PathRetractionStrategy extends AbstractTraversalStrategy> children = new ArrayList<>(); +children.addAll(((TraversalParent) step).getGlobalChildren()); +children.addAll(((TraversalParent) step).getLocalChildren()); +// if this is
[10/29] tinkerpop git commit: Fixed a gremlin server bug with global bindings
Fixed a gremlin server bug with global bindings TraversalSources established in init scripts using the new plugin system weren't getting set to the GraphManager given the fact that the GremlinScriptEngineManager does runs the scripts when the GremlinScriptEngine is first initialized. By forcing the GremlinScriptEngine to initialize with a throw-away script the init scripts will execute. This is a bit of a hack - will consider other solutions for 3.3.0. CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/956f3505 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/956f3505 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/956f3505 Branch: refs/heads/TINKERPOP-1602 Commit: 956f35056a967ecf1d8e74dc04bb227ba4823047 Parents: d08a68f Author: Stephen MalletteAuthored: Wed Jan 25 09:24:49 2017 -0500 Committer: Stephen Mallette Committed: Wed Jan 25 09:24:49 2017 -0500 -- .../tinkerpop/gremlin/server/util/ServerGremlinExecutor.java | 6 ++ 1 file changed, 6 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/956f3505/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/ServerGremlinExecutor.java -- diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/ServerGremlinExecutor.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/ServerGremlinExecutor.java index 2b2f1f1..199c9f8 100644 --- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/ServerGremlinExecutor.java +++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/ServerGremlinExecutor.java @@ -145,6 +145,12 @@ public class ServerGremlinExecutor { logger.info("Initialized GremlinExecutor and configured ScriptEngines."); +// force each scriptengine to process something so that the init scripts will fire (this is necessary if +// the GremlinExecutor is using the GremlinScriptEngineManager. this is a bit of hack, but it at least allows +// the global bindings to become available after the init scripts are run (DefaultGremlinScriptEngineManager +// runs the init scripts when the GremlinScriptEngine is created. +settings.scriptEngines.keySet().forEach(engineName -> gremlinExecutor.eval("1+1", engineName, Collections.emptyMap()).join()); + // script engine init may have altered the graph bindings or maybe even created new ones - need to // re-apply those references back gremlinExecutor.getGlobalBindings().entrySet().stream()
[05/29] tinkerpop git commit: Merge branch 'centrality-recipes' into tp32
Merge branch 'centrality-recipes' into tp32 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/9d883043 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/9d883043 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/9d883043 Branch: refs/heads/TINKERPOP-1602 Commit: 9d883043ed3123af5b1c614b343cbbdd0dc9013f Parents: aa262d6 1756461 Author: Daniel KuppitzAuthored: Tue Jan 24 11:00:26 2017 +0100 Committer: Daniel Kuppitz Committed: Tue Jan 24 11:00:26 2017 +0100 -- docs/src/recipes/centrality.asciidoc | 121 ++--- docs/static/images/betweeness-example.png | Bin 8465 -> 21283 bytes 2 files changed, 67 insertions(+), 54 deletions(-) --
[4/5] tinkerpop git commit: added tests
added tests Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/67f70260 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/67f70260 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/67f70260 Branch: refs/heads/tp32 Commit: 67f70260f7062672b49f9b9b8f5d6b82915988ec Parents: c05e072 Author: Robert DaleAuthored: Mon Jan 23 14:27:37 2017 -0500 Committer: Robert Dale Committed: Fri Jan 27 16:26:33 2017 -0500 -- .../server/GremlinServerIntegrateTest.java | 87 +++- gremlin-server/src/test/resources/client.crt| 40 + .../src/test/resources/client.key.pk8 | 47 +++ gremlin-server/src/test/resources/server.crt| 41 + .../src/test/resources/server.key.pk8 | 47 +++ 5 files changed, 261 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/67f70260/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java -- diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java index 1743e89..6e6d1ff 100644 --- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java +++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java @@ -18,6 +18,7 @@ */ package org.apache.tinkerpop.gremlin.server; +import io.netty.handler.ssl.ClientAuth; import io.netty.handler.ssl.SslContext; import io.netty.handler.ssl.SslContextBuilder; import io.netty.handler.ssl.SslProvider; @@ -105,7 +106,13 @@ import static org.junit.Assert.assertEquals; */ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegrationTest { -private Log4jRecordingAppender recordingAppender = null; + private static final String SERVER_KEY = "src/test/resources/server.key.pk8"; + private static final String SERVER_CRT = "src/test/resources/server.crt"; + private static final String KEY_PASS = "changeit"; + private static final String CLIENT_KEY = "src/test/resources/client.key.pk8"; + private static final String CLIENT_CRT = "src/test/resources/client.crt"; + + private Log4jRecordingAppender recordingAppender = null; private final Supplier graphGetter = () -> server.getServerGremlinExecutor().getGraphManager().getGraphs().get("graph"); private final Configuration conf = new BaseConfiguration() {{ setProperty(Graph.GRAPH, RemoteGraph.class.getName()); @@ -165,6 +172,36 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration settings.ssl.enabled = true; settings.ssl.overrideSslContext(createServerSslContext()); break; +case "shouldEnableSslAndClientCertificateAuth": +settings.ssl = new Settings.SslSettings(); +settings.ssl.enabled = true; +settings.ssl.needClientAuth = ClientAuth.REQUIRE; +settings.ssl.keyCertChainFile = SERVER_CRT; +settings.ssl.keyFile = SERVER_KEY; +settings.ssl.keyPassword =KEY_PASS; +// Trust the client +settings.ssl.trustCertChainFile = CLIENT_CRT; + break; +case "shouldEnableSslAndClientCertificateAuthAndFailWithoutCert": +settings.ssl = new Settings.SslSettings(); +settings.ssl.enabled = true; +settings.ssl.needClientAuth = ClientAuth.REQUIRE; +settings.ssl.keyCertChainFile = SERVER_CRT; +settings.ssl.keyFile = SERVER_KEY; +settings.ssl.keyPassword =KEY_PASS; +// Trust the client +settings.ssl.trustCertChainFile = CLIENT_CRT; + break; +case "shouldEnableSslAndClientCertificateAuthAndFailWithoutTrustedClientCert": +settings.ssl = new Settings.SslSettings(); +settings.ssl.enabled = true; +settings.ssl.needClientAuth = ClientAuth.REQUIRE; +settings.ssl.keyCertChainFile = SERVER_CRT; +settings.ssl.keyFile = SERVER_KEY; +settings.ssl.keyPassword =KEY_PASS; +// Trust ONLY the server cert +settings.ssl.trustCertChainFile = SERVER_CRT; + break; case "shouldStartWithDefaultSettings": // test with defaults exception for port because we want to keep testing off of 8182
[1/5] tinkerpop git commit: updated doc for ssl client auth
Repository: tinkerpop Updated Branches: refs/heads/tp32 c2a42e27f -> 33253dc6b updated doc for ssl client auth Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/9b279c6b Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/9b279c6b Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/9b279c6b Branch: refs/heads/tp32 Commit: 9b279c6b738f1cbe8eceab88f0269ceb971b615a Parents: c62480b Author: Robert DaleAuthored: Tue Jan 17 14:39:32 2017 -0500 Committer: Robert Dale Committed: Fri Jan 27 16:26:32 2017 -0500 -- docs/src/reference/gremlin-applications.asciidoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9b279c6b/docs/src/reference/gremlin-applications.asciidoc -- diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc index e515ef7..2454581 100644 --- a/docs/src/reference/gremlin-applications.asciidoc +++ b/docs/src/reference/gremlin-applications.asciidoc @@ -1036,7 +1036,8 @@ The following table describes the various configuration options that Gremlin Ser |ssl.keyCertChainFile |The X.509 certificate chain file in PEM format. If this value is not present and `ssl.enabled` is `true` a self-signed certificate will be used (not suitable for production). |_none_ |ssl.keyFile |The `PKCS#8` private key file in PEM format. If this value is not present and `ssl.enabled` is `true` a self-signed certificate will be used (not suitable for production). |_none_ |ssl.keyPassword |The password of the `keyFile` if it is password-protected |_none_ -|ssl.trustCertChainFile |Trusted certificates for verifying the remote endpoint's certificate. The file should contain an X.509 certificate chain in PEM format. A system default will be used if this setting is not present. (Not supported) |_none_ +|ssl.needClientAuth | Optional. One of NONE, OPTIONAL, REQUIRE. Enables client certificate authentication at the level specified. Can be used in combination with Authenticator. |_none_ +|ssl.trustCertChainFile | Required when needClientAuth is OPTIONAL or REQUIRE. Trusted certificates for verifying the remote endpoint's certificate. The file should contain an X.509 certificate chain in PEM format. |_none_ |strictTransactionManagement |Set to `true` to require `aliases` to be submitted on every requests, where the `aliases` become the scope of transaction management. |false |threadPoolBoss |The number of threads available to Gremlin Server for accepting connections. Should always be set to `1`. |1 |threadPoolWorker |The number of threads available to Gremlin Server for processing non-blocking reads and writes. |1
[3/5] tinkerpop git commit: updated docs
updated docs Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/c05e0729 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/c05e0729 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/c05e0729 Branch: refs/heads/tp32 Commit: c05e072940a1f4bc55521a7240c0b67640ab2651 Parents: 9b279c6 Author: Robert DaleAuthored: Wed Jan 18 09:08:19 2017 -0500 Committer: Robert Dale Committed: Fri Jan 27 16:26:33 2017 -0500 -- CHANGELOG.asciidoc | 1 + docs/src/reference/gremlin-applications.asciidoc | 2 +- docs/src/upgrade/release-3.2.x-incubating.asciidoc | 9 + 3 files changed, 11 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c05e0729/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index d523ae2..76d9ef5 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -103,6 +103,7 @@ TinkerPop 3.2.4 (Release Date: NOT OFFICIALLY RELEASED YET) * Fixed a severe bug where `GraphComputer` strategies are not being loaded until the second use of the traversal source. * The root traversal now throws regular `NoSuchElementException` instead of `FastNoSuchElementException`. (*breaking*) * Added a short sleep to prevent traversal from finishing before it can be interrupted during `TraversalInterruptionComputerTest`. +* Added support for SSL client authentication [[release-3-2-3]] TinkerPop 3.2.3 (Release Date: October 17, 2016) http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c05e0729/docs/src/reference/gremlin-applications.asciidoc -- diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc index 2454581..5cea36b 100644 --- a/docs/src/reference/gremlin-applications.asciidoc +++ b/docs/src/reference/gremlin-applications.asciidoc @@ -1036,7 +1036,7 @@ The following table describes the various configuration options that Gremlin Ser |ssl.keyCertChainFile |The X.509 certificate chain file in PEM format. If this value is not present and `ssl.enabled` is `true` a self-signed certificate will be used (not suitable for production). |_none_ |ssl.keyFile |The `PKCS#8` private key file in PEM format. If this value is not present and `ssl.enabled` is `true` a self-signed certificate will be used (not suitable for production). |_none_ |ssl.keyPassword |The password of the `keyFile` if it is password-protected |_none_ -|ssl.needClientAuth | Optional. One of NONE, OPTIONAL, REQUIRE. Enables client certificate authentication at the level specified. Can be used in combination with Authenticator. |_none_ +|ssl.needClientAuth | Optional. One of NONE, OPTIONAL, REQUIRE. Enables client certificate authentication at the enforcement level specified. Can be used in combination with Authenticator. |_none_ |ssl.trustCertChainFile | Required when needClientAuth is OPTIONAL or REQUIRE. Trusted certificates for verifying the remote endpoint's certificate. The file should contain an X.509 certificate chain in PEM format. |_none_ |strictTransactionManagement |Set to `true` to require `aliases` to be submitted on every requests, where the `aliases` become the scope of transaction management. |false |threadPoolBoss |The number of threads available to Gremlin Server for accepting connections. Should always be set to `1`. |1 http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c05e0729/docs/src/upgrade/release-3.2.x-incubating.asciidoc -- diff --git a/docs/src/upgrade/release-3.2.x-incubating.asciidoc b/docs/src/upgrade/release-3.2.x-incubating.asciidoc index 7b5d638..401d67a 100644 --- a/docs/src/upgrade/release-3.2.x-incubating.asciidoc +++ b/docs/src/upgrade/release-3.2.x-incubating.asciidoc @@ -141,6 +141,15 @@ removed. See: link:https://issues.apache.org/jira/browse/TINKERPOP-1562[TINKERPOP-1562] + +SSL Client Authentication +^ + +Added new server configuration option `ssl.needClientAuth`. + +See: link:https://issues.apache.org/jira/browse/TINKERPOP-1602[TINKERPOP-1602] + + Upgrading for Providers ~~~
[2/6] tinkerpop git commit: Support SSL client auth
Support SSL client auth Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/c62480bb Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/c62480bb Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/c62480bb Branch: refs/heads/master Commit: c62480bbd563b9904654c23abdc66c4b4828b64e Parents: c2a42e2 Author: Robert DaleAuthored: Tue Jan 17 14:24:00 2017 -0500 Committer: Robert Dale Committed: Fri Jan 27 16:26:32 2017 -0500 -- .../apache/tinkerpop/gremlin/server/AbstractChannelizer.java | 4 +++- .../java/org/apache/tinkerpop/gremlin/server/Settings.java | 6 ++ 2 files changed, 9 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c62480bb/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java -- diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java index 57c6994..d28fd4f 100644 --- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java +++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java @@ -242,8 +242,10 @@ public abstract class AbstractChannelizer extends ChannelInitializerhttp://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c62480bb/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java -- diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java index 97e2875..a3b9545 100644 --- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java +++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java @@ -18,6 +18,7 @@ */ package org.apache.tinkerpop.gremlin.server; +import io.netty.handler.ssl.ClientAuth; import io.netty.handler.ssl.SslContext; import org.apache.tinkerpop.gremlin.driver.MessageSerializer; import org.apache.tinkerpop.gremlin.jsr223.GremlinPlugin; @@ -420,6 +421,11 @@ public class Settings { * contain an X.509 certificate chain in PEM format. {@code null} uses the system default. */ public String trustCertChainFile = null; + +/** + * Require client certificate authentication + */ +public ClientAuth needClientAuth = ClientAuth.NONE; private SslContext sslContext;
[3/6] tinkerpop git commit: added tests
added tests Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/67f70260 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/67f70260 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/67f70260 Branch: refs/heads/master Commit: 67f70260f7062672b49f9b9b8f5d6b82915988ec Parents: c05e072 Author: Robert DaleAuthored: Mon Jan 23 14:27:37 2017 -0500 Committer: Robert Dale Committed: Fri Jan 27 16:26:33 2017 -0500 -- .../server/GremlinServerIntegrateTest.java | 87 +++- gremlin-server/src/test/resources/client.crt| 40 + .../src/test/resources/client.key.pk8 | 47 +++ gremlin-server/src/test/resources/server.crt| 41 + .../src/test/resources/server.key.pk8 | 47 +++ 5 files changed, 261 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/67f70260/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java -- diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java index 1743e89..6e6d1ff 100644 --- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java +++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java @@ -18,6 +18,7 @@ */ package org.apache.tinkerpop.gremlin.server; +import io.netty.handler.ssl.ClientAuth; import io.netty.handler.ssl.SslContext; import io.netty.handler.ssl.SslContextBuilder; import io.netty.handler.ssl.SslProvider; @@ -105,7 +106,13 @@ import static org.junit.Assert.assertEquals; */ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegrationTest { -private Log4jRecordingAppender recordingAppender = null; + private static final String SERVER_KEY = "src/test/resources/server.key.pk8"; + private static final String SERVER_CRT = "src/test/resources/server.crt"; + private static final String KEY_PASS = "changeit"; + private static final String CLIENT_KEY = "src/test/resources/client.key.pk8"; + private static final String CLIENT_CRT = "src/test/resources/client.crt"; + + private Log4jRecordingAppender recordingAppender = null; private final Supplier graphGetter = () -> server.getServerGremlinExecutor().getGraphManager().getGraphs().get("graph"); private final Configuration conf = new BaseConfiguration() {{ setProperty(Graph.GRAPH, RemoteGraph.class.getName()); @@ -165,6 +172,36 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration settings.ssl.enabled = true; settings.ssl.overrideSslContext(createServerSslContext()); break; +case "shouldEnableSslAndClientCertificateAuth": +settings.ssl = new Settings.SslSettings(); +settings.ssl.enabled = true; +settings.ssl.needClientAuth = ClientAuth.REQUIRE; +settings.ssl.keyCertChainFile = SERVER_CRT; +settings.ssl.keyFile = SERVER_KEY; +settings.ssl.keyPassword =KEY_PASS; +// Trust the client +settings.ssl.trustCertChainFile = CLIENT_CRT; + break; +case "shouldEnableSslAndClientCertificateAuthAndFailWithoutCert": +settings.ssl = new Settings.SslSettings(); +settings.ssl.enabled = true; +settings.ssl.needClientAuth = ClientAuth.REQUIRE; +settings.ssl.keyCertChainFile = SERVER_CRT; +settings.ssl.keyFile = SERVER_KEY; +settings.ssl.keyPassword =KEY_PASS; +// Trust the client +settings.ssl.trustCertChainFile = CLIENT_CRT; + break; +case "shouldEnableSslAndClientCertificateAuthAndFailWithoutTrustedClientCert": +settings.ssl = new Settings.SslSettings(); +settings.ssl.enabled = true; +settings.ssl.needClientAuth = ClientAuth.REQUIRE; +settings.ssl.keyCertChainFile = SERVER_CRT; +settings.ssl.keyFile = SERVER_KEY; +settings.ssl.keyPassword =KEY_PASS; +// Trust ONLY the server cert +settings.ssl.trustCertChainFile = SERVER_CRT; + break; case "shouldStartWithDefaultSettings": // test with defaults exception for port because we want to keep testing off of 8182
[1/6] tinkerpop git commit: updated doc for ssl client auth
Repository: tinkerpop Updated Branches: refs/heads/master a71f5650c -> 4917d8870 updated doc for ssl client auth Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/9b279c6b Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/9b279c6b Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/9b279c6b Branch: refs/heads/master Commit: 9b279c6b738f1cbe8eceab88f0269ceb971b615a Parents: c62480b Author: Robert DaleAuthored: Tue Jan 17 14:39:32 2017 -0500 Committer: Robert Dale Committed: Fri Jan 27 16:26:32 2017 -0500 -- docs/src/reference/gremlin-applications.asciidoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9b279c6b/docs/src/reference/gremlin-applications.asciidoc -- diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc index e515ef7..2454581 100644 --- a/docs/src/reference/gremlin-applications.asciidoc +++ b/docs/src/reference/gremlin-applications.asciidoc @@ -1036,7 +1036,8 @@ The following table describes the various configuration options that Gremlin Ser |ssl.keyCertChainFile |The X.509 certificate chain file in PEM format. If this value is not present and `ssl.enabled` is `true` a self-signed certificate will be used (not suitable for production). |_none_ |ssl.keyFile |The `PKCS#8` private key file in PEM format. If this value is not present and `ssl.enabled` is `true` a self-signed certificate will be used (not suitable for production). |_none_ |ssl.keyPassword |The password of the `keyFile` if it is password-protected |_none_ -|ssl.trustCertChainFile |Trusted certificates for verifying the remote endpoint's certificate. The file should contain an X.509 certificate chain in PEM format. A system default will be used if this setting is not present. (Not supported) |_none_ +|ssl.needClientAuth | Optional. One of NONE, OPTIONAL, REQUIRE. Enables client certificate authentication at the level specified. Can be used in combination with Authenticator. |_none_ +|ssl.trustCertChainFile | Required when needClientAuth is OPTIONAL or REQUIRE. Trusted certificates for verifying the remote endpoint's certificate. The file should contain an X.509 certificate chain in PEM format. |_none_ |strictTransactionManagement |Set to `true` to require `aliases` to be submitted on every requests, where the `aliases` become the scope of transaction management. |false |threadPoolBoss |The number of threads available to Gremlin Server for accepting connections. Should always be set to `1`. |1 |threadPoolWorker |The number of threads available to Gremlin Server for processing non-blocking reads and writes. |1
[5/5] tinkerpop git commit: format, organize imports only
format, organize imports only Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/33253dc6 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/33253dc6 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/33253dc6 Branch: refs/heads/tp32 Commit: 33253dc6b76aa5c3d5cb428a35a4379890e4a7a2 Parents: 67f7026 Author: Robert DaleAuthored: Wed Jan 25 06:27:43 2017 -0500 Committer: Robert Dale Committed: Fri Jan 27 16:26:33 2017 -0500 -- .../gremlin/server/GremlinServerIntegrateTest.java | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/33253dc6/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java -- diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java index 6e6d1ff..fe00a43 100644 --- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java +++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java @@ -55,7 +55,6 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.util.BulkSet; import org.apache.tinkerpop.gremlin.structure.Graph; import org.apache.tinkerpop.gremlin.structure.T; import org.apache.tinkerpop.gremlin.server.channel.NioChannelizer; -import org.apache.tinkerpop.gremlin.structure.Vertex; import org.apache.tinkerpop.gremlin.structure.util.detached.DetachedVertex; import org.apache.tinkerpop.gremlin.structure.util.empty.EmptyGraph; import org.apache.tinkerpop.gremlin.util.Log4jRecordingAppender; @@ -80,7 +79,6 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; -import java.util.function.Function; import java.util.function.Supplier; import java.util.stream.Collectors; import java.util.stream.IntStream; @@ -96,7 +94,6 @@ import static org.hamcrest.core.StringStartsWith.startsWith; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; -import static org.junit.Assume.assumeThat; import static org.junit.Assert.assertEquals; /** @@ -106,13 +103,13 @@ import static org.junit.Assert.assertEquals; */ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegrationTest { - private static final String SERVER_KEY = "src/test/resources/server.key.pk8"; - private static final String SERVER_CRT = "src/test/resources/server.crt"; - private static final String KEY_PASS = "changeit"; - private static final String CLIENT_KEY = "src/test/resources/client.key.pk8"; - private static final String CLIENT_CRT = "src/test/resources/client.crt"; +private static final String SERVER_KEY = "src/test/resources/server.key.pk8"; +private static final String SERVER_CRT = "src/test/resources/server.crt"; +private static final String KEY_PASS = "changeit"; +private static final String CLIENT_KEY = "src/test/resources/client.key.pk8"; +private static final String CLIENT_CRT = "src/test/resources/client.crt"; - private Log4jRecordingAppender recordingAppender = null; +private Log4jRecordingAppender recordingAppender = null; private final Supplier graphGetter = () -> server.getServerGremlinExecutor().getGraphManager().getGraphs().get("graph"); private final Configuration conf = new BaseConfiguration() {{ setProperty(Graph.GRAPH, RemoteGraph.class.getName());
[6/6] tinkerpop git commit: Merge branch 'tp32'
Merge branch 'tp32' Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/4917d887 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/4917d887 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/4917d887 Branch: refs/heads/master Commit: 4917d887068ad3593e658ea4719cdc494f30d8aa Parents: a71f565 33253dc Author: Robert DaleAuthored: Fri Jan 27 16:27:09 2017 -0500 Committer: Robert Dale Committed: Fri Jan 27 16:27:09 2017 -0500 -- CHANGELOG.asciidoc | 1 + .../src/reference/gremlin-applications.asciidoc | 3 +- .../upgrade/release-3.2.x-incubating.asciidoc | 9 ++ .../gremlin/server/AbstractChannelizer.java | 4 +- .../tinkerpop/gremlin/server/Settings.java | 6 ++ .../server/GremlinServerIntegrateTest.java | 88 +++- gremlin-server/src/test/resources/client.crt| 40 + .../src/test/resources/client.key.pk8 | 47 +++ gremlin-server/src/test/resources/server.crt| 41 + .../src/test/resources/server.key.pk8 | 47 +++ 10 files changed, 281 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4917d887/CHANGELOG.asciidoc -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4917d887/docs/src/reference/gremlin-applications.asciidoc -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4917d887/docs/src/upgrade/release-3.2.x-incubating.asciidoc -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4917d887/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4917d887/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java --
[4/6] tinkerpop git commit: updated docs
updated docs Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/c05e0729 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/c05e0729 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/c05e0729 Branch: refs/heads/master Commit: c05e072940a1f4bc55521a7240c0b67640ab2651 Parents: 9b279c6 Author: Robert DaleAuthored: Wed Jan 18 09:08:19 2017 -0500 Committer: Robert Dale Committed: Fri Jan 27 16:26:33 2017 -0500 -- CHANGELOG.asciidoc | 1 + docs/src/reference/gremlin-applications.asciidoc | 2 +- docs/src/upgrade/release-3.2.x-incubating.asciidoc | 9 + 3 files changed, 11 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c05e0729/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index d523ae2..76d9ef5 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -103,6 +103,7 @@ TinkerPop 3.2.4 (Release Date: NOT OFFICIALLY RELEASED YET) * Fixed a severe bug where `GraphComputer` strategies are not being loaded until the second use of the traversal source. * The root traversal now throws regular `NoSuchElementException` instead of `FastNoSuchElementException`. (*breaking*) * Added a short sleep to prevent traversal from finishing before it can be interrupted during `TraversalInterruptionComputerTest`. +* Added support for SSL client authentication [[release-3-2-3]] TinkerPop 3.2.3 (Release Date: October 17, 2016) http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c05e0729/docs/src/reference/gremlin-applications.asciidoc -- diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc index 2454581..5cea36b 100644 --- a/docs/src/reference/gremlin-applications.asciidoc +++ b/docs/src/reference/gremlin-applications.asciidoc @@ -1036,7 +1036,7 @@ The following table describes the various configuration options that Gremlin Ser |ssl.keyCertChainFile |The X.509 certificate chain file in PEM format. If this value is not present and `ssl.enabled` is `true` a self-signed certificate will be used (not suitable for production). |_none_ |ssl.keyFile |The `PKCS#8` private key file in PEM format. If this value is not present and `ssl.enabled` is `true` a self-signed certificate will be used (not suitable for production). |_none_ |ssl.keyPassword |The password of the `keyFile` if it is password-protected |_none_ -|ssl.needClientAuth | Optional. One of NONE, OPTIONAL, REQUIRE. Enables client certificate authentication at the level specified. Can be used in combination with Authenticator. |_none_ +|ssl.needClientAuth | Optional. One of NONE, OPTIONAL, REQUIRE. Enables client certificate authentication at the enforcement level specified. Can be used in combination with Authenticator. |_none_ |ssl.trustCertChainFile | Required when needClientAuth is OPTIONAL or REQUIRE. Trusted certificates for verifying the remote endpoint's certificate. The file should contain an X.509 certificate chain in PEM format. |_none_ |strictTransactionManagement |Set to `true` to require `aliases` to be submitted on every requests, where the `aliases` become the scope of transaction management. |false |threadPoolBoss |The number of threads available to Gremlin Server for accepting connections. Should always be set to `1`. |1 http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c05e0729/docs/src/upgrade/release-3.2.x-incubating.asciidoc -- diff --git a/docs/src/upgrade/release-3.2.x-incubating.asciidoc b/docs/src/upgrade/release-3.2.x-incubating.asciidoc index 7b5d638..401d67a 100644 --- a/docs/src/upgrade/release-3.2.x-incubating.asciidoc +++ b/docs/src/upgrade/release-3.2.x-incubating.asciidoc @@ -141,6 +141,15 @@ removed. See: link:https://issues.apache.org/jira/browse/TINKERPOP-1562[TINKERPOP-1562] + +SSL Client Authentication +^ + +Added new server configuration option `ssl.needClientAuth`. + +See: link:https://issues.apache.org/jira/browse/TINKERPOP-1602[TINKERPOP-1602] + + Upgrading for Providers ~~~
tinkerpop git commit: format, organize imports only
Repository: tinkerpop Updated Branches: refs/heads/TINKERPOP-1602 705c93412 -> b18f59cd7 format, organize imports only Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/b18f59cd Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/b18f59cd Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/b18f59cd Branch: refs/heads/TINKERPOP-1602 Commit: b18f59cd768da3d1c6f8298545303e86aadd3ce5 Parents: 705c934 Author: Robert DaleAuthored: Wed Jan 25 06:27:43 2017 -0500 Committer: Robert Dale Committed: Wed Jan 25 06:27:43 2017 -0500 -- .../gremlin/server/GremlinServerIntegrateTest.java | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b18f59cd/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java -- diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java index 6e6d1ff..fe00a43 100644 --- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java +++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java @@ -55,7 +55,6 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.util.BulkSet; import org.apache.tinkerpop.gremlin.structure.Graph; import org.apache.tinkerpop.gremlin.structure.T; import org.apache.tinkerpop.gremlin.server.channel.NioChannelizer; -import org.apache.tinkerpop.gremlin.structure.Vertex; import org.apache.tinkerpop.gremlin.structure.util.detached.DetachedVertex; import org.apache.tinkerpop.gremlin.structure.util.empty.EmptyGraph; import org.apache.tinkerpop.gremlin.util.Log4jRecordingAppender; @@ -80,7 +79,6 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; -import java.util.function.Function; import java.util.function.Supplier; import java.util.stream.Collectors; import java.util.stream.IntStream; @@ -96,7 +94,6 @@ import static org.hamcrest.core.StringStartsWith.startsWith; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; -import static org.junit.Assume.assumeThat; import static org.junit.Assert.assertEquals; /** @@ -106,13 +103,13 @@ import static org.junit.Assert.assertEquals; */ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegrationTest { - private static final String SERVER_KEY = "src/test/resources/server.key.pk8"; - private static final String SERVER_CRT = "src/test/resources/server.crt"; - private static final String KEY_PASS = "changeit"; - private static final String CLIENT_KEY = "src/test/resources/client.key.pk8"; - private static final String CLIENT_CRT = "src/test/resources/client.crt"; +private static final String SERVER_KEY = "src/test/resources/server.key.pk8"; +private static final String SERVER_CRT = "src/test/resources/server.crt"; +private static final String KEY_PASS = "changeit"; +private static final String CLIENT_KEY = "src/test/resources/client.key.pk8"; +private static final String CLIENT_CRT = "src/test/resources/client.crt"; - private Log4jRecordingAppender recordingAppender = null; +private Log4jRecordingAppender recordingAppender = null; private final Supplier graphGetter = () -> server.getServerGremlinExecutor().getGraphManager().getGraphs().get("graph"); private final Configuration conf = new BaseConfiguration() {{ setProperty(Graph.GRAPH, RemoteGraph.class.getName());
[23/45] tinkerpop git commit: Consistent naming for TinkerIoRegistry
Consistent naming for TinkerIoRegistry Now that there are multiple versions of GraphSON/Gryo the naming of registries should reflect the version number. This is a non-breaking change. The old TinkerIoRegistry is just deprecated. CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/802ff9f6 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/802ff9f6 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/802ff9f6 Branch: refs/heads/TINKERPOP-1602 Commit: 802ff9f69b48b4aa56a85c586ed3c58844a89c9f Parents: 3bb177f Author: Stephen MalletteAuthored: Tue Jan 17 19:04:03 2017 -0500 Committer: Stephen Mallette Committed: Tue Jan 17 19:04:03 2017 -0500 -- CHANGELOG.asciidoc | 1 + gremlin-console/conf/remote-objects.yaml| 2 +- .../tinkergraph/structure/TinkerGraph.java | 2 +- .../tinkergraph/structure/TinkerIoRegistry.java | 2 + .../structure/TinkerIoRegistryV1d0.java | 263 +++ .../structure/TinkerIoRegistryV2d0.java | 5 +- .../TinkerGraphGryoSerializerTest.java | 1 - .../TinkerGraphGryoSerializerV1d0Test.java | 83 ++ .../TinkerGraphGryoSerializerV2d0Test.java | 80 ++ .../tinkergraph/structure/TinkerGraphTest.java | 30 ++- 10 files changed, 463 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/802ff9f6/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 42088dd..9471b9f 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima TinkerPop 3.2.4 (Release Date: NOT OFFICIALLY RELEASED YET) ~~~ +* Deprecated `TinkerIoRegistry` replacing it with the more consistently named `TinkerIoRegistryV1d0`. * Made error messaging more consistent during result iteration timeouts in Gremlin Server. * `PathRetractionStrategy` does not add a `NoOpBarrierStep` to the end of local children as its wasted computation in 99% of traversals. * Fixed a bug in `AddVertexStartStep` where if a side-effect was being used in the parametrization, an NPE occurred. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/802ff9f6/gremlin-console/conf/remote-objects.yaml -- diff --git a/gremlin-console/conf/remote-objects.yaml b/gremlin-console/conf/remote-objects.yaml index f507f4e..d1909fc 100644 --- a/gremlin-console/conf/remote-objects.yaml +++ b/gremlin-console/conf/remote-objects.yaml @@ -38,4 +38,4 @@ hosts: [localhost] port: 8182 serializer: { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0, - config: { ioRegistries: [org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerIoRegistry] }} \ No newline at end of file + config: { ioRegistries: [org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerIoRegistryV1d0] }} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/802ff9f6/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java -- diff --git a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java index 48f4d3d..fa8c62b 100644 --- a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java +++ b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java @@ -233,7 +233,7 @@ public final class TinkerGraph implements Graph { @Override public I io(final Io.Builder builder) { -return (I) builder.graph(this).onMapper(mapper -> mapper.addRegistry(TinkerIoRegistry.instance())).create(); +return (I) builder.graph(this).onMapper(mapper -> mapper.addRegistry(TinkerIoRegistryV1d0.instance())).create(); } @Override http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/802ff9f6/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerIoRegistry.java -- diff --git a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerIoRegistry.java b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerIoRegistry.java index 66bdba1..40720e5 100644
[34/45] tinkerpop git commit: moved all the GroupStep work against tp32/
moved all the GroupStep work against tp32/ Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/3496402a Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/3496402a Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/3496402a Branch: refs/heads/TINKERPOP-1602 Commit: 3496402a4e0c2803031d3b88086aabd5c6a2cfd8 Parents: 97cc07d Author: Marko A. RodriguezAuthored: Thu Jan 19 04:16:56 2017 -0700 Committer: Marko A. Rodriguez Committed: Thu Jan 19 04:16:56 2017 -0700 -- CHANGELOG.asciidoc | 1 + .../process/traversal/step/map/GroupStep.java | 263 +++ .../step/sideEffect/GroupSideEffectStep.java| 50 ++-- .../step/sideEffect/GroovyGroupTest.groovy | 5 + .../traversal/step/sideEffect/GroupTest.java| 30 ++- 5 files changed, 91 insertions(+), 258 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3496402a/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 4f3f9ce..74751fa 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima TinkerPop 3.2.4 (Release Date: NOT OFFICIALLY RELEASED YET) ~~~ +* `GroupBiOperator` no longer maintains state and thus, no more side-effect related OLAP inconsistencies. * SASL negotiation supports both a byte array and Base64 encoded bytes as a string for authentication to Gremlin Server. * Deprecated `TinkerIoRegistry` replacing it with the more consistently named `TinkerIoRegistryV1d0`. * Made error messaging more consistent during result iteration timeouts in Gremlin Server. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3496402a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroupStep.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroupStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroupStep.java index d6ce421..07ca4ae 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroupStep.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroupStep.java @@ -19,7 +19,7 @@ package org.apache.tinkerpop.gremlin.process.traversal.step.map; -import org.apache.tinkerpop.gremlin.process.traversal.Step; +import org.apache.tinkerpop.gremlin.process.traversal.Operator; import org.apache.tinkerpop.gremlin.process.traversal.Traversal; import org.apache.tinkerpop.gremlin.process.traversal.Traverser; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__; @@ -29,22 +29,14 @@ import org.apache.tinkerpop.gremlin.process.traversal.lambda.IdentityTraversal; import org.apache.tinkerpop.gremlin.process.traversal.lambda.TokenTraversal; import org.apache.tinkerpop.gremlin.process.traversal.step.Barrier; import org.apache.tinkerpop.gremlin.process.traversal.step.ByModulating; -import org.apache.tinkerpop.gremlin.process.traversal.step.LambdaHolder; import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent; -import org.apache.tinkerpop.gremlin.process.traversal.step.util.EmptyStep; import org.apache.tinkerpop.gremlin.process.traversal.step.util.ReducingBarrierStep; import org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement; -import org.apache.tinkerpop.gremlin.process.traversal.traverser.util.TraverserSet; import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper; import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalUtil; import org.apache.tinkerpop.gremlin.structure.util.StringFactory; import org.apache.tinkerpop.gremlin.util.function.HashMapSupplier; -import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils; -import org.javatuples.Pair; -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; import java.io.Serializable; import java.util.ArrayList; import java.util.HashMap; @@ -60,14 +52,14 @@ public final class GroupStep extends ReducingBarrierStep> private char state = 'k'; private Traversal.AdminkeyTraversal; -private Traversal.AdminpreTraversal; private Traversal.AdminvalueTraversal; +private Barrier barrierStep; public GroupStep(final Traversal.Admin traversal) { super(traversal); this.valueTraversal =
[44/45] tinkerpop git commit: updated docs
updated docs Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/2979af65 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/2979af65 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/2979af65 Branch: refs/heads/TINKERPOP-1602 Commit: 2979af65e3c945c55264d76f1b0d657356f5e6ea Parents: 9f7e367 Author: Robert DaleAuthored: Wed Jan 18 09:08:19 2017 -0500 Committer: Robert Dale Committed: Sat Jan 21 06:39:20 2017 -0500 -- CHANGELOG.asciidoc | 1 + docs/src/reference/gremlin-applications.asciidoc | 2 +- docs/src/upgrade/release-3.2.x-incubating.asciidoc | 9 + 3 files changed, 11 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2979af65/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index fb0f8da..735cee1 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -99,6 +99,7 @@ TinkerPop 3.2.4 (Release Date: NOT OFFICIALLY RELEASED YET) * Fixed a severe bug where `GraphComputer` strategies are not being loaded until the second use of the traversal source. * The root traversal now throws regular `NoSuchElementException` instead of `FastNoSuchElementException`. (*breaking*) * Added a short sleep to prevent traversal from finishing before it can be interrupted during `TraversalInterruptionComputerTest`. +* Added support for SSL client authentication [[release-3-2-3]] TinkerPop 3.2.3 (Release Date: October 17, 2016) http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2979af65/docs/src/reference/gremlin-applications.asciidoc -- diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc index 2454581..5cea36b 100644 --- a/docs/src/reference/gremlin-applications.asciidoc +++ b/docs/src/reference/gremlin-applications.asciidoc @@ -1036,7 +1036,7 @@ The following table describes the various configuration options that Gremlin Ser |ssl.keyCertChainFile |The X.509 certificate chain file in PEM format. If this value is not present and `ssl.enabled` is `true` a self-signed certificate will be used (not suitable for production). |_none_ |ssl.keyFile |The `PKCS#8` private key file in PEM format. If this value is not present and `ssl.enabled` is `true` a self-signed certificate will be used (not suitable for production). |_none_ |ssl.keyPassword |The password of the `keyFile` if it is password-protected |_none_ -|ssl.needClientAuth | Optional. One of NONE, OPTIONAL, REQUIRE. Enables client certificate authentication at the level specified. Can be used in combination with Authenticator. |_none_ +|ssl.needClientAuth | Optional. One of NONE, OPTIONAL, REQUIRE. Enables client certificate authentication at the enforcement level specified. Can be used in combination with Authenticator. |_none_ |ssl.trustCertChainFile | Required when needClientAuth is OPTIONAL or REQUIRE. Trusted certificates for verifying the remote endpoint's certificate. The file should contain an X.509 certificate chain in PEM format. |_none_ |strictTransactionManagement |Set to `true` to require `aliases` to be submitted on every requests, where the `aliases` become the scope of transaction management. |false |threadPoolBoss |The number of threads available to Gremlin Server for accepting connections. Should always be set to `1`. |1 http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2979af65/docs/src/upgrade/release-3.2.x-incubating.asciidoc -- diff --git a/docs/src/upgrade/release-3.2.x-incubating.asciidoc b/docs/src/upgrade/release-3.2.x-incubating.asciidoc index b478b96..e34edb5 100644 --- a/docs/src/upgrade/release-3.2.x-incubating.asciidoc +++ b/docs/src/upgrade/release-3.2.x-incubating.asciidoc @@ -141,6 +141,15 @@ removed. See: link:https://issues.apache.org/jira/browse/TINKERPOP-1562[TINKERPOP-1562] + +SSL Client Authentication +^ + +Added new server configuration option `ssl.needClientAuth`. + +See: link:https://issues.apache.org/jira/browse/TINKERPOP-1602[TINKERPOP-1602] + + Upgrading for Providers ~~~
[38/45] tinkerpop git commit: updated CHANGELOG.
updated CHANGELOG. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/60022999 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/60022999 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/60022999 Branch: refs/heads/TINKERPOP-1602 Commit: 6002299925e7ef68275b9576331aac1194642bef Parents: d54b490 Author: Marko A. RodriguezAuthored: Thu Jan 19 10:16:43 2017 -0700 Committer: Marko A. Rodriguez Committed: Thu Jan 19 10:16:43 2017 -0700 -- CHANGELOG.asciidoc | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/60022999/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 5f28790..fb0f8da 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima TinkerPop 3.2.4 (Release Date: NOT OFFICIALLY RELEASED YET) ~~~ +* Fixed a bug associated with user-provided maps and `GroupSideEffectStep`. * `GroupBiOperator` no longer maintains a detached traversal and thus, no more side-effect related OLAP inconsistencies. * Added `ProjectedTraverser` which wraps a traverser with a `List` of projected data. * Fixed an optimization bug in `CollectionBarrierSteps` where the barrier was being consumed on each `addBarrier()`.
[29/45] tinkerpop git commit: Removed a PathProcessor.ID constraint from ComputerVerificationStrategy. Moreover, sampling and ordering is more efficient as the projected data is co-located with the tr
Removed a PathProcessor.ID constraint from ComputerVerificationStrategy. Moreover, sampling and ordering is more efficient as the projected data is co-located with the traverser in the new ProjectedTraverser wrapper. Going to leave it at this for tp32/... Moving forward, we can make it so we don't need to DetachFactory.detach(true) for CollectingBarrierStep by maintaining 'future data.' Its complicated and I don't want to introduce potential bugs. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/b2f0c57d Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/b2f0c57d Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/b2f0c57d Branch: refs/heads/TINKERPOP-1602 Commit: b2f0c57df6fd9191904213622ae718a0790d7a03 Parents: 5045f67 Author: Marko A. RodriguezAuthored: Wed Jan 18 11:07:32 2017 -0700 Committer: Marko A. Rodriguez Committed: Wed Jan 18 11:07:32 2017 -0700 -- .../traversal/step/filter/SampleGlobalStep.java | 19 -- .../traversal/step/map/OrderGlobalStep.java | 27 +--- .../step/util/CollectingBarrierStep.java| 24 ++--- .../ComputerVerificationStrategy.java | 8 -- .../traversal/traverser/ProjectedTraverser.java | 16 +++- .../gremlin/util/function/MultiComparator.java | 14 +++--- 6 files changed, 60 insertions(+), 48 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b2f0c57d/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/SampleGlobalStep.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/SampleGlobalStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/SampleGlobalStep.java index 0a4da58..2b2cf20 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/SampleGlobalStep.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/SampleGlobalStep.java @@ -24,6 +24,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.lambda.ConstantTraversal; import org.apache.tinkerpop.gremlin.process.traversal.step.ByModulating; import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent; import org.apache.tinkerpop.gremlin.process.traversal.step.util.CollectingBarrierStep; +import org.apache.tinkerpop.gremlin.process.traversal.traverser.ProjectedTraverser; import org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement; import org.apache.tinkerpop.gremlin.process.traversal.traverser.util.TraverserSet; import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalUtil; @@ -64,6 +65,15 @@ public final class SampleGlobalStep extends CollectingBarrierStep implemen } @Override +public void processAllStarts() { +if (this.starts.hasNext()) { +while (this.starts.hasNext()) { + this.traverserSet.add(this.createProjectedTraverser(this.starts.next())); +} +} +} + +@Override public void barrierConsumer(final TraverserSet traverserSet) { // return the entire traverser set if the set is smaller than the amount to sample if (traverserSet.bulkSize() <= this.amountToSample) @@ -71,7 +81,7 @@ public final class SampleGlobalStep extends CollectingBarrierStep implemen else sample the set double totalWeight = 0.0d; for (final Traverser.Admin s : traverserSet) { -totalWeight = totalWeight + TraversalUtil.apply(s, this.probabilityTraversal).doubleValue() * s.bulk(); +totalWeight = totalWeight + (((ProjectedTraverser ) s).getProjections().get(0).doubleValue() * s.bulk()); } /// final TraverserSet sampledSet = new TraverserSet<>(); @@ -82,7 +92,7 @@ public final class SampleGlobalStep extends CollectingBarrierStep implemen for (final Traverser.Admin s : traverserSet) { long sampleBulk = sampledSet.contains(s) ? sampledSet.get(s).bulk() : 0; if (sampleBulk < s.bulk()) { -final double currentWeight = TraversalUtil.apply(s, this.probabilityTraversal).doubleValue(); +final double currentWeight = ((ProjectedTraverser) s).getProjections().get(0).doubleValue(); for (int i = 0; i < (s.bulk() - sampleBulk); i++) { runningWeight = runningWeight + currentWeight; if (RANDOM.nextDouble() <= ((runningWeight / totalWeight))) { @@ -104,6 +114,11 @@
[04/45] tinkerpop git commit: Fixed bug in `IncidentToAdjacentStrategy`, it was missing some invalidating steps.
Fixed bug in `IncidentToAdjacentStrategy`, it was missing some invalidating steps. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/52e3b86c Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/52e3b86c Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/52e3b86c Branch: refs/heads/TINKERPOP-1602 Commit: 52e3b86c06938c3427b2452c39a44b75d92e5a6f Parents: 7ba7ecd Author: Daniel KuppitzAuthored: Mon Jan 9 15:31:54 2017 +0100 Committer: Daniel Kuppitz Committed: Mon Jan 9 15:31:54 2017 +0100 -- CHANGELOG.asciidoc | 1 + .../IncidentToAdjacentStrategy.java | 50 + .../IncidentToAdjacentStrategyTest.java | 56 ++-- 3 files changed, 58 insertions(+), 49 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/52e3b86c/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index fa67c56..f82fa23 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima TinkerPop 3.1.6 (Release Date: NOT OFFICIALLY RELEASED YET) ~~~ +* Fixed bug in `IncidentToAdjacentStrategy`, it was missing some invalidating steps. * Returned a confirmation on session close from Gremlin Server. * Use non-default port for running tests on Gremlin Server. * Fully shutdown metrics services in Gremlin Server on shutdown. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/52e3b86c/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IncidentToAdjacentStrategy.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IncidentToAdjacentStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IncidentToAdjacentStrategy.java index 712110d4..2edfa17 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IncidentToAdjacentStrategy.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IncidentToAdjacentStrategy.java @@ -22,10 +22,14 @@ import org.apache.tinkerpop.gremlin.process.traversal.Step; import org.apache.tinkerpop.gremlin.process.traversal.Traversal; import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy; import org.apache.tinkerpop.gremlin.process.traversal.step.LambdaHolder; +import org.apache.tinkerpop.gremlin.process.traversal.step.filter.CyclicPathStep; +import org.apache.tinkerpop.gremlin.process.traversal.step.filter.SimplePathStep; import org.apache.tinkerpop.gremlin.process.traversal.step.map.EdgeOtherVertexStep; import org.apache.tinkerpop.gremlin.process.traversal.step.map.EdgeVertexStep; import org.apache.tinkerpop.gremlin.process.traversal.step.map.PathStep; +import org.apache.tinkerpop.gremlin.process.traversal.step.map.TreeStep; import org.apache.tinkerpop.gremlin.process.traversal.step.map.VertexStep; +import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.TreeSideEffectStep; import org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy; import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper; import org.apache.tinkerpop.gremlin.structure.Direction; @@ -63,31 +67,12 @@ public final class IncidentToAdjacentStrategy extends AbstractTraversalStrategy< implements TraversalStrategy.OptimizationStrategy { private static final IncidentToAdjacentStrategy INSTANCE = new IncidentToAdjacentStrategy(); -private static final Set INVALIDATING_STEP_CLASSES = new HashSet<>(Arrays.asList(PathStep.class, LambdaHolder.class)); +private static final Set INVALIDATING_STEP_CLASSES = new HashSet<>(Arrays.asList(CyclicPathStep.class, +PathStep.class, SimplePathStep.class, TreeStep.class, TreeSideEffectStep.class, LambdaHolder.class)); private IncidentToAdjacentStrategy() { } -@Override -public void apply(Traversal.Admin traversal) { -final Traversal.Admin root = TraversalHelper.getRootTraversal(traversal); -if (TraversalHelper.hasStepOfAssignableClassRecursively(INVALIDATING_STEP_CLASSES, root)) -return; -final Collection > stepsToReplace = new ArrayList<>(); -Step prev = null; -for (final Step curr : traversal.getSteps()) { -if (isOptimizable(prev,
[25/45] tinkerpop git commit: Created OrdertedTraverser which allows us to move beyond the star graph for OrderGlobalStep by()-projections. Moreover, it reduces the complexity of ordering as the objec
Created OrdertedTraverser which allows us to move beyond the star graph for OrderGlobalStep by()-projections. Moreover, it reduces the complexity of ordering as the objects of comparison are already determined. Going to generalize fully to a ProjectedTraverser which will allow us to do the same for SampleGlobalStep, DedupGlobalStep, and down the road maintain order even as the computation is re-distributed to workers. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/501e97a1 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/501e97a1 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/501e97a1 Branch: refs/heads/TINKERPOP-1602 Commit: 501e97a1ecb23f76b2fddba8eaed1dba4a5a839e Parents: e80a4cd Author: Marko A. RodriguezAuthored: Wed Jan 18 09:08:24 2017 -0700 Committer: Marko A. Rodriguez Committed: Wed Jan 18 09:08:24 2017 -0700 -- CHANGELOG.asciidoc | 1 + .../traversal/step/map/OrderGlobalStep.java | 61 ++--- .../step/util/CollectingBarrierStep.java| 4 +- .../ComputerVerificationStrategy.java | 5 +- .../traversal/traverser/OrderedTraverser.java | 235 +++ .../gremlin/structure/io/gryo/GryoVersion.java | 4 +- 6 files changed, 277 insertions(+), 33 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/501e97a1/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 4f3f9ce..86c6b4f 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima TinkerPop 3.2.4 (Release Date: NOT OFFICIALLY RELEASED YET) ~~~ +* `OrderGlobalStep` now emits traversers with their `by()`-projections and thus, can move beyond the local star graph. * SASL negotiation supports both a byte array and Base64 encoded bytes as a string for authentication to Gremlin Server. * Deprecated `TinkerIoRegistry` replacing it with the more consistently named `TinkerIoRegistryV1d0`. * Made error messaging more consistent during result iteration timeouts in Gremlin Server. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/501e97a1/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderGlobalStep.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderGlobalStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderGlobalStep.java index a7d21b2..ac5df90 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderGlobalStep.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderGlobalStep.java @@ -27,10 +27,10 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.ByModulating; import org.apache.tinkerpop.gremlin.process.traversal.step.ComparatorHolder; import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent; import org.apache.tinkerpop.gremlin.process.traversal.step.util.CollectingBarrierStep; +import org.apache.tinkerpop.gremlin.process.traversal.traverser.OrderedTraverser; import org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement; import org.apache.tinkerpop.gremlin.process.traversal.traverser.util.TraverserSet; import org.apache.tinkerpop.gremlin.structure.util.StringFactory; -import org.apache.tinkerpop.gremlin.util.function.ChainedComparator; import org.javatuples.Pair; import java.io.Serializable; @@ -49,8 +49,8 @@ import java.util.stream.Collectors; public final class OrderGlobalStep extends CollectingBarrierStep implements ComparatorHolder, TraversalParent, ByModulating { private List, Comparator>> comparators = new ArrayList<>(); -private ChainedComparator chainedComparator = null; private long limit = Long.MAX_VALUE; +private boolean isShuffle = false; public OrderGlobalStep(final Traversal.Admin traversal) { super(traversal); @@ -58,12 +58,30 @@ public final class OrderGlobalStepextends CollectingBa @Override public void barrierConsumer(final TraverserSet traverserSet) { -if (null == this.chainedComparator) -this.chainedComparator = new ChainedComparator<>(true, this.comparators); -if (this.chainedComparator.isShuffle()) +if (this.isShuffle) traverserSet.shuffle();
[16/45] tinkerpop git commit: Add another example for appendix d of recipes.
Add another example for appendix d of recipes. The addition find vertex pairs with more than one edge between them assuming undirected edges. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/1c14dde5 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/1c14dde5 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/1c14dde5 Branch: refs/heads/TINKERPOP-1602 Commit: 1c14dde500f24f90eabb3d0517ecce6c8626100f Parents: 4be8a1b Author: Stephen MalletteAuthored: Mon Jan 16 15:36:34 2017 -0500 Committer: Stephen Mallette Committed: Mon Jan 16 15:36:34 2017 -0500 -- docs/src/recipes/appendix.asciidoc | 10 ++ 1 file changed, 10 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1c14dde5/docs/src/recipes/appendix.asciidoc -- diff --git a/docs/src/recipes/appendix.asciidoc b/docs/src/recipes/appendix.asciidoc index 9d0ea7b..15fda50 100644 --- a/docs/src/recipes/appendix.asciidoc +++ b/docs/src/recipes/appendix.asciidoc @@ -136,6 +136,16 @@ g.V().as("a"). select(keys) +The following example assumes that the edges point in the `OUT` direction. Assuming undirected edges: + +[gremlin-groovy,modern] + +g.V().where(without("x")).as("a"). + outE().as("e").inV().as("b"). + filter(bothE().where(neq("e")).otherV().where(eq("a"))).store("x"). + select("a","b").dedup() + + [[appendix-e]] _In the "crew" graph, find vertices that match on a complete set of multi-properties._
[15/45] tinkerpop git commit: Merge branch 'TINKERPOP-1545-tp31' into tp31
Merge branch 'TINKERPOP-1545-tp31' into tp31 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/4b8ea270 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/4b8ea270 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/4b8ea270 Branch: refs/heads/TINKERPOP-1602 Commit: 4b8ea2703c1fe30b0345624b329d79d5ea1d6924 Parents: a27a048 52e3b86 Author: Daniel KuppitzAuthored: Thu Jan 12 15:22:33 2017 +0100 Committer: Daniel Kuppitz Committed: Thu Jan 12 15:22:33 2017 +0100 -- CHANGELOG.asciidoc | 1 + .../IncidentToAdjacentStrategy.java | 50 + .../IncidentToAdjacentStrategyTest.java | 56 ++-- 3 files changed, 58 insertions(+), 49 deletions(-) --
[42/45] tinkerpop git commit: updated doc for ssl client auth
updated doc for ssl client auth Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/9f7e367c Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/9f7e367c Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/9f7e367c Branch: refs/heads/TINKERPOP-1602 Commit: 9f7e367ca4279b179736f8c51628868a02226d77 Parents: 68c6c0f Author: Robert DaleAuthored: Tue Jan 17 14:39:32 2017 -0500 Committer: Robert Dale Committed: Sat Jan 21 06:39:20 2017 -0500 -- docs/src/reference/gremlin-applications.asciidoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9f7e367c/docs/src/reference/gremlin-applications.asciidoc -- diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc index e515ef7..2454581 100644 --- a/docs/src/reference/gremlin-applications.asciidoc +++ b/docs/src/reference/gremlin-applications.asciidoc @@ -1036,7 +1036,8 @@ The following table describes the various configuration options that Gremlin Ser |ssl.keyCertChainFile |The X.509 certificate chain file in PEM format. If this value is not present and `ssl.enabled` is `true` a self-signed certificate will be used (not suitable for production). |_none_ |ssl.keyFile |The `PKCS#8` private key file in PEM format. If this value is not present and `ssl.enabled` is `true` a self-signed certificate will be used (not suitable for production). |_none_ |ssl.keyPassword |The password of the `keyFile` if it is password-protected |_none_ -|ssl.trustCertChainFile |Trusted certificates for verifying the remote endpoint's certificate. The file should contain an X.509 certificate chain in PEM format. A system default will be used if this setting is not present. (Not supported) |_none_ +|ssl.needClientAuth | Optional. One of NONE, OPTIONAL, REQUIRE. Enables client certificate authentication at the level specified. Can be used in combination with Authenticator. |_none_ +|ssl.trustCertChainFile | Required when needClientAuth is OPTIONAL or REQUIRE. Trusted certificates for verifying the remote endpoint's certificate. The file should contain an X.509 certificate chain in PEM format. |_none_ |strictTransactionManagement |Set to `true` to require `aliases` to be submitted on every requests, where the `aliases` become the scope of transaction management. |false |threadPoolBoss |The number of threads available to Gremlin Server for accepting connections. Should always be set to `1`. |1 |threadPoolWorker |The number of threads available to Gremlin Server for processing non-blocking reads and writes. |1
[26/45] tinkerpop git commit: remember user's working directory when script files are being loaded in execution mode
remember user's working directory when script files are being loaded in execution mode Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/8fd6dbbe Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/8fd6dbbe Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/8fd6dbbe Branch: refs/heads/TINKERPOP-1602 Commit: 8fd6dbbe9cc0b98d124cd3fdf739377289300ce8 Parents: e80a4cd Author: Daniel KuppitzAuthored: Wed Jan 18 17:18:46 2017 +0100 Committer: Daniel Kuppitz Committed: Wed Jan 18 17:18:46 2017 +0100 -- gremlin-console/src/main/bin/gremlin.sh | 4 +++- .../org/apache/tinkerpop/gremlin/console/Console.groovy | 8 +++- 2 files changed, 10 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8fd6dbbe/gremlin-console/src/main/bin/gremlin.sh -- diff --git a/gremlin-console/src/main/bin/gremlin.sh b/gremlin-console/src/main/bin/gremlin.sh index 901610b..d8c94db 100755 --- a/gremlin-console/src/main/bin/gremlin.sh +++ b/gremlin-console/src/main/bin/gremlin.sh @@ -22,6 +22,8 @@ set -e set -u +USER_DIR=`pwd` + cd $(dirname $0) DIR=`pwd` @@ -90,7 +92,7 @@ while getopts ":l" opt; do esac done -JAVA_OPTIONS="${JAVA_OPTIONS} -Dtinkerpop.ext=${USER_EXT_DIR:-${SYSTEM_EXT_DIR}} -Dlog4j.configuration=conf/log4j-console.properties -Dgremlin.log4j.level=$GREMLIN_LOG_LEVEL" +JAVA_OPTIONS="${JAVA_OPTIONS} -Duser.working_dir=${USER_DIR} -Dtinkerpop.ext=${USER_EXT_DIR:-${SYSTEM_EXT_DIR}} -Dlog4j.configuration=conf/log4j-console.properties -Dgremlin.log4j.level=$GREMLIN_LOG_LEVEL" JAVA_OPTIONS=$(awk -v RS=' ' '!/^$/ {if (!x[$0]++) print}' <<< "${JAVA_OPTIONS}" | grep -v '^$' | paste -sd ' ' -) if [ -n "$SCRIPT_DEBUG" ]; then http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8fd6dbbe/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy -- diff --git a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy index a2e518c..0788f42 100644 --- a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy +++ b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy @@ -378,7 +378,13 @@ class Console { groovy.execute("args = []") } -final File file = new File(scriptFile) +File file = new File(scriptFile) +if (!file.exists() && !file.isAbsolute()) { +final String userWorkingDir = System.getProperty("user.working_dir"); +if (userWorkingDir != null) { +file = new File(userWorkingDir, scriptFile); +} +} int lineNumber = 0 def lines = file.readLines() for (String line : lines) {
[06/45] tinkerpop git commit: Add an appendix to the recipes.
Add an appendix to the recipes. Useful for general example traversals that don't fit nicely into a specific recipe or under a specific step in the reference documentation. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/043d1a3a Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/043d1a3a Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/043d1a3a Branch: refs/heads/TINKERPOP-1602 Commit: 043d1a3aa116b23a46cd1d77bed5ba3c0e4b77a2 Parents: d5404b8 Author: Stephen MalletteAuthored: Mon Jan 9 15:19:34 2017 -0500 Committer: Stephen Mallette Committed: Mon Jan 9 15:19:34 2017 -0500 -- docs/src/recipes/index.asciidoc | 81 +++- 1 file changed, 80 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/043d1a3a/docs/src/recipes/index.asciidoc -- diff --git a/docs/src/recipes/index.asciidoc b/docs/src/recipes/index.asciidoc index 8ffc358..2e88ac5 100644 --- a/docs/src/recipes/index.asciidoc +++ b/docs/src/recipes/index.asciidoc @@ -133,4 +133,83 @@ GitHub and JIRA are linked. As mentioned earlier in this section, the recipe wi committers prior to merging. This process may take several days to complete. We look forward to receiving your submissions! - +Appendix + + +Many of the recipes are based on questions and answers provided on the gremlin-users mailing list. This section +contains a number of traversals from the mailing list that do not easily fit any particular pattern (i.e. a recipe), +but are nonetheless interesting and thus remain good tools for learning Gremlin. + +[[appendix-a]] +_For each person in a "follows" graph, determine the number of followers and list their names._ + +[gremlin-groovy] + +g.addV('name','marko').as('marko'). + addV('name','josh').as('josh'). + addV('name','daniel').as('daniel'). + addV('name','matthias').as('matthias'). + addE('follows').from('josh').to('marko'). + addE('follows').from('matthias').to('josh'). + addE('follows').from('daniel').to('josh'). + addE('follows').from('daniel').to('marko').iterate() +g.V().as('p'). + map(__.in('follows').values('name').fold()). + group().by(select('p').by('name')). + by(project('numFollowers','followers'). + by(count(local)).by()).next() + + +[[appendix-b]] +_In the "modern" graph, show each person, the software they worked on and the co-worker count for the software and +the names of those co-workers._ + +[gremlin-groovy,modern] + +g.V().hasLabel("person").as("p"). + out("created").as("s"). + map(__.in("created"). +where(neq("p")).values("name").fold()). + group().by(select("p").by("name")). +by(group().by(select("s").by("name")). +by(project("numCoworkers","coworkers"). + by(count(local)).by())).next() + + +[[appendix-c]] +_Assuming a graph of students, classes and times, detect students who have a conflicting schedule._ + +[gremlin-groovy] + +g.addV(label, "student", "name", "Pete").as("s1"). + addV(label, "student", "name", "Joe").as("s2"). + addV(label, "class", "name", "Java's GC").as("c1"). + addV(label, "class", "name", "FP Principles").as("c2"). + addV(label, "class", "name", "Memory Management in C").as("c3"). + addV(label, "class", "name", "Memory Management in C++").as("c4"). + addV(label, "timeslot", "date", "11/25/2016", "fromTime", "10:00", "toTime", "11:00").as("t1"). + addV(label, "timeslot", "date", "11/25/2016", "fromTime", "11:00", "toTime", "12:00").as("t2"). + addE("attends").from("s1").to("c1"). + addE("attends").from("s1").to("c2"). + addE("attends").from("s1").to("c3"). + addE("attends").from("s1").to("c4"). + addE("attends").from("s2").to("c2"). + addE("attends").from("s2").to("c3"). + addE("allocated").from("c1").to("t1"). + addE("allocated").from("c1").to("t2"). + addE("allocated").from("c2").to("t1"). + addE("allocated").from("c3").to("t2"). + addE("allocated").from("c4").to("t2").iterate() +g.V().hasLabel("student").as("s"). + out("attends").as("c"). + out("allocated").as("t"). + select("s"). + out("attends"). + where(neq("c")). + out("allocated"). + where(eq("t")). + group(). +by(select("s").by("name")). +by(group().by(select("t").by(valueMap("fromTime","toTime"))). + by(select("c").dedup().values("name").fold())).next() + \ No newline at end of file
[10/45] tinkerpop git commit: Added a recipe appendix entry
Added a recipe appendix entry Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/0938ebdc Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/0938ebdc Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/0938ebdc Branch: refs/heads/TINKERPOP-1602 Commit: 0938ebdce4b6d8512674503680c660eea9870e9e Parents: d7ecfc0 Author: Stephen MalletteAuthored: Tue Jan 10 10:45:56 2017 -0500 Committer: Stephen Mallette Committed: Tue Jan 10 10:45:56 2017 -0500 -- docs/src/recipes/appendix.asciidoc | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0938ebdc/docs/src/recipes/appendix.asciidoc -- diff --git a/docs/src/recipes/appendix.asciidoc b/docs/src/recipes/appendix.asciidoc index 63ec447..15d7340 100644 --- a/docs/src/recipes/appendix.asciidoc +++ b/docs/src/recipes/appendix.asciidoc @@ -109,4 +109,19 @@ g.V().as("a"). unfold(). filter(select(values).is(gt(1))). select(keys) - \ No newline at end of file + + +[[appendix-e]] +_In the "crew" graph, find vertices that match on a complete set of multi-properties._ + +[gremlin-groovy,theCrew] + +places = ["centreville","dulles"];[] // will not match as "purcellville" is missing +g.V().not(has("location", without(places))). + where(values("location").is(within(places)).count().is(places.size())). + valueMap() +places = ["centreville","dulles","purcellville"];[] +g.V().not(has("location", without(places))). + where(values("location").is(within(places)).count().is(places.size())). + valueMap() +
[32/45] tinkerpop git commit: Renamed GraphSONTraversalSerializersV2d0 for consistency
Renamed GraphSONTraversalSerializersV2d0 for consistency This is a non-breaking change as the class is not public. CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/97cc07de Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/97cc07de Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/97cc07de Branch: refs/heads/TINKERPOP-1602 Commit: 97cc07de91918bf0886f5f217a762ce2fffcc201 Parents: 28e1d93 Author: Stephen MalletteAuthored: Wed Jan 18 13:22:00 2017 -0500 Committer: Stephen Mallette Committed: Wed Jan 18 13:22:00 2017 -0500 -- .../structure/io/graphson/GraphSONModule.java | 30 +- .../GraphSONTraversalSerializersV2d0.java | 390 --- .../io/graphson/TraversalSerializersV2d0.java | 390 +++ 3 files changed, 405 insertions(+), 405 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/97cc07de/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONModule.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONModule.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONModule.java index 7d65f9c..a061d1c 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONModule.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONModule.java @@ -207,8 +207,8 @@ abstract class GraphSONModule extends TinkerPopJacksonModule { addSerializer(Double.class, new GraphSONSerializersV2d0.DoubleGraphSONSerializer()); // traversal -addSerializer(Traversal.class, new GraphSONTraversalSerializersV2d0.TraversalJacksonSerializer()); -addSerializer(Bytecode.class, new GraphSONTraversalSerializersV2d0.BytecodeJacksonSerializer()); +addSerializer(Traversal.class, new TraversalSerializersV2d0.TraversalJacksonSerializer()); +addSerializer(Bytecode.class, new TraversalSerializersV2d0.BytecodeJacksonSerializer()); Stream.of(VertexProperty.Cardinality.class, Column.class, Direction.class, @@ -218,12 +218,12 @@ abstract class GraphSONModule extends TinkerPopJacksonModule { SackFunctions.Barrier.class, Scope.class, TraversalOptionParent.Pick.class, -T.class).forEach(e -> addSerializer(e, new GraphSONTraversalSerializersV2d0.EnumJacksonSerializer())); -addSerializer(P.class, new GraphSONTraversalSerializersV2d0.PJacksonSerializer()); -addSerializer(Lambda.class, new GraphSONTraversalSerializersV2d0.LambdaJacksonSerializer()); -addSerializer(Bytecode.Binding.class, new GraphSONTraversalSerializersV2d0.BindingJacksonSerializer()); -addSerializer(Traverser.class, new GraphSONTraversalSerializersV2d0.TraverserJacksonSerializer()); -addSerializer(TraversalStrategy.class, new GraphSONTraversalSerializersV2d0.TraversalStrategyJacksonSerializer()); +T.class).forEach(e -> addSerializer(e, new TraversalSerializersV2d0.EnumJacksonSerializer())); +addSerializer(P.class, new TraversalSerializersV2d0.PJacksonSerializer()); +addSerializer(Lambda.class, new TraversalSerializersV2d0.LambdaJacksonSerializer()); +addSerializer(Bytecode.Binding.class, new TraversalSerializersV2d0.BindingJacksonSerializer()); +addSerializer(Traverser.class, new TraversalSerializersV2d0.TraverserJacksonSerializer()); +addSerializer(TraversalStrategy.class, new TraversalSerializersV2d0.TraversalStrategyJacksonSerializer()); /// DESERIALIZERS @@ -242,8 +242,8 @@ abstract class GraphSONModule extends TinkerPopJacksonModule { addDeserializer(Double.class, new GraphSONSerializersV2d0.DoubleJackonsDeserializer()); // traversal -addDeserializer(Bytecode.class, new GraphSONTraversalSerializersV2d0.BytecodeJacksonDeserializer()); -addDeserializer(Bytecode.Binding.class, new GraphSONTraversalSerializersV2d0.BindingJacksonDeserializer()); +addDeserializer(Bytecode.class, new TraversalSerializersV2d0.BytecodeJacksonDeserializer()); +addDeserializer(Bytecode.Binding.class, new TraversalSerializersV2d0.BindingJacksonDeserializer()); Stream.of(VertexProperty.Cardinality.values(), Column.values(), Direction.values(), @@
[45/45] tinkerpop git commit: added tests
added tests Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/1633bd94 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/1633bd94 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/1633bd94 Branch: refs/heads/TINKERPOP-1602 Commit: 1633bd94554e2bde6f0b13ebdb7cf328d8973f3b Parents: 2979af6 Author: Robert DaleAuthored: Mon Jan 23 14:27:37 2017 -0500 Committer: Robert Dale Committed: Mon Jan 23 14:27:37 2017 -0500 -- .../server/GremlinServerIntegrateTest.java | 87 +++- gremlin-server/src/test/resources/client.crt| 40 + .../src/test/resources/client.key.pk8 | 47 +++ gremlin-server/src/test/resources/server.crt| 41 + .../src/test/resources/server.key.pk8 | 47 +++ 5 files changed, 261 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1633bd94/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java -- diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java index 1743e89..6e6d1ff 100644 --- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java +++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java @@ -18,6 +18,7 @@ */ package org.apache.tinkerpop.gremlin.server; +import io.netty.handler.ssl.ClientAuth; import io.netty.handler.ssl.SslContext; import io.netty.handler.ssl.SslContextBuilder; import io.netty.handler.ssl.SslProvider; @@ -105,7 +106,13 @@ import static org.junit.Assert.assertEquals; */ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegrationTest { -private Log4jRecordingAppender recordingAppender = null; + private static final String SERVER_KEY = "src/test/resources/server.key.pk8"; + private static final String SERVER_CRT = "src/test/resources/server.crt"; + private static final String KEY_PASS = "changeit"; + private static final String CLIENT_KEY = "src/test/resources/client.key.pk8"; + private static final String CLIENT_CRT = "src/test/resources/client.crt"; + + private Log4jRecordingAppender recordingAppender = null; private final Supplier graphGetter = () -> server.getServerGremlinExecutor().getGraphManager().getGraphs().get("graph"); private final Configuration conf = new BaseConfiguration() {{ setProperty(Graph.GRAPH, RemoteGraph.class.getName()); @@ -165,6 +172,36 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration settings.ssl.enabled = true; settings.ssl.overrideSslContext(createServerSslContext()); break; +case "shouldEnableSslAndClientCertificateAuth": +settings.ssl = new Settings.SslSettings(); +settings.ssl.enabled = true; +settings.ssl.needClientAuth = ClientAuth.REQUIRE; +settings.ssl.keyCertChainFile = SERVER_CRT; +settings.ssl.keyFile = SERVER_KEY; +settings.ssl.keyPassword =KEY_PASS; +// Trust the client +settings.ssl.trustCertChainFile = CLIENT_CRT; + break; +case "shouldEnableSslAndClientCertificateAuthAndFailWithoutCert": +settings.ssl = new Settings.SslSettings(); +settings.ssl.enabled = true; +settings.ssl.needClientAuth = ClientAuth.REQUIRE; +settings.ssl.keyCertChainFile = SERVER_CRT; +settings.ssl.keyFile = SERVER_KEY; +settings.ssl.keyPassword =KEY_PASS; +// Trust the client +settings.ssl.trustCertChainFile = CLIENT_CRT; + break; +case "shouldEnableSslAndClientCertificateAuthAndFailWithoutTrustedClientCert": +settings.ssl = new Settings.SslSettings(); +settings.ssl.enabled = true; +settings.ssl.needClientAuth = ClientAuth.REQUIRE; +settings.ssl.keyCertChainFile = SERVER_CRT; +settings.ssl.keyFile = SERVER_KEY; +settings.ssl.keyPassword =KEY_PASS; +// Trust ONLY the server cert +settings.ssl.trustCertChainFile = SERVER_CRT; + break; case "shouldStartWithDefaultSettings": // test with defaults exception for port because we want to keep testing off of 8182
[28/45] tinkerpop git commit: We now have ProjectedTraveser which is a Traverser with List of projections. OrderGlobalStep uses this and thus, can order for everything within the local star gr
We now have ProjectedTraveser which is a Traverser with List of projections. OrderGlobalStep uses this and thus, can order for everything within the local star graph. Added MultiComparator which is like ChainedComparator but doesn't contain traversal projections -- just comparators. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/5045f67f Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/5045f67f Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/5045f67f Branch: refs/heads/TINKERPOP-1602 Commit: 5045f67f469e163d1363f953672a3f38b4ff2a3f Parents: 501e97a Author: Marko A. RodriguezAuthored: Wed Jan 18 09:38:21 2017 -0700 Committer: Marko A. Rodriguez Committed: Wed Jan 18 09:38:21 2017 -0700 -- .../traversal/step/map/OrderGlobalStep.java | 39 ++- .../traversal/traverser/OrderedTraverser.java | 235 --- .../traversal/traverser/ProjectedTraverser.java | 199 .../gremlin/structure/io/gryo/GryoVersion.java | 8 +- .../gremlin/util/function/MultiComparator.java | 60 + 5 files changed, 295 insertions(+), 246 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5045f67f/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderGlobalStep.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderGlobalStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderGlobalStep.java index ac5df90..9c071f1 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderGlobalStep.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderGlobalStep.java @@ -27,10 +27,12 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.ByModulating; import org.apache.tinkerpop.gremlin.process.traversal.step.ComparatorHolder; import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent; import org.apache.tinkerpop.gremlin.process.traversal.step.util.CollectingBarrierStep; -import org.apache.tinkerpop.gremlin.process.traversal.traverser.OrderedTraverser; +import org.apache.tinkerpop.gremlin.process.traversal.traverser.ProjectedTraverser; import org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement; import org.apache.tinkerpop.gremlin.process.traversal.traverser.util.TraverserSet; +import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalUtil; import org.apache.tinkerpop.gremlin.structure.util.StringFactory; +import org.apache.tinkerpop.gremlin.util.function.MultiComparator; import org.javatuples.Pair; import java.io.Serializable; @@ -49,6 +51,7 @@ import java.util.stream.Collectors; public final class OrderGlobalStep extends CollectingBarrierStep implements ComparatorHolder, TraversalParent, ByModulating { private List, Comparator>> comparators = new ArrayList<>(); +private MultiComparator multiComparator = null; private long limit = Long.MAX_VALUE; private boolean isShuffle = false; @@ -61,14 +64,16 @@ public final class OrderGlobalStep extends CollectingBa if (this.isShuffle) traverserSet.shuffle(); else -traverserSet.sort(Comparator.naturalOrder()); +traverserSet.sort((Comparator) this.multiComparator); } @Override public void processAllStarts() { +if (null == this.multiComparator) +this.multiComparator = this.createMultiComparator(); if (this.starts.hasNext()) { while (this.starts.hasNext()) { -this.traverserSet.add(new OrderedTraverser(this.starts.next(), (List) this.comparators)); + this.traverserSet.add(this.createOrderedTraverser(this.starts.next())); } this.barrierConsumer(this.traverserSet); } @@ -81,7 +86,7 @@ public final class OrderGlobalStepextends CollectingBa } else if (this.starts.hasNext()) { this.processAllStarts(); } -return ((OrderedTraverser) this.traverserSet.remove()).getInternal(); +return ((ProjectedTraverser) this.traverserSet.remove()).getInternal(); } public void setLimit(final long limit) { @@ -155,7 +160,25 @@ public final class OrderGlobalStepextends CollectingBa @Override public MemoryComputeKeygetMemoryComputeKey() { -return MemoryComputeKey.of(this.getId(), new
[22/45] tinkerpop git commit: Merge branch 'tp31' into tp32
Merge branch 'tp31' into tp32 Conflicts: CHANGELOG.asciidoc gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IncidentToAdjacentStrategy.java gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IncidentToAdjacentStrategyTest.java pom.xml Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/3bb177fe Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/3bb177fe Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/3bb177fe Branch: refs/heads/TINKERPOP-1602 Commit: 3bb177fef12727184575477d28ef163a956c01bf Parents: e06ce0c 6e2128c Author: Stephen MalletteAuthored: Tue Jan 17 13:55:24 2017 -0500 Committer: Stephen Mallette Committed: Tue Jan 17 13:55:24 2017 -0500 -- CHANGELOG.asciidoc | 1 + pom.xml| 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3bb177fe/CHANGELOG.asciidoc -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3bb177fe/pom.xml -- diff --cc pom.xml index 3c5f8ed,d8311ca..0845ef8 --- a/pom.xml +++ b/pom.xml @@@ -134,7 -127,8 +134,7 @@@ limitations under the License 1.10 - 2.4.7 + 2.4.8 -4.12 3.0.2 UTF-8 UTF-8
[41/45] tinkerpop git commit: CTR: added another script evaluation test in `validate-distribution.sh`.
CTR: added another script evaluation test in `validate-distribution.sh`. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/62785dcb Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/62785dcb Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/62785dcb Branch: refs/heads/TINKERPOP-1602 Commit: 62785dcb686be7d56bf207a0ef4279f912cbe41e Parents: 67a1092 Author: Daniel KuppitzAuthored: Sat Jan 21 12:29:28 2017 +0100 Committer: Daniel Kuppitz Committed: Sat Jan 21 12:29:28 2017 +0100 -- bin/validate-distribution.sh | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/62785dcb/bin/validate-distribution.sh -- diff --git a/bin/validate-distribution.sh b/bin/validate-distribution.sh index 2148610..3c2cc95 100755 --- a/bin/validate-distribution.sh +++ b/bin/validate-distribution.sh @@ -169,9 +169,13 @@ echo "OK" if [ "${TYPE}" = "CONSOLE" ]; then echo -n "* testing script evaluation ... " SCRIPT="x = org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerFactory.createModern().traversal().V().count().next(); println x; x" - SCRIPT_FILENAME="${TMP_DIR}/test.groovy" - echo ${SCRIPT} > ${SCRIPT_FILENAME} + SCRIPT_FILENAME="test.groovy" + SCRIPT_PATH="${TMP_DIR}/${SCRIPT_FILENAME}" + echo ${SCRIPT} > ${SCRIPT_PATH} [[ `bin/gremlin.sh <<< ${SCRIPT} | grep '^==>' | sed -e 's/^==>//'` -eq 6 ]] || { echo "failed to evaluate sample script"; exit 1; } - [[ `bin/gremlin.sh -e ${SCRIPT_FILENAME}` -eq 6 ]] || { echo "failed to evaluate sample script using -e option"; exit 1; } + [[ `bin/gremlin.sh -e ${SCRIPT_PATH}` -eq 6 ]] || { echo "failed to evaluate sample script using -e option"; exit 1; } + CONSOLE_DIR=`pwd` + cd ${TMP_DIR} + [[ `${CONSOLE_DIR}/bin/gremlin.sh -e ${SCRIPT_FILENAME}` -eq 6 ]] || { echo "failed to evaluate sample script using -e option (using a different working directory and a relative script path)"; exit 1; } echo "OK" fi
[36/45] tinkerpop git commit: @dkuppitz found an optimization trick for MultiComparator. The startIndex for comparing should start after the last Order.shuffle.
@dkuppitz found an optimization trick for MultiComparator. The startIndex for comparing should start after the last Order.shuffle. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/341ebf98 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/341ebf98 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/341ebf98 Branch: refs/heads/TINKERPOP-1602 Commit: 341ebf9811c15d65231ea31c3617723c2fd0ab09 Parents: 379a6e5 Author: Marko A. RodriguezAuthored: Thu Jan 19 08:23:42 2017 -0700 Committer: Marko A. Rodriguez Committed: Thu Jan 19 08:23:42 2017 -0700 -- CHANGELOG.asciidoc | 2 +- .../gremlin/structure/io/gryo/GryoVersion.java | 4 +- .../gremlin/util/function/MultiComparator.java | 15 +++-- .../util/function/MultiComparatorTest.java | 69 4 files changed, 81 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/341ebf98/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 88cbf32..5f28790 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -26,7 +26,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima TinkerPop 3.2.4 (Release Date: NOT OFFICIALLY RELEASED YET) ~~~ -* `GroupBiOperator` no longer maintains state and thus, no more side-effect related OLAP inconsistencies. +* `GroupBiOperator` no longer maintains a detached traversal and thus, no more side-effect related OLAP inconsistencies. * Added `ProjectedTraverser` which wraps a traverser with a `List` of projected data. * Fixed an optimization bug in `CollectionBarrierSteps` where the barrier was being consumed on each `addBarrier()`. * `OrderGlobalStep` and `SampleGlobalStep` use `ProjectedTraverser` and now can work up to the local star graph in OLAP. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/341ebf98/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoVersion.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoVersion.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoVersion.java index f4e31fd..7818f6b 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoVersion.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoVersion.java @@ -292,13 +292,13 @@ public enum GryoVersion { add(GryoTypeReg.of(Operator.class, 107)); add(GryoTypeReg.of(FoldStep.FoldBiOperator.class, 108)); add(GryoTypeReg.of(GroupCountStep.GroupCountBiOperator.class, 109)); -add(GryoTypeReg.of(GroupStep.GroupBiOperator.class, 117, new JavaSerializer())); // because they contain traversals +add(GryoTypeReg.of(GroupStep.GroupBiOperator.class, 117, new JavaSerializer())); add(GryoTypeReg.of(MeanGlobalStep.MeanGlobalBiOperator.class, 110)); add(GryoTypeReg.of(MeanGlobalStep.MeanNumber.class, 111)); add(GryoTypeReg.of(TreeStep.TreeBiOperator.class, 112)); add(GryoTypeReg.of(GroupStepV3d0.GroupBiOperatorV3d0.class, 113)); add(GryoTypeReg.of(RangeGlobalStep.RangeBiOperator.class, 114)); -add(GryoTypeReg.of(OrderGlobalStep.OrderBiOperator.class, 118, new JavaSerializer())); // because they contain traversals +add(GryoTypeReg.of(OrderGlobalStep.OrderBiOperator.class, 118, new JavaSerializer())); add(GryoTypeReg.of(ProfileStep.ProfileBiOperator.class, 119)); }}; } http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/341ebf98/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/util/function/MultiComparator.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/util/function/MultiComparator.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/util/function/MultiComparator.java index 5d24ddf..d97d147 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/util/function/MultiComparator.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/util/function/MultiComparator.java @@ -33,6 +33,7 @@ public final class MultiComparator implements Comparator, Serializable { private List comparators; private boolean isShuffle; +int startIndex = 0; private MultiComparator() { // for serialization purposes @@ -41,6 +42,10 @@ public
[07/45] tinkerpop git commit: Added duplicate edge detection recipe
Added duplicate edge detection recipe Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/7783c838 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/7783c838 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/7783c838 Branch: refs/heads/TINKERPOP-1602 Commit: 7783c838e15cfdf3ee567790c657f34403766936 Parents: 043d1a3 Author: Stephen MalletteAuthored: Tue Jan 10 08:49:02 2017 -0500 Committer: Stephen Mallette Committed: Tue Jan 10 08:49:02 2017 -0500 -- docs/src/recipes/duplicate-edge.asciidoc | 142 ++ docs/src/recipes/index.asciidoc | 18 2 files changed, 160 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7783c838/docs/src/recipes/duplicate-edge.asciidoc -- diff --git a/docs/src/recipes/duplicate-edge.asciidoc b/docs/src/recipes/duplicate-edge.asciidoc new file mode 100644 index 000..ed56106 --- /dev/null +++ b/docs/src/recipes/duplicate-edge.asciidoc @@ -0,0 +1,142 @@ + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +[[duplicate-edge]] +Duplicate Edge Detection + + +Whether part of a graph maintenance process or for some other analysis need, it is sometimes necessary to detect +if there is more than one edge between two vertices. The following examples will assume that an edge with the same +label and direction will be considered "duplicate". + +The "modern" graph does not have any duplicate edges that fit that definition, so the following example adds one +that is duplicative of the "created" edge between vertex "1" and "3". + +[gremlin-groovy,modern] + +g.V(1).as("a").V(3).addE("created").from("a").iterate() +g.V(1).outE("created") + + +One way to find the duplicate edges would be to do something like this: + +[gremlin-groovy,existing] + +g.V().outE(). + project("a","b"). <1> +by().by(inV().path().by().by(label)). + group(). <2> +by(select("b")). +by(select("a").fold()). + unfold(). <3> + select(values). <4> + where(count(local).is(gt(1))) + + +<1> The "a" and "b" from the `project` contain the edge and the path respectively. The path consists of a the outgoing +vertex, an edge, and the incoming vertex. The use of `by().by(label))` converts the edge to its label (recall that `by` +are applied in round-robin fashion), so the path will look something like: `[v[1],created,v[3]]`. +<2> Group by the path from "b" and construct a list of edges from "a". Any value in this `Map` that has a list of edges +greater than one means that there is more than one edge for that edge label between those two vertices (i.e. the `Map` +key). +<3> Unroll the key-value pairs in the `Map` of paths-edges. +<4> Only the values from the `Map` are needed and as mentioned earlier, those lists with more than one edge would +containa duplicate. + +This method find the duplicates, but does require more memory than other approaches. A slightly more complex approach +that uses less memory might look like this: + +[gremlin-groovy,existing] + +g.V().as("ov"). + outE().as("e"). + inV().as("iv"). + inE(). <1> + where(neq("e")).<2> + where(eq("e")).by(label). + where(outV().as("ov")). + group(). +by(select("ov","e","iv").by().by(label)). <3> + unfold(). <4> + select(values). + where(count(local).is(gt(1))) + + +<1> To this point in the traversal, the outgoing edges of a vertex are being iterated with the current edge labelled +as "e". For "e", Gremlin traverses to the incoming vertex and back on in edges of that vertex. +<2> Those incoming edges are filtered with the following `where` steps. The first ensures that it does not traverse +back over "e" (i.e. the current edge). The second determines if
[20/45] tinkerpop git commit: Merge remote-tracking branch 'origin/more-recipes' into tp32
Merge remote-tracking branch 'origin/more-recipes' into tp32 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/e06ce0c1 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/e06ce0c1 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/e06ce0c1 Branch: refs/heads/TINKERPOP-1602 Commit: e06ce0c19bb7d1752db8bd578e97f4b11e6e6ea8 Parents: 1e856b3 9cdc47c Author: Stephen MalletteAuthored: Tue Jan 17 12:22:45 2017 -0500 Committer: Stephen Mallette Committed: Tue Jan 17 12:22:45 2017 -0500 -- docs/src/recipes/appendix.asciidoc | 262 +++ docs/src/recipes/connected-components.asciidoc | 82 ++ docs/src/recipes/cycle-detection.asciidoc | 55 docs/src/recipes/duplicate-edge.asciidoc| 160 +++ docs/src/recipes/duplicate-vertex.asciidoc | 52 docs/src/recipes/index.asciidoc | 8 +- .../recipes/traversal-induced-values.asciidoc | 109 docs/src/reference/the-traversal.asciidoc | 4 + docs/static/images/connected-components.png | Bin 0 -> 17946 bytes docs/static/images/eulerian-circuit.png | Bin 0 -> 25270 bytes .../images/traversal-induced-values-1.png | Bin 0 -> 12607 bytes .../images/traversal-induced-values-2.png | Bin 0 -> 40440 bytes .../images/traversal-induced-values-3.png | Bin 0 -> 49652 bytes 13 files changed, 731 insertions(+), 1 deletion(-) --
[09/45] tinkerpop git commit: Added duplicate vertex recipe
Added duplicate vertex recipe Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/d7ecfc05 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/d7ecfc05 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/d7ecfc05 Branch: refs/heads/TINKERPOP-1602 Commit: d7ecfc05f9c476fed2ebf987e6b26bee14f5db54 Parents: 3e54d89 Author: Stephen MalletteAuthored: Tue Jan 10 10:19:59 2017 -0500 Committer: Stephen Mallette Committed: Tue Jan 10 10:19:59 2017 -0500 -- docs/src/recipes/duplicate-vertex.asciidoc | 52 + docs/src/recipes/index.asciidoc| 2 + 2 files changed, 54 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d7ecfc05/docs/src/recipes/duplicate-vertex.asciidoc -- diff --git a/docs/src/recipes/duplicate-vertex.asciidoc b/docs/src/recipes/duplicate-vertex.asciidoc new file mode 100644 index 000..e0327f4 --- /dev/null +++ b/docs/src/recipes/duplicate-vertex.asciidoc @@ -0,0 +1,52 @@ + +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. + +[[duplicate-vertex]] +Duplicate Vertex Detection +-- + +The pattern for finding duplicate vertices is quite similar to the pattern defined in the < > +section. The idea is to extract the relevant features of the vertex into a comparable list that can then be used to +group for duplicates. + +Consider the following example with some duplicate vertices added to the "modern" graph: + +[gremlin-groovy,modern] + +g.addV(label, 'person', 'name', 'vadas', 'age', 27) +g.addV(label, 'person', 'name', 'vadas', 'age', 22) // not a duplicate because "age" value +g.addV(label, 'person', 'name', 'marko', 'age', 29) +g.V().hasLabel("person"). + group(). +by(values("name", "age").fold()). + unfold() + + +In the above case, the "name" and "age" properties are the relevant features for identifying duplication. The key in +the `Map` provided by the `group` is the list of features for comparison and the value is the list of vertices that +match the feature. To extract just those vertices that contain duplicates an additional filter can be added: + +[gremlin-groovy,existing] + +g.V().hasLabel("person"). + group(). +by(values("name", "age").fold()). + unfold(). + filter(select(values).count(local).is(gt(1))) + + +That filter, extracts the values of the `Map` and counts the vertices within each list. If that list contains more than +one vertex then it is a duplicate. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d7ecfc05/docs/src/recipes/index.asciidoc -- diff --git a/docs/src/recipes/index.asciidoc b/docs/src/recipes/index.asciidoc index f77b929..31095c0 100644 --- a/docs/src/recipes/index.asciidoc +++ b/docs/src/recipes/index.asciidoc @@ -46,6 +46,8 @@ include::cycle-detection.asciidoc[] include::duplicate-edge.asciidoc[] +include::duplicate-vertex.asciidoc[] + include::if-then-based-grouping.asciidoc[] include::pagination.asciidoc[]
[33/45] tinkerpop git commit: Not going to touch GroupStep in this ticket. Too complicated ... will do for the next release. Minor tweaks and cleanups.
Not going to touch GroupStep in this ticket. Too complicated ... will do for the next release. Minor tweaks and cleanups. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/973484d1 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/973484d1 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/973484d1 Branch: refs/heads/TINKERPOP-1602 Commit: 973484d19a81ada87e95f9d3c2b0b66988f362d9 Parents: ee1ab08 Author: Marko A. RodriguezAuthored: Wed Jan 18 12:25:41 2017 -0700 Committer: Marko A. Rodriguez Committed: Wed Jan 18 12:25:41 2017 -0700 -- CHANGELOG.asciidoc | 2 +- .../traversal/step/filter/SampleGlobalStep.java | 8 +++- .../traversal/step/map/OrderGlobalStep.java | 21 3 files changed, 12 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/973484d1/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 052257f..25ff3e9 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -27,7 +27,7 @@ TinkerPop 3.2.4 (Release Date: NOT OFFICIALLY RELEASED YET) ~~~ * Added `ProjectedTraverser` which wraps a traverser with a `List` of projected data. -* `OrderGlobalStep` and `SampleGlobalStep` now emit traversers with their `by()`-projections and thus, can move beyond the local star graph. +* `OrderGlobalStep` and `SampleGlobalStep` use `ProjectedTraverser` and now can work up to the local star graph in OLAP. * SASL negotiation supports both a byte array and Base64 encoded bytes as a string for authentication to Gremlin Server. * Deprecated `TinkerIoRegistry` replacing it with the more consistently named `TinkerIoRegistryV1d0`. * Made error messaging more consistent during result iteration timeouts in Gremlin Server. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/973484d1/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/SampleGlobalStep.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/SampleGlobalStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/SampleGlobalStep.java index 2b2cf20..28d2fb4 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/SampleGlobalStep.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/SampleGlobalStep.java @@ -66,10 +66,8 @@ public final class SampleGlobalStep extends CollectingBarrierStep implemen @Override public void processAllStarts() { -if (this.starts.hasNext()) { -while (this.starts.hasNext()) { - this.traverserSet.add(this.createProjectedTraverser(this.starts.next())); -} +while (this.starts.hasNext()) { + this.traverserSet.add(this.createProjectedTraverser(this.starts.next())); } } @@ -97,7 +95,7 @@ public final class SampleGlobalStep extends CollectingBarrierStep implemen runningWeight = runningWeight + currentWeight; if (RANDOM.nextDouble() <= ((runningWeight / totalWeight))) { final Traverser.Admin split = s.split(); -split.setBulk(1l); +split.setBulk(1L); sampledSet.add(split); runningAmountToSample++; totalWeight = totalWeight - currentWeight; http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/973484d1/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderGlobalStep.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderGlobalStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderGlobalStep.java index 55d8650..e5c5834 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderGlobalStep.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderGlobalStep.java @@ -53,7 +53,6 @@ public final class OrderGlobalStep extends CollectingBa private List, Comparator>> comparators = new ArrayList<>(); private MultiComparator multiComparator = null; private long limit =
[19/45] tinkerpop git commit: optimized math examples
optimized math examples Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/9cdc47c3 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/9cdc47c3 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/9cdc47c3 Branch: refs/heads/TINKERPOP-1602 Commit: 9cdc47c3876ab3326de096a66228ccd43d8a42ca Parents: f992cdf Author: Daniel KuppitzAuthored: Tue Jan 17 17:52:45 2017 +0100 Committer: Daniel Kuppitz Committed: Tue Jan 17 17:52:45 2017 +0100 -- docs/src/recipes/appendix.asciidoc | 8 1 file changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9cdc47c3/docs/src/recipes/appendix.asciidoc -- diff --git a/docs/src/recipes/appendix.asciidoc b/docs/src/recipes/appendix.asciidoc index e9d13aa..55fa45d 100644 --- a/docs/src/recipes/appendix.asciidoc +++ b/docs/src/recipes/appendix.asciidoc @@ -169,9 +169,9 @@ _Methods for performing some basic mathematical operations in the "modern" graph g.V().values("age").sum() // sum all ages g.V().values("age").fold(1, mult) // multiply all ages -g.V().values("age").map(union(identity(), constant(-1)).sum()) // subtract 1 -g.V().values("age").map(union(identity(), identity()).sum()) // multiply by 2 (simple) -g.V().values("age").map(union(identity(), constant(2)).fold(1, mult)) // multiply by 2 (generally useful for multiplications by n): +g.withSack(0).V().values("age").sack(sum).sack(sum).by(constant(-1)).sack() // subtract 1 +g.withSack(0).V().values("age").sack(sum).sack(sum).sack() // multiply by 2 (simple) +g.withSack(0).V().values("age").sack(sum).sack(mult).by(constant(2)).sack() // multiply by 2 (generally useful for multiplications by n) [[appendix-g]] @@ -259,4 +259,4 @@ g.V().as("a"). group(). by(select(keys).unfold()). by(select(values).unfold().unfold().fold())) - \ No newline at end of file +
[02/45] tinkerpop git commit: Added more content to traversal induced value recipe
Added more content to traversal induced value recipe Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/e1d5b686 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/e1d5b686 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/e1d5b686 Branch: refs/heads/TINKERPOP-1602 Commit: e1d5b686172aa4caed3429adf04802fb3ef62a07 Parents: 6dba5ec Author: Stephen MalletteAuthored: Fri Jan 6 11:48:40 2017 -0500 Committer: Stephen Mallette Committed: Fri Jan 6 11:48:40 2017 -0500 -- .../recipes/traversal-induced-values.asciidoc | 49 +++ docs/static/images/eulerian-circuit.png | Bin 0 -> 25270 bytes .../images/traversal-induced-values-1.png | Bin 0 -> 12607 bytes .../images/traversal-induced-values-2.png | Bin 0 -> 40440 bytes .../images/traversal-induced-values-3.png | Bin 0 -> 49652 bytes 5 files changed, 49 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e1d5b686/docs/src/recipes/traversal-induced-values.asciidoc -- diff --git a/docs/src/recipes/traversal-induced-values.asciidoc b/docs/src/recipes/traversal-induced-values.asciidoc index e292e16..03affbe 100644 --- a/docs/src/recipes/traversal-induced-values.asciidoc +++ b/docs/src/recipes/traversal-induced-values.asciidoc @@ -56,6 +56,55 @@ g.V().has('name','marko').as('marko'). <1> <3> Continue to traverser only if Marko's current friend is older than him. <4> Get the name of Marko's older friend. +As another example of how traversal induced values can be used, consider a scenario where there was a graph that +contained people, their friendship relationships, and the movies that they liked. + +image:traversal-induced-values-3.png[width=600] + +[gremlin-groovy] + +g.addV("name", "alice", label, "user").as("u1"). + addV("name", "jen", label, "user").as("u2"). + addV("name", "dave", label, "user").as("u3"). + addV("name", "the wild bunch", label, "movie").as("m1"). + addV("name", "young guns", label, "movie").as("m2"). + addV("name", "unforgiven", label, "movie").as("m3"). + addE("friend").from("u1").to("u2"). + addE("friend").from("u1").to("u3"). + addE("like").from("u2").to("m1"). + addE("like").from("u2").to("m2"). + addE("like").from("u3").to("m2"). + addE("like").from("u3").to("m3").iterate() + + +Getting a list of all the movies that Alice's friends like could be done like this: + +[gremlin-groovy,existing] + +g.V().has('name','alice').out("friend").out("like").values("name") + + +but what if there was a need to get a list of movies that *all* her Alice's friends liked. In this case, that would +mean filtering out "the wild bunch" and "unforgiven". + +[gremlin-groovy,existing] + +g.V().has("name","alice"). + out("friend").aggregate("friends").<1> + out("like").dedup(). <2> + filter(__.in("like").where(within("friends")).count().as("a"). <3> +select("friends").count(local).where(eq("a"))). <4> + values("name") + + +<1> Gather Alice's list of friends to a list called "friends". +<2> Traverse to the unique list of movies that Alice's friends like. +<3> Remove movies that weren't liked by all friends. This starts by taking each movie and traversing back in on the +"like" edges to friends who liked the movie (note the use of `where(within("friends"))` to limit those likes to only +Alice's friends as aggregated in step one) and count them up into "a". +<4> Count the aggregated friends and see if the number matches what was stored in "a" which would mean that all friends +like the movie. + Traversal induced values are not just for filtering. They can also be used when writing the values of the properties of one `Vertex` to another: http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e1d5b686/docs/static/images/eulerian-circuit.png -- diff --git a/docs/static/images/eulerian-circuit.png b/docs/static/images/eulerian-circuit.png new file mode 100755 index 000..d75674f Binary files /dev/null and b/docs/static/images/eulerian-circuit.png differ http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e1d5b686/docs/static/images/traversal-induced-values-1.png -- diff --git a/docs/static/images/traversal-induced-values-1.png b/docs/static/images/traversal-induced-values-1.png new file mode 100755 index 000..3dc1eea Binary files /dev/null and b/docs/static/images/traversal-induced-values-1.png differ
[12/45] tinkerpop git commit: Added some more appendix items to recipes
Added some more appendix items to recipes Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/79a24685 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/79a24685 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/79a24685 Branch: refs/heads/TINKERPOP-1602 Commit: 79a246851493e4f5a39644a9e86d828b39db0b2c Parents: 6971e64 Author: Stephen MalletteAuthored: Tue Jan 10 12:13:59 2017 -0500 Committer: Stephen Mallette Committed: Tue Jan 10 12:13:59 2017 -0500 -- docs/src/recipes/appendix.asciidoc | 87 + 1 file changed, 87 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/79a24685/docs/src/recipes/appendix.asciidoc -- diff --git a/docs/src/recipes/appendix.asciidoc b/docs/src/recipes/appendix.asciidoc index 369d049..6f9fb2c 100644 --- a/docs/src/recipes/appendix.asciidoc +++ b/docs/src/recipes/appendix.asciidoc @@ -136,4 +136,91 @@ g.V().values("age").fold(1, mult) // multiply all ages g.V().values("age").map(union(identity(), constant(-1)).sum()) // subtract 1 g.V().values("age").map(union(identity(), identity()).sum()) // multiply by 2 (simple) g.V().values("age").map(union(identity(), constant(2)).fold(1, mult)) // multiply by 2 (generally useful for multiplications by n): + + +[[appendix-g]] +_Dropping a vertex, as well as the vertices related to that dropped vertex that are connected by a "knows" edge in the +"modern" graph_ + +[gremlin-groovy,modern] + +g.V().has('name','marko').outE() +g.V().has('name','marko').sideEffect(out('knows').drop()).drop() +g.V().has('name','marko') +g.V(2,4,3) + + +[[appendix-h]] +_For the specified graph, find all neighbor vertices connected to "A" as filtered by datetime, those neighbor vertices +that don't have datetime vertices, and those neighbor vertices that have the label "dimon"._ + +[gremlin-groovy] + +g.addV().property("name", "A").as("a"). + addV().property("name", "B").as("b"). + addV().property("name", "C").as("c"). + addV().property("name", "D").as("d"). + addV().property("name", "E").as("e"). + addV("dimon").property("name", "F").as("f"). + addV().property("name", "G").as("g").property("date", 20160818). + addV().property("name", "H").as("h").property("date", 20160817). + addE("rel").from("a").to("b"). + addE("rel").from("a").to("c"). + addE("rel").from("a").to("d"). + addE("rel").from("a").to("e"). + addE("rel").from("c").to("f"). + addE("occured_at").from("d").to("g"). + addE("occured_at").from("e").to("h").iterate() +// D and E have a valid datetime +g.V().has("name", "A").out("rel"). + union(where(out("occured_at").has("date", gte(20160817))), +__.not(outE("occured_at")).coalesce(out().hasLabel("dimon"), identity())). + valueMap() +// only E has a valid date +g.V().has("name", "A").out("rel"). + union(where(out("occured_at").has("date", lte(20160817))), +__.not(outE("occured_at")).coalesce(out().hasLabel("dimon"), identity())). + valueMap() +// only D has a valid date +g.V().has("name", "A").out("rel"). + union(where(out("occured_at").has("date", gt(20160817))), +__.not(outE("occured_at")).coalesce(out().hasLabel("dimon"), identity())). + valueMap() +// neither D nor E have a valid date +g.V().has("name", "A").out("rel"). + union(where(out("occured_at").has("date", lt(20160817))), +__.not(outE("occured_at")).coalesce(out().hasLabel("dimon"), identity())). + valueMap() + + +[[appendix-i]] +_Use element labels in a `select`._ + +[gremlin-groovy,modern] + +g.V(1).as("a"). + both(). + map(group().by(label).by(unfold())).as("b"). + select("a","b"). + map(union(project("a").by(select("a")), select("b")). + unfold(). + group(). +by(select(keys)). +by(select(values))) +g.V().as("a"). + both(). + map(group().by(label).by(unfold())).as("b"). + select("a","b"). + group(). +by(select("a")). +by(select("b"). + group(). + by(select(keys)). + by(select(values).fold())). +unfold(). +map(union(select(keys).project("a").by(), select(values)). +unfold(). +group(). + by(select(keys).unfold()). + by(select(values).unfold().unfold().fold())) \ No newline at end of file
[40/45] tinkerpop git commit: Merge branch 'TINKERPOP-1605' into tp32
Merge branch 'TINKERPOP-1605' into tp32 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/67a10923 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/67a10923 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/67a10923 Branch: refs/heads/TINKERPOP-1602 Commit: 67a10923d77098f403efc187ba43781443d1ed8f Parents: 8ad2911 8fd6dbb Author: Daniel KuppitzAuthored: Sat Jan 21 12:04:46 2017 +0100 Committer: Daniel Kuppitz Committed: Sat Jan 21 12:04:46 2017 +0100 -- gremlin-console/src/main/bin/gremlin.sh | 4 +++- .../org/apache/tinkerpop/gremlin/console/Console.groovy | 8 +++- 2 files changed, 10 insertions(+), 2 deletions(-) --
[21/45] tinkerpop git commit: Bump to groovy 2.4.8
Bump to groovy 2.4.8 https://lists.apache.org/thread.html/50dd28c50a15c422b3e7277d0aa4c59a8831523d4ae7d5afe73e8573@%3Cdev.tinkerpop.apache.org%3E CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/6e2128cb Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/6e2128cb Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/6e2128cb Branch: refs/heads/TINKERPOP-1602 Commit: 6e2128cbac8fb7bd7e42ba262cb0b1f559e4a385 Parents: 4b8ea27 Author: Stephen MalletteAuthored: Tue Jan 17 13:01:49 2017 -0500 Committer: Stephen Mallette Committed: Tue Jan 17 13:01:49 2017 -0500 -- CHANGELOG.asciidoc | 1 + pom.xml| 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6e2128cb/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index f82fa23..d498599 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima TinkerPop 3.1.6 (Release Date: NOT OFFICIALLY RELEASED YET) ~~~ +* Bumped to Groovy 2.4.8. * Fixed bug in `IncidentToAdjacentStrategy`, it was missing some invalidating steps. * Returned a confirmation on session close from Gremlin Server. * Use non-default port for running tests on Gremlin Server. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6e2128cb/pom.xml -- diff --git a/pom.xml b/pom.xml index ee4b965..d8311ca 100644 --- a/pom.xml +++ b/pom.xml @@ -127,7 +127,7 @@ limitations under the License. 1.10 -2.4.6 +2.4.8 4.12 3.0.2 UTF-8
[08/45] tinkerpop git commit: Move appendix to its own doc and out of index.
Move appendix to its own doc and out of index. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/3e54d897 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/3e54d897 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/3e54d897 Branch: refs/heads/TINKERPOP-1602 Commit: 3e54d897e70f26fdefbe30daf5ce19a38a052e4d Parents: 7783c83 Author: Stephen MalletteAuthored: Tue Jan 10 08:52:58 2017 -0500 Committer: Stephen Mallette Committed: Tue Jan 10 08:52:58 2017 -0500 -- docs/src/recipes/appendix.asciidoc | 112 docs/src/recipes/index.asciidoc| 97 +-- 2 files changed, 113 insertions(+), 96 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3e54d897/docs/src/recipes/appendix.asciidoc -- diff --git a/docs/src/recipes/appendix.asciidoc b/docs/src/recipes/appendix.asciidoc new file mode 100644 index 000..63ec447 --- /dev/null +++ b/docs/src/recipes/appendix.asciidoc @@ -0,0 +1,112 @@ + +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. + +Appendix + + +Many of the recipes are based on questions and answers provided on the gremlin-users mailing list. This section +contains a number of traversals from the mailing list that do not easily fit any particular pattern (i.e. a recipe), +but are nonetheless interesting and thus remain good tools for learning Gremlin. + +[[appendix-a]] +_For each person in a "follows" graph, determine the number of followers and list their names._ + +[gremlin-groovy] + +g.addV('name','marko').as('marko'). + addV('name','josh').as('josh'). + addV('name','daniel').as('daniel'). + addV('name','matthias').as('matthias'). + addE('follows').from('josh').to('marko'). + addE('follows').from('matthias').to('josh'). + addE('follows').from('daniel').to('josh'). + addE('follows').from('daniel').to('marko').iterate() +g.V().as('p'). + map(__.in('follows').values('name').fold()). + group().by(select('p').by('name')). + by(project('numFollowers','followers'). + by(count(local)).by()).next() + + +[[appendix-b]] +_In the "modern" graph, show each person, the software they worked on and the co-worker count for the software and +the names of those co-workers._ + +[gremlin-groovy,modern] + +g.V().hasLabel("person").as("p"). + out("created").as("s"). + map(__.in("created"). +where(neq("p")).values("name").fold()). + group().by(select("p").by("name")). +by(group().by(select("s").by("name")). +by(project("numCoworkers","coworkers"). + by(count(local)).by())).next() + + +[[appendix-c]] +_Assuming a graph of students, classes and times, detect students who have a conflicting schedule._ + +[gremlin-groovy] + +g.addV(label, "student", "name", "Pete").as("s1"). + addV(label, "student", "name", "Joe").as("s2"). + addV(label, "class", "name", "Java's GC").as("c1"). + addV(label, "class", "name", "FP Principles").as("c2"). + addV(label, "class", "name", "Memory Management in C").as("c3"). + addV(label, "class", "name", "Memory Management in C++").as("c4"). + addV(label, "timeslot", "date", "11/25/2016", "fromTime", "10:00", "toTime", "11:00").as("t1"). + addV(label, "timeslot", "date", "11/25/2016", "fromTime", "11:00", "toTime", "12:00").as("t2"). + addE("attends").from("s1").to("c1"). + addE("attends").from("s1").to("c2"). + addE("attends").from("s1").to("c3"). + addE("attends").from("s1").to("c4"). + addE("attends").from("s2").to("c2"). + addE("attends").from("s2").to("c3"). + addE("allocated").from("c1").to("t1"). + addE("allocated").from("c1").to("t2"). + addE("allocated").from("c2").to("t1"). + addE("allocated").from("c3").to("t2"). + addE("allocated").from("c4").to("t2").iterate() +g.V().hasLabel("student").as("s"). + out("attends").as("c"). + out("allocated").as("t"). + select("s"). + out("attends"). + where(neq("c")). + out("allocated"). + where(eq("t")). +
[24/45] tinkerpop git commit: TINKERPOP-1600 Added base64 encoded string to sasl challenge
TINKERPOP-1600 Added base64 encoded string to sasl challenge Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/e80a4cd1 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/e80a4cd1 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/e80a4cd1 Branch: refs/heads/TINKERPOP-1602 Commit: e80a4cd172746dc393711cc095e229a4d5e78629 Parents: 802ff9f Author: Stephen MalletteAuthored: Mon Jan 16 15:22:07 2017 -0500 Committer: Stephen Mallette Committed: Wed Jan 18 06:56:11 2017 -0500 -- CHANGELOG.asciidoc | 2 +- docs/src/dev/io/graphson.asciidoc | 5 ++--- docs/src/upgrade/release-3.2.x-incubating.asciidoc | 16 .../apache/tinkerpop/gremlin/driver/Handler.java| 15 +-- .../server/handler/SaslAuthenticationHandler.java | 14 -- 5 files changed, 44 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e80a4cd1/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 9471b9f..4f3f9ce 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima TinkerPop 3.2.4 (Release Date: NOT OFFICIALLY RELEASED YET) ~~~ +* SASL negotiation supports both a byte array and Base64 encoded bytes as a string for authentication to Gremlin Server. * Deprecated `TinkerIoRegistry` replacing it with the more consistently named `TinkerIoRegistryV1d0`. * Made error messaging more consistent during result iteration timeouts in Gremlin Server. * `PathRetractionStrategy` does not add a `NoOpBarrierStep` to the end of local children as its wasted computation in 99% of traversals. @@ -580,7 +581,6 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima TinkerPop 3.1.6 (Release Date: NOT OFFICIALLY RELEASED YET) ~~~ -* Bumped to Groovy 2.4.8. * Fixed bug in `IncidentToAdjacentStrategy`, it was missing some invalidating steps. * Returned a confirmation on session close from Gremlin Server. * Use non-default port for running tests on Gremlin Server. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e80a4cd1/docs/src/dev/io/graphson.asciidoc -- diff --git a/docs/src/dev/io/graphson.asciidoc b/docs/src/dev/io/graphson.asciidoc index cdc9880..fe56c27 100644 --- a/docs/src/dev/io/graphson.asciidoc +++ b/docs/src/dev/io/graphson.asciidoc @@ -1299,7 +1299,7 @@ ResponseMessage Authentication Challenge -When authentication is enabled, an initial request to the server will result in an authentication challenge. The typical response message will appear as follows, but handling it could be different dependending on the SASL implementation (e.g. multiple challenges maybe requested in some cases, but no in the default provided by Gremlin Server). +When authentication is enabled, an initial request to the server will result in an authentication challenge. The typical response message will appear as follows, but handling it could be different dependending on the SASL implementation (e.g. multiple challenges maybe requested in some cases, but not in the default provided by Gremlin Server). [source,json] @@ -4262,14 +4262,13 @@ The following `RequestMessage` is an example of a sessionless request for a scri } - ResponseMessage ~~~ Authentication Challenge -When authentication is enabled, an initial request to the server will result in an authentication challenge. The typical response message will appear as follows, but handling it could be different dependending on the SASL implementation (e.g. multiple challenges maybe requested in some cases, but no in the default provided by Gremlin Server). +When authentication is enabled, an initial request to the server will result in an authentication challenge. The typical response message will appear as follows, but handling it could be different dependending on the SASL implementation (e.g. multiple challenges maybe requested in some cases, but not in the default provided by Gremlin Server). [source,json] http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e80a4cd1/docs/src/upgrade/release-3.2.x-incubating.asciidoc -- diff --git a/docs/src/upgrade/release-3.2.x-incubating.asciidoc
[01/45] tinkerpop git commit: Added more cycle detection and traversal induced value recipes. [Forced Update!]
Repository: tinkerpop Updated Branches: refs/heads/TINKERPOP-1602 d7b7e66d7 -> 1633bd945 (forced update) Added more cycle detection and traversal induced value recipes. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/6dba5ec6 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/6dba5ec6 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/6dba5ec6 Branch: refs/heads/TINKERPOP-1602 Commit: 6dba5ec636aed6fd3eeb1ac7db7b4043657689b1 Parents: 9c44f0d Author: Stephen MalletteAuthored: Fri Jan 6 08:57:31 2017 -0500 Committer: Stephen Mallette Committed: Fri Jan 6 08:57:31 2017 -0500 -- docs/src/recipes/cycle-detection.asciidoc | 55 ++ .../recipes/traversal-induced-values.asciidoc | 60 2 files changed, 115 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6dba5ec6/docs/src/recipes/cycle-detection.asciidoc -- diff --git a/docs/src/recipes/cycle-detection.asciidoc b/docs/src/recipes/cycle-detection.asciidoc index 1a8650b..7cebb00 100644 --- a/docs/src/recipes/cycle-detection.asciidoc +++ b/docs/src/recipes/cycle-detection.asciidoc @@ -58,4 +58,59 @@ arbitrary length over both incoming and outgoing edges in the modern graph? g.V().as('a').repeat(both().simplePath()).emit(loops().is(gt(1))). both().where(eq('a')).path(). dedup().by(unfold().order().by(id).dedup().fold()) + + +An interesting type of cycle is known as the Eulerian circuit which is a path taken in a graph where each edge is +visited once and the path starts and ends with the same vertex. Consider the following graph, representative of an +imaginary but geographically similar link:https://en.wikipedia.org/wiki/Seven_Bridges_of_K%C3%B6nigsberg[Königsberg] +that happens to have an eighth bridge (the diagram depicts edge direction but direction won't be considered in the traversal): + +image:eulerian-circuit.png[width=500] + +Gremlin can detect if such a cycle exists with: + +[gremlin-groovy] + +g.addV().property(id, 'blue').as('b'). + addV().property(id, 'orange').as('o'). + addV().property(id, 'red').as('r'). + addV().property(id, 'green').as('g'). + addE('bridge').from('g').to('b'). + addE('bridge').from('g').to('o'). + addE('bridge').from('g').to('r'). + addE('bridge').from('g').to('r'). + addE('bridge').from('o').to('b'). + addE('bridge').from('o').to('b'). + addE('bridge').from('o').to('r'). + addE('bridge').from('o').to('r').iterate() +g.V().sideEffect(outE("bridge").aggregate("bridges")).barrier().<1> + repeat(bothE(). <2> + or(__.not(select('e')), +__.not(filter(__.as('x').select(all, 'e').unfold(). <3> + where(eq('x').as('e'). + otherV()). +until(select(all, 'e').count(local).as("c").<4> + select("bridges").count(local).where(eq("c"))).hasNext() + + +<1> Gather all the edges in a "bridges" side effect. +<2> As mentioned earlier with the diagram, directionality is ignored as the traversal uses `bothE` and, later, `otherV`. +<3> In continually traversing over both incoming and outgoing edges, this path is only worth continuing if the edges +traversed thus far are only traversed once. That set of edges is maintained in "e". +<4> The traversal should repeat until the number of edges traversed in "e" is equal to the total number gathered in +the first step above, which would mean that the complete circuit has been made. + +Unlike Königsberg, with just seven bridges, a Eulerian circuit exists in the case with an eighth bridge. The first +detected circuit can be displayed with: + +[gremlin-groovy,existing] + +g.V().sideEffect(outE("bridge").aggregate("bridges")).barrier(). + repeat(bothE().or(__.not(select('e')), +__.not(filter(__.as('x').select(all, 'e').unfold(). + where(eq('x').as('e').otherV()). +until(select(all, 'e').count(local).as("c"). + select("bridges").count(local).where(eq("c"))).limit(1). + path().by(id).by(constant(" -> ")). + map {String.join("", it.get().objects())} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6dba5ec6/docs/src/recipes/traversal-induced-values.asciidoc -- diff --git a/docs/src/recipes/traversal-induced-values.asciidoc b/docs/src/recipes/traversal-induced-values.asciidoc index 5f48591..e292e16 100644 --- a/docs/src/recipes/traversal-induced-values.asciidoc +++ b/docs/src/recipes/traversal-induced-values.asciidoc @@ -64,4 +64,64 @@ of one `Vertex`
[13/45] tinkerpop git commit: Improved the section description for the recipes appendix
Improved the section description for the recipes appendix Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/0fbfd75a Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/0fbfd75a Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/0fbfd75a Branch: refs/heads/TINKERPOP-1602 Commit: 0fbfd75afbb5654b079111e928020250905327a7 Parents: 79a2468 Author: Stephen MalletteAuthored: Thu Jan 12 07:38:48 2017 -0500 Committer: Stephen Mallette Committed: Thu Jan 12 07:38:48 2017 -0500 -- docs/src/recipes/appendix.asciidoc | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0fbfd75a/docs/src/recipes/appendix.asciidoc -- diff --git a/docs/src/recipes/appendix.asciidoc b/docs/src/recipes/appendix.asciidoc index 6f9fb2c..9038cea 100644 --- a/docs/src/recipes/appendix.asciidoc +++ b/docs/src/recipes/appendix.asciidoc @@ -17,9 +17,11 @@ limitations under the License. Appendix -Many of the recipes are based on questions and answers provided on the gremlin-users mailing list. This section -contains a number of traversals from the mailing list that do not easily fit any particular pattern (i.e. a recipe), -but are nonetheless interesting and thus remain good tools for learning Gremlin. +Many of the recipes are based on questions and answers provided on the +link:https://groups.google.com/forum/#!forum/gremlin-users[gremlin-users mailing list] or on +link:http://stackoverflow.com/questions/tagged/gremlin[StackOverflow]. This section contains those traversals from +those sources that do not easily fit any particular pattern (i.e. a recipe), but are nonetheless interesting and thus +remain good tools for learning Gremlin. [[appendix-a]] _For each person in a "follows" graph, determine the number of followers and list their names._
[18/45] tinkerpop git commit: Fixed up an appendix entry given pull request feedback.
Fixed up an appendix entry given pull request feedback. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/f992cdfe Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/f992cdfe Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/f992cdfe Branch: refs/heads/TINKERPOP-1602 Commit: f992cdfe89b00e91df98e83907c65968d16dcb17 Parents: 1c14dde Author: Stephen MalletteAuthored: Tue Jan 17 11:38:18 2017 -0500 Committer: Stephen Mallette Committed: Tue Jan 17 11:38:18 2017 -0500 -- docs/src/recipes/appendix.asciidoc | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f992cdfe/docs/src/recipes/appendix.asciidoc -- diff --git a/docs/src/recipes/appendix.asciidoc b/docs/src/recipes/appendix.asciidoc index 15fda50..e9d13aa 100644 --- a/docs/src/recipes/appendix.asciidoc +++ b/docs/src/recipes/appendix.asciidoc @@ -38,9 +38,10 @@ g.addV('name','marko').as('marko'). addE('follows').from('daniel').to('marko').iterate() g.V().as('p'). map(__.in('follows').values('name').fold()). - group().by(select('p').by('name')). - by(project('numFollowers','followers'). - by(count(local)).by()).next() + project('person','followers','numFollowers'). +by(select('p').by('name')). +by(). +by(count(local)) It might also be alternatively written as:
[14/45] tinkerpop git commit: Added some additional examples to appendix recipes.
Added some additional examples to appendix recipes. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/4be8a1b2 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/4be8a1b2 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/4be8a1b2 Branch: refs/heads/TINKERPOP-1602 Commit: 4be8a1b2ec8c15aee1c84199e560687a1e3fdf39 Parents: 0fbfd75 Author: Stephen MalletteAuthored: Thu Jan 12 08:06:07 2017 -0500 Committer: Stephen Mallette Committed: Thu Jan 12 08:06:07 2017 -0500 -- docs/src/recipes/appendix.asciidoc | 23 +++ docs/src/recipes/duplicate-edge.asciidoc | 18 ++ 2 files changed, 41 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4be8a1b2/docs/src/recipes/appendix.asciidoc -- diff --git a/docs/src/recipes/appendix.asciidoc b/docs/src/recipes/appendix.asciidoc index 9038cea..9d0ea7b 100644 --- a/docs/src/recipes/appendix.asciidoc +++ b/docs/src/recipes/appendix.asciidoc @@ -43,6 +43,29 @@ g.V().as('p'). by(count(local)).by()).next() +It might also be alternatively written as: + +[gremlin-groovy,existing] + +g.V().group(). +by('name'). +by(project('numFollowers','followers'). + by(__.in('follows').count()). + by(__.in('follows').values('name').fold())).next() + + +or even: + +[gremlin-groovy,existing] + +g.V().group(). +by('name'). +by(__.in('follows').values('name').fold(). +project('numFollowers','followers'). + by(count(local)). + by()).next() + + [[appendix-b]] _In the "modern" graph, show each person, the software they worked on and the co-worker count for the software and the names of those co-workers._ http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4be8a1b2/docs/src/recipes/duplicate-edge.asciidoc -- diff --git a/docs/src/recipes/duplicate-edge.asciidoc b/docs/src/recipes/duplicate-edge.asciidoc index ed56106..a62716e 100644 --- a/docs/src/recipes/duplicate-edge.asciidoc +++ b/docs/src/recipes/duplicate-edge.asciidoc @@ -86,6 +86,24 @@ the outgoing vertex, the edge label, and the incoming vertex as the key, with th value. <4> The rest of the traversal is the same as the previous one. +Note that the above traversal could also be written using `match` step: + +[gremlin-groovy,existing] + +g.V().match( +__.as("ov").outE().as("e"), +__.as("e").inV().as("iv"), +__.as("iv").inE().as("ie"), +__.as("ie").outV().as("ov")). + where("ie",neq("e")). + where("ie",eq("e")).by(label). +select("ie"). +group(). + by(select("ov","e","iv").by().by(label)). +unfold().select(values). + where(count(local).is(gt(1))) + + A third way to approach this problem would be to force a link:https://en.wikipedia.org/wiki/Depth-first_search[depth-first search]. The previous examples invoke traversal strategies that force a link:https://en.wikipedia.org/wiki/Breadth-first_search[breadth first search] as a performance optimization.
[30/45] tinkerpop git commit: updated CHANGELOG and tweaked ProjectTraverser variable naming.
updated CHANGELOG and tweaked ProjectTraverser variable naming. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/91e1f50c Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/91e1f50c Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/91e1f50c Branch: refs/heads/TINKERPOP-1602 Commit: 91e1f50c8b95d295a86cba6f3c9db7a002664233 Parents: b2f0c57 Author: Marko A. RodriguezAuthored: Wed Jan 18 11:17:05 2017 -0700 Committer: Marko A. Rodriguez Committed: Wed Jan 18 11:17:05 2017 -0700 -- CHANGELOG.asciidoc | 3 +- .../traversal/traverser/ProjectedTraverser.java | 69 +--- 2 files changed, 34 insertions(+), 38 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/91e1f50c/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 86c6b4f..052257f 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -26,7 +26,8 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima TinkerPop 3.2.4 (Release Date: NOT OFFICIALLY RELEASED YET) ~~~ -* `OrderGlobalStep` now emits traversers with their `by()`-projections and thus, can move beyond the local star graph. +* Added `ProjectedTraverser` which wraps a traverser with a `List` of projected data. +* `OrderGlobalStep` and `SampleGlobalStep` now emit traversers with their `by()`-projections and thus, can move beyond the local star graph. * SASL negotiation supports both a byte array and Base64 encoded bytes as a string for authentication to Gremlin Server. * Deprecated `TinkerIoRegistry` replacing it with the more consistently named `TinkerIoRegistryV1d0`. * Made error messaging more consistent during result iteration timeouts in Gremlin Server. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/91e1f50c/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/traverser/ProjectedTraverser.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/traverser/ProjectedTraverser.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/traverser/ProjectedTraverser.java index 5cecdc4..128e377 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/traverser/ProjectedTraverser.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/traverser/ProjectedTraverser.java @@ -34,163 +34,158 @@ import java.util.function.Function; */ public final class ProjectedTraverser implements Traverser.Admin { -private Traverser.Admin internal; +private Traverser.Admin baseTraverser; private List projections; private ProjectedTraverser() { // for serialization } -public ProjectedTraverser(final Traverser.Admin internal, final List projections) { -this.internal = internal; +public ProjectedTraverser(final Traverser.Admin baseTraverser, final List projections) { +this.baseTraverser = baseTraverser; this.projections = projections; } - -public Traverser.Admin getInternal() { -return this.internal; -} - public List getProjections() { return this.projections; } @Override public void merge(final Admin other) { -this.internal.merge(other); +this.baseTraverser.merge(other); } @Override -public Admin split(R r, Step step) { -return new ProjectedTraverser<>(this.internal.split(r, step), this.projections); +public Admin split(final R r, final Step step) { +return new ProjectedTraverser<>(this.baseTraverser.split(r, step), this.projections); } @Override public Admin split() { -return new ProjectedTraverser<>(this.internal.split(), this.projections); +return new ProjectedTraverser<>(this.baseTraverser.split(), this.projections); } @Override public void addLabels(final Set labels) { -this.internal.addLabels(labels); +this.baseTraverser.addLabels(labels); } @Override public void keepLabels(final Set labels) { -this.internal.keepLabels(labels); +this.baseTraverser.keepLabels(labels); } @Override public void dropLabels(final Set labels) { -this.internal.dropLabels(labels); +this.baseTraverser.dropLabels(labels); } @Override public void dropPath() { -this.internal.dropPath(); +this.baseTraverser.dropPath(); }
[39/45] tinkerpop git commit: introduced a minor bug into CollectingBarrierStep that would only be noticed by asynchrnous traversal execution engines. I noticed it in the GraphActors branch. Also, add
introduced a minor bug into CollectingBarrierStep that would only be noticed by asynchrnous traversal execution engines. I noticed it in the GraphActors branch. Also, added a toString() to ProjectedTraverser. CTR. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/8ad29113 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/8ad29113 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/8ad29113 Branch: refs/heads/TINKERPOP-1602 Commit: 8ad291134d1b9febdae437e855812185b41c73db Parents: 6002299 Author: Marko A. RodriguezAuthored: Thu Jan 19 13:01:07 2017 -0700 Committer: Marko A. Rodriguez Committed: Thu Jan 19 13:01:07 2017 -0700 -- .../process/traversal/step/util/CollectingBarrierStep.java | 4 ++-- .../gremlin/process/traversal/traverser/ProjectedTraverser.java | 5 + 2 files changed, 7 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8ad29113/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/CollectingBarrierStep.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/CollectingBarrierStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/CollectingBarrierStep.java index f99201d..8409c9f 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/CollectingBarrierStep.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/CollectingBarrierStep.java @@ -97,8 +97,8 @@ public abstract class CollectingBarrierStep extends AbstractStep implem @Override public void addBarrier(final TraverserSet barrier) { -this.traverserSet = barrier; -this.traverserSet.forEach(traverser -> traverser.setSideEffects(this.getTraversal().getSideEffects())); +barrier.forEach(traverser -> traverser.setSideEffects(this.getTraversal().getSideEffects())); +this.traverserSet.addAll(barrier); this.barrierConsumed = false; } http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8ad29113/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/traverser/ProjectedTraverser.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/traverser/ProjectedTraverser.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/traverser/ProjectedTraverser.java index 128e377..602f88f 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/traverser/ProjectedTraverser.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/traverser/ProjectedTraverser.java @@ -182,6 +182,11 @@ public final class ProjectedTraverserimplements Traverser.Admin { } @Override +public String toString() { +return this.baseTraverser.toString(); +} + +@Override public ProjectedTraverser clone() { try { final ProjectedTraverser clone = (ProjectedTraverser ) super.clone();
[35/45] tinkerpop git commit: Merge branch 'TINKERPOP-1248' into tp32
Merge branch 'TINKERPOP-1248' into tp32 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/379a6e5e Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/379a6e5e Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/379a6e5e Branch: refs/heads/TINKERPOP-1602 Commit: 379a6e5e9e19b1de72fba3c7c401e4424028a88a Parents: 3496402 973484d Author: Marko A. RodriguezAuthored: Thu Jan 19 05:33:22 2017 -0700 Committer: Marko A. Rodriguez Committed: Thu Jan 19 05:33:22 2017 -0700 -- CHANGELOG.asciidoc | 3 + .../traversal/step/filter/SampleGlobalStep.java | 19 +- .../traversal/step/map/OrderGlobalStep.java | 68 --- .../step/util/CollectingBarrierStep.java| 24 ++- .../ComputerVerificationStrategy.java | 7 - .../traversal/traverser/ProjectedTraverser.java | 198 +++ .../gremlin/structure/io/gryo/GryoVersion.java | 8 +- .../gremlin/util/function/MultiComparator.java | 72 +++ 8 files changed, 349 insertions(+), 50 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/379a6e5e/CHANGELOG.asciidoc -- diff --cc CHANGELOG.asciidoc index 74751fa,25ff3e9..88cbf32 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@@ -26,7 -26,8 +26,10 @@@ image::https://raw.githubusercontent.co TinkerPop 3.2.4 (Release Date: NOT OFFICIALLY RELEASED YET) ~~~ +* `GroupBiOperator` no longer maintains state and thus, no more side-effect related OLAP inconsistencies. + * Added `ProjectedTraverser` which wraps a traverser with a `List` of projected data. ++* Fixed an optimization bug in `CollectionBarrierSteps` where the barrier was being consumed on each `addBarrier()`. + * `OrderGlobalStep` and `SampleGlobalStep` use `ProjectedTraverser` and now can work up to the local star graph in OLAP. * SASL negotiation supports both a byte array and Base64 encoded bytes as a string for authentication to Gremlin Server. * Deprecated `TinkerIoRegistry` replacing it with the more consistently named `TinkerIoRegistryV1d0`. * Made error messaging more consistent during result iteration timeouts in Gremlin Server.
[05/45] tinkerpop git commit: Added connected components recipe
Added connected components recipe Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/d5404b81 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/d5404b81 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/d5404b81 Branch: refs/heads/TINKERPOP-1602 Commit: d5404b8166525f0dd62d0e0bde3cce9fc68cd887 Parents: 52f7f96 Author: Stephen MalletteAuthored: Mon Jan 9 11:12:03 2017 -0500 Committer: Stephen Mallette Committed: Mon Jan 9 11:12:03 2017 -0500 -- docs/src/recipes/connected-components.asciidoc | 82 docs/src/recipes/index.asciidoc| 2 + docs/static/images/connected-components.png| Bin 0 -> 17946 bytes 3 files changed, 84 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d5404b81/docs/src/recipes/connected-components.asciidoc -- diff --git a/docs/src/recipes/connected-components.asciidoc b/docs/src/recipes/connected-components.asciidoc new file mode 100644 index 000..cfb93fb --- /dev/null +++ b/docs/src/recipes/connected-components.asciidoc @@ -0,0 +1,82 @@ + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +[[connected-components]] +Connected Components + + +Gremlin can be used to find link:https://en.wikipedia.org/wiki/Connected_component_(graph_theory)[connected components] +in a graph. Consider the following graph which has three connected components: + +image:connected-components.png[width=600] + +[gremlin-groovy] + +g.addV(id, "A").as("a"). + addV(id, "B").as("b"). + addV(id, "C").as("c"). + addV(id, "D").as("d"). + addV(id, "E").as("e"). + addV(id, "F"). + addE("link").from("a").to("b"). + addE("link").from("b").to("c"). + addE("link").from("d").to("e").iterate() + + +One way to detect the various subgraphs would be to do something like this: + +[gremlin-groovy,existing] + +g.V().emit(cyclicPath().or().not(both())).repeat(both()).until(cyclicPath()). <1> + aggregate("p").by(path()).cap("p"). <2> + unfold().limit(local, 1).dedup(). <3> + map(__.as("v").select("p").unfold(). <4> + filter(unfold().where(eq("v"))). + unfold().dedup().order().by(id).fold() + ).dedup() <5> + + +<1> Iterate all vertices and repeatedly traverse over both incoming and outgoing edges (TinkerPop doesn't support +unidirectional graphs directly so it must be simulated by ignoring the direction with `both`). Note the use of `emit` +prior to `repeat` as this allows for return of a single length path. +<2> Aggregate the emitted vertices to "p" and get their path information. Calling `cap` at the end will push the +aggregate path list into the traversal. It is within these paths that the list of connected components will be +identified. Obviously the paths list are duplicative in the sense that they contains different paths travelled over +the same vertices. +<3> Unroll the elements in the path list with `unfold` and grab the first vertex in each path and `dedup`. +<4> Use the first vertex in each path to filter against the paths stored in "p". When a path is found that has the +vertex in it, dedup the vertices in the path, order it by the identifier. Each path output from this `map` step +represents a connected component. +<5> The connected component list is duplicative given the nature of the paths in "p", but now that the vertices within +the paths are ordered, a final `dedup` will make the list of connective components unique. + +NOTE: This is a nice example of where running smaller pieces of a large Gremlin statement make it easier to see what +is happening at each step. Consider running this example one line at a time (or perhaps even in a step at a time) to +see the output at each point. + +While the above approach returns results
[37/45] tinkerpop git commit: A proof that TINKERPOP-1261 is fixed given the refactor of GroupBiOperator.
A proof that TINKERPOP-1261 is fixed given the refactor of GroupBiOperator. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/d54b490a Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/d54b490a Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/d54b490a Branch: refs/heads/TINKERPOP-1602 Commit: d54b490a66837e98077fa1e90f45ad20497c1a19 Parents: 341ebf9 Author: Marko A. RodriguezAuthored: Thu Jan 19 08:57:36 2017 -0700 Committer: Marko A. Rodriguez Committed: Thu Jan 19 08:57:36 2017 -0700 -- .../step/sideEffect/GroovyGroupTest.groovy | 5 .../traversal/step/sideEffect/GroupTest.java| 30 2 files changed, 35 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d54b490a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/GroovyGroupTest.groovy -- diff --git a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/GroovyGroupTest.groovy b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/GroovyGroupTest.groovy index 3ce9efe..fc0c55d 100644 --- a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/GroovyGroupTest.groovy +++ b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/GroovyGroupTest.groovy @@ -128,5 +128,10 @@ public abstract class GroovyGroupTest { public Traversal > get_g_V_group_byXlabelX_byXbothE_groupXaX_byXlabelX_byXweight_sumX_weight_sumX() { new ScriptTraversal<>(g, "gremlin-groovy", "g.V.group().by(label).by(bothE().group('a').by(label).by(values('weight').sum).weight.sum)") } + +@Override +public Traversal > get_g_withSideEffectXa__marko_666_noone_blahX_V_groupXaX_byXnameX_byXoutE_label_foldX_capXaX() { +new ScriptTraversal<>(g, "gremlin-groovy", "g.withSideEffect('a', map).V().group('a').by('name').by(outE().label.fold).cap('a')", "map", new HashMap<>(["marko": [666], "noone": ["blah"]])); +} } } http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d54b490a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/GroupTest.java -- diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/GroupTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/GroupTest.java index 71b15a5..5f2504e 100644 --- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/GroupTest.java +++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/GroupTest.java @@ -28,9 +28,12 @@ import org.apache.tinkerpop.gremlin.structure.Vertex; import org.junit.Test; import org.junit.runner.RunWith; +import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; +import java.util.Collections; import java.util.HashMap; +import java.util.HashSet; import java.util.List; import java.util.Map; @@ -94,6 +97,8 @@ public abstract class GroupTest extends AbstractGremlinProcessTest { public abstract Traversal > get_g_V_group_byXlabelX_byXbothE_groupXaX_byXlabelX_byXweight_sumX_weight_sumX(); +public abstract Traversal > get_g_withSideEffectXa__marko_666_noone_blahX_V_groupXaX_byXnameX_byXoutE_label_foldX_capXaX(); + @Test @LoadGraphWith(MODERN) public void g_V_group_byXnameX() { @@ -462,6 +467,23 @@ public abstract class GroupTest extends AbstractGremlinProcessTest { assertEquals(3.0d, sideEffect.get("knows").doubleValue(), 0.01d); } +@Test +@LoadGraphWith(MODERN) +public void g_withSideEffectXa__marko_666_noone_blahX_V_groupXaX_byXnameX_byXoutE_label_foldX_capXaX() { +final Traversal > traversal = get_g_withSideEffectXa__marko_666_noone_blahX_V_groupXaX_byXnameX_byXoutE_label_foldX_capXaX(); +printTraversalForm(traversal); +final Map map = traversal.next(); +assertEquals(7, map.size()); +assertEquals(Collections.singleton("blah"), new HashSet<>(map.get("noone"))); +assertEquals(new HashSet<>(Arrays.asList("created", "knows", 666)), new HashSet<>(map.get("marko"))); +assertEquals(Collections.singleton("created"), new HashSet<>(map.get("josh"))); +
[31/45] tinkerpop git commit: added a private no-arg constructor to MultiComparator so it can be serialized.
added a private no-arg constructor to MultiComparator so it can be serialized. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/ee1ab08b Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/ee1ab08b Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/ee1ab08b Branch: refs/heads/TINKERPOP-1602 Commit: ee1ab08b0b8c7c6dca85d9ff046dcff739549387 Parents: 91e1f50 Author: Marko A. RodriguezAuthored: Wed Jan 18 11:20:07 2017 -0700 Committer: Marko A. Rodriguez Committed: Wed Jan 18 11:20:07 2017 -0700 -- .../tinkerpop/gremlin/util/function/MultiComparator.java | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ee1ab08b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/util/function/MultiComparator.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/util/function/MultiComparator.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/util/function/MultiComparator.java index b7176ab..5d24ddf 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/util/function/MultiComparator.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/util/function/MultiComparator.java @@ -31,8 +31,12 @@ import java.util.List; */ public final class MultiComparator implements Comparator, Serializable { -private final List comparators; -private final boolean isShuffle; +private List comparators; +private boolean isShuffle; + +private MultiComparator() { +// for serialization purposes +} public MultiComparator(final List comparators) { this.comparators = (List) comparators;
[17/45] tinkerpop git commit: Allow some extra time to be sure the future completes
Allow some extra time to be sure the future completes This test never fails on my system but on rare occassions it seems to fail for others. I can only guess it is a timing issue of sorts, but I'm not sure I see how to better test this. The point of the test is not related to timing, so adding this extra wait doesn't seem wrong. It's not as though the functionality is not being tested properly. We just need to validate that the future completes when all the items arrive to the ResultSet, so in that sense the addition of the wait also validates that. CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/1e856b34 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/1e856b34 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/1e856b34 Branch: refs/heads/TINKERPOP-1602 Commit: 1e856b344849fe7db4ba2ce8e4ccdd9e0de53cb8 Parents: 9d1c3e5 Author: Stephen MalletteAuthored: Tue Jan 17 09:25:23 2017 -0500 Committer: Stephen Mallette Committed: Tue Jan 17 09:25:23 2017 -0500 -- .../java/org/apache/tinkerpop/gremlin/driver/ResultSetTest.java | 4 1 file changed, 4 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1e856b34/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ResultSetTest.java -- diff --git a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ResultSetTest.java b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ResultSetTest.java index 4a57ebb..0cf4fb5 100644 --- a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ResultSetTest.java +++ b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ResultSetTest.java @@ -26,6 +26,7 @@ import java.util.Iterator; import java.util.List; import java.util.NoSuchElementException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Stream; @@ -76,6 +77,9 @@ public class ResultSetTest extends AbstractResultQueueTest { } assertThat(atLeastOnce.get(), is(true)); + +// ensure there is enough time for the readComplete to complete the "all" future +all.get(3, TimeUnit.MILLISECONDS); assertThat(all.isDone(), is(true)); }
[27/45] tinkerpop git commit: Added docs for not()-step
Added docs for not()-step Re-arranged some steps that were out of order CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/28e1d93f Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/28e1d93f Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/28e1d93f Branch: refs/heads/TINKERPOP-1602 Commit: 28e1d93fe84fa35439ad81493daa270299461cfa Parents: e80a4cd Author: Stephen MalletteAuthored: Wed Jan 18 11:31:59 2017 -0500 Committer: Stephen Mallette Committed: Wed Jan 18 11:31:59 2017 -0500 -- docs/src/reference/the-traversal.asciidoc | 90 +++--- 1 file changed, 53 insertions(+), 37 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/28e1d93f/docs/src/reference/the-traversal.asciidoc -- diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc index 6380efc..861adce 100644 --- a/docs/src/reference/the-traversal.asciidoc +++ b/docs/src/reference/the-traversal.asciidoc @@ -438,43 +438,6 @@ g.V().groupCount('a').by(label).groupCount('b').by(outE().count()).cap('a','b') <1> Group and count verticies by their label. Emit the side effect labeled 'a', which is the group count by label. <2> Same as statement 1, but also emit the side effect labeled 'b' which groups vertices by the number of out edges. -[[coalesce-step]] -Coalesce Step -~ - -The `coalesce()`-step evaluates the provided traversals in order and returns the first traversal that emits at -least one element. - -[gremlin-groovy,modern] - -g.V(1).coalesce(outE('knows'), outE('created')).inV().path().by('name').by(label) -g.V(1).coalesce(outE('created'), outE('knows')).inV().path().by('name').by(label) -g.V(1).property('nickname', 'okram') -g.V().hasLabel('person').coalesce(values('nickname'), values('name')) - - -[[count-step]] -Count Step -~~ - -image::count-step.png[width=195] - -The `count()`-step (*map*) counts the total number of represented traversers in the streams (i.e. the bulk count). - -[gremlin-groovy,modern] - -g.V().count() -g.V().hasLabel('person').count() -g.V().hasLabel('person').outE('created').count().path() <1> -g.V().hasLabel('person').outE('created').count().map {it.get() * 10}.path() <2> - - -<1> `count()`-step is a < > meaning that all of the previous traversers are folded into a new traverser. -<2> The path of the traverser emanating from `count()` starts at `count()`. - -IMPORTANT: `count(local)` counts the current, local object (not the objects in the traversal stream). This works for -`Collection`- and `Map`-type objects. For any other object, a count of 1 is returned. - [[choose-step]] Choose Step ~~~ @@ -532,6 +495,21 @@ g.V().hasLabel('person'). option(none, values('name')) +[[coalesce-step]] +Coalesce Step +~ + +The `coalesce()`-step evaluates the provided traversals in order and returns the first traversal that emits at +least one element. + +[gremlin-groovy,modern] + +g.V(1).coalesce(outE('knows'), outE('created')).inV().path().by('name').by(label) +g.V(1).coalesce(outE('created'), outE('knows')).inV().path().by('name').by(label) +g.V(1).property('nickname', 'okram') +g.V().hasLabel('person').coalesce(values('nickname'), values('name')) + + [[coin-step]] Coin Step ~ @@ -565,6 +543,28 @@ g.V().coalesce( <1> Show the names of people, but show "inhuman" for other vertices. <2> Same as statement 1 (unless there is a person vertex with no name). +[[count-step]] +Count Step +~~ + +image::count-step.png[width=195] + +The `count()`-step (*map*) counts the total number of represented traversers in the streams (i.e. the bulk count). + +[gremlin-groovy,modern] + +g.V().count() +g.V().hasLabel('person').count() +g.V().hasLabel('person').outE('created').count().path() <1> +g.V().hasLabel('person').outE('created').count().map {it.get() * 10}.path() <2> + + +<1> `count()`-step is a < > meaning that all of the previous traversers are folded into a new traverser. +<2> The path of the traverser emanating from `count()` starts at `count()`. + +IMPORTANT: `count(local)` counts the current, local object (not the objects in the traversal stream). This works for +`Collection`- and `Map`-type objects. For any other object, a count of 1 is returned. + [[cyclicpath-step]] CyclicPath Step ~~~ @@ -1184,6 +1184,22 @@ g.V().repeat(both()).times(3).values('age').min() IMPORTANT: `min(local)` determines the min of the current, local object (not the objects in the traversal stream). This
[11/45] tinkerpop git commit: Added recipe to appendix for some basic math ops
Added recipe to appendix for some basic math ops Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/6971e644 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/6971e644 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/6971e644 Branch: refs/heads/TINKERPOP-1602 Commit: 6971e644ffc0306a968c43f055a7849761108f60 Parents: 0938ebd Author: Stephen MalletteAuthored: Tue Jan 10 11:06:48 2017 -0500 Committer: Stephen Mallette Committed: Tue Jan 10 11:06:48 2017 -0500 -- docs/src/recipes/appendix.asciidoc | 12 1 file changed, 12 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6971e644/docs/src/recipes/appendix.asciidoc -- diff --git a/docs/src/recipes/appendix.asciidoc b/docs/src/recipes/appendix.asciidoc index 15d7340..369d049 100644 --- a/docs/src/recipes/appendix.asciidoc +++ b/docs/src/recipes/appendix.asciidoc @@ -125,3 +125,15 @@ g.V().not(has("location", without(places))). where(values("location").is(within(places)).count().is(places.size())). valueMap() + +[[appendix-f]] +_Methods for performing some basic mathematical operations in the "modern" graph._ + +[gremlin-groovy,modern] + +g.V().values("age").sum() // sum all ages +g.V().values("age").fold(1, mult) // multiply all ages +g.V().values("age").map(union(identity(), constant(-1)).sum()) // subtract 1 +g.V().values("age").map(union(identity(), identity()).sum()) // multiply by 2 (simple) +g.V().values("age").map(union(identity(), constant(2)).fold(1, mult)) // multiply by 2 (generally useful for multiplications by n): + \ No newline at end of file
tinkerpop git commit: Support SSL client auth
Repository: tinkerpop Updated Branches: refs/heads/TINKERPOP-1602 [created] 7462a9f00 Support SSL client auth Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/7462a9f0 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/7462a9f0 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/7462a9f0 Branch: refs/heads/TINKERPOP-1602 Commit: 7462a9f007df86e83a9b6d49c71cb59c2bbc180d Parents: 9d1c3e5 Author: Robert DaleAuthored: Tue Jan 17 14:24:00 2017 -0500 Committer: Robert Dale Committed: Tue Jan 17 14:24:00 2017 -0500 -- .../apache/tinkerpop/gremlin/server/AbstractChannelizer.java | 4 +++- .../java/org/apache/tinkerpop/gremlin/server/Settings.java | 6 ++ 2 files changed, 9 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7462a9f0/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java -- diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java index 57c6994..d28fd4f 100644 --- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java +++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java @@ -242,8 +242,10 @@ public abstract class AbstractChannelizer extends ChannelInitializerhttp://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7462a9f0/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java -- diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java index 97e2875..a3b9545 100644 --- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java +++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java @@ -18,6 +18,7 @@ */ package org.apache.tinkerpop.gremlin.server; +import io.netty.handler.ssl.ClientAuth; import io.netty.handler.ssl.SslContext; import org.apache.tinkerpop.gremlin.driver.MessageSerializer; import org.apache.tinkerpop.gremlin.jsr223.GremlinPlugin; @@ -420,6 +421,11 @@ public class Settings { * contain an X.509 certificate chain in PEM format. {@code null} uses the system default. */ public String trustCertChainFile = null; + +/** + * Require client certificate authentication + */ +public ClientAuth needClientAuth = ClientAuth.NONE; private SslContext sslContext;
tinkerpop git commit: updated doc for ssl client auth
Repository: tinkerpop Updated Branches: refs/heads/TINKERPOP-1602 7462a9f00 -> 2471a5784 updated doc for ssl client auth Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/2471a578 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/2471a578 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/2471a578 Branch: refs/heads/TINKERPOP-1602 Commit: 2471a57844731b08600b1e9aef76ee572a517a2d Parents: 7462a9f Author: Robert DaleAuthored: Tue Jan 17 14:39:32 2017 -0500 Committer: Robert Dale Committed: Tue Jan 17 14:39:32 2017 -0500 -- docs/src/reference/gremlin-applications.asciidoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2471a578/docs/src/reference/gremlin-applications.asciidoc -- diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc index e515ef7..2454581 100644 --- a/docs/src/reference/gremlin-applications.asciidoc +++ b/docs/src/reference/gremlin-applications.asciidoc @@ -1036,7 +1036,8 @@ The following table describes the various configuration options that Gremlin Ser |ssl.keyCertChainFile |The X.509 certificate chain file in PEM format. If this value is not present and `ssl.enabled` is `true` a self-signed certificate will be used (not suitable for production). |_none_ |ssl.keyFile |The `PKCS#8` private key file in PEM format. If this value is not present and `ssl.enabled` is `true` a self-signed certificate will be used (not suitable for production). |_none_ |ssl.keyPassword |The password of the `keyFile` if it is password-protected |_none_ -|ssl.trustCertChainFile |Trusted certificates for verifying the remote endpoint's certificate. The file should contain an X.509 certificate chain in PEM format. A system default will be used if this setting is not present. (Not supported) |_none_ +|ssl.needClientAuth | Optional. One of NONE, OPTIONAL, REQUIRE. Enables client certificate authentication at the level specified. Can be used in combination with Authenticator. |_none_ +|ssl.trustCertChainFile | Required when needClientAuth is OPTIONAL or REQUIRE. Trusted certificates for verifying the remote endpoint's certificate. The file should contain an X.509 certificate chain in PEM format. |_none_ |strictTransactionManagement |Set to `true` to require `aliases` to be submitted on every requests, where the `aliases` become the scope of transaction management. |false |threadPoolBoss |The number of threads available to Gremlin Server for accepting connections. Should always be set to `1`. |1 |threadPoolWorker |The number of threads available to Gremlin Server for processing non-blocking reads and writes. |1
tinkerpop git commit: updated docs
Repository: tinkerpop Updated Branches: refs/heads/TINKERPOP-1602 2471a5784 -> d7b7e66d7 updated docs Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/d7b7e66d Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/d7b7e66d Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/d7b7e66d Branch: refs/heads/TINKERPOP-1602 Commit: d7b7e66d7d35b50bd38b1b5fe4f29a49b0fb6577 Parents: 2471a57 Author: Robert DaleAuthored: Wed Jan 18 09:08:19 2017 -0500 Committer: Robert Dale Committed: Wed Jan 18 09:15:40 2017 -0500 -- CHANGELOG.asciidoc | 1 + docs/src/reference/gremlin-applications.asciidoc | 2 +- docs/src/upgrade/release-3.2.x-incubating.asciidoc | 9 + 3 files changed, 11 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d7b7e66d/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 0a2affe..66285b0 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -92,6 +92,7 @@ TinkerPop 3.2.4 (Release Date: NOT OFFICIALLY RELEASED YET) * Fixed a severe bug where `GraphComputer` strategies are not being loaded until the second use of the traversal source. * The root traversal now throws regular `NoSuchElementException` instead of `FastNoSuchElementException`. (*breaking*) * Added a short sleep to prevent traversal from finishing before it can be interrupted during `TraversalInterruptionComputerTest`. +* Added support for SSL client authentication [[release-3-2-3]] TinkerPop 3.2.3 (Release Date: October 17, 2016) http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d7b7e66d/docs/src/reference/gremlin-applications.asciidoc -- diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc index 2454581..5cea36b 100644 --- a/docs/src/reference/gremlin-applications.asciidoc +++ b/docs/src/reference/gremlin-applications.asciidoc @@ -1036,7 +1036,7 @@ The following table describes the various configuration options that Gremlin Ser |ssl.keyCertChainFile |The X.509 certificate chain file in PEM format. If this value is not present and `ssl.enabled` is `true` a self-signed certificate will be used (not suitable for production). |_none_ |ssl.keyFile |The `PKCS#8` private key file in PEM format. If this value is not present and `ssl.enabled` is `true` a self-signed certificate will be used (not suitable for production). |_none_ |ssl.keyPassword |The password of the `keyFile` if it is password-protected |_none_ -|ssl.needClientAuth | Optional. One of NONE, OPTIONAL, REQUIRE. Enables client certificate authentication at the level specified. Can be used in combination with Authenticator. |_none_ +|ssl.needClientAuth | Optional. One of NONE, OPTIONAL, REQUIRE. Enables client certificate authentication at the enforcement level specified. Can be used in combination with Authenticator. |_none_ |ssl.trustCertChainFile | Required when needClientAuth is OPTIONAL or REQUIRE. Trusted certificates for verifying the remote endpoint's certificate. The file should contain an X.509 certificate chain in PEM format. |_none_ |strictTransactionManagement |Set to `true` to require `aliases` to be submitted on every requests, where the `aliases` become the scope of transaction management. |false |threadPoolBoss |The number of threads available to Gremlin Server for accepting connections. Should always be set to `1`. |1 http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d7b7e66d/docs/src/upgrade/release-3.2.x-incubating.asciidoc -- diff --git a/docs/src/upgrade/release-3.2.x-incubating.asciidoc b/docs/src/upgrade/release-3.2.x-incubating.asciidoc index 8d73baed..9601bde 100644 --- a/docs/src/upgrade/release-3.2.x-incubating.asciidoc +++ b/docs/src/upgrade/release-3.2.x-incubating.asciidoc @@ -141,6 +141,15 @@ removed. See: link:https://issues.apache.org/jira/browse/TINKERPOP-1562[TINKERPOP-1562] + +SSL Client Authentication +^ + +Added new server configuration option `ssl.needClientAuth`. + +See: link:https://issues.apache.org/jira/browse/TINKERPOP-1602[TINKERPOP-1602] + + Upgrading for Providers ~~~
tinkerpop git commit: allow users to pass options to docker
Repository: tinkerpop Updated Branches: refs/heads/TINKERPOP-1556 [created] 3441f3f5e allow users to pass options to docker Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/3441f3f5 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/3441f3f5 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/3441f3f5 Branch: refs/heads/TINKERPOP-1556 Commit: 3441f3f5e8a70efad4345f8305bed04d980c20a0 Parents: 418fb2a Author: Robert DaleAuthored: Wed Nov 16 17:57:38 2016 -0500 Committer: Robert Dale Committed: Wed Nov 16 17:57:38 2016 -0500 -- CHANGELOG.asciidoc | 6 ++ docker/build.sh| 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3441f3f5/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 14ee66d..10e4121 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -31,6 +31,12 @@ TinkerPop 3.1.6 (Release Date: NOT OFFICIALLY RELEASED YET) * Fully shutdown metrics services in Gremlin Server on shutdown. * Deprecated `tryRandomCommit()` in `AbstractGremlinTest` - the annotation was never added in 3.1.1, and was only deprecated via javadoc. * Minor fixes to various test feature requirements in `gremlin-test`. +* Allow developers to pass options to `docker run` with DOCKER_OPTS environment variable + +Improvements + + +* TINKERPOP-1556 Allow Hadoop to run on IPv6 systems [[release-3-1-5]] TinkerPop 3.1.5 (Release Date: October 17, 2016) http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3441f3f5/docker/build.sh -- diff --git a/docker/build.sh b/docker/build.sh index c37a6f5..c314e5e 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -47,6 +47,6 @@ CMD ["sh", "-c", "docker/scripts/build.sh $@"] EOF docker build -t tinkerpop:${BUILD_TAG} . -docker run --rm -ti tinkerpop:${BUILD_TAG} +docker run ${DOCKER_OPTS} --rm -ti tinkerpop:${BUILD_TAG} popd > /dev/null
[7/8] tinkerpop git commit: updated per @dkuppitz review
updated per @dkuppitz review Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/a8954393 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/a8954393 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/a8954393 Branch: refs/heads/TINKERPOP-980 Commit: a8954393dd7d2fc1b78fed2c83856745a65ddd63 Parents: f5132ea Author: Robert DaleAuthored: Thu Nov 17 03:58:26 2016 -0500 Committer: Robert Dale Committed: Thu Nov 17 03:58:26 2016 -0500 -- docs/src/reference/gremlin-applications.asciidoc | 6 +++--- docs/src/upgrade/release-3.3.x.asciidoc | 4 ++-- gremlin-server/src/main/bin/gremlin-server.conf | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a8954393/docs/src/reference/gremlin-applications.asciidoc -- diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc index ea8ef2a..7d14e46 100644 --- a/docs/src/reference/gremlin-applications.asciidoc +++ b/docs/src/reference/gremlin-applications.asciidoc @@ -1543,13 +1543,13 @@ service gremlin-server start Systemd +++ -To install, copy the this service template to /etc/systemd/system/gremlin.service -and update the paths `/path/to/apache-tinkerpop-gremlin-server` with the actual install path of gremlin server. +To install, copy the service template below to /etc/systemd/system/gremlin.service +and update the paths `/path/to/apache-tinkerpop-gremlin-server` with the actual install path of Gremlin Server. [source,bash] [Unit] -Description=Apache Tinkerpop Gremlin server daemon +Description=Apache TinkerPop Gremlin Server daemon Documentation=http://tinkerpop.apache.org/ After=network.target http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a8954393/docs/src/upgrade/release-3.3.x.asciidoc -- diff --git a/docs/src/upgrade/release-3.3.x.asciidoc b/docs/src/upgrade/release-3.3.x.asciidoc index e59070b..9810d5f 100644 --- a/docs/src/upgrade/release-3.3.x.asciidoc +++ b/docs/src/upgrade/release-3.3.x.asciidoc @@ -118,11 +118,11 @@ Gremlin-server.sh and Init Scripts `gremlin-server.sh` is now also an init script and can no longer be started without parameters. To start it in the foreground with defaults like previous usage, please use the `console` parameter. Also, `gremlin-server.sh` will continue to start in the foreground when provided a yaml configuration file. -How to install as a service has been added to the link:http://tinkerpop.apache.org/docs/3.2.3/reference/#_as_a_service[Reference Documentation - As A Service]. +How to install as a service has been added to the link:http://tinkerpop.apache.org/docs/3.3.0/reference/#_as_a_service[Reference Documentation - As A Service]. The switch name has changed for installing dependencies. `-i` has been deprecated and replaced by `install`. -See: link:https://issues.apache.org/jira/browse/TINKERPOP-980[TINKERPOP-980], link:http://tinkerpop.apache.org/docs/3.2.3/reference/#_configuring_2[Reference Documentation - Server Configuration]. +See: link:https://issues.apache.org/jira/browse/TINKERPOP-980[TINKERPOP-980], link:http://tinkerpop.apache.org/docs/x.y.z/reference/#_configuring_2[Reference Documentation - Server Configuration]. Gremlin-server.bat ^^ http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a8954393/gremlin-server/src/main/bin/gremlin-server.conf -- diff --git a/gremlin-server/src/main/bin/gremlin-server.conf b/gremlin-server/src/main/bin/gremlin-server.conf index 22f3385..336b943 100644 --- a/gremlin-server/src/main/bin/gremlin-server.conf +++ b/gremlin-server/src/main/bin/gremlin-server.conf @@ -20,10 +20,10 @@ # initd: debug the initd script #DEBUG=1 -# initd: gremlin server install location +# initd: Gremlin Server install location #GREMLIN_HOME= -# initd: Yaml file passed to gremlin server. Path can be absolute or relative to GREMLIN_HOME e.g. conf/gremlin-server.yaml +# initd: Yaml file passed to Gremlin Server. Path can be absolute or relative to GREMLIN_HOME e.g. conf/gremlin-server.yaml #GREMLIN_YAML= # initd: console log location
[8/8] tinkerpop git commit: fixed url version
fixed url version Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/7e907ce5 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/7e907ce5 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/7e907ce5 Branch: refs/heads/TINKERPOP-980 Commit: 7e907ce550766edb0c25ab5106b6b91a23d45d79 Parents: a895439 Author: Robert DaleAuthored: Thu Nov 17 04:26:51 2016 -0500 Committer: Robert Dale Committed: Thu Nov 17 04:26:51 2016 -0500 -- docs/src/upgrade/release-3.3.x.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7e907ce5/docs/src/upgrade/release-3.3.x.asciidoc -- diff --git a/docs/src/upgrade/release-3.3.x.asciidoc b/docs/src/upgrade/release-3.3.x.asciidoc index 9810d5f..c0213d8 100644 --- a/docs/src/upgrade/release-3.3.x.asciidoc +++ b/docs/src/upgrade/release-3.3.x.asciidoc @@ -122,7 +122,7 @@ How to install as a service has been added to the link:http://tinkerpop.apache.o The switch name has changed for installing dependencies. `-i` has been deprecated and replaced by `install`. -See: link:https://issues.apache.org/jira/browse/TINKERPOP-980[TINKERPOP-980], link:http://tinkerpop.apache.org/docs/x.y.z/reference/#_configuring_2[Reference Documentation - Server Configuration]. +See: link:https://issues.apache.org/jira/browse/TINKERPOP-980[TINKERPOP-980], link:http://tinkerpop.apache.org/docs/3.3.0/reference/#_configuring_2[Reference Documentation - Server Configuration]. Gremlin-server.bat ^^
[4/8] tinkerpop git commit: Corrected systemd template, user will be handled by gremlin-server.sh. Updated correct section.
Corrected systemd template, user will be handled by gremlin-server.sh. Updated correct section. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/47de5342 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/47de5342 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/47de5342 Branch: refs/heads/TINKERPOP-980 Commit: 47de5342967ec541a997371d47c6a6097d9c75de Parents: e4a94ad Author: Robert DaleAuthored: Fri Sep 30 09:39:59 2016 -0400 Committer: Robert Dale Committed: Thu Nov 17 03:45:36 2016 -0500 -- docs/src/reference/gremlin-applications.asciidoc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/47de5342/docs/src/reference/gremlin-applications.asciidoc -- diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc index 29d12b9..eea044a 100644 --- a/docs/src/reference/gremlin-applications.asciidoc +++ b/docs/src/reference/gremlin-applications.asciidoc @@ -680,7 +680,7 @@ which will boost performance and reduce resources required on the server. Configuration ^ -The following table describes the various YAML configuration options for the Gremlin Driver: +The following table describes the various configuration options for the Gremlin Driver: [width="100%",cols="3,10,^2",options="header"] |= @@ -1011,7 +1011,7 @@ to use to `bin/gremlin-server.sh` as in: bin/gremlin-server.sh conf/gremlin-server-min.yaml -The following table describes the various configuration options that Gremlin Server expects: +The following table describes the various YAML configuration options that Gremlin Server expects: [width="100%",cols="3,10,^2",options="header"] |= @@ -1556,7 +1556,6 @@ Type=forking ExecStart=/path/to/apache-tinkerpop-gremlin-server/bin/gremlin-server.sh start ExecStop=/path/to/apache-tinkerpop-gremlin-server/bin/gremlin-server.sh stop PIDFile=/path/to/apache-tinkerpop-gremlin-server/run/gremlin.pid -User=gremlin [Install] WantedBy=multi-user.target
[tinkerpop] Git Push Summary
Repository: tinkerpop Updated Branches: refs/heads/TINKERPOP-980 [deleted] 7e907ce55
[2/8] tinkerpop git commit: gremlin-server.sh is also init script. updated docs.
gremlin-server.sh is also init script. updated docs. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/e4a94ad6 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/e4a94ad6 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/e4a94ad6 Branch: refs/heads/TINKERPOP-980 Commit: e4a94ad6615967a026ccddf7abd3b70d726b860a Parents: 417a791 Author: Robert DaleAuthored: Fri Sep 30 08:39:39 2016 -0400 Committer: Robert Dale Committed: Thu Nov 17 03:45:36 2016 -0500 -- .../src/reference/gremlin-applications.asciidoc | 114 +++- docs/src/reference/gremlin-variants.asciidoc| 4 +- .../reference/implementations-neo4j.asciidoc| 2 +- .../gremlin-language-variants/index.asciidoc| 2 +- docs/src/upgrade/release-3.3.x.asciidoc | 50 +--- .../src/main/bin/gremlin-server.initd | 173 .../src/main/bin/gremlin-server.service | 36 --- gremlin-server/src/main/bin/gremlin-server.sh | 275 +-- 8 files changed, 354 insertions(+), 302 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e4a94ad6/docs/src/reference/gremlin-applications.asciidoc -- diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc index 5a0e397..29d12b9 100644 --- a/docs/src/reference/gremlin-applications.asciidoc +++ b/docs/src/reference/gremlin-applications.asciidoc @@ -680,7 +680,7 @@ which will boost performance and reduce resources required on the server. Configuration ^ -The following table describes the various configuration options for the Gremlin Driver: +The following table describes the various YAML configuration options for the Gremlin Driver: [width="100%",cols="3,10,^2",options="header"] |= @@ -959,29 +959,58 @@ can be cached for faster evaluation on the next submission. Configuring ~~~ -As mentioned earlier, Gremlin Server is configured though a YAML file. By default, Gremlin Server will look for a -file called `conf/gremlin-server.yaml` to configure itself on startup. To override this default, supply the file -to use to `bin/gremlin-server.sh` as in: - -[source,text] - -bin/gremlin-server.sh conf/gremlin-server-min.yaml - - -The `gremlin-server.sh` file also serves a second purpose. It can be used to "install" dependencies to the Gremlin +The `gremlin-server.sh` file serves multiple purposes. It can be used to "install" dependencies to the Gremlin Server path. For example, to be able to configure and use other `Graph` implementations, the dependencies must be -made available to Gremlin Server. To do this, use the `-i` switch and supply the Maven coordinates for the dependency +made available to Gremlin Server. To do this, use the `install` switch and supply the Maven coordinates for the dependency to "install". For example, to use Neo4j in Gremlin Server: [source,text] -bin/gremlin-server.sh -i org.apache.tinkerpop neo4j-gremlin x.y.z +bin/gremlin-server.sh install org.apache.tinkerpop neo4j-gremlin x.y.z This command will "grab" the appropriate dependencies and copy them to the `ext` directory of Gremlin Server, which will then allow them to be "used" the next time the server is started. To uninstall dependencies, simply delete them from the `ext` directory. +`bin/gremlin-server.sh` has several other options. + +[width="100%",cols="3,10",options="header"] +|= +|Parameter|Description +|start|Start the server in the background. +|stop|Shutdown the server. +|restart|Shutdown a running server then start it again. +|status|Check if the server is running. +|console|Start the server in the foreground. Use ^C to kill it. +|install | Install dependencies into the server. "-i" exists for backwards compatibility but is deprecated. +|| Start the server in the foreground using the provided YAML config file. +|= + +The `bin/gremlin-server.sh` script can be customized with environment variables in `bin/gremlin-server.conf`. + +[width="100%",cols="3,10",options="header"] +|= +|Variable |Description +|DEBUG| Enable debugging of the startup script +|GREMLIN_HOME| The Gremlin Server install directory. Use this if the script has trouble finding itself. +|GREMLIN_YAML| The default server YAML file (conf/gremlin-server.yaml) +|LOG_DIR| Location of gremlin.log where stdout/stderr are captured (logs/) +|PID_DIR| Location of gremlin.pid +|RUNAS| User to run the server
[3/3] tinkerpop git commit: Merge branch 'tp32'
Merge branch 'tp32' Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/9c5b8913 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/9c5b8913 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/9c5b8913 Branch: refs/heads/master Commit: 9c5b891347b0c0fb8b1122bb50596448b0901997 Parents: 4334087 35364c8 Author: Robert DaleAuthored: Thu Nov 17 04:08:28 2016 -0500 Committer: Robert Dale Committed: Thu Nov 17 04:08:28 2016 -0500 -- CHANGELOG.asciidoc | 6 ++ docker/build.sh| 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9c5b8913/CHANGELOG.asciidoc --
[1/2] tinkerpop git commit: allow users to pass options to docker
Repository: tinkerpop Updated Branches: refs/heads/tp32 997e94fb4 -> 35364c859 allow users to pass options to docker Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/3441f3f5 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/3441f3f5 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/3441f3f5 Branch: refs/heads/tp32 Commit: 3441f3f5e8a70efad4345f8305bed04d980c20a0 Parents: 418fb2a Author: Robert DaleAuthored: Wed Nov 16 17:57:38 2016 -0500 Committer: Robert Dale Committed: Wed Nov 16 17:57:38 2016 -0500 -- CHANGELOG.asciidoc | 6 ++ docker/build.sh| 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3441f3f5/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 14ee66d..10e4121 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -31,6 +31,12 @@ TinkerPop 3.1.6 (Release Date: NOT OFFICIALLY RELEASED YET) * Fully shutdown metrics services in Gremlin Server on shutdown. * Deprecated `tryRandomCommit()` in `AbstractGremlinTest` - the annotation was never added in 3.1.1, and was only deprecated via javadoc. * Minor fixes to various test feature requirements in `gremlin-test`. +* Allow developers to pass options to `docker run` with DOCKER_OPTS environment variable + +Improvements + + +* TINKERPOP-1556 Allow Hadoop to run on IPv6 systems [[release-3-1-5]] TinkerPop 3.1.5 (Release Date: October 17, 2016) http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3441f3f5/docker/build.sh -- diff --git a/docker/build.sh b/docker/build.sh index c37a6f5..c314e5e 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -47,6 +47,6 @@ CMD ["sh", "-c", "docker/scripts/build.sh $@"] EOF docker build -t tinkerpop:${BUILD_TAG} . -docker run --rm -ti tinkerpop:${BUILD_TAG} +docker run ${DOCKER_OPTS} --rm -ti tinkerpop:${BUILD_TAG} popd > /dev/null