[48/50] [abbrv] tinkerpop git commit: Merge branch 'tp33'
Merge branch 'tp33' Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/6358715e Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/6358715e Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/6358715e Branch: refs/heads/TINKERPOP-1990 Commit: 6358715e9dfa69627a425e4b930636f271141022 Parents: 9ab5efa 7985106 Author: Stephen Mallette Authored: Fri Jul 27 16:29:50 2018 -0400 Committer: Stephen Mallette Committed: Fri Jul 27 16:29:50 2018 -0400 -- docs/src/recipes/element-existence.asciidoc | 91 docs/src/recipes/index.asciidoc | 2 + 2 files changed, 93 insertions(+) --
[17/50] [abbrv] tinkerpop git commit: Merge branch 'tp33'
Merge branch 'tp33' Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/aad01022 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/aad01022 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/aad01022 Branch: refs/heads/TINKERPOP-1990 Commit: aad0102275acde628d1224f6e1ffe498d478f6f6 Parents: e0ffa3b 3aa6dcf Author: Daniel Kuppitz Authored: Mon Jul 23 11:01:20 2018 -0700 Committer: Daniel Kuppitz Committed: Mon Jul 23 11:01:20 2018 -0700 -- .../gremlin/process/traversal/step/branch/BranchStep.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --
[39/50] [abbrv] tinkerpop git commit: Close server for auth tests prior to assertions
Close server for auth tests prior to assertions Further trying to flush logs to prevent random failure - hoping that killing the server will do it and make these tests more stable CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/e55ffc64 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/e55ffc64 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/e55ffc64 Branch: refs/heads/TINKERPOP-1990 Commit: e55ffc6432a188b9629d00177b5e01cfb07c3f9a Parents: ffb8c3e Author: Stephen Mallette Authored: Thu Jul 26 14:15:20 2018 -0400 Committer: Stephen Mallette Committed: Thu Jul 26 14:15:20 2018 -0400 -- .../GremlinServerAuditLogIntegrateTest.java | 14 + .../server/GremlinServerAuthIntegrateTest.java | 1 - .../GremlinServerAuthKrb5IntegrateTest.java | 15 ++ .../tinkerpop/gremlin/server/KdcFixture.java| 21 ++-- 4 files changed, 35 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e55ffc64/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuditLogIntegrateTest.java -- diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuditLogIntegrateTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuditLogIntegrateTest.java index c31ee69..0231bab 100644 --- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuditLogIntegrateTest.java +++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuditLogIntegrateTest.java @@ -23,8 +23,6 @@ import org.apache.http.client.methods.HttpGet; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.http.util.EntityUtils; -import org.apache.log4j.Appender; -import org.apache.log4j.LogManager; import org.apache.log4j.Logger; import org.apache.log4j.spi.LoggingEvent; import static org.apache.log4j.Level.INFO; @@ -165,6 +163,7 @@ public class GremlinServerAuditLogIntegrateTest extends AbstractGremlinServerInt } // wait for logger to flush - (don't think there is a way to detect this) +stopServer(); Thread.sleep(1000); // WebSocketChannelizer does not add SaslAuthenticationHandler for AllowAllAuthenticator, @@ -192,6 +191,10 @@ public class GremlinServerAuditLogIntegrateTest extends AbstractGremlinServerInt cluster.close(); } +// wait for logger to flush - (don't think there is a way to detect this) +stopServer(); +Thread.sleep(1000); + final String simpleAuthenticatorName = SimpleAuthenticator.class.getSimpleName(); final String authMsg = recordingAppender.getMessages().stream() .filter(msg -> msg.contains("by " + simpleAuthenticatorName)).iterator().next(); @@ -199,8 +202,6 @@ public class GremlinServerAuditLogIntegrateTest extends AbstractGremlinServerInt m.find(); final String address = m.group(1); -// wait for logger to flush - (don't think there is a way to detect this) -Thread.sleep(1000); assertTrue(recordingAppender.logContainsAny(AUDIT_LOGGER_NAME, INFO, String.format("User %s with address %s authenticated by %s", username, address, simpleAuthenticatorName))); @@ -226,6 +227,7 @@ public class GremlinServerAuditLogIntegrateTest extends AbstractGremlinServerInt } // wait for logger to flush - (don't think there is a way to detect this) +stopServer(); Thread.sleep(1000); final List log = recordingAppender.getEvents(); @@ -260,6 +262,7 @@ public class GremlinServerAuditLogIntegrateTest extends AbstractGremlinServerInt } // wait for logger to flush - (don't think there is a way to detect this) +stopServer(); Thread.sleep(1000); final List log = recordingAppender.getEvents(); @@ -287,6 +290,7 @@ public class GremlinServerAuditLogIntegrateTest extends AbstractGremlinServerInt } // wait for logger to flush - (don't think there is a way to detect this) +stopServer(); Thread.sleep(1000); final List log = recordingAppender.getEvents(); @@ -322,6 +326,7 @@ public class GremlinServerAuditLogIntegrateTest extends AbstractGremlinServerInt } // wait for logger to flush - (don't think there is a way to detect this) +stopServer(); Thread.sleep(1000); final List log = recordingAppender.getEvents(); @@ -359,6 +364,7 @@ public class GremlinServerAuditLogIntegrateTest extends
[21/50] [abbrv] tinkerpop git commit: Added warning for postfixes in gremlin-javascript CTR
Added warning for postfixes in gremlin-javascript CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/9986493b Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/9986493b Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/9986493b Branch: refs/heads/TINKERPOP-1990 Commit: 9986493baed59c964673460324a5abcd2fbb2e98 Parents: ecd944e Author: Stephen Mallette Authored: Wed Jul 25 07:43:28 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 07:43:28 2018 -0400 -- docs/src/reference/gremlin-variants.asciidoc | 3 +++ 1 file changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9986493b/docs/src/reference/gremlin-variants.asciidoc -- diff --git a/docs/src/reference/gremlin-variants.asciidoc b/docs/src/reference/gremlin-variants.asciidoc index 7a85ab1..04090b5 100644 --- a/docs/src/reference/gremlin-variants.asciidoc +++ b/docs/src/reference/gremlin-variants.asciidoc @@ -491,6 +491,9 @@ traversal source. Since Gremlin-JavaScript currently doesn't support lambda expressions, all traversals can be translated to Gremlin-Java on the remote location (e.g. Gremlin Server). +WARNING: In Javascript, `from` and `in` are reserved words. Gremlin-Javascript simply postfixes `_` to the end of +these terms for their use with graph traversal. For instance: `g.V().in_().out()` + IMPORTANT: Gremlin-JavaScriptâs `Traversal` base class supports the standard Gremlin methods such as `next()` and `toList()` Such "terminal" methods trigger the evaluation of the traversal.
[25/50] [abbrv] tinkerpop git commit: Merge branch 'tp32' into tp33
Merge branch 'tp32' into tp33 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/421839d2 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/421839d2 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/421839d2 Branch: refs/heads/TINKERPOP-1990 Commit: 421839d2744d679afe922e55e814b34fb61cfec5 Parents: ebee26c f56a3e7 Author: Stephen Mallette Authored: Wed Jul 25 08:59:31 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 08:59:31 2018 -0400 -- docs/src/reference/gremlin-variants.asciidoc | 2 +- docs/src/reference/the-traversal.asciidoc| 63 +++ 2 files changed, 64 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/421839d2/docs/src/reference/gremlin-variants.asciidoc -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/421839d2/docs/src/reference/the-traversal.asciidoc --
[14/50] [abbrv] tinkerpop git commit: Merge branch 'tp32' into tp33
Merge branch 'tp32' into tp33 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/c3981000 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/c3981000 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/c3981000 Branch: refs/heads/TINKERPOP-1990 Commit: c3981000234faf03f4ea4bc1da8086bc34fb3140 Parents: 05432a7 f9ad72a Author: Daniel Kuppitz Authored: Mon Jul 23 10:01:23 2018 -0700 Committer: Daniel Kuppitz Committed: Mon Jul 23 10:01:23 2018 -0700 -- .gitignore | 1 + CHANGELOG.asciidoc | 1 + docker/hadoop/.gitignore| 1 + docker/hadoop/Dockerfile| 25 -- .../traversal/step/branch/BranchStep.java | 51 +--- gremlin-test/features/branch/Choose.feature | 15 ++ .../traversal/step/branch/ChooseTest.java | 24 + 7 files changed, 86 insertions(+), 32 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c3981000/.gitignore -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c3981000/CHANGELOG.asciidoc --
[30/50] [abbrv] tinkerpop git commit: Fixed a problem with writing GraphSON Date in js CTR
Fixed a problem with writing GraphSON Date in js CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/fd643609 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/fd643609 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/fd643609 Branch: refs/heads/TINKERPOP-1990 Commit: fd643609a8d469130c89dde94d50b66ef0fadf0f Parents: db46c0f Author: Stephen Mallette Authored: Wed Jul 25 11:30:33 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 11:30:33 2018 -0400 -- .../gremlin-javascript/lib/structure/io/type-serializers.js | 2 +- .../javascript/gremlin-javascript/test/unit/graphson-test.js | 7 +-- 2 files changed, 6 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/fd643609/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js -- diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js index 4bc2935..fdf049f 100644 --- a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js +++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js @@ -65,7 +65,7 @@ class DateSerializer extends TypeSerializer { serialize(item) { return { [typeKey]: 'g:Date', - [valueKey]: item.value.getTime() + [valueKey]: item.getTime() }; } http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/fd643609/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphson-test.js -- diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphson-test.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphson-test.js index 8f749f7..b459407 100644 --- a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphson-test.js +++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphson-test.js @@ -50,8 +50,6 @@ describe('GraphSONReader', function () { const obj = { "@type" : "g:Date", "@value" : 1481750076295 }; const reader = new GraphSONReader(); const result = reader.read(obj); -console.log("++" + obj); -console.log("++" + result); assert.ok(result instanceof Date); }); it('should parse vertices from GraphSON', function () { @@ -104,6 +102,11 @@ describe('GraphSONWriter', function () { const writer = new GraphSONWriter(); assert.strictEqual(writer.write(2), '2'); }); + it('should write Date', function() { +const writer = new GraphSONWriter(); +const expected = JSON.stringify({ "@type" : "g:Date", "@value" : 1481750076295 }); +assert.strictEqual(writer.write(new Date(1481750076295)), expected); + }); it('should write boolean values', function () { const writer = new GraphSONWriter(); assert.strictEqual(writer.write(true), 'true');
[22/50] [abbrv] tinkerpop git commit: Merge branch 'tp32' into tp33
Merge branch 'tp32' into tp33 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/ebee26c4 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/ebee26c4 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/ebee26c4 Branch: refs/heads/TINKERPOP-1990 Commit: ebee26c47fd3ec341d95fcdd6d87190d27e37f27 Parents: 1ca5ef3 9986493 Author: Stephen Mallette Authored: Wed Jul 25 07:43:46 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 07:43:46 2018 -0400 -- docs/src/reference/gremlin-variants.asciidoc | 3 +++ 1 file changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ebee26c4/docs/src/reference/gremlin-variants.asciidoc --
[16/50] [abbrv] tinkerpop git commit: Fixed bad merge (NumberHelper package name)
Fixed bad merge (NumberHelper package name) Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/3aa6dcf4 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/3aa6dcf4 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/3aa6dcf4 Branch: refs/heads/TINKERPOP-1990 Commit: 3aa6dcf413d16feaae4e020b60e029e62521e7a9 Parents: c398100 Author: Daniel Kuppitz Authored: Mon Jul 23 11:01:03 2018 -0700 Committer: Daniel Kuppitz Committed: Mon Jul 23 11:01:03 2018 -0700 -- .../gremlin/process/traversal/step/branch/BranchStep.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3aa6dcf4/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/BranchStep.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/BranchStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/BranchStep.java index 1ced91c..e35d51e 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/BranchStep.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/BranchStep.java @@ -18,7 +18,6 @@ */ package org.apache.tinkerpop.gremlin.process.traversal.step.branch; -import org.apache.tinkerpop.gremlin.process.traversal.NumberHelper; import org.apache.tinkerpop.gremlin.process.traversal.Traversal; import org.apache.tinkerpop.gremlin.process.traversal.Traverser; import org.apache.tinkerpop.gremlin.process.traversal.step.Barrier; @@ -31,6 +30,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.util.FastNoSuchElementExce 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.NumberHelper; import java.util.ArrayList; import java.util.Collections;
[23/50] [abbrv] tinkerpop git commit: Merge branch 'tp33'
Merge branch 'tp33' Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/dbbe4482 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/dbbe4482 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/dbbe4482 Branch: refs/heads/TINKERPOP-1990 Commit: dbbe4482ff5b7b892d68528eb5070cb8ca91b834 Parents: e1e15fa ebee26c Author: Stephen Mallette Authored: Wed Jul 25 07:43:53 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 07:43:53 2018 -0400 -- docs/src/reference/gremlin-variants.asciidoc | 3 +++ 1 file changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dbbe4482/docs/src/reference/gremlin-variants.asciidoc --
[19/50] [abbrv] tinkerpop git commit: Merge branch 'tp32' into tp33
Merge branch 'tp32' into tp33 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/1ca5ef3d Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/1ca5ef3d Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/1ca5ef3d Branch: refs/heads/TINKERPOP-1990 Commit: 1ca5ef3d15bfc7acc2f53268ec8a60f6f7e956c9 Parents: 3aa6dcf ecd944e Author: Stephen Mallette Authored: Wed Jul 25 07:01:05 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 07:01:05 2018 -0400 -- CHANGELOG.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1ca5ef3d/CHANGELOG.asciidoc --
[24/50] [abbrv] tinkerpop git commit: Added GLV specific warnings in the step docs to point out step naming differences CTR
Added GLV specific warnings in the step docs to point out step naming differences CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/f56a3e72 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/f56a3e72 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/f56a3e72 Branch: refs/heads/TINKERPOP-1990 Commit: f56a3e724e08c33b55b0d131438db66b95c4e54d Parents: 9986493 Author: Stephen Mallette Authored: Wed Jul 25 08:58:41 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 08:58:41 2018 -0400 -- docs/src/reference/gremlin-variants.asciidoc | 2 +- docs/src/reference/the-traversal.asciidoc| 63 +++ 2 files changed, 64 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f56a3e72/docs/src/reference/gremlin-variants.asciidoc -- diff --git a/docs/src/reference/gremlin-variants.asciidoc b/docs/src/reference/gremlin-variants.asciidoc index 04090b5..e8b4c21 100644 --- a/docs/src/reference/gremlin-variants.asciidoc +++ b/docs/src/reference/gremlin-variants.asciidoc @@ -88,7 +88,7 @@ link:https://en.wikipedia.org/wiki/CPython[CPython] machine. Python's syntax has namespaces (`a(b())` vs `a(__.b())`). As such, anyone familiar with Gremlin-Java will immediately be able to work with Gremlin-Python. Moreover, there are a few added constructs to Gremlin-Python that make traversals a bit more succinct. -WARNING: In Python, `as`, `in`, `and`, `or`, `is`, `not`, `from`, and `global` are reserved words. Gremlin-Python simply +WARNING: In Python, `and`, `as`, `from`, `global`, `in`, `is`, `not`, and `or` are reserved words. Gremlin-Python simply postfixes `_` to the end of these terms for their use with graph traversal. For instance: `g.V().as_('a').in_().as_('b').select('a','b')`. To install Gremlin-Python, use Python's link:https://en.wikipedia.org/wiki/Pip_(package_manager)[pip] package manager. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f56a3e72/docs/src/reference/the-traversal.asciidoc -- diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc index 8cc6ac0..057ec6a 100644 --- a/docs/src/reference/the-traversal.asciidoc +++ b/docs/src/reference/the-traversal.asciidoc @@ -315,6 +315,11 @@ link:++http://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/grem The `and()`-step ensures that all provided traversals yield a result (*filter*). Please see <> for or-semantics. +[NOTE, caption=Python] + +The term `and` is a reserved word in Python, and therefore must be referred to in Gremlin with `and_()`. + + [gremlin-groovy,modern] g.V().and( @@ -345,6 +350,17 @@ The `as()`-step is not a real step, but a "step modulator" similar to <>, <>, and path. +[NOTE, caption=Groovy] + +The term `as` is a reserved word in Groovy, and when therefore used as part of an anonymous traversal must be referred +to in Gremlin with the double underscore `__.as()`. + + +[NOTE, caption=Python] + +The term `as` is a reserved word in Python, and therefore must be referred to in Gremlin with `as_()`. + + [gremlin-groovy,modern] g.V().as('a').out('created').as('b').select('a','b')<1> @@ -809,6 +825,16 @@ means by which they are added. The general pattern is `step().from()`. See <>, <>, <>, and <>. +[NOTE, caption=Javasacript] + +The term `from` is a reserved word in Javascript, and therefore must be referred to in Gremlin with `from_()`. + + +[NOTE, caption=Python] + +The term `from` is a reserved word in Python, and therefore must be referred to in Gremlin with `from_()`. + + *Additional References* link:++http://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.html#from-java.lang.String-++[`from(String)`], @@ -1045,6 +1071,11 @@ link:++http://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/grem It is possible to filter scalar values using `is()`-step (*filter*). +[NOTE, caption=Python] + +The term `is` is a reserved word in Python, and therefore must be referred to in Gremlin with `is_()`. + + [gremlin-groovy,modern] g.V().values('age').is(32) @@ -1482,6 +1513,17 @@ link:++http://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/grem The `not()`-step (*filter*) removes objects from the traversal stream when the traversal provided as an argument returns an object. +[NOTE, caption=Groovy] + +The term `not` is a reserved word in Groovy, and when therefore used as part of an anonymous traversal must be referred +to in Gremlin
[27/50] [abbrv] tinkerpop git commit: Added Date GraphSON serialization for Javascript CTR
Added Date GraphSON serialization for Javascript CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/db46c0f6 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/db46c0f6 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/db46c0f6 Branch: refs/heads/TINKERPOP-1990 Commit: db46c0f67fb1f93b9ea76032dbd2a852c24effd4 Parents: f56a3e7 Author: Stephen Mallette Authored: Wed Jul 25 09:45:30 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 09:45:30 2018 -0400 -- CHANGELOG.asciidoc| 1 + .../lib/structure/io/graph-serializer.js | 2 ++ .../lib/structure/io/type-serializers.js | 18 ++ .../gremlin-javascript/test/unit/graphson-test.js | 8 4 files changed, 29 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/db46c0f6/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index f076ba1..0f2b18b 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -24,6 +24,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima === TinkerPop 3.2.10 (Release Date: NOT OFFICIALLY RELEASED YET) * Match numbers in `choose()` options using `NumberHelper` (match values, ignore data type). +* Added support for GraphSON serialization of `Date` in Javascript. * Fixed bug in Java driver where an disorderly shutdown of the server would cause the client to hang. * Added a dotnet template project that should make it easier to get started with Gremlin.Net. * Removed `ThreadInterruptCustomizerProvider` from documentation as a way to timeout. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/db46c0f6/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/graph-serializer.js -- diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/graph-serializer.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/graph-serializer.js index df05659..55b0265 100644 --- a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/graph-serializer.js +++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/graph-serializer.js @@ -155,6 +155,7 @@ const deserializers = { 'g:Int64': typeSerializers.NumberSerializer, 'g:Float': typeSerializers.NumberSerializer, 'g:Double': typeSerializers.NumberSerializer, + 'g:Date': typeSerializers.DateSerializer, 'g:Vertex': typeSerializers.VertexSerializer, 'g:Edge': typeSerializers.EdgeSerializer, 'g:VertexProperty': typeSerializers.VertexPropertySerializer, @@ -165,6 +166,7 @@ const deserializers = { const serializers = [ typeSerializers.NumberSerializer, + typeSerializers.DateSerializer, typeSerializers.BytecodeSerializer, typeSerializers.TraverserSerializer, typeSerializers.PSerializer, http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/db46c0f6/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js -- diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js index 304888f..4bc2935 100644 --- a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js +++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js @@ -61,6 +61,23 @@ class NumberSerializer extends TypeSerializer { } } +class DateSerializer extends TypeSerializer { + serialize(item) { +return { + [typeKey]: 'g:Date', + [valueKey]: item.value.getTime() +}; + } + + deserialize(obj) { +return new Date(obj[valueKey]); + } + + canBeUsedFor(value) { +return (value instanceof Date); + } +} + class LongSerializer extends TypeSerializer { serialize(item) { return { @@ -278,6 +295,7 @@ class TSerializer extends TypeSerializer { module.exports = { BytecodeSerializer, + DateSerializer, EdgeSerializer, EnumSerializer, LambdaSerializer, http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/db46c0f6/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphson-test.js -- diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphson-test.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphson-test.js index 8bc7571..8f749f7 100644 ---
[15/50] [abbrv] tinkerpop git commit: Merge branch 'tp33'
Merge branch 'tp33' Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/e0ffa3be Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/e0ffa3be Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/e0ffa3be Branch: refs/heads/TINKERPOP-1990 Commit: e0ffa3be37b83db50d3f613b4c5777a05e74b9fc Parents: acc7012 c398100 Author: Daniel Kuppitz Authored: Mon Jul 23 10:01:39 2018 -0700 Committer: Daniel Kuppitz Committed: Mon Jul 23 10:01:39 2018 -0700 -- .gitignore | 1 + CHANGELOG.asciidoc | 1 + docker/hadoop/.gitignore| 1 + .../traversal/step/branch/BranchStep.java | 51 +--- gremlin-test/features/branch/Choose.feature | 15 ++ .../traversal/step/branch/ChooseTest.java | 24 + 6 files changed, 86 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e0ffa3be/CHANGELOG.asciidoc --
[13/50] [abbrv] tinkerpop git commit: TINKERPOP-2011 Treat numerical options in `ChooseStep` as in any other numerical comparison (value matters, data type does not).
TINKERPOP-2011 Treat numerical options in `ChooseStep` as in any other numerical comparison (value matters, data type does not). Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/f565345b Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/f565345b Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/f565345b Branch: refs/heads/TINKERPOP-1990 Commit: f565345b03b69d06e9770e7acab4435f355df8d0 Parents: ec561d8 Author: Daniel Kuppitz Authored: Wed Jul 18 12:34:16 2018 -0700 Committer: Daniel Kuppitz Committed: Mon Jul 23 09:52:38 2018 -0700 -- .gitignore | 1 + CHANGELOG.asciidoc | 1 + docker/hadoop/.gitignore| 1 + docker/hadoop/Dockerfile| 25 -- .../traversal/step/branch/BranchStep.java | 51 +--- .../step/branch/GroovyChooseTest.groovy | 5 ++ gremlin-test/features/branch/Choose.feature | 15 ++ .../traversal/step/branch/ChooseTest.java | 24 + 8 files changed, 91 insertions(+), 32 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f565345b/.gitignore -- diff --git a/.gitignore b/.gitignore index a27eb44..fa8dac6 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,4 @@ tools/ *nupkg NuGet.Config nuget*.exe +/Dockerfile http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f565345b/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index f50b9ec..6270880 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -23,6 +23,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima [[release-3-2-10]] === TinkerPop 3.2.10 (Release Date: NOT OFFICIALLY RELEASED YET) +* Match numbers in `choose()` options using `NumberHelper` (match values, ignore data type). * Fixed bug in Java driver where an disorderly shutdown of the server would cause the client to hang. * Added a dotnet template project that should make it easier to get started with Gremlin.Net. * Removed `ThreadInterruptCustomizerProvider` from documentation as a way to timeout. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f565345b/docker/hadoop/.gitignore -- diff --git a/docker/hadoop/.gitignore b/docker/hadoop/.gitignore new file mode 100644 index 000..9414382 --- /dev/null +++ b/docker/hadoop/.gitignore @@ -0,0 +1 @@ +Dockerfile http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f565345b/docker/hadoop/Dockerfile -- diff --git a/docker/hadoop/Dockerfile b/docker/hadoop/Dockerfile deleted file mode 100644 index 86b2598..000 --- a/docker/hadoop/Dockerfile +++ /dev/null @@ -1,25 +0,0 @@ -# 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. - -FROM tinkerpop:base - -MAINTAINER Daniel Kuppitz - -ENV HADOOP_VERSION 2.7.2 - -COPY install.sh /usr/local/sbin/install-hadoop.sh -RUN /usr/local/sbin/install-hadoop.sh http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f565345b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/BranchStep.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/BranchStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/BranchStep.java index 0b1a059..6c38351 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/BranchStep.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/BranchStep.java @@ -18,6 +18,7 @@ */ package org.apache.tinkerpop.gremlin.process.traversal.step.branch; +import
[37/50] [abbrv] tinkerpop git commit: Merge branch 'tp32' into tp33
Merge branch 'tp32' into tp33 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/ffb8c3e4 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/ffb8c3e4 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/ffb8c3e4 Branch: refs/heads/TINKERPOP-1990 Commit: ffb8c3e4e6e8a87d9fea31f2a2f92deb7f809ac5 Parents: 445a8bf 0bd9b5a Author: Stephen Mallette Authored: Thu Jul 26 08:28:33 2018 -0400 Committer: Stephen Mallette Committed: Thu Jul 26 08:28:33 2018 -0400 -- CHANGELOG.asciidoc| 1 + .../traversal/dsl/graph/GraphTraversalSource.java | 18 +++--- .../dsl/graph/GraphTraversalSourceTest.java | 9 ++--- 3 files changed, 10 insertions(+), 18 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ffb8c3e4/CHANGELOG.asciidoc -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ffb8c3e4/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java --
[18/50] [abbrv] tinkerpop git commit: Minor fix in formatting CTR
Minor fix in formatting CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/ecd944e6 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/ecd944e6 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/ecd944e6 Branch: refs/heads/TINKERPOP-1990 Commit: ecd944e6018ddd87a917cde82541d2068a267ae4 Parents: f9ad72a Author: Stephen Mallette Authored: Wed Jul 25 07:00:45 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 07:00:45 2018 -0400 -- CHANGELOG.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ecd944e6/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 6270880..f076ba1 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -33,7 +33,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima * Improved performance of `TraversalVertexProgram` and related infrastructure. * Deprecated `BulkLoaderVertexProgram` and related infrastructure. * Deprecated `BulkDumperVertexProgram` with the more aptly named `CloneVertexProgram`. -* Added `createGratefulDead()`to `TinkerFactory` to help make it easier to try to instantiate that toy graph. +* Added `createGratefulDead()` to `TinkerFactory` to help make it easier to try to instantiate that toy graph. * Added identifiers to edges in the Kitchen Sink toy graph. * Ordered the loading of plugins in the Gremlin Console by their position in the configuration file. * Refactored the Gremlin Server integration testing framework and streamlined that infrastructure.
[32/50] [abbrv] tinkerpop git commit: Merge branch 'tp33'
Merge branch 'tp33' Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/c2ffd946 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/c2ffd946 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/c2ffd946 Branch: refs/heads/TINKERPOP-1990 Commit: c2ffd946e61fb2704314ad5ccee0364318229190 Parents: 7d4fb34 5eaf312 Author: Stephen Mallette Authored: Wed Jul 25 11:30:59 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 11:30:59 2018 -0400 -- .../gremlin-javascript/lib/structure/io/type-serializers.js | 2 +- .../javascript/gremlin-javascript/test/unit/graphson-test.js | 7 +-- 2 files changed, 6 insertions(+), 3 deletions(-) --
[36/50] [abbrv] tinkerpop git commit: Throw exception if withRemote() is called multiple times during configuration
Throw exception if withRemote() is called multiple times during configuration This is a change in behavior. Prior to this we would have quietly closed the connection, but that's a little too sneaky. Also, the connection was being assigned to the current TraversalSource as well as the clone. Not sure why that was happening as the clone was really the only thing that would use it after the call to withRemote(), so the construction was also corrected. CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/0bd9b5ae Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/0bd9b5ae Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/0bd9b5ae Branch: refs/heads/TINKERPOP-1990 Commit: 0bd9b5ae7a1bcfda2754136a2eaf4e421908 Parents: 3be3550 Author: Stephen Mallette Authored: Thu Jul 26 08:25:02 2018 -0400 Committer: Stephen Mallette Committed: Thu Jul 26 08:25:02 2018 -0400 -- CHANGELOG.asciidoc| 1 + .../traversal/dsl/graph/GraphTraversalSource.java | 18 +++--- .../dsl/graph/GraphTraversalSourceTest.java | 9 ++--- 3 files changed, 10 insertions(+), 18 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0bd9b5ae/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 0f2b18b..b6e85ce 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -28,6 +28,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima * Fixed bug in Java driver where an disorderly shutdown of the server would cause the client to hang. * Added a dotnet template project that should make it easier to get started with Gremlin.Net. * Removed `ThreadInterruptCustomizerProvider` from documentation as a way to timeout. +* Changed behavior of `withRemote()` if called multiple times so as to simply throw an exception and not perform the side-effect of auto-closing. * Added Docker images for Gremlin Console and Gremlin Server. * Fixed bug in `branch()` where reducing steps as options would produce incorrect results. * Removed recursive handling of streaming results from Gremlin-Python driver to avoid max recursion depth errors. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0bd9b5ae/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java index baba19c..faf9459 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java @@ -302,19 +302,15 @@ public class GraphTraversalSource implements TraversalSource { */ @Override public GraphTraversalSource withRemote(final RemoteConnection connection) { -try { -// check if someone called withRemote() more than once, so just release resources on the initial -// connection as you can't have more than one. maybe better to toss IllegalStateException?? -if (this.connection != null) -this.connection.close(); -} catch (Exception ignored) { -// not sure there's anything to do here -} +// check if someone called withRemote() more than once, so just release resources on the initial +// connection as you can't have more than one. maybe better to toss IllegalStateException?? +if (this.connection != null) +throw new IllegalStateException(String.format("TraversalSource already configured with a RemoteConnection [%s]", connection)); -this.connection = connection; -final TraversalSource clone = this.clone(); +final GraphTraversalSource clone = this.clone(); +clone.connection = connection; clone.getStrategies().addStrategies(new RemoteStrategy(connection)); -return (GraphTraversalSource) clone; +return clone; } SPAWNS http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0bd9b5ae/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSourceTest.java -- diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSourceTest.java
[42/50] [abbrv] tinkerpop git commit: Merge branch 'tp32' into tp33
Merge branch 'tp32' into tp33 Conflicts: docs/src/tutorials/getting-started/index.asciidoc Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/66099fed Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/66099fed Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/66099fed Branch: refs/heads/TINKERPOP-1990 Commit: 66099fed82e57ef29d1983a5f95725dcd4e5c157 Parents: e55ffc6 dde73e4 Author: Stephen Mallette Authored: Fri Jul 27 07:17:54 2018 -0400 Committer: Stephen Mallette Committed: Fri Jul 27 07:17:54 2018 -0400 -- docs/src/dev/developer/for-committers.asciidoc| 2 +- docs/src/recipes/between-vertices.asciidoc| 6 +++--- docs/src/recipes/collections.asciidoc | 18 +- docs/src/recipes/pagination.asciidoc | 2 +- .../recipes/traversal-component-reuse.asciidoc| 4 ++-- docs/src/recipes/tree.asciidoc| 2 +- docs/src/reference/the-traversal.asciidoc | 2 +- docs/src/tutorials/getting-started/index.asciidoc | 10 +- .../src/tutorials/gremlins-anatomy/index.asciidoc | 16 .../tutorials/the-gremlin-console/index.asciidoc | 2 +- 10 files changed, 32 insertions(+), 32 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/66099fed/docs/src/dev/developer/for-committers.asciidoc -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/66099fed/docs/src/recipes/collections.asciidoc -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/66099fed/docs/src/reference/the-traversal.asciidoc -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/66099fed/docs/src/tutorials/getting-started/index.asciidoc --
[45/50] [abbrv] tinkerpop git commit: Consistent use of hyphen in step references CTR
Consistent use of hyphen in step references CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/9ab5efa6 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/9ab5efa6 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/9ab5efa6 Branch: refs/heads/TINKERPOP-1990 Commit: 9ab5efa6772bb831238f6c9a4e46fc925a45ddaa Parents: 13ff64c Author: Stephen Mallette Authored: Fri Jul 27 07:19:12 2018 -0400 Committer: Stephen Mallette Committed: Fri Jul 27 07:19:12 2018 -0400 -- docs/src/upgrade/release-3.4.x.asciidoc | 8 1 file changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9ab5efa6/docs/src/upgrade/release-3.4.x.asciidoc -- diff --git a/docs/src/upgrade/release-3.4.x.asciidoc b/docs/src/upgrade/release-3.4.x.asciidoc index 97e14e3..2d699dc 100644 --- a/docs/src/upgrade/release-3.4.x.asciidoc +++ b/docs/src/upgrade/release-3.4.x.asciidoc @@ -31,9 +31,9 @@ Please see the link:https://github.com/apache/tinkerpop/blob/3.4.0/CHANGELOG.asc with() Step -This version of TinkerPop introduces the `with()` step to Gremlin. It isn't really a step but is instead a step +This version of TinkerPop introduces the `with()`-step to Gremlin. It isn't really a step but is instead a step modulator. This modulator allows the step it is modifying to accept configurations that can be used to alter the -behavior of the step itself. A good example of its usage is shown with the revised syntax of the `pageRank()` step +behavior of the step itself. A good example of its usage is shown with the revised syntax of the `pageRank()`-step which now uses `with()` to replace the old `by()` options: [groovy] @@ -47,7 +47,7 @@ g.V().hasLabel('person'). valueMap('name','friendRank') -A similar change was made for `peerPressure()` step: +A similar change was made for `peerPressure()`-step: [groovy] @@ -306,7 +306,7 @@ See: link:https://issues.apache.org/jira/browse/TINKERPOP-1518[TINKERPOP-1518] = Configuring Interface There were some changes to interfaces that were related to `Step`. A new `Configuring` interface was added that was -helpful in the implementation of the `with()` step modulator. This new interface extends the `Parameterizing` interface +helpful in the implementation of the `with()`-step modulator. This new interface extends the `Parameterizing` interface (which moved to the `org.apache.tinkerpop.gremlin.process.traversal.step` package with the other step interfaces) and in turn is extended by the `Mutating` interface. Making this change meant that the `Mutating.addPropertyMutations()` method could be removed in favor of the new `Configuring.configure()` method.
[20/50] [abbrv] tinkerpop git commit: Merge branch 'tp33'
Merge branch 'tp33' Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/e1e15fa1 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/e1e15fa1 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/e1e15fa1 Branch: refs/heads/TINKERPOP-1990 Commit: e1e15fa10a5a7f183be81143bfb8a902b483610a Parents: aad0102 1ca5ef3 Author: Stephen Mallette Authored: Wed Jul 25 07:01:18 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 07:01:18 2018 -0400 -- CHANGELOG.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e1e15fa1/CHANGELOG.asciidoc --
[41/50] [abbrv] tinkerpop git commit: Consistent format of step references should use a dash CTR
Consistent format of step references should use a dash CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/dde73e42 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/dde73e42 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/dde73e42 Branch: refs/heads/TINKERPOP-1990 Commit: dde73e42bc1aed1e73b71a38aa51a9c4641ef562 Parents: 0bd9b5a Author: Stephen Mallette Authored: Fri Jul 27 07:16:11 2018 -0400 Committer: Stephen Mallette Committed: Fri Jul 27 07:16:11 2018 -0400 -- docs/src/dev/developer/for-committers.asciidoc| 2 +- docs/src/recipes/between-vertices.asciidoc| 6 +++--- docs/src/recipes/collections.asciidoc | 18 +- docs/src/recipes/pagination.asciidoc | 2 +- .../recipes/traversal-component-reuse.asciidoc| 4 ++-- docs/src/recipes/tree.asciidoc| 2 +- docs/src/reference/the-traversal.asciidoc | 2 +- docs/src/tutorials/getting-started/index.asciidoc | 12 ++-- .../src/tutorials/gremlins-anatomy/index.asciidoc | 16 .../tutorials/the-gremlin-console/index.asciidoc | 2 +- 10 files changed, 33 insertions(+), 33 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dde73e42/docs/src/dev/developer/for-committers.asciidoc -- diff --git a/docs/src/dev/developer/for-committers.asciidoc b/docs/src/dev/developer/for-committers.asciidoc index 43c9ce3..82b3609 100644 --- a/docs/src/dev/developer/for-committers.asciidoc +++ b/docs/src/dev/developer/for-committers.asciidoc @@ -366,7 +366,7 @@ in it * "the result should be ordered" - the exact results and should appear in the order presented * "the result should be unordered" - the exact results but can appear any order * "the result should be of" - results can be any of the specified values and in any order (use when guarantees -regarding the exact results cannot be pre-determined easily - see the `range()` step tests for examples) +regarding the exact results cannot be pre-determined easily - see the `range()`-step tests for examples) These final three types of assertions mentioned above should be followed by a Gherkin table that has one column, where each row value in that column represents a value to assert in the result. These values are type notation respected as http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dde73e42/docs/src/recipes/between-vertices.asciidoc -- diff --git a/docs/src/recipes/between-vertices.asciidoc b/docs/src/recipes/between-vertices.asciidoc index a947d3b..b32d323 100644 --- a/docs/src/recipes/between-vertices.asciidoc +++ b/docs/src/recipes/between-vertices.asciidoc @@ -33,7 +33,7 @@ g.V(1).out().where(__.in().hasId(6)) <6> <1> There are three edges from the vertex with the identifier of "1". -<2> Filter those three edges using the `where()` step using the identifier of the vertex returned by `otherV()` to +<2> Filter those three edges using the `where()`-step using the identifier of the vertex returned by `otherV()` to ensure it matches on the vertex of concern, which is the one with an identifier of "2". <3> Note that the same traversal will work if there are actual `Vertex` instances rather than just vertex identifiers. <4> The vertex with identifier "1" has all outgoing edges, so it would also be acceptable to use the directional steps @@ -43,7 +43,7 @@ vertices with identifiers "2" and "3". <6> There's no reason why the same pattern of exclusion used for edges with `where()` can't work for a vertex between two vertices. -The basic pattern of using `where()` step to find the "other" known vertex can be applied in far more complex +The basic pattern of using `where()`-step to find the "other" known vertex can be applied in far more complex scenarios. For one such example, consider the following traversal that finds all the paths between a group of defined vertices: @@ -113,6 +113,6 @@ g.V(vRexsterJob1, vBlueprintsJob1).as('job'). While the traversals above are more complex, the pattern for finding "things" between two vertices is largely the same. -Note the use of the `where()` step to terminate the traversers for a specific user. It is embedded in a `coalesce()` +Note the use of the `where()`-step to terminate the traversers for a specific user. It is embedded in a `coalesce()` step to handle situations where the specified user did not complete an application for the specified job and will return `false` in those cases. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dde73e42/docs/src/recipes/collections.asciidoc
[29/50] [abbrv] tinkerpop git commit: Merge branch 'tp33'
Merge branch 'tp33' Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/7d4fb343 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/7d4fb343 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/7d4fb343 Branch: refs/heads/TINKERPOP-1990 Commit: 7d4fb343e36becfeebc4f08b8cd8a464268b6d24 Parents: a14cf28 1bd35dc Author: Stephen Mallette Authored: Wed Jul 25 09:46:23 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 09:46:23 2018 -0400 -- CHANGELOG.asciidoc| 1 + .../lib/structure/io/graph-serializer.js | 2 ++ .../lib/structure/io/type-serializers.js | 18 ++ .../gremlin-javascript/test/unit/graphson-test.js | 8 4 files changed, 29 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7d4fb343/CHANGELOG.asciidoc --
[46/50] [abbrv] tinkerpop git commit: Added "get or create" or "upsert" recipe CTR
Added "get or create" or "upsert" recipe CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/3b8c8280 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/3b8c8280 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/3b8c8280 Branch: refs/heads/TINKERPOP-1990 Commit: 3b8c8280cab1e7a6fd3b273ef0d2cf2c6d00f650 Parents: dde73e4 Author: Stephen Mallette Authored: Fri Jul 27 16:29:11 2018 -0400 Committer: Stephen Mallette Committed: Fri Jul 27 16:29:11 2018 -0400 -- docs/src/recipes/element-existence.asciidoc | 91 docs/src/recipes/index.asciidoc | 2 + 2 files changed, 93 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3b8c8280/docs/src/recipes/element-existence.asciidoc -- diff --git a/docs/src/recipes/element-existence.asciidoc b/docs/src/recipes/element-existence.asciidoc new file mode 100644 index 000..be6e517 --- /dev/null +++ b/docs/src/recipes/element-existence.asciidoc @@ -0,0 +1,91 @@ + +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. + +[[element-existence]] +== Element Existence + +Checking for whether or not a graph element is present in the graph is simple: + +[gremlin-groovy,modern] + +g.V().has('person','name','marko').hasNext() +g.V().has('person','name','stephen').hasNext() + + +Knowing that an element exists or not is usually a common point of decision in determining the appropriate path of code +to take. In the example above, the check is for vertex existence and a typical reason to check for existence is to +determine whether or not to add a new vertex or to return the one that exists (i.e. "get or create" pattern). This +entire operation can occur in a single traversal. + +[gremlin-groovy,modern] + +g.V().has('person','name','marko'). + fold(). + coalesce(unfold(), + addV('person'). + property('name','marko'). + property('age',29)) +g.V().has('person','name','stephen'). + fold(). + coalesce(unfold(), + addV('person'). + property('name','stephen'). + property('age',34)) + + +This use of `coalesce()` shown above is the basis for this pattern. Note that at the end of `has()`-step there is +either a vertex or not. By using `fold()`, "existence" or "not existence" is reduced to a `List` with the vertex or +a `List` with no values. With a `List` as the traverser flowing into `coalesce()` the first child traversal to return +something will execute. If the `List` has a vertex then it will `unfold()` and return the existing one. If it is empty, +then the vertex does not exist and it is added and returned. + +This "get or create" logic can be expanded to be "upsert" like functionality as follows: + +[gremlin-groovy,modern] + +g.V().has('person','name','marko'). + fold(). + coalesce(unfold(), + addV('person').property('name','marko')). + property('age',29) +g.V().has('person','name','stephen'). + fold(). + coalesce(unfold(), + addV('person').property('name','stephen')). + property('age',34) + + +By moving the `property()`-step that set the "age" value outside of `coalesce()`, the property is then set for both +newly created vertices and for existing ones. + +WARNING: Always consider the specific nature of the graph implementation in use when considering these patterns. Some +graph databases may not treat these traversals as true "upsert" operations and may do a "read before write" in their +execution. + +It is possible to do similar sorts of operations with edges using the same pattern: + +[gremlin-groovy,modern] + +g.V().has('person','name','vadas').as('v'). + V().has('software','name','ripple'). + coalesce(__.inE('created').where(outV().as('v')), + addE('created').from('v').property('weight',0.5)) + + +In this case, the adjacent vertices of the edge are retrieved first and within the `coalesce()`, the existence of +the edge is checked with `where()` using a matching
[35/50] [abbrv] tinkerpop git commit: Merge branch 'tp33'
Merge branch 'tp33' Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/5f912eab Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/5f912eab Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/5f912eab Branch: refs/heads/TINKERPOP-1990 Commit: 5f912eab0ff53f7301ff87cef2fd05eb4dda0a34 Parents: c2ffd94 445a8bf Author: Stephen Mallette Authored: Wed Jul 25 12:26:00 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 12:26:00 2018 -0400 -- .../Gherkin/GherkinTestRunner.cs | 3 +-- .../Gherkin/IgnoreException.cs | 3 --- .../gremlin-javascript/test/cucumber/feature-steps.js | 3 +-- gremlin-python/src/main/jython/radish/feature_steps.py | 2 +- gremlin-test/features/map/Select.feature | 13 + 5 files changed, 8 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5f912eab/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5f912eab/gremlin-test/features/map/Select.feature --
[43/50] [abbrv] tinkerpop git commit: Consistent use of hyphen for step references CTR
Consistent use of hyphen for step references CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/9b693c02 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/9b693c02 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/9b693c02 Branch: refs/heads/TINKERPOP-1990 Commit: 9b693c02c6101b82af0d19bae3252fe022ecb988 Parents: 66099fe Author: Stephen Mallette Authored: Fri Jul 27 07:18:25 2018 -0400 Committer: Stephen Mallette Committed: Fri Jul 27 07:18:25 2018 -0400 -- docs/src/upgrade/release-3.3.x.asciidoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9b693c02/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 a18075f..f6cade0 100644 --- a/docs/src/upgrade/release-3.3.x.asciidoc +++ b/docs/src/upgrade/release-3.3.x.asciidoc @@ -115,7 +115,7 @@ Please see the link:https://github.com/apache/tinkerpop/blob/3.3.1/CHANGELOG.asc Gremlin Python path() There was a bug in GraphSON 3.0 serialization that prevented proper handling of results contain `Path` object. As a -result, traversals that used and returned results from the `path()` step in Python would return unusable results, +result, traversals that used and returned results from the `path()`-step in Python would return unusable results, but did not actually cause an exception condition. This problem is now resolved. See: link:https://issues.apache.org/jira/browse/TINKERPOP-1799[TINKERPOP-1799] @@ -154,7 +154,7 @@ See: link:https://issues.apache.org/jira/browse/TINKERPOP-1632[TINKERPOP-1632] Changed Typing on `from()` and `to()` -The `from()` and `to()` steps of `GraphTraversal` have a `Traversal` overload. The `E` has been changed to `?` +The `from()` and `to()`-steps of `GraphTraversal` have a `Traversal` overload. The `E` has been changed to `?` in order to reduce `< >`-based coersion in strongly type Gremlin language variants. See: link:https://issues.apache.org/jira/browse/TINKERPOP-1793[TINKERPOP-1793]
[12/50] [abbrv] tinkerpop git commit: Simpler PickTokenKey::toString() implementation
Simpler PickTokenKey::toString() implementation Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/f9ad72a2 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/f9ad72a2 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/f9ad72a2 Branch: refs/heads/TINKERPOP-1990 Commit: f9ad72a2526908ec00435d26407ebd183b6f7de5 Parents: f565345 Author: Daniel Kuppitz Authored: Mon Jul 23 09:52:02 2018 -0700 Committer: Daniel Kuppitz Committed: Mon Jul 23 09:52:38 2018 -0700 -- .../gremlin/process/traversal/step/branch/BranchStep.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f9ad72a2/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/BranchStep.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/BranchStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/BranchStep.java index 6c38351..1ced91c 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/BranchStep.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/BranchStep.java @@ -260,7 +260,7 @@ public class BranchStep extends ComputerAwareStep implements Trav @Override public String toString() { -return "PickTokenKey(" + number + ")"; +return number.toString(); } } }
[09/50] [abbrv] tinkerpop git commit: Minor spelling error CTR
Minor spelling error CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/ec561d8d Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/ec561d8d Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/ec561d8d Branch: refs/heads/TINKERPOP-1990 Commit: ec561d8d51c92b3f97aa9de4eace756d83018932 Parents: fc36be1 Author: Stephen Mallette Authored: Sun Jul 22 15:10:40 2018 -0400 Committer: Stephen Mallette Committed: Sun Jul 22 15:10:40 2018 -0400 -- docs/src/recipes/collections.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ec561d8d/docs/src/recipes/collections.asciidoc -- diff --git a/docs/src/recipes/collections.asciidoc b/docs/src/recipes/collections.asciidoc index d027376..257d661 100644 --- a/docs/src/recipes/collections.asciidoc +++ b/docs/src/recipes/collections.asciidoc @@ -21,7 +21,7 @@ image:gremlin-collections.png[width=400] Lists and maps form the basis for much of the processing in Gremlin traversals. They are core to how side-effects are typically held and how results are generally produced. Being able to pick them apart and reformat them is sometimes -required. This need to shape the date within a traversal may arise both at the +required. This need to shape the data within a traversal may arise both at the link:http://tinkerpop.apache.org/docs/current/reference/#terminal-steps[terminal step] of the traversal (technically just prior to the terminal step) or in the middle of a traversal. Considering the former, a transformation just prior to iteration will get the result into the form required by the application which would remove the need for additional
[33/50] [abbrv] tinkerpop git commit: Redefined gherkin test that was forcing list[list] assertions
Redefined gherkin test that was forcing list[list] assertions Not sure we really needed the original assertion the way that it was. The fact that we get a result means serialization for list[list] worked and we assert correctness of the traversal in a reasonable way without list[list] so there doesn't seem to be much need to complicate the logic of the gherkin runners to support that CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/3be3550d Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/3be3550d Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/3be3550d Branch: refs/heads/TINKERPOP-1990 Commit: 3be3550d191fc894639cfe2aae5447eb7bad3cbf Parents: fd64360 Author: Stephen Mallette Authored: Wed Jul 25 12:16:09 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 12:16:09 2018 -0400 -- .../Gherkin/GherkinTestRunner.cs | 3 +-- .../Gherkin/IgnoreException.cs | 3 --- .../gremlin-javascript/test/cucumber/feature-steps.js | 3 +-- gremlin-python/src/main/jython/radish/feature_steps.py | 2 +- gremlin-test/features/map/Select.feature | 13 + 5 files changed, 8 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3be3550d/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs -- diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs index 787cca9..3802da5 100644 --- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs +++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs @@ -41,8 +41,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin new Dictionary() { { "g_injectX1X_chooseXisX1X__constantX10Xfold__foldX", IgnoreReason.NoReason }, -{ "g_injectX2X_chooseXisX1X__constantX10Xfold__foldX", IgnoreReason.NoReason }, -{ "g_V_asXa_bX_out_asXcX_path_selectXkeysX", IgnoreReason.EmbeddedListAssertion } +{ "g_injectX2X_chooseXisX1X__constantX10Xfold__foldX", IgnoreReason.NoReason } }; private static class Keywords http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3be3550d/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs -- diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs index 368713d..6198f1d 100644 --- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs +++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs @@ -40,9 +40,6 @@ namespace Gremlin.Net.IntegrationTest.Gherkin string reasonSuffix = null; switch (reason) { -case IgnoreReason.EmbeddedListAssertion: -reasonSuffix = "This test returns an embedded list in the result and the Gherkin processor does not parse that correctly"; -break; case IgnoreReason.NoReason: reasonSuffix = ""; break; http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3be3550d/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js -- diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js index 53f457d..3976348 100644 --- a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js +++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js @@ -55,13 +55,12 @@ const parsers = [ const ignoreReason = { lambdaNotSupported: 'Lambdas are not supported on gremlin-javascript', - embeddedListAssertion: '"This test returns an embedded list in the result and the Gherkin processor does not parse that correctly"', needsFurtherInvestigation: '', }; const ignoredScenarios = { // An associative array containing the scenario name as key, for example: - 'g_V_asXa_bX_out_asXcX_path_selectXkeysX': new IgnoreError(ignoreReason.embeddedListAssertion), + // 'g_V_asXa_bX_out_asXcX_path_selectXkeysX': new IgnoreError(ignoreReason.embeddedListAssertion), }; defineSupportCode(function(methods) {
[34/50] [abbrv] tinkerpop git commit: Merge branch 'tp32' into tp33
Merge branch 'tp32' into tp33 Conflicts: gremlin-test/features/map/Select.feature Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/445a8bf0 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/445a8bf0 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/445a8bf0 Branch: refs/heads/TINKERPOP-1990 Commit: 445a8bf0b75f8f6ee246c5bd9277f0e902db246c Parents: 5eaf312 3be3550 Author: Stephen Mallette Authored: Wed Jul 25 12:25:51 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 12:25:51 2018 -0400 -- .../Gherkin/GherkinTestRunner.cs | 3 +-- .../Gherkin/IgnoreException.cs | 3 --- .../gremlin-javascript/test/cucumber/feature-steps.js | 3 +-- gremlin-python/src/main/jython/radish/feature_steps.py | 2 +- gremlin-test/features/map/Select.feature | 13 + 5 files changed, 8 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/445a8bf0/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/445a8bf0/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/445a8bf0/gremlin-test/features/map/Select.feature --
[47/50] [abbrv] tinkerpop git commit: Merge branch 'tp32' into tp33
Merge branch 'tp32' into tp33 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/79851067 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/79851067 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/79851067 Branch: refs/heads/TINKERPOP-1990 Commit: 798510679b5af84ffc1ecdfa5ef86d52229cbc99 Parents: 9b693c0 3b8c828 Author: Stephen Mallette Authored: Fri Jul 27 16:29:37 2018 -0400 Committer: Stephen Mallette Committed: Fri Jul 27 16:29:37 2018 -0400 -- docs/src/recipes/element-existence.asciidoc | 91 docs/src/recipes/index.asciidoc | 2 + 2 files changed, 93 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/79851067/docs/src/recipes/index.asciidoc --
[40/50] [abbrv] tinkerpop git commit: Merge branch 'tp33'
Merge branch 'tp33' Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/a17bb406 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/a17bb406 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/a17bb406 Branch: refs/heads/TINKERPOP-1990 Commit: a17bb4066c83b73df7e7c79f6625dc5fd389c836 Parents: 74930a9 e55ffc6 Author: Stephen Mallette Authored: Thu Jul 26 14:16:21 2018 -0400 Committer: Stephen Mallette Committed: Thu Jul 26 14:16:21 2018 -0400 -- .../GremlinServerAuditLogIntegrateTest.java | 14 + .../server/GremlinServerAuthIntegrateTest.java | 1 - .../GremlinServerAuthKrb5IntegrateTest.java | 15 ++ .../tinkerpop/gremlin/server/KdcFixture.java| 21 ++-- 4 files changed, 35 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a17bb406/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuditLogIntegrateTest.java -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a17bb406/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuthIntegrateTest.java -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a17bb406/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuthKrb5IntegrateTest.java --
[26/50] [abbrv] tinkerpop git commit: Merge branch 'tp33'
Merge branch 'tp33' Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/a14cf28f Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/a14cf28f Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/a14cf28f Branch: refs/heads/TINKERPOP-1990 Commit: a14cf28f45742f47f15b768a90355ca9e9e89e17 Parents: dbbe448 421839d Author: Stephen Mallette Authored: Wed Jul 25 08:59:39 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 08:59:39 2018 -0400 -- docs/src/reference/gremlin-variants.asciidoc | 2 +- docs/src/reference/the-traversal.asciidoc| 63 +++ 2 files changed, 64 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a14cf28f/docs/src/reference/gremlin-variants.asciidoc -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a14cf28f/docs/src/reference/the-traversal.asciidoc --
[02/50] [abbrv] tinkerpop git commit: Merge pull request #890 from arings/TINKERPOP-1507-JS
Merge pull request #890 from arings/TINKERPOP-1507-JS Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/a7aed51d Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/a7aed51d Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/a7aed51d Branch: refs/heads/TINKERPOP-1990 Commit: a7aed51d29dbf9886531b8dddb00b0b74f9e8699 Parents: 0272a2e c324002 Author: Jorge Bay Gondra Authored: Fri Jul 20 10:24:47 2018 +0200 Committer: Jorge Bay Gondra Committed: Fri Jul 20 10:24:47 2018 +0200 -- .../src/main/javascript/gremlin-javascript/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --
[04/50] [abbrv] tinkerpop git commit: Merge branch 'tp33'
Merge branch 'tp33' Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/d6a14265 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/d6a14265 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/d6a14265 Branch: refs/heads/TINKERPOP-1990 Commit: d6a14265a10303404efa457794485e65f353c840 Parents: ce73ceb f9f0112 Author: Jorge Bay Gondra Authored: Fri Jul 20 10:27:36 2018 +0200 Committer: Jorge Bay Gondra Committed: Fri Jul 20 10:27:36 2018 +0200 -- .../src/main/javascript/gremlin-javascript/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --
[06/50] [abbrv] tinkerpop git commit: Remove note about Gremlin.Net's history CTR
Remove note about Gremlin.Net's history CTR The note explained that Gremlin.Net was a personal project before it became part of TinkerPop. Considering that the first official release of Gremlin.Net as part of TinkerPop was over 6 months ago, it doesn't seem necessary anymore. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/fc36be1b Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/fc36be1b Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/fc36be1b Branch: refs/heads/TINKERPOP-1990 Commit: fc36be1b9b269f281fea1ab308c064fb49330854 Parents: a7aed51 Author: Florian Hockmann Authored: Sun Jul 22 15:53:52 2018 +0200 Committer: Florian Hockmann Committed: Sun Jul 22 15:53:52 2018 +0200 -- gremlin-dotnet/glv/Gremlin.Net.csproj.template| 4 +--- gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/fc36be1b/gremlin-dotnet/glv/Gremlin.Net.csproj.template -- diff --git a/gremlin-dotnet/glv/Gremlin.Net.csproj.template b/gremlin-dotnet/glv/Gremlin.Net.csproj.template index b95bae6..5357e14 100644 --- a/gremlin-dotnet/glv/Gremlin.Net.csproj.template +++ b/gremlin-dotnet/glv/Gremlin.Net.csproj.template @@ -36,9 +36,7 @@ Apache TinkerPop⢠is a graph computing framework for both graph databases (OLT Gremlin.Net implements Gremlin within .NET. C# syntax has the same constructs as Java including "dot notation" for function chaining (a.b.c), round bracket function arguments (a(b,c)), and support for global namespaces (a(b()) vs a(__.b())). As such, anyone familiar with Gremlin-Java will immediately be able to work with Gremlin.Net. Moreover, there are a few added constructs to Gremlin.Net that make traversals a bit more succinct. -Please see the reference documentation at Apache TinkerPop for more information on usage. - -NOTE: Gremlin.Net is an extension of the Gremlin.Net driver by Florian Hockmann (versions: 0.y.z) and is now included as part of the Apache TinkerPop project. +Please see the reference documentation at Apache TinkerPop for more information on usage. ../../build/tinkerpop.snk true Gremlin.Net http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/fc36be1b/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj -- diff --git a/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj b/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj index ff3b2a2..7aa5ba0 100644 --- a/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj +++ b/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj @@ -36,9 +36,7 @@ Apache TinkerPop⢠is a graph computing framework for both graph databases (OLT Gremlin.Net implements Gremlin within .NET. C# syntax has the same constructs as Java including "dot notation" for function chaining (a.b.c), round bracket function arguments (a(b,c)), and support for global namespaces (a(b()) vs a(__.b())). As such, anyone familiar with Gremlin-Java will immediately be able to work with Gremlin.Net. Moreover, there are a few added constructs to Gremlin.Net that make traversals a bit more succinct. -Please see the reference documentation at Apache TinkerPop for more information on usage. - -NOTE: Gremlin.Net is an extension of the Gremlin.Net driver by Florian Hockmann (versions: 0.y.z) and is now included as part of the Apache TinkerPop project. +Please see the reference documentation at Apache TinkerPop for more information on usage. ../../build/tinkerpop.snk true Gremlin.Net
[07/50] [abbrv] tinkerpop git commit: Merge branch 'tp32' into tp33
Merge branch 'tp32' into tp33 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/b757173b Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/b757173b Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/b757173b Branch: refs/heads/TINKERPOP-1990 Commit: b757173b1c036e97d58c2abf7584922c0aa6870f Parents: f9f0112 fc36be1 Author: Florian Hockmann Authored: Sun Jul 22 15:54:14 2018 +0200 Committer: Florian Hockmann Committed: Sun Jul 22 15:54:14 2018 +0200 -- gremlin-dotnet/glv/Gremlin.Net.csproj.template| 4 +--- gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b757173b/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj --
[03/50] [abbrv] tinkerpop git commit: Merge branch 'tp32' into tp33
Merge branch 'tp32' into tp33 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/f9f0112f Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/f9f0112f Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/f9f0112f Branch: refs/heads/TINKERPOP-1990 Commit: f9f0112f2e0e1899223754a9f0cb1377836dd685 Parents: 398ab9c a7aed51 Author: Jorge Bay Gondra Authored: Fri Jul 20 10:27:20 2018 +0200 Committer: Jorge Bay Gondra Committed: Fri Jul 20 10:27:20 2018 +0200 -- .../src/main/javascript/gremlin-javascript/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --
[10/50] [abbrv] tinkerpop git commit: Merge branch 'tp32' into tp33
Merge branch 'tp32' into tp33 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/05432a79 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/05432a79 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/05432a79 Branch: refs/heads/TINKERPOP-1990 Commit: 05432a79296dd6154233a2b62685dbf60f9eb16f Parents: b757173 ec561d8 Author: Stephen Mallette Authored: Sun Jul 22 15:11:05 2018 -0400 Committer: Stephen Mallette Committed: Sun Jul 22 15:11:05 2018 -0400 -- docs/src/recipes/collections.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/05432a79/docs/src/recipes/collections.asciidoc --
[01/50] [abbrv] tinkerpop git commit: Expose pick object in module.exports [Forced Update!]
Repository: tinkerpop Updated Branches: refs/heads/TINKERPOP-1990 823e93541 -> b003528c4 (forced update) Expose pick object in module.exports Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/c324002c Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/c324002c Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/c324002c Branch: refs/heads/TINKERPOP-1990 Commit: c324002c7d2184b87ef1e90067c318ebf727311f Parents: 0272a2e Author: arings Authored: Sun Jul 15 19:51:08 2018 +0200 Committer: Jorge Bay Gondra Committed: Fri Jul 20 10:21:59 2018 +0200 -- .../src/main/javascript/gremlin-javascript/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c324002c/gremlin-javascript/src/main/javascript/gremlin-javascript/index.js -- diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/index.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/index.js index 2ebae48..d4c6d88 100644 --- a/gremlin-javascript/src/main/javascript/gremlin-javascript/index.js +++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/index.js @@ -54,6 +54,7 @@ module.exports = { direction: t.direction, operator: t.operator, order: t.order, +pick: t.pick, pop: t.pop, scope: t.scope, t: t.t, @@ -74,4 +75,4 @@ module.exports = { VertexProperty: graph.VertexProperty, toLong: utils.toLong } -}; \ No newline at end of file +};
[50/50] [abbrv] tinkerpop git commit: TINKERPOP-1990 Implemented `ShortestPathVertexProgram` and `ShortestPathVertexProgramStep`.
TINKERPOP-1990 Implemented `ShortestPathVertexProgram` and `ShortestPathVertexProgramStep`. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/b003528c Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/b003528c Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/b003528c Branch: refs/heads/TINKERPOP-1990 Commit: b003528c4b27c49fb992d1b9da8035a853af3c54 Parents: 6358715 Author: Daniel Kuppitz Authored: Wed May 23 08:46:34 2018 -0400 Committer: Daniel Kuppitz Committed: Sun Jul 29 10:21:23 2018 -0700 -- CHANGELOG.asciidoc | 1 + docs/src/reference/the-graphcomputer.asciidoc | 51 ++ docs/src/reference/the-traversal.asciidoc | 56 ++ .../tinkerpop/gremlin/jsr223/CoreImports.java | 4 + .../search/path/ShortestPathVertexProgram.java | 581 +++ .../traversal/step/map/ShortestPath.java| 108 .../step/map/ShortestPathVertexProgramStep.java | 174 ++ .../gremlin/process/remote/RemoteGraph.java | 8 + .../gremlin/process/traversal/Traversal.java| 16 +- .../traversal/dsl/graph/GraphTraversal.java | 20 + .../traversal/lambda/ColumnTraversal.java | 8 + .../traversal/lambda/ConstantTraversal.java | 9 +- .../traversal/lambda/ElementValueTraversal.java | 10 +- .../traversal/lambda/IdentityTraversal.java | 7 +- .../process/traversal/lambda/LoopTraversal.java | 6 + .../traversal/lambda/TokenTraversal.java| 8 + .../process/traversal/lambda/TrueTraversal.java | 5 + .../structure/io/graphson/GraphSONModule.java | 2 +- .../gremlin/structure/io/gryo/GryoVersion.java | 12 +- .../structure/io/gryo/UtilSerializers.java | 15 + .../gremlin/structure/util/Attachable.java | 3 +- .../traversal/dsl/graph/GraphTraversalTest.java | 2 +- .../Process/Traversal/GraphTraversal.cs | 18 +- .../lib/process/graph-traversal.js | 10 + .../gremlin_python/process/graph_traversal.py | 4 + .../tinkerpop/gremlin/AbstractGremlinTest.java | 6 +- .../process/AbstractGremlinProcessTest.java | 11 +- .../gremlin/process/ProcessComputerSuite.java | 5 + .../search/path/ShortestPathTestHelper.java | 100 .../path/ShortestPathVertexProgramTest.java | 297 ++ .../traversal/step/map/ShortestPathTest.java| 353 +++ pom.xml | 3 + 32 files changed, 1879 insertions(+), 34 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b003528c/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 3054085..1c28d03 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -25,6 +25,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima This release also includes changes from <>. +* Implemented `ShortestPathVertexProgram` and the `shortestPath()` step. * Bumped to Netty 4.1.25. * Bumped to Spark 2.3.1. * Moved `Parameterizing` interface to the `org.apache.tinkerpop.gremlin.process.traversal.step` package with other marker interfaces of its type. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b003528c/docs/src/reference/the-graphcomputer.asciidoc -- diff --git a/docs/src/reference/the-graphcomputer.asciidoc b/docs/src/reference/the-graphcomputer.asciidoc index 1d7586c..3d7ec00 100644 --- a/docs/src/reference/the-graphcomputer.asciidoc +++ b/docs/src/reference/the-graphcomputer.asciidoc @@ -403,6 +403,57 @@ g.V().peerPressure().by('cluster').valueMap() g.V().peerPressure().by(outE('knows')).by('cluster').valueMap() +[[shortestpathvertexprogram]] +=== ShortestPathVertexProgram + +The `ShortestPathVertexProram` provides an easy way to find shortest non-cyclic paths in the graph. It provides several options to configure +the output format, the start- and end-vertices, the direction, a custom distance function, as well as a distance limitation. By default it just +finds all undirected, shortest paths in the graph. + +[gremlin-groovy,modern] + +spvp = ShortestPathVertexProgram.build().create() <1> +result = graph.compute().program(spvp).submit().get() <2> +result.memory().get(ShortestPathVertexProgram.SHORTEST_PATHS) <3> + + +<1> Create a `ShortestPathVertexProgram` with its default configuration. +<2> Execute the `ShortestPathVertexProgram`. +<3> Get all shortest paths from the results memory. + +[gremlin-groovy,modern] + +spvp = ShortestPathVertexProgram.build().includeEdges(true).create() <1> +result = graph.compute().program(spvp).submit().get() <2> +result.memory().get(ShortestPathVertexProgram.SHORTEST_PATHS) <3>
[31/50] [abbrv] tinkerpop git commit: Merge branch 'tp32' into tp33
Merge branch 'tp32' into tp33 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/5eaf312c Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/5eaf312c Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/5eaf312c Branch: refs/heads/TINKERPOP-1990 Commit: 5eaf312c000d3145707513f20109956f5f97265a Parents: 1bd35dc fd64360 Author: Stephen Mallette Authored: Wed Jul 25 11:30:52 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 11:30:52 2018 -0400 -- .../gremlin-javascript/lib/structure/io/type-serializers.js | 2 +- .../javascript/gremlin-javascript/test/unit/graphson-test.js | 7 +-- 2 files changed, 6 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5eaf312c/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js --
[28/50] [abbrv] tinkerpop git commit: Merge branch 'tp32' into tp33
Merge branch 'tp32' into tp33 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/1bd35dcc Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/1bd35dcc Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/1bd35dcc Branch: refs/heads/TINKERPOP-1990 Commit: 1bd35dcc5383373ed07fb72fdba7da274f982497 Parents: 421839d db46c0f Author: Stephen Mallette Authored: Wed Jul 25 09:46:11 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 09:46:11 2018 -0400 -- CHANGELOG.asciidoc| 1 + .../lib/structure/io/graph-serializer.js | 2 ++ .../lib/structure/io/type-serializers.js | 18 ++ .../gremlin-javascript/test/unit/graphson-test.js | 8 4 files changed, 29 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1bd35dcc/CHANGELOG.asciidoc -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1bd35dcc/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/graph-serializer.js -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1bd35dcc/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js -- diff --cc gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js index 3b2b9e6,4bc2935..5044ee7 --- a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js +++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js @@@ -283,78 -293,9 +300,79 @@@ class TSerializer extends TypeSerialize } } +class ArraySerializer extends TypeSerializer { + constructor(typeKey) { +super(); +this.typeKey = typeKey; + } + + deserialize(obj) { +const value = obj[valueKey]; +if (!Array.isArray(value)) { + throw new Error('Expected Array, obtained: ' + value); +} +return value.map(x => this.reader.read(x)); + } + + /** @param {Array} item */ + serialize(item) { +return { + [typeKey]: this.typeKey, + [valueKey]: item.map(x => this.writer.adaptObject(x)) +}; + } + + canBeUsedFor(value) { +return Array.isArray(value); + } +} + +class MapSerializer extends TypeSerializer { + deserialize(obj) { +const value = obj[valueKey]; +if (!Array.isArray(value)) { + throw new Error('Expected Array, obtained: ' + value); +} +const result = new Map(); +for (let i = 0; i < value.length; i += 2) { + result.set(this.reader.read(value[i]), this.reader.read(value[i + 1])); +} +return result; + } + + /** @param {Map} map */ + serialize(map) { +const arr = []; +map.forEach((v, k) => { + arr.push(this.writer.adaptObject(k)); + arr.push(this.writer.adaptObject(v)); +}); +return { + [typeKey]: 'g:Map', + [valueKey]: arr +}; + } + + canBeUsedFor(value) { +return value instanceof Map; + } +} + +class ListSerializer extends ArraySerializer { + constructor() { +super('g:List'); + } +} + +class SetSerializer extends ArraySerializer { + constructor() { +super('g:Set'); + } +} + module.exports = { BytecodeSerializer, + DateSerializer, EdgeSerializer, EnumSerializer, LambdaSerializer,
[05/50] [abbrv] tinkerpop git commit: This closes #890
This closes #890 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/c21aa284 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/c21aa284 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/c21aa284 Branch: refs/heads/TINKERPOP-1990 Commit: c21aa284212b52fbc4e29b5d8ee081f405e4cbbc Parents: d6a1426 Author: Jorge Bay Gondra Authored: Fri Jul 20 11:23:40 2018 +0200 Committer: Jorge Bay Gondra Committed: Fri Jul 20 11:23:40 2018 +0200 -- --
[49/50] [abbrv] tinkerpop git commit: TINKERPOP-1990 Implemented `ShortestPathVertexProgram` and `ShortestPathVertexProgramStep`.
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b003528c/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessComputerSuite.java -- diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessComputerSuite.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessComputerSuite.java index b224c8b..57b05bd 100644 --- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessComputerSuite.java +++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessComputerSuite.java @@ -26,6 +26,7 @@ import org.apache.tinkerpop.gremlin.process.computer.bulkloading.BulkLoaderVerte import org.apache.tinkerpop.gremlin.process.computer.clone.CloneVertexProgramTest; import org.apache.tinkerpop.gremlin.process.computer.clustering.peerpressure.PeerPressureVertexProgramTest; import org.apache.tinkerpop.gremlin.process.computer.ranking.pagerank.PageRankVertexProgramTest; +import org.apache.tinkerpop.gremlin.process.computer.search.path.ShortestPathVertexProgramTest; import org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine; import org.apache.tinkerpop.gremlin.process.traversal.TraversalInterruptionComputerTest; import org.apache.tinkerpop.gremlin.process.traversal.step.ComplexTest; @@ -70,6 +71,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.map.ProfileTest; import org.apache.tinkerpop.gremlin.process.traversal.step.map.ProgramTest; import org.apache.tinkerpop.gremlin.process.traversal.step.map.ProjectTest; import org.apache.tinkerpop.gremlin.process.traversal.step.map.PropertiesTest; +import org.apache.tinkerpop.gremlin.process.traversal.step.map.ShortestPathTest; import org.apache.tinkerpop.gremlin.process.traversal.step.map.SelectTest; import org.apache.tinkerpop.gremlin.process.traversal.step.map.SumTest; import org.apache.tinkerpop.gremlin.process.traversal.step.map.UnfoldTest; @@ -163,6 +165,7 @@ public class ProcessComputerSuite extends AbstractGremlinSuite { ProjectTest.Traversals.class, ProgramTest.Traversals.class, PropertiesTest.Traversals.class, +ShortestPathTest.Traversals.class, SelectTest.Traversals.class, UnfoldTest.Traversals.class, ValueMapTest.Traversals.class, @@ -190,6 +193,7 @@ public class ProcessComputerSuite extends AbstractGremlinSuite { // algorithms PageRankVertexProgramTest.class, PeerPressureVertexProgramTest.class, +ShortestPathVertexProgramTest.class, BulkLoaderVertexProgramTest.class, BulkDumperVertexProgramTest.class, CloneVertexProgramTest.class, @@ -254,6 +258,7 @@ public class ProcessComputerSuite extends AbstractGremlinSuite { ProjectTest.class, ProgramTest.class, PropertiesTest.class, +ShortestPathTest.class, SelectTest.class, UnfoldTest.class, ValueMapTest.class, http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b003528c/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/search/path/ShortestPathTestHelper.java -- diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/search/path/ShortestPathTestHelper.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/search/path/ShortestPathTestHelper.java new file mode 100644 index 000..7f3aa63 --- /dev/null +++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/search/path/ShortestPathTestHelper.java @@ -0,0 +1,100 @@ +/* + * 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.search.path; + +import org.apache.tinkerpop.gremlin.process.AbstractGremlinProcessTest; +import org.apache.tinkerpop.gremlin.process.traversal.P; +import org.apache.tinkerpop.gremlin.process.traversal.Path; +import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource; +import
[08/50] [abbrv] tinkerpop git commit: Merge branch 'tp33'
Merge branch 'tp33' Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/2596bcf0 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/2596bcf0 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/2596bcf0 Branch: refs/heads/TINKERPOP-1990 Commit: 2596bcf02680b201ddf1c71b6f74ec2783435331 Parents: c21aa28 b757173 Author: Florian Hockmann Authored: Sun Jul 22 15:56:33 2018 +0200 Committer: Florian Hockmann Committed: Sun Jul 22 15:56:33 2018 +0200 -- gremlin-dotnet/glv/Gremlin.Net.csproj.template| 4 +--- gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2596bcf0/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj --
[11/50] [abbrv] tinkerpop git commit: Merge branch 'tp33'
Merge branch 'tp33' Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/acc7012a Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/acc7012a Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/acc7012a Branch: refs/heads/TINKERPOP-1990 Commit: acc7012a48acaac47fc94f38e260b2048b027b9f Parents: 2596bcf 05432a7 Author: Stephen Mallette Authored: Sun Jul 22 15:11:20 2018 -0400 Committer: Stephen Mallette Committed: Sun Jul 22 15:11:20 2018 -0400 -- docs/src/recipes/collections.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --
[44/50] [abbrv] tinkerpop git commit: Merge branch 'tp33'
Merge branch 'tp33' Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/13ff64c8 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/13ff64c8 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/13ff64c8 Branch: refs/heads/TINKERPOP-1990 Commit: 13ff64c8b1230cb886b28d294f31cce064f4b52d Parents: a17bb40 9b693c0 Author: Stephen Mallette Authored: Fri Jul 27 07:18:45 2018 -0400 Committer: Stephen Mallette Committed: Fri Jul 27 07:18:45 2018 -0400 -- docs/src/dev/developer/for-committers.asciidoc| 2 +- docs/src/recipes/between-vertices.asciidoc| 6 +++--- docs/src/recipes/collections.asciidoc | 18 +- docs/src/recipes/pagination.asciidoc | 2 +- .../recipes/traversal-component-reuse.asciidoc| 4 ++-- docs/src/recipes/tree.asciidoc| 2 +- docs/src/reference/the-traversal.asciidoc | 2 +- docs/src/tutorials/getting-started/index.asciidoc | 10 +- .../src/tutorials/gremlins-anatomy/index.asciidoc | 16 .../tutorials/the-gremlin-console/index.asciidoc | 2 +- docs/src/upgrade/release-3.3.x.asciidoc | 4 ++-- 11 files changed, 34 insertions(+), 34 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/13ff64c8/docs/src/reference/the-traversal.asciidoc -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/13ff64c8/docs/src/tutorials/getting-started/index.asciidoc -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/13ff64c8/docs/src/tutorials/the-gremlin-console/index.asciidoc --