[1/3] tinkerpop git commit: Removed caveat from docs about stargraph limitation
Repository: tinkerpop Updated Branches: refs/heads/master 849349afc -> 78d1a62b2 Removed caveat from docs about stargraph limitation Note that TINKERPOP-693 as "crazy" so no point referencing that anymore CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/1b59b9ef Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/1b59b9ef Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/1b59b9ef Branch: refs/heads/master Commit: 1b59b9efdcb5c820622c15d483bae54caf2ff62a Parents: 6feff18 Author: Stephen Mallette Authored: Tue May 29 16:14:21 2018 -0400 Committer: Stephen Mallette Committed: Tue May 29 16:14:21 2018 -0400 -- docs/src/reference/the-traversal.asciidoc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1b59b9ef/docs/src/reference/the-traversal.asciidoc -- diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc index e2e3be2..0e7fa26 100644 --- a/docs/src/reference/the-traversal.asciidoc +++ b/docs/src/reference/the-traversal.asciidoc @@ -2845,8 +2845,7 @@ g.V().as('a').out('knows').as('b'). WARNING: The anonymous traversal of `where()` processes the current object "locally". In OLAP, where the atomic unit of computing is the vertex and its local "star graph," it is important that the anonymous traversal does not leave the confines of the vertex's star graph. In other words, it can not traverse to an adjacent vertex's properties or -edges. Note that is only a temporary limitation that will be addressed in a future version of TinkerPop3 (see -link:https://issues.apache.org/jira/browse/TINKERPOP-693[TINKERPOP-693]). +edges. *Additional References*
[3/3] tinkerpop git commit: Merge branch 'tp33'
Merge branch 'tp33' Conflicts: docs/src/reference/the-traversal.asciidoc Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/78d1a62b Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/78d1a62b Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/78d1a62b Branch: refs/heads/master Commit: 78d1a62b2ab96eba657ebc018a926d9be641464c Parents: 849349a 0496922 Author: Stephen Mallette Authored: Tue May 29 16:16:08 2018 -0400 Committer: Stephen Mallette Committed: Tue May 29 16:16:08 2018 -0400 -- docs/src/reference/the-traversal.asciidoc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/78d1a62b/docs/src/reference/the-traversal.asciidoc -- diff --cc docs/src/reference/the-traversal.asciidoc index d61da37,60357fe..e28090a --- a/docs/src/reference/the-traversal.asciidoc +++ b/docs/src/reference/the-traversal.asciidoc @@@ -2961,8 -2959,7 +2961,7 @@@ g.V().as('a').out('knows').as('b') WARNING: The anonymous traversal of `where()` processes the current object "locally". In OLAP, where the atomic unit of computing is the vertex and its local "star graph," it is important that the anonymous traversal does not leave the confines of the vertex's star graph. In other words, it can not traverse to an adjacent vertex's properties or - edges. Note that is only a temporary limitation that will be addressed in a future version of TinkerPop (see - link:https://issues.apache.org/jira/browse/TINKERPOP-693[TINKERPOP-693]). -edges. ++edges. *Additional References*
tinkerpop git commit: Removed caveat from docs about stargraph limitation
Repository: tinkerpop Updated Branches: refs/heads/tp32 6feff1869 -> 1b59b9efd Removed caveat from docs about stargraph limitation Note that TINKERPOP-693 as "crazy" so no point referencing that anymore CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/1b59b9ef Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/1b59b9ef Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/1b59b9ef Branch: refs/heads/tp32 Commit: 1b59b9efdcb5c820622c15d483bae54caf2ff62a Parents: 6feff18 Author: Stephen Mallette Authored: Tue May 29 16:14:21 2018 -0400 Committer: Stephen Mallette Committed: Tue May 29 16:14:21 2018 -0400 -- docs/src/reference/the-traversal.asciidoc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1b59b9ef/docs/src/reference/the-traversal.asciidoc -- diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc index e2e3be2..0e7fa26 100644 --- a/docs/src/reference/the-traversal.asciidoc +++ b/docs/src/reference/the-traversal.asciidoc @@ -2845,8 +2845,7 @@ g.V().as('a').out('knows').as('b'). WARNING: The anonymous traversal of `where()` processes the current object "locally". In OLAP, where the atomic unit of computing is the vertex and its local "star graph," it is important that the anonymous traversal does not leave the confines of the vertex's star graph. In other words, it can not traverse to an adjacent vertex's properties or -edges. Note that is only a temporary limitation that will be addressed in a future version of TinkerPop3 (see -link:https://issues.apache.org/jira/browse/TINKERPOP-693[TINKERPOP-693]). +edges. *Additional References*
[1/2] tinkerpop git commit: Removed caveat from docs about stargraph limitation
Repository: tinkerpop Updated Branches: refs/heads/tp33 2862ff989 -> 04969222b Removed caveat from docs about stargraph limitation Note that TINKERPOP-693 as "crazy" so no point referencing that anymore CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/1b59b9ef Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/1b59b9ef Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/1b59b9ef Branch: refs/heads/tp33 Commit: 1b59b9efdcb5c820622c15d483bae54caf2ff62a Parents: 6feff18 Author: Stephen Mallette Authored: Tue May 29 16:14:21 2018 -0400 Committer: Stephen Mallette Committed: Tue May 29 16:14:21 2018 -0400 -- docs/src/reference/the-traversal.asciidoc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1b59b9ef/docs/src/reference/the-traversal.asciidoc -- diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc index e2e3be2..0e7fa26 100644 --- a/docs/src/reference/the-traversal.asciidoc +++ b/docs/src/reference/the-traversal.asciidoc @@ -2845,8 +2845,7 @@ g.V().as('a').out('knows').as('b'). WARNING: The anonymous traversal of `where()` processes the current object "locally". In OLAP, where the atomic unit of computing is the vertex and its local "star graph," it is important that the anonymous traversal does not leave the confines of the vertex's star graph. In other words, it can not traverse to an adjacent vertex's properties or -edges. Note that is only a temporary limitation that will be addressed in a future version of TinkerPop3 (see -link:https://issues.apache.org/jira/browse/TINKERPOP-693[TINKERPOP-693]). +edges. *Additional References*
[2/3] tinkerpop git commit: Merge branch 'tp32' into tp33
Merge branch 'tp32' into tp33 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/04969222 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/04969222 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/04969222 Branch: refs/heads/master Commit: 04969222bf44ce5131d71fb8e53538af36747487 Parents: 2862ff9 1b59b9e Author: Stephen Mallette Authored: Tue May 29 16:15:13 2018 -0400 Committer: Stephen Mallette Committed: Tue May 29 16:15:13 2018 -0400 -- docs/src/reference/the-traversal.asciidoc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/04969222/docs/src/reference/the-traversal.asciidoc --
[2/2] tinkerpop git commit: Merge branch 'tp32' into tp33
Merge branch 'tp32' into tp33 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/04969222 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/04969222 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/04969222 Branch: refs/heads/tp33 Commit: 04969222bf44ce5131d71fb8e53538af36747487 Parents: 2862ff9 1b59b9e Author: Stephen Mallette Authored: Tue May 29 16:15:13 2018 -0400 Committer: Stephen Mallette Committed: Tue May 29 16:15:13 2018 -0400 -- docs/src/reference/the-traversal.asciidoc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/04969222/docs/src/reference/the-traversal.asciidoc --
tinkerpop git commit: Moved references to TinkerPop 2.x to upgrade docs
Repository: tinkerpop Updated Branches: refs/heads/master dbf3a0e9d -> 849349afc Moved references to TinkerPop 2.x to upgrade docs By now we're pretty much just "TinkerPop" - anything else is just sorta confusing. CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/849349af Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/849349af Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/849349af Branch: refs/heads/master Commit: 849349afc901ef543e36726b276645cb74cb20d1 Parents: dbf3a0e Author: Stephen Mallette Authored: Tue May 29 16:13:01 2018 -0400 Committer: Stephen Mallette Committed: Tue May 29 16:13:01 2018 -0400 -- docs/src/dev/future/index.asciidoc | 4 +- docs/src/dev/provider/index.asciidoc| 24 ++-- .../src/reference/gremlin-applications.asciidoc | 8 +- .../implementations-hadoop-start.asciidoc | 8 +- .../reference/implementations-neo4j.asciidoc| 4 +- .../implementations-tinkergraph.asciidoc| 6 +- docs/src/reference/intro.asciidoc | 38 +++ docs/src/reference/preface.asciidoc | 10 +- docs/src/reference/the-graph.asciidoc | 90 ++- docs/src/reference/the-graphcomputer.asciidoc | 17 +-- docs/src/reference/the-traversal.asciidoc | 22 ++-- .../the-gremlin-console/index.asciidoc | 4 +- docs/src/upgrade/appendix.asciidoc | 113 +++ docs/src/upgrade/index.asciidoc | 2 + .../Process/Traversal/GraphTraversal.cs | 9 ++ .../lib/process/graph-traversal.js | 10 ++ .../gremlin_python/process/graph_traversal.py | 4 + 17 files changed, 216 insertions(+), 157 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/849349af/docs/src/dev/future/index.asciidoc -- diff --git a/docs/src/dev/future/index.asciidoc b/docs/src/dev/future/index.asciidoc index 5cf..6e41cf9 100644 --- a/docs/src/dev/future/index.asciidoc +++ b/docs/src/dev/future/index.asciidoc @@ -40,8 +40,8 @@ image:tp4-think.png[] == The Main Features -TinkerPop4 should focus on the most successful aspects of TinkerPop3 and it should avoid the traps realized in TinkerPop3. -These items include: +TinkerPop 4.x should focus on the most successful aspects of TinkerPop 3.x and it should avoid the traps realized in +TinkerPop 3.x. These items include: * The concept of Gremlin as both a virtual machine and language. ** A standard bytecode specification should be provided. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/849349af/docs/src/dev/provider/index.asciidoc -- diff --git a/docs/src/dev/provider/index.asciidoc b/docs/src/dev/provider/index.asciidoc index 467b3f3..f6a964b 100644 --- a/docs/src/dev/provider/index.asciidoc +++ b/docs/src/dev/provider/index.asciidoc @@ -39,17 +39,17 @@ This document attempts to address the needs of the different providers that have [[graph-system-provider-requirements]] == Graph System Provider Requirements -image:tinkerpop-enabled.png[width=140,float=left] At the core of TinkerPop3 is a Java8 API. The implementation of this +image:tinkerpop-enabled.png[width=140,float=left] At the core of TinkerPop 3.x is a Java8 API. The implementation of this core API and its validation via the `gremlin-test` suite is all that is required of a graph system provider wishing to -provide a TinkerPop3-enabled graph engine. Once a graph system has a valid implementation, then all the applications +provide a TinkerPop-enabled graph engine. Once a graph system has a valid implementation, then all the applications provided by TinkerPop (e.g. Gremlin Console, Gremlin Server, etc.) and 3rd-party developers (e.g. Gremlin-Scala, Gremlin-JS, etc.) will integrate properly. Finally, please feel free to use the logo on the left to promote your -TinkerPop3 implementation. +TinkerPop implementation. [[graph-structure-api]] === Graph Structure API -The graph structure API of TinkerPop3 provides the interfaces necessary to create a TinkerPop enabled system and +The graph structure API of TinkerPop provides the interfaces necessary to create a TinkerPop enabled system and exposes the basic components of a property graph to include `Graph`, `Vertex`, `Edge`, `VertexProperty` and `Property`. The structure API can be used directly as follows: @@ -77,11 +77,7 @@ In the above code all the vertices are created first and then their respective e `Graph.addVertex(Object...)` or `Vertex.addEdge(String,Vertex,Object...)`, the respective element is created along with the provided key/value pair properties appended
[19/19] tinkerpop git commit: TINKERPOP-1968 Make Pop tests more GLV friendly
TINKERPOP-1968 Make Pop tests more GLV friendly The java/groovy tests were nicer before, but they don't translate to GLV tests well. Had to change them to get them off the ignore list. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/8967876e Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/8967876e Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/8967876e Branch: refs/heads/TINKERPOP-1968 Commit: 8967876eaebceb35233a8180b7c7e9791876d67e Parents: 079549d Author: Stephen Mallette Authored: Sat May 19 07:16:09 2018 -0400 Committer: Stephen Mallette Committed: Tue May 29 13:59:56 2018 -0400 -- .../traversal/step/map/GroovySelectTest.groovy | 80 +- gremlin-test/features/map/Select.feature| 135 ++ .../process/traversal/step/map/SelectTest.java | 245 --- .../gremlin/process/FeatureCoverageTest.java| 5 - 4 files changed, 409 insertions(+), 56 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8967876e/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovySelectTest.groovy -- diff --git a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovySelectTest.groovy b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovySelectTest.groovy index 104322d..6f5b73b 100644 --- a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovySelectTest.groovy +++ b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovySelectTest.groovy @@ -177,27 +177,83 @@ public abstract class GroovySelectTest { // TINKERPOP-619: select should not throw @Override -public Traversal get_g_V_selectXaX(final Pop pop) { -final String root = "g.V." -new ScriptTraversal<>(g, "gremlin-groovy", root + (null == pop ? "select('a')" : "select(${pop}, 'a')")) +public Traversal get_g_V_selectXaX() { +new ScriptTraversal<>(g, "gremlin-groovy", "g.V.select('a')") } @Override -public Traversal> get_g_V_selectXa_bX(final Pop pop) { -final String root = "g.V." -new ScriptTraversal<>(g, "gremlin-groovy", root + (null == pop ? "select('a', 'b')" : "select(${pop}, 'a', 'b')")) +public Traversal> get_g_V_selectXa_bX() { +new ScriptTraversal<>(g, "gremlin-groovy", "g.V.select('a', 'b')") } @Override -public Traversal get_g_V_valueMap_selectXpop_aX(final Pop pop) { -final String root = "g.V.valueMap." -new ScriptTraversal<>(g, "gremlin-groovy", root + (null == pop ? "select('a')" : "select(${pop}, 'a')")) +public Traversal get_g_V_valueMap_selectXaX() { +new ScriptTraversal<>(g, "gremlin-groovy", "g.V.valueMap().select('a')") } @Override -public Traversal> get_g_V_valueMap_selectXpop_a_bX(final Pop pop) { -final String root = "g.V.valueMap." -new ScriptTraversal<>(g, "gremlin-groovy", root + (null == pop ? "select('a', 'b')" : "select(${pop}, 'a', 'b')")) +public Traversal> get_g_V_valueMap_selectXa_bX() { +new ScriptTraversal<>(g, "gremlin-groovy", "g.V.valueMap().select('a', 'b')") +} + +@Override +public Traversal get_g_V_selectXfirst_aX() { +new ScriptTraversal<>(g, "gremlin-groovy", "g.V.select(Pop.first, 'a')") +} + +@Override +public Traversal> get_g_V_selectXfirst_a_bX() { +new ScriptTraversal<>(g, "gremlin-groovy", "g.V.select(Pop.first, 'a', 'b')") +} + +@Override +public Traversal get_g_V_valueMap_selectXfirst_aX() { +new ScriptTraversal<>(g, "gremlin-groovy", "g.V.valueMap().select(Pop.first, 'a')") +} + +@Override +public Traversal> get_g_V_valueMap_selectXfirst_a_bX() { +new ScriptTraversal<>(g, "gremlin-groovy", "g.V.valueMap().select(Pop.first, 'a', 'b')") +} + +@Override +public Traversal get_g_V_selectXlast_aX() { +new ScriptTraversal<>(g, "gremlin-groovy", "g.V.select(Pop.last, 'a')") +} + +@Override +public Traversal> get_g_V_selectXlast_a_bX() { +new ScriptTraversal<>(g, "gremlin-groovy", "g.V.select(Pop.last, 'a', 'b')") +} + +@Override +public Traversal get_g_V_valueMap_selectXlast_aX() { +new ScriptTraversal<>(g, "gremlin-groovy", "g.V.valueMap().select(Pop.last, 'a')") +} + +@Override +
[12/19] tinkerpop git commit: TINKERPOP-1968 Open up a formerly ignored test
TINKERPOP-1968 Open up a formerly ignored test Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/be79e497 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/be79e497 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/be79e497 Branch: refs/heads/TINKERPOP-1968 Commit: be79e49785a0d0c12951baa8f6ed6ae37e2aef6a Parents: b9c634a Author: Stephen Mallette Authored: Mon May 21 08:32:03 2018 -0400 Committer: Stephen Mallette Committed: Tue May 29 13:59:56 2018 -0400 -- gremlin-test/features/map/Vertex.feature | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/be79e497/gremlin-test/features/map/Vertex.feature -- diff --git a/gremlin-test/features/map/Vertex.feature b/gremlin-test/features/map/Vertex.feature index 8642693..3f2a63b 100644 --- a/gremlin-test/features/map/Vertex.feature +++ b/gremlin-test/features/map/Vertex.feature @@ -449,12 +449,25 @@ Feature: Step - V(), E(), out(), in(), both(), inE(), outE(), bothE() | v[vadas] | | v[josh] | + # this test deviates from the setup of the java test, but the intent is the same. the java test drops lop and then + # tries to query it as part of the group of ids. here, rather than drop, we simply use an id that doesn't exist + # which is simulated by an edge identifier. Scenario: g_VX1_2_3_4X_name -Given an unsupported test -Then nothing should happen because +Given the modern graph +And using the parameter v1Id defined as "v[marko].id" +And using the parameter v2Id defined as "v[vadas].id" +And using the parameter v3Id defined as "e[marko-knows->josh].id" +And using the parameter v4Id defined as "v[josh].id" +And the traversal of """ - the test manipulates a static dataset which is not supported by the language of the feature files" + g.V(v1Id, v2Id, v3Id, v4Id).values("name") """ +When iterated to list +Then the result should be unordered + | result | + | marko | + | vadas | + | josh | Scenario: g_V_hasLabelXpersonX_V_hasLabelXsoftwareX_name Given the modern graph
[16/19] tinkerpop git commit: TINKERPOP-1968 Stop ignoring test that passes for python GLV
TINKERPOP-1968 Stop ignoring test that passes for python GLV Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/61832c21 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/61832c21 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/61832c21 Branch: refs/heads/TINKERPOP-1968 Commit: 61832c2189e9f806fea417e4b3ba9c222622b5c5 Parents: 8967876 Author: Stephen Mallette Authored: Sat May 19 07:57:07 2018 -0400 Committer: Stephen Mallette Committed: Tue May 29 13:59:56 2018 -0400 -- gremlin-python/src/main/jython/radish/feature_steps.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/61832c21/gremlin-python/src/main/jython/radish/feature_steps.py -- diff --git a/gremlin-python/src/main/jython/radish/feature_steps.py b/gremlin-python/src/main/jython/radish/feature_steps.py index 80137b0..fab35fd 100644 --- a/gremlin-python/src/main/jython/radish/feature_steps.py +++ b/gremlin-python/src/main/jython/radish/feature_steps.py @@ -43,9 +43,7 @@ inV = __.inV project = __.project tail = __.tail -ignores = [ -"g.V(v1Id).out().inject(v2).values(\"name\")", # bug in attachment won't connect v2 - ] +ignores = [] @given("the {graph_name:w} graph")
[13/19] tinkerpop git commit: TINKERPOP-1968 Javascript doesn't handle embedded list assertions.
TINKERPOP-1968 Javascript doesn't handle embedded list assertions. Had to ignore this test for now. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/6718c087 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/6718c087 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/6718c087 Branch: refs/heads/TINKERPOP-1968 Commit: 6718c087caa7ca33191ab7319ccbc14694abb56a Parents: be79e49 Author: Stephen Mallette Authored: Mon May 21 08:56:15 2018 -0400 Committer: Stephen Mallette Committed: Tue May 29 13:59:56 2018 -0400 -- .../javascript/gremlin-javascript/test/cucumber/feature-steps.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6718c087/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 c4eaebc..53f457d 100644 --- a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js +++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js @@ -55,12 +55,13 @@ 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_branchXlabel_eq_person': new IgnoreError(ignoreReason.lambdaNotSupported), + 'g_V_asXa_bX_out_asXcX_path_selectXkeysX': new IgnoreError(ignoreReason.embeddedListAssertion), }; defineSupportCode(function(methods) {
[17/19] tinkerpop git commit: TINKERPOP-1968 Removed embedded list test from ignored validation
TINKERPOP-1968 Removed embedded list test from ignored validation Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/15285765 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/15285765 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/15285765 Branch: refs/heads/TINKERPOP-1968 Commit: 15285765680081a6dc081f311fce1c96c917652d Parents: b830d16 Author: Stephen Mallette Authored: Mon May 21 07:07:20 2018 -0400 Committer: Stephen Mallette Committed: Tue May 29 13:59:56 2018 -0400 -- .../org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java | 2 -- 1 file changed, 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/15285765/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java -- diff --git a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java b/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java index ceef0d6..181cd17 100644 --- a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java +++ b/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java @@ -105,8 +105,6 @@ public class FeatureCoverageTest { // GLV suite doesn't support property identifiers and related assertions "g_V_hasXageX_properties_hasXid_nameIdX_value", "g_V_hasXageX_properties_hasXid_nameIdAsStringX_value", -// assertion doesn't seem to want to work right for embedded lists -"g_V_asXa_bX_out_asXcX_path_selectXkeysX", // ugh - BigInteger? "g_withSackXBigInteger_TEN_powX1000X_assignX_V_localXoutXknowsX_barrierXnormSackXX_inXknowsX_barrier_sack", // ugh - clone
[18/19] tinkerpop git commit: TINKERPOP-1968 Changelog updates
TINKERPOP-1968 Changelog updates Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/8f11d783 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/8f11d783 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/8f11d783 Branch: refs/heads/TINKERPOP-1968 Commit: 8f11d7830fd95c5f70247df721a9dd98f2494e42 Parents: 6718c08 Author: Stephen Mallette Authored: Tue May 22 06:17:22 2018 -0400 Committer: Stephen Mallette Committed: Tue May 29 13:59:56 2018 -0400 -- CHANGELOG.asciidoc | 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8f11d783/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index fbcfbc3..09db776 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -26,6 +26,8 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima * Removed recursive handling of streaming results from Gremlin-Python driver to avoid max recursion depth errors. * Improved performance of `TraversalVertexProgram` and related infrastructure. * 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. +* Refactored the Gremlin Server integration testing framework and streamlined that infrastructure. * Fixed bug in `GroovyTranslator` that didn't properly handle empty `Map` objects. * Added concrete configuration methods to `SparkGraphComputer` to make a more clear API for configuring it. * Fixed a bug in `TinkerGraphCountStrategy`, which didn't consider that certain map steps may not emit an element.
[15/19] tinkerpop git commit: TINKERPOP-1968 PageRank tests aren't currently part of the required tests
TINKERPOP-1968 PageRank tests aren't currently part of the required tests Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/b830d16a Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/b830d16a Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/b830d16a Branch: refs/heads/TINKERPOP-1968 Commit: b830d16ab03db346bf60f83688086d459431b32f Parents: b572df8 Author: Stephen Mallette Authored: Mon May 21 07:06:35 2018 -0400 Committer: Stephen Mallette Committed: Tue May 29 13:59:56 2018 -0400 -- .../org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b830d16a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java -- diff --git a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java b/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java index 5c2d8ed..ceef0d6 100644 --- a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java +++ b/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java @@ -157,7 +157,7 @@ public class FeatureCoverageTest { MeanTest.class, MinTest.class, OrderTest.class, -PageRankTest.class, +//PageRankTest.class, PathTest.class, // PeerPressureTest.class, // ProfileTest.class,
[05/19] tinkerpop git commit: Removed references to Structure API from "user docs"
Removed references to Structure API from "user docs" Restricted such references to Provider documentation CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/6feff186 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/6feff186 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/6feff186 Branch: refs/heads/TINKERPOP-1968 Commit: 6feff186984c6b1d71ba9dc6c9ace5e59e2d09e4 Parents: 9830a3f Author: Stephen Mallette Authored: Tue May 29 12:50:59 2018 -0400 Committer: Stephen Mallette Committed: Tue May 29 12:50:59 2018 -0400 -- docs/src/dev/provider/index.asciidoc| 80 ++ .../src/reference/gremlin-applications.asciidoc | 5 +- .../reference/implementations-neo4j.asciidoc| 10 +- docs/src/reference/intro.asciidoc | 148 ++- docs/src/reference/the-graph.asciidoc | 40 ++--- .../tutorials/getting-started/index.asciidoc| 27 ++-- 6 files changed, 140 insertions(+), 170 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6feff186/docs/src/dev/provider/index.asciidoc -- diff --git a/docs/src/dev/provider/index.asciidoc b/docs/src/dev/provider/index.asciidoc index 5bc4d9e..dddcb18 100644 --- a/docs/src/dev/provider/index.asciidoc +++ b/docs/src/dev/provider/index.asciidoc @@ -46,6 +46,86 @@ provided by TinkerPop (e.g. Gremlin Console, Gremlin Server, etc.) and 3rd-party Gremlin-JS, etc.) will integrate properly. Finally, please feel free to use the logo on the left to promote your TinkerPop3 implementation. +[[graph-structure-api]] +=== Graph Structure API + +The graph structure API of TinkerPop3 provides the interfaces necessary to create a TinkerPop enabled system and +exposes the basic components of a property graph to include `Graph`, `Vertex`, `Edge`, `VertexProperty` and `Property`. +The structure API can be used directly as follows: + +[source,java] +Graph graph = TinkerGraph.open(); <1> +Vertex marko = graph.addVertex(T.label, "person", T.id, 1, "name", "marko", "age", 29); <2> +Vertex vadas = graph.addVertex(T.label, "person", T.id, 2, "name", "vadas", "age", 27); +Vertex lop = graph.addVertex(T.label, "software", T.id, 3, "name", "lop", "lang", "java"); +Vertex josh = graph.addVertex(T.label, "person", T.id, 4, "name", "josh", "age", 32); +Vertex ripple = graph.addVertex(T.label, "software", T.id, 5, "name", "ripple", "lang", "java"); +Vertex peter = graph.addVertex(T.label, "person", T.id, 6, "name", "peter", "age", 35); +marko.addEdge("knows", vadas, T.id, 7, "weight", 0.5f); <3> +marko.addEdge("knows", josh, T.id, 8, "weight", 1.0f); +marko.addEdge("created", lop, T.id, 9, "weight", 0.4f); +josh.addEdge("created", ripple, T.id, 10, "weight", 1.0f); +josh.addEdge("created", lop, T.id, 11, "weight", 0.4f); +peter.addEdge("created", lop, T.id, 12, "weight", 0.2f); + +<1> Create a new in-memory `TinkerGraph` and assign it to the variable `graph`. +<2> Create a vertex along with a set of key/value pairs with `T.label` being the vertex label and `T.id` being the vertex id. +<3> Create an edge along with a set of key/value pairs with the edge label being specified as the first argument. + +In the above code all the vertices are created first and then their respective edges. There are two "accessor tokens": +`T.id` and `T.label`. When any of these, along with a set of other key value pairs is provided to +`Graph.addVertex(Object...)` or `Vertex.addEdge(String,Vertex,Object...)`, the respective element is created along +with the provided key/value pair properties appended to it. + +Below is a sequence of basic graph mutation operations represented in Java 8. One of the major differences between +TinkerPop2 and TinkerPop3 is that in TinkerPop3, the Java convention of using setters and getters has been abandoned +in favor of a syntax that is more aligned with the syntax of Gremlin-Groovy in TinkerPop2. Given that Gremlin-Java8 +and Gremlin-Groovy are nearly identical due to the inclusion of Java 8 lambdas, a big effort was made to ensure that +both languages are as similar as possible. + +image:basic-mutation.png[width=240,float=right] +[source,java] + +// create a new graph +Graph graph = TinkerGraph.open(); +// add a software vertex with a name property +Vertex gremlin = graph.addVertex(T.label, "software", + "name", "gremlin"); <1> +// only one vertex should exist +assert(IteratorUtils.count(graph.vertices()) == 1) +// no edges should exist as none have been created +assert(IteratorUtils.count(graph.edges()) == 0) +// add a new property +gremlin.property("created",2009) <2> +// add a new software vertex to the graph +Vertex blueprints = graph.addVertex(T.label,
[07/19] tinkerpop git commit: TINKERPOP-1968 Minor change to loading Grateful from TinkerFactory
TINKERPOP-1968 Minor change to loading Grateful from TinkerFactory Decided to load it from a resources in tinkergraph-gremlin. Seemed to better than relying on the local file system. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/079549d8 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/079549d8 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/079549d8 Branch: refs/heads/TINKERPOP-1968 Commit: 079549d8eb31333a3da6d06a2035a978d7980518 Parents: 9adfc59 Author: Stephen Mallette Authored: Fri May 18 18:39:39 2018 -0400 Committer: Stephen Mallette Committed: Tue May 29 13:55:42 2018 -0400 -- .../the-gremlin-console/index.asciidoc | 5 ++- .../upgrade/release-3.2.x-incubating.asciidoc | 8 + tinkergraph-gremlin/pom.xml | 19 +++ .../tinkergraph/structure/TinkerFactory.java| 32 --- .../tinkergraph/structure/grateful-dead.kryo| Bin 0 -> 332226 bytes 5 files changed, 36 insertions(+), 28 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/079549d8/docs/src/tutorials/the-gremlin-console/index.asciidoc -- diff --git a/docs/src/tutorials/the-gremlin-console/index.asciidoc b/docs/src/tutorials/the-gremlin-console/index.asciidoc index da8bac3..cc090d9 100644 --- a/docs/src/tutorials/the-gremlin-console/index.asciidoc +++ b/docs/src/tutorials/the-gremlin-console/index.asciidoc @@ -117,9 +117,8 @@ However, if you find that a larger graph might be helpful, there is another opti [gremlin-groovy] -graph = TinkerGraph.open() -graph.io(gryo()).readGraph('data/grateful-dead.kryo') -graph +graph = TinkerFactory.createGratefulDead() +g = graph.traversal() The Grateful Dead graph ships with the Gremlin Console and the data can be found in several formats (along with the http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/079549d8/docs/src/upgrade/release-3.2.x-incubating.asciidoc -- diff --git a/docs/src/upgrade/release-3.2.x-incubating.asciidoc b/docs/src/upgrade/release-3.2.x-incubating.asciidoc index 112ce22..ccdf51a 100644 --- a/docs/src/upgrade/release-3.2.x-incubating.asciidoc +++ b/docs/src/upgrade/release-3.2.x-incubating.asciidoc @@ -27,6 +27,14 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima Please see the link:https://github.com/apache/tinkerpop/blob/3.2.10/CHANGELOG.asciidoc#release-3-2-10[changelog] for a complete list of all the modifications that are part of this release. +=== Upgrading for Users + + TinkerFactory.createGratefulDead() + +The Grateful Dead dataset has been with TinkerPop since the early days of 1.x. It has always been available as a +packaged dataset that needed to be loaded through the various IO options available, while other toy graphs had the +benefit of `TinkerFactory` to help get them bootstrapped. For 3.2.10, Grateful Dead is now more conveniently loaded +via that same method as the other toy graphs with `TinkerFactory.createGratefulDead()`. == TinkerPop 3.2.9 http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/079549d8/tinkergraph-gremlin/pom.xml -- diff --git a/tinkergraph-gremlin/pom.xml b/tinkergraph-gremlin/pom.xml index 1ff0aa0..1432ac5 100644 --- a/tinkergraph-gremlin/pom.xml +++ b/tinkergraph-gremlin/pom.xml @@ -127,6 +127,25 @@ limitations under the License. + copy-gratefuldead-to-tinkergraph-resources +prepare-package + +copy-resources + + + src/main/resources/org/apache/tinkerpop/gremlin/tinkergraph/structure + + + ${io.tmp.dir} +false + + grateful-dead.kryo + + + + + + copy-gio-from-tmp-to-resources prepare-package
[09/19] tinkerpop git commit: TINKERPOP-1968 Simplified gremlin server test configuration
TINKERPOP-1968 Simplified gremlin server test configuration There was a fair bit of duplicated configuration for Gremlin Server testing - streamlined that to a single gremlin-server-integration.yaml file and script initializer. Tests had to become more specific as to the graphs that they were executing against as a result. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/0e38b898 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/0e38b898 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/0e38b898 Branch: refs/heads/TINKERPOP-1968 Commit: 0e38b8989574ac06f510c5ee45183e1efb7d26f2 Parents: 9064c5c Author: Stephen Mallette Authored: Fri May 18 14:38:04 2018 -0400 Committer: Stephen Mallette Committed: Tue May 29 13:55:42 2018 -0400 -- gremlin-dotnet/test/pom.xml | 2 +- gremlin-javascript/pom.xml | 2 +- .../test/integration/remote-connection-tests.js | 2 +- .../test/integration/traversal-test.js | 2 +- gremlin-python/pom.xml | 2 +- .../src/main/jython/tests/conftest.py | 6 +- .../src/main/jython/tests/driver/test_client.py | 14 ++--- .../driver/test_driver_remote_connection.py | 4 +- .../test_driver_remote_connection_threaded.py | 4 +- gremlin-server/scripts/generate-all.groovy | 63 gremlin-server/src/assembly/standalone.xml | 3 - .../driver/remote/RemoteGraphProvider.java | 2 +- .../server/GremlinResultSetIntegrateTest.java | 34 +-- .../server/GremlinServerHttpIntegrateTest.java | 18 ++ .../gremlin/server/ServerTestHelper.java| 7 ++- .../server/util/DefaultGraphManagerTest.java| 32 +++--- .../remote/gremlin-server-integration.yaml | 56 - .../server/gremlin-server-integration.yaml | 11 +++- .../src/test/scripts/generate-all.groovy| 31 +- .../src/test/scripts/neo4j-empty.properties | 33 ++ 20 files changed, 139 insertions(+), 189 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0e38b898/gremlin-dotnet/test/pom.xml -- diff --git a/gremlin-dotnet/test/pom.xml b/gremlin-dotnet/test/pom.xml index db1f8ad..f8d3118 100644 --- a/gremlin-dotnet/test/pom.xml +++ b/gremlin-dotnet/test/pom.xml @@ -143,7 +143,7 @@ limitations under the License. settingsFile - ${gremlin.server.dir}/src/test/resources/org/apache/tinkerpop/gremlin/driver/remote/gremlin-server-integration.yaml + ${gremlin.server.dir}/src/test/resources/org/apache/tinkerpop/gremlin/server/gremlin-server-integration.yaml executionName http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0e38b898/gremlin-javascript/pom.xml -- diff --git a/gremlin-javascript/pom.xml b/gremlin-javascript/pom.xml index a820f3b..b01b2b9 100644 --- a/gremlin-javascript/pom.xml +++ b/gremlin-javascript/pom.xml @@ -114,7 +114,7 @@ limitations under the License. settingsFile - ${gremlin.server.dir}/src/test/resources/org/apache/tinkerpop/gremlin/driver/remote/gremlin-server-integration.yaml + ${gremlin.server.dir}/src/test/resources/org/apache/tinkerpop/gremlin/server/gremlin-server-integration.yaml executionName http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0e38b898/gremlin-javascript/src/main/javascript/gremlin-javascript/test/integration/remote-connection-tests.js -- diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/integration/remote-connection-tests.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/integration/remote-connection-tests.js index 9e115be..afc0e58 100644 --- a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/integration/remote-connection-tests.js +++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/integration/remote-connection-tests.js @@ -31,7 +31,7 @@ let connection; describe('DriverRemoteConnection', function () { before(function () { -connection =
[10/19] tinkerpop git commit: TINKERPOP-1968 Configured all the match() tests for GLV
TINKERPOP-1968 Configured all the match() tests for GLV These were ignored because grateful dead wasn't an available graph, but it's been available for a while now so i'm not sure why those weren't setup. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/9adfc590 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/9adfc590 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/9adfc590 Branch: refs/heads/TINKERPOP-1968 Commit: 9adfc5902d96d71b9520ebc229b1afe607576f05 Parents: 970c8aa Author: Stephen Mallette Authored: Fri May 18 16:17:11 2018 -0400 Committer: Stephen Mallette Committed: Tue May 29 13:55:42 2018 -0400 -- .../ModernGraphTypeInformation.cs | 3 +- gremlin-test/features/map/Match.feature | 134 ++ gremlin-test/features/map/Order.feature | 173 +++ gremlin-test/features/map/Properties.feature| 14 ++ .../gremlin/process/FeatureCoverageTest.java| 16 -- 5 files changed, 323 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9adfc590/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/ModernGraphTypeInformation.cs -- diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/ModernGraphTypeInformation.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/ModernGraphTypeInformation.cs index 327a50a..7489b44 100644 --- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/ModernGraphTypeInformation.cs +++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/ModernGraphTypeInformation.cs @@ -39,7 +39,8 @@ namespace Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation {"lang", typeof(string)}, {"weight", typeof(float)}, {"foo", typeof(object)}, // used when for invalid property key lookups -{"friendWeight", typeof(float)} // used in an AddVertex.feature test +{"friendWeight", typeof(float)}, // used in an AddVertex.feature test +{"performances", typeof(int)} // grateful dead graph }; /// http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9adfc590/gremlin-test/features/map/Match.feature -- diff --git a/gremlin-test/features/map/Match.feature b/gremlin-test/features/map/Match.feature index 55dffcf..73afd71 100644 --- a/gremlin-test/features/map/Match.feature +++ b/gremlin-test/features/map/Match.feature @@ -393,3 +393,137 @@ Feature: Step - match() | d[0].l | | d[0].l | + Scenario: g_V_matchXa_0sungBy_b__a_0writtenBy_c__b_writtenBy_d__c_sungBy_d__d_hasXname_GarciaXX +Given the grateful graph +And the traversal of + """ + g.V().match(__.as("a").in("sungBy").as("b"), + __.as("a").in("writtenBy").as("c"), + __.as("b").out("writtenBy").as("d"), + __.as("c").out("sungBy").as("d"), + __.as("d").has("name", "Garcia")) + """ +When iterated to list +Then the result should be unordered + | result | + | m[{"a":"v[Garcia]","b":"v[CREAM PUFF WAR]","c":"v[CREAM PUFF WAR]","d":"v[Garcia]"}] | + | m[{"a":"v[Garcia]","b":"v[CREAM PUFF WAR]","c":"v[CRYPTICAL ENVELOPMENT]","d":"v[Garcia]"}] | + | m[{"a":"v[Garcia]","b":"v[CRYPTICAL ENVELOPMENT]","c":"v[CREAM PUFF WAR]","d":"v[Garcia]"}] | + | m[{"a":"v[Garcia]","b":"v[CRYPTICAL ENVELOPMENT]","c":"v[CRYPTICAL ENVELOPMENT]","d":"v[Garcia]"}] | + | m[{"a":"v[Grateful_Dead]","b":"v[CANT COME DOWN]","c":"v[DOWN SO LONG]","d":"v[Garcia]"}] | + | m[{"a":"v[Grateful_Dead]","b":"v[THE ONLY TIME IS NOW]","c":"v[DOWN SO LONG]","d":"v[Garcia]"}] | + + Scenario: g_V_matchXa_hasXsong_name_sunshineX__a_mapX0followedBy_weight_meanX_b__a_0followedBy_c__c_filterXweight_whereXgteXbXXX_outV_dX_selectXdX_byXnameX +Given the grateful graph +And the traversal of + """ + g.V().match(__.as("a").has("song", "name", "HERE COMES SUNSHINE"), + __.as("a").map(__.inE("followedBy").values("weight").mean()).as("b"), + __.as("a").inE("followedBy").as("c"), + __.as("c").filter(__.values("weight").where(P.gte("b"))).outV().as("d")). +select("d").by("name") + """ +When iterated to list +Then the result should be unordered + | result | + | THE MUSIC NEVER STOPPED | + | PROMISED LAND | + | PLAYING IN THE BAND | + | CASEY JONES | + | BIG RIVER | + | EL PASO
[03/19] tinkerpop git commit: Merge branch 'TINKERPOP-1958' into tp32
Merge branch 'TINKERPOP-1958' into tp32 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/7c700139 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/7c700139 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/7c700139 Branch: refs/heads/TINKERPOP-1968 Commit: 7c7001394a3dd5706c5ff38bcbf5c96dd6c611fc Parents: bd85e5f 2407739 Author: Daniel Kuppitz Authored: Tue May 22 08:04:24 2018 -0700 Committer: Daniel Kuppitz Committed: Tue May 22 08:04:24 2018 -0700 -- CHANGELOG.asciidoc | 1 + .../traversal/step/map/GroovySelectTest.groovy | 5 gremlin-test/features/map/Select.feature| 22 - .../process/traversal/step/map/SelectTest.java | 15 .../optimization/TinkerGraphCountStrategy.java | 2 +- .../TinkerGraphCountStrategyTest.java | 25 6 files changed, 58 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7c700139/CHANGELOG.asciidoc -- diff --cc CHANGELOG.asciidoc index 395bb55,23e130e..3d33c78 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@@ -23,10 -23,7 +23,11 @@@ image::https://raw.githubusercontent.co [[release-3-2-10]] === TinkerPop 3.2.10 (Release Date: NOT OFFICIALLY RELEASED YET) +* Removed recursive handling of streaming results from Gremlin-Python driver to avoid max recursion depth errors. +* Improved performance of `TraversalVertexProgram` and related infrastructure. +* Fixed bug in `GroovyTranslator` that didn't properly handle empty `Map` objects. +* Added concrete configuration methods to `SparkGraphComputer` to make a more clear API for configuring it. + * Fixed a bug in `TinkerGraphCountStrategy`, which didn't consider that certain map steps may not emit an element. [[release-3-2-9]] === TinkerPop 3.2.9 (Release Date: May 8, 2018)
[14/19] tinkerpop git commit: TINKERPOP-1968 Have one method of ignoring tests.
TINKERPOP-1968 Have one method of ignoring tests. Tests that should be ignored are "unsupported" in the .feature files. The validator doesn't need a second level of filtering for that. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/b9c634af Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/b9c634af Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/b9c634af Branch: refs/heads/TINKERPOP-1968 Commit: b9c634af29a6c42f5291cefc3ba8630c6e910bc1 Parents: 1528576 Author: Stephen Mallette Authored: Mon May 21 07:46:07 2018 -0400 Committer: Stephen Mallette Committed: Tue May 29 13:59:56 2018 -0400 -- gremlin-test/features/map/AddVertex.feature | 16 - gremlin-test/features/map/Properties.feature| 16 - gremlin-test/features/sideEffect/Sack.feature | 24 +++- .../gremlin/process/FeatureCoverageTest.java| 16 - 4 files changed, 53 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b9c634af/gremlin-test/features/map/AddVertex.feature -- diff --git a/gremlin-test/features/map/AddVertex.feature b/gremlin-test/features/map/AddVertex.feature index 996521b..c684b3b 100644 --- a/gremlin-test/features/map/AddVertex.feature +++ b/gremlin-test/features/map/AddVertex.feature @@ -334,4 +334,18 @@ Feature: Step - addV() Then the result should be unordered | result | | marko | -And the graph should return 2 for count of "g.V().has(\"name\",\"marko\")" \ No newline at end of file +And the graph should return 2 for count of "g.V().has(\"name\",\"marko\")" + + Scenario: g_V_addVXlabel_animal_age_0X +Given an unsupported test +Then nothing should happen because + """ + This API is deprecated - will not test. + """ + + Scenario: g_addVXlabel_person_name_stephenX +Given an unsupported test +Then nothing should happen because + """ + This API is deprecated - will not test. + """ \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b9c634af/gremlin-test/features/map/Properties.feature -- diff --git a/gremlin-test/features/map/Properties.feature b/gremlin-test/features/map/Properties.feature index 5e61615..52376ec 100644 --- a/gremlin-test/features/map/Properties.feature +++ b/gremlin-test/features/map/Properties.feature @@ -65,4 +65,18 @@ Feature: Step - properties() | josh | | d[32].i | | peter | - | d[35].i | \ No newline at end of file + | d[35].i | + + Scenario: g_V_hasXageX_properties_hasXid_nameIdX_value +Given an unsupported test +Then nothing should happen because + """ + GLV suite doesn't support property identifiers and related assertions + """ + + Scenario: g_V_hasXageX_properties_hasXid_nameIdAsStringX_value +Given an unsupported test +Then nothing should happen because + """ + GLV suite doesn't support property identifiers and related assertions + """ \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b9c634af/gremlin-test/features/sideEffect/Sack.feature -- diff --git a/gremlin-test/features/sideEffect/Sack.feature b/gremlin-test/features/sideEffect/Sack.feature index 8d97c0c..aaf248d 100644 --- a/gremlin-test/features/sideEffect/Sack.feature +++ b/gremlin-test/features/sideEffect/Sack.feature @@ -108,4 +108,26 @@ Feature: Step - sack() Then the result should be unordered | result | | d[1.0].m | - | d[1.0].m | \ No newline at end of file + | d[1.0].m | + + Scenario: g_withSackXBigInteger_TEN_powX1000X_assignX_V_localXoutXknowsX_barrierXnormSackXX_inXknowsX_barrier_sack +Given an unsupported test +Then nothing should happen because + """ + GLV Suite does not support BigInteger assignments at this time. + """ + + Scenario: g_withSackXmap__map_cloneX_V_out_out_sackXmap_a_nameX_sack +Given an unsupported test +Then nothing should happen because + """ + This test is bound pretty tightly to the JVM in that it requires a UnaryOperator cast to get the right + withSack() method called. Not sure how that would work with a GLV. + """ + + Scenario: g_withSackX2X_V_sackXdivX_byXconstantX3_0XX_sack +Given an unsupported test +Then nothing should happen because + """ + Something strange happens with rounding that prevents GLVs from asserting this result properly. + """ \ No newline at end of file
[01/19] tinkerpop git commit: TINKERPOP-1958 Fixed a bug in TinkerGraphCountStrategy [Forced Update!]
Repository: tinkerpop Updated Branches: refs/heads/TINKERPOP-1968 7ce6f99b7 -> 8f11d7830 (forced update) TINKERPOP-1958 Fixed a bug in TinkerGraphCountStrategy The strategy did not consider, that certain map steps may not emit an element. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/2407739b Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/2407739b Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/2407739b Branch: refs/heads/TINKERPOP-1968 Commit: 2407739b2e7b3624478bd9b5dbc55c9c28f1da28 Parents: 288b455 Author: Daniel Kuppitz Authored: Wed May 9 07:53:24 2018 -0700 Committer: Daniel Kuppitz Committed: Fri May 11 18:18:53 2018 -0700 -- CHANGELOG.asciidoc | 1 + .../traversal/step/map/GroovySelectTest.groovy | 5 gremlin-test/features/map/Select.feature| 22 - .../process/traversal/step/map/SelectTest.java | 15 .../optimization/TinkerGraphCountStrategy.java | 2 +- .../TinkerGraphCountStrategyTest.java | 25 6 files changed, 58 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2407739b/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 41d83c4..23e130e 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -23,6 +23,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima [[release-3-2-10]] === TinkerPop 3.2.10 (Release Date: NOT OFFICIALLY RELEASED YET) +* Fixed a bug in `TinkerGraphCountStrategy`, which didn't consider that certain map steps may not emit an element. [[release-3-2-9]] === TinkerPop 3.2.9 (Release Date: May 8, 2018) http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2407739b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovySelectTest.groovy -- diff --git a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovySelectTest.groovy b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovySelectTest.groovy index 89fc691..104322d 100644 --- a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovySelectTest.groovy +++ b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovySelectTest.groovy @@ -104,6 +104,11 @@ public abstract class GroovySelectTest { new ScriptTraversal<>(g, "gremlin-groovy", "g.V.choose(__.outE().count().is(0L), __.as('a'), __.as('b')).choose(select('a'),select('a'),select('b'))") } +@Override +public Traversal get_g_V_selectXaX_count() { +new ScriptTraversal<>(g, "gremlin-groovy", "g.V.select('a').count") +} + // below are original back()-tests @Override http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2407739b/gremlin-test/features/map/Select.feature -- diff --git a/gremlin-test/features/map/Select.feature b/gremlin-test/features/map/Select.feature index 35d9322..1e45a0e 100644 --- a/gremlin-test/features/map/Select.feature +++ b/gremlin-test/features/map/Select.feature @@ -514,4 +514,24 @@ Feature: Step - select() Then the result should be unordered | result | | d[2].l | - | d[2].l | \ No newline at end of file + | d[2].l | + + Scenario: g_V_selectXaX +Given the modern graph +And the traversal of + """ + g.V().select("a") + """ +When iterated to list +Then the result should be empty + + Scenario: g_V_selectXaX_count +Given the modern graph +And the traversal of + """ + g.V().select("a").count() + """ +When iterated to list +Then the result should be unordered + | result | + | d[0].l | http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2407739b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SelectTest.java -- diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SelectTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SelectTest.java index c0486d0..3d778e4 100644 --- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SelectTest.java +++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SelectTest.java @@ -83,6 +83,8 @@ public
[11/19] tinkerpop git commit: TINKERPOP-1968 Embedded list tests only pass for js at this point
TINKERPOP-1968 Embedded list tests only pass for js at this point Creating issues for .net and python. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/b572df8c Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/b572df8c Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/b572df8c Branch: refs/heads/TINKERPOP-1968 Commit: b572df8c181c71ae895a45b5024e57401a3b4e50 Parents: 61832c2 Author: Stephen Mallette Authored: Mon May 21 06:57:36 2018 -0400 Committer: Stephen Mallette Committed: Tue May 29 13:59:56 2018 -0400 -- .../Gherkin/GherkinTestRunner.cs | 5 - .../Gherkin/IgnoreException.cs| 6 +- .../src/main/jython/radish/feature_steps.py | 2 +- gremlin-test/features/map/Select.feature | 18 +- gremlin-test/features/sideEffect/Group.feature| 1 - 5 files changed, 27 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b572df8c/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 6d38ccc..d5eac93 100644 --- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs +++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs @@ -38,7 +38,10 @@ namespace Gremlin.Net.IntegrationTest.Gherkin public class GherkinTestRunner { private static readonly IDictionary IgnoredScenarios = -new Dictionary(); +new Dictionary +{ +{ "g_V_asXa_bX_out_asXcX_path_selectXkeysX", IgnoreReason.EmbeddedListAssertion } +}; private static class Keywords { http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b572df8c/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 860c11d..368713d 100644 --- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs +++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs @@ -40,6 +40,9 @@ 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; @@ -50,6 +53,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin public enum IgnoreReason { -NoReason +NoReason, +EmbeddedListAssertion } } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b572df8c/gremlin-python/src/main/jython/radish/feature_steps.py -- diff --git a/gremlin-python/src/main/jython/radish/feature_steps.py b/gremlin-python/src/main/jython/radish/feature_steps.py index fab35fd..5067d1b 100644 --- a/gremlin-python/src/main/jython/radish/feature_steps.py +++ b/gremlin-python/src/main/jython/radish/feature_steps.py @@ -43,7 +43,7 @@ inV = __.inV project = __.project tail = __.tail -ignores = [] +ignores = ["g.V().as(\"a\", \"b\").out().as(\"c\").path().select(Column.keys)"] @given("the {graph_name:w} graph") http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b572df8c/gremlin-test/features/map/Select.feature -- diff --git a/gremlin-test/features/map/Select.feature b/gremlin-test/features/map/Select.feature index db79c15..4765f59 100644 --- a/gremlin-test/features/map/Select.feature +++ b/gremlin-test/features/map/Select.feature @@ -669,4 +669,20 @@ Feature: Step - select() g.V().valueMap().select(Pop.all, "a","b") """ When iterated to list -Then the result should be empty \ No newline at end of file +Then the result should be empty + + Scenario: g_V_asXa_bX_out_asXcX_path_selectXkeysX +Given the modern graph +And the traversal of + """ + g.V().as("a", "b").out().as("c").path().select(Column.keys) + """ +When iterated to list +Then the result should be unordered + | result
[04/19] tinkerpop git commit: Make GraphSONWriter.ToDict() public CTR
Make GraphSONWriter.ToDict() public CTR This method can be used to transform an object into its GraphSON representation which is done recusively on member data. So this method is necessary to serialize complex objects with their member data. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/9830a3ff Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/9830a3ff Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/9830a3ff Branch: refs/heads/TINKERPOP-1968 Commit: 9830a3fffe6ec38367ec9c684d25816476605ce6 Parents: 7c70013 Author: Florian Hockmann Authored: Sun May 27 19:49:56 2018 +0200 Committer: Florian Hockmann Committed: Sun May 27 19:49:56 2018 +0200 -- .../src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9830a3ff/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs -- diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs index 7185868..8926d23 100644 --- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs +++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs @@ -93,7 +93,12 @@ namespace Gremlin.Net.Structure.IO.GraphSON return JsonConvert.SerializeObject(ToDict(objectData)); } -internal dynamic ToDict(dynamic objectData) +/// +/// Transforms an object into its GraphSON representation including type information. +/// +/// The object to transform. +/// A GraphSON representation of the object ready to be serialized. +public dynamic ToDict(dynamic objectData) { var type = objectData.GetType(); if (TryGetSerializerFor(out IGraphSONSerializer serializer, type))
[06/19] tinkerpop git commit: TINKERPOP-1968 Added edge ids to sink and grateful generator
TINKERPOP-1968 Added edge ids to sink and grateful generator Edge ids should have always been statically defined - not sure how/why that was missed. Also added grateful dead dataset to TinkerFactory to make that easier to programmatically setup. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/9064c5ce Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/9064c5ce Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/9064c5ce Branch: refs/heads/TINKERPOP-1968 Commit: 9064c5ce41c3efc05d4f2bea01d45d6eafb28a3e Parents: 6feff18 Author: Stephen Mallette Authored: Fri May 18 14:34:44 2018 -0400 Committer: Stephen Mallette Committed: Tue May 29 13:55:41 2018 -0400 -- CHANGELOG.asciidoc | 1 + data/tinkerpop-sink-typed.json | 6 +- data/tinkerpop-sink-v2d0-typed.json | 6 +- data/tinkerpop-sink-v2d0.json | 6 +- data/tinkerpop-sink.json| 6 +- data/tinkerpop-sink.kryo| Bin 234 -> 240 bytes .../io/graphson/tinkerpop-sink-typed.json | 6 +- .../io/graphson/tinkerpop-sink-v2d0-typed.json | 6 +- .../io/graphson/tinkerpop-sink-v2d0.json| 6 +- .../structure/io/graphson/tinkerpop-sink.json | 6 +- .../structure/io/gryo/tinkerpop-sink.kryo | Bin 234 -> 240 bytes .../tinkergraph/structure/TinkerFactory.java| 82 ++- 12 files changed, 104 insertions(+), 27 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9064c5ce/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 3d33c78..fbcfbc3 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -25,6 +25,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima * Removed recursive handling of streaming results from Gremlin-Python driver to avoid max recursion depth errors. * Improved performance of `TraversalVertexProgram` and related infrastructure. +* Added `createGratefulDead()`to `TinkerFactory` to help make it easier to try to instantiate that toy graph. * Fixed bug in `GroovyTranslator` that didn't properly handle empty `Map` objects. * Added concrete configuration methods to `SparkGraphComputer` to make a more clear API for configuring it. * Fixed a bug in `TinkerGraphCountStrategy`, which didn't consider that certain map steps may not emit an element. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9064c5ce/data/tinkerpop-sink-typed.json -- diff --git a/data/tinkerpop-sink-typed.json b/data/tinkerpop-sink-typed.json index 2e83384..9f16788 100644 --- a/data/tinkerpop-sink-typed.json +++ b/data/tinkerpop-sink-typed.json @@ -1,3 +1,3 @@ -{"@class":"java.util.HashMap","id":2000,"label":"message","inE":{"@class":"java.util.HashMap","link":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":5,"outV":2000}]]},"outE":{"@class":"java.util.HashMap","link":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":4,"inV":2001},{"@class":"java.util.HashMap","id":5,"inV":2000}]]},"properties":{"@class":"java.util.HashMap","name":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",2],"value":"a"}]]}} -{"@class":"java.util.HashMap","id":2001,"label":"message","inE":{"@class":"java.util.HashMap","link":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":4,"outV":2000}]]},"properties":{"@class":"java.util.HashMap","name":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",3],"value":"b"}]]}} -{"@class":"java.util.HashMap","id":1000,"label":"loops","inE":{"@class":"java.util.HashMap","self":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":1,"outV":1000}]]},"outE":{"@class":"java.util.HashMap","self":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":1,"inV":1000}]]},"properties":{"@class":"java.util.HashMap","name":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",0],"value":"loop"}]]}} +{"@class":"java.util.HashMap","id":2000,"label":"message","inE":{"@class":"java.util.HashMap","link":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":2003,"outV":2000}]]},"outE":{"@class":"java.util.HashMap","link":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":2002,"inV":2001},{"@class":"java.util.HashMap","id":2003,"inV":2000}]]},"properties":{"@class":"java.util.HashMap","name":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",1],"value":"a"}]]}}
[02/19] tinkerpop git commit: TINKERPOP-1113 Added spark configuration options as concrete methods CTR
TINKERPOP-1113 Added spark configuration options as concrete methods CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/bd85e5fe Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/bd85e5fe Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/bd85e5fe Branch: refs/heads/TINKERPOP-1968 Commit: bd85e5febee56434c4de4e7ab31e337a9f5e Parents: f36eb4f Author: Stephen Mallette Authored: Tue May 22 06:55:46 2018 -0400 Committer: Stephen Mallette Committed: Tue May 22 06:55:46 2018 -0400 -- CHANGELOG.asciidoc | 1 + .../process/computer/SparkGraphComputer.java| 90 +--- .../computer/SparkHadoopGraphProvider.java | 5 +- 3 files changed, 80 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/bd85e5fe/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 21fde2c..395bb55 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima * Removed recursive handling of streaming results from Gremlin-Python driver to avoid max recursion depth errors. * Improved performance of `TraversalVertexProgram` and related infrastructure. * Fixed bug in `GroovyTranslator` that didn't properly handle empty `Map` objects. +* Added concrete configuration methods to `SparkGraphComputer` to make a more clear API for configuring it. [[release-3-2-9]] === TinkerPop 3.2.9 (Release Date: May 8, 2018) http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/bd85e5fe/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkGraphComputer.java -- diff --git a/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkGraphComputer.java b/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkGraphComputer.java index 00a2e46..4c896cd 100644 --- a/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkGraphComputer.java +++ b/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkGraphComputer.java @@ -30,11 +30,10 @@ import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat; import org.apache.spark.HashPartitioner; import org.apache.spark.Partitioner; -import org.apache.spark.SparkConf; -import org.apache.spark.SparkContext; import org.apache.spark.api.java.JavaPairRDD; import org.apache.spark.api.java.JavaSparkContext; import org.apache.spark.launcher.SparkLauncher; +import org.apache.spark.serializer.Serializer; import org.apache.spark.storage.StorageLevel; import org.apache.tinkerpop.gremlin.hadoop.Constants; import org.apache.tinkerpop.gremlin.hadoop.process.computer.AbstractHadoopGraphComputer; @@ -79,7 +78,16 @@ import java.util.concurrent.Executors; import java.util.concurrent.Future; import java.util.concurrent.ThreadFactory; +import static org.apache.tinkerpop.gremlin.hadoop.Constants.GREMLIN_SPARK_GRAPH_STORAGE_LEVEL; +import static org.apache.tinkerpop.gremlin.hadoop.Constants.GREMLIN_SPARK_PERSIST_CONTEXT; +import static org.apache.tinkerpop.gremlin.hadoop.Constants.GREMLIN_SPARK_PERSIST_STORAGE_LEVEL; +import static org.apache.tinkerpop.gremlin.hadoop.Constants.GREMLIN_SPARK_SKIP_GRAPH_CACHE; +import static org.apache.tinkerpop.gremlin.hadoop.Constants.GREMLIN_SPARK_SKIP_PARTITIONER; +import static org.apache.tinkerpop.gremlin.hadoop.Constants.SPARK_SERIALIZER; + /** + * {@link GraphComputer} implementation for Apache Spark. + * * @author Marko A. Rodriguez (http://markorodriguez.com) */ public final class SparkGraphComputer extends AbstractHadoopGraphComputer { @@ -107,8 +115,12 @@ public final class SparkGraphComputer extends AbstractHadoopGraphComputer { ConfigurationUtils.copy(this.hadoopGraph.configuration(), this.sparkConfiguration); } +/** + * Sets the number of workers. If the {@code spark.master} configuration is configured with "local" then it will + * change that configuration to use the specified number of worker threads. + */ @Override -public GraphComputer workers(final int workers) { +public SparkGraphComputer workers(final int workers) { super.workers(workers); if (this.sparkConfiguration.containsKey(SparkLauncher.SPARK_MASTER) && this.sparkConfiguration.getString(SparkLauncher.SPARK_MASTER).startsWith("local")) { this.sparkConfiguration.setProperty(SparkLauncher.SPARK_MASTER, "local[" + this.workers + "]"); @@
[08/19] tinkerpop git commit: TINKERPOP-1968 Enabled GLV tests for self loops
TINKERPOP-1968 Enabled GLV tests for self loops Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/970c8aa6 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/970c8aa6 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/970c8aa6 Branch: refs/heads/TINKERPOP-1968 Commit: 970c8aa62dc88b1dd72a3c17c830be790decb08d Parents: 0e38b89 Author: Stephen Mallette Authored: Fri May 18 14:39:53 2018 -0400 Committer: Stephen Mallette Committed: Tue May 29 13:55:42 2018 -0400 -- .../traversal/step/map/GroovyVertexTest.groovy | 8 +++--- gremlin-test/features/map/Vertex.feature| 26 ++- .../process/traversal/step/map/VertexTest.java | 27 ++-- .../gremlin/process/FeatureCoverageTest.java| 3 --- 4 files changed, 42 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/970c8aa6/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyVertexTest.groovy -- diff --git a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyVertexTest.groovy b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyVertexTest.groovy index ff6275d..cd43ad0 100644 --- a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyVertexTest.groovy +++ b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyVertexTest.groovy @@ -185,13 +185,13 @@ public abstract class GroovyVertexTest { } @Override -public Traversal get_g_V_bothEXselfX() { -new ScriptTraversal<>(g, "gremlin-groovy", "g.V().bothE('self')") +public Traversal get_g_V_hasLabelXloopsX_bothEXselfX() { +new ScriptTraversal<>(g, "gremlin-groovy", "g.V().hasLabel('loops').bothE('self')") } @Override -public Traversal get_g_V_bothXselfX() { -new ScriptTraversal<>(g, "gremlin-groovy", "g.V().both('self')") +public Traversal get_g_V_hasLabelXloopsX_bothXselfX() { +new ScriptTraversal<>(g, "gremlin-groovy", "g.V().hasLabel('loops').both('self')") } } } http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/970c8aa6/gremlin-test/features/map/Vertex.feature -- diff --git a/gremlin-test/features/map/Vertex.feature b/gremlin-test/features/map/Vertex.feature index 569fb6f..8642693 100644 --- a/gremlin-test/features/map/Vertex.feature +++ b/gremlin-test/features/map/Vertex.feature @@ -472,4 +472,28 @@ Feature: Step - V(), E(), out(), in(), both(), inE(), outE(), bothE() | ripple | | ripple | | ripple | - | ripple | \ No newline at end of file + | ripple | + + Scenario: g_V_hasLabelXloopsX_bothEXselfX +Given the sink graph +And the traversal of +""" +g.V().hasLabel("loops").bothE("self") +""" +When iterated to list +Then the result should be unordered + | result | + | e[loop-self->loop] | + | e[loop-self->loop] | + + Scenario: g_V_hasLabelXloopsX_bothXselfX +Given the sink graph +And the traversal of +""" +g.V().hasLabel("loops").both("self") +""" +When iterated to list +Then the result should be unordered + | result | + | v[loop] | + | v[loop] | http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/970c8aa6/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/VertexTest.java -- diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/VertexTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/VertexTest.java index 8a57535..7908952 100644 --- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/VertexTest.java +++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/VertexTest.java @@ -41,6 +41,7 @@ import java.util.Map; import java.util.Set; import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData.MODERN; +import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData.SINK; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; @@ -113,9 +114,9 @@ public abstract class VertexTest extends AbstractGremlinProcessTest { public abstract Traversal get_g_V_hasLabelXpersonX_V_hasLabelXsoftwareX_name(); -public abstract Traversal
svn commit: r1832462 - in /tinkerpop/site: gremlin.html index.html js/prism.js
Author: spmallette Date: Tue May 29 17:14:58 2018 New Revision: 1832462 URL: http://svn.apache.org/viewvc?rev=1832462=rev Log: Deploy TinkerPop homepage Modified: tinkerpop/site/gremlin.html tinkerpop/site/index.html tinkerpop/site/js/prism.js Modified: tinkerpop/site/gremlin.html URL: http://svn.apache.org/viewvc/tinkerpop/site/gremlin.html?rev=1832462=1832461=1832462=diff == --- tinkerpop/site/gremlin.html (original) +++ tinkerpop/site/gremlin.html Tue May 29 17:14:58 2018 @@ -291,7 +291,7 @@ g.V().has("name","gremlin"). out("bought").aggregate("stash"). in("bought").out("bought"). where(not(within("stash"))). - groupCount().order(local).by(values,decr) + groupCount().order(local).by(values,desc) @@ -315,7 +315,7 @@ g.V().hasLabel("person"). pageRank(). by("friendRank"). by(outE("knows")). - order().by("friendRank",decr). + order().by("friendRank",desc). limit(10) Modified: tinkerpop/site/index.html URL: http://svn.apache.org/viewvc/tinkerpop/site/index.html?rev=1832462=1832461=1832462=diff == --- tinkerpop/site/index.html (original) +++ tinkerpop/site/index.html Tue May 29 17:14:58 2018 @@ -271,7 +271,7 @@ limitations under the License. in("bought").out("bought"). where(not(within("stash"))). groupCount(). -order(local).by(values,decr) +order(local).by(values,desc) @@ -417,6 +417,7 @@ limitations under the License. Powered By +https://www.exakat.io/;>exakat.io - Static analysis engine for PHP, powered by Gremlin. https://bricaud.github.io/graphexp/graphexp.html;>Graphexp - Interactive visualization of the Gremlin graph database with D3.js. http://www.pitneybowes.com/us/customer-information-management/data-integration-management/spectrum-data-hub-module.html;>Pitney Bowes Spectrum Data Hub Module - Uses Gremlin OLTP to query Neo4j-powered master data management based graph database. Modified: tinkerpop/site/js/prism.js URL: http://svn.apache.org/viewvc/tinkerpop/site/js/prism.js?rev=1832462=1832461=1832462=diff == --- tinkerpop/site/js/prism.js (original) +++ tinkerpop/site/js/prism.js Tue May 29 17:14:58 2018 @@ -233,7 +233,7 @@ Prism.languages.clike = { punctuation: /[{}[\];(),.:]/ }; Prism.languages.gremlin = Prism.languages.extend("clike", { -keyword: /\b(values,|decr|incr|local|global|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/, +keyword: /\b(values,|decr|desc|incr|asc|local|global|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/, number: /\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/, "function": /[_$a-zA-Z\xA0-\u][_$a-zA-Z0-9\xA0-\u]*(?=\()/i }), Prism.languages.insertBefore("gremlin", "keyword", {
tinkerpop git commit: Added exakat.io to powered by listing CTR
Repository: tinkerpop Updated Branches: refs/heads/master 51f0ae647 -> dbf3a0e9d Added exakat.io to powered by listing CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/dbf3a0e9 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/dbf3a0e9 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/dbf3a0e9 Branch: refs/heads/master Commit: dbf3a0e9d4d3952de534dd437507f367b78bc629 Parents: 51f0ae6 Author: Stephen Mallette Authored: Tue May 29 13:13:00 2018 -0400 Committer: Stephen Mallette Committed: Tue May 29 13:13:00 2018 -0400 -- docs/site/home/index.html | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dbf3a0e9/docs/site/home/index.html -- diff --git a/docs/site/home/index.html b/docs/site/home/index.html index 73218e0..d882049 100644 --- a/docs/site/home/index.html +++ b/docs/site/home/index.html @@ -279,6 +279,7 @@ limitations under the License. Powered By +https://www.exakat.io/;>exakat.io - Static analysis engine for PHP, powered by Gremlin. https://bricaud.github.io/graphexp/graphexp.html;>Graphexp - Interactive visualization of the Gremlin graph database with D3.js. http://www.pitneybowes.com/us/customer-information-management/data-integration-management/spectrum-data-hub-module.html;>Pitney Bowes Spectrum Data Hub Module - Uses Gremlin OLTP to query Neo4j-powered master data management based graph database.
tinkerpop git commit: Removed references to Structure API from "user docs"
Repository: tinkerpop Updated Branches: refs/heads/tp32 9830a3fff -> 6feff1869 Removed references to Structure API from "user docs" Restricted such references to Provider documentation CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/6feff186 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/6feff186 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/6feff186 Branch: refs/heads/tp32 Commit: 6feff186984c6b1d71ba9dc6c9ace5e59e2d09e4 Parents: 9830a3f Author: Stephen Mallette Authored: Tue May 29 12:50:59 2018 -0400 Committer: Stephen Mallette Committed: Tue May 29 12:50:59 2018 -0400 -- docs/src/dev/provider/index.asciidoc| 80 ++ .../src/reference/gremlin-applications.asciidoc | 5 +- .../reference/implementations-neo4j.asciidoc| 10 +- docs/src/reference/intro.asciidoc | 148 ++- docs/src/reference/the-graph.asciidoc | 40 ++--- .../tutorials/getting-started/index.asciidoc| 27 ++-- 6 files changed, 140 insertions(+), 170 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6feff186/docs/src/dev/provider/index.asciidoc -- diff --git a/docs/src/dev/provider/index.asciidoc b/docs/src/dev/provider/index.asciidoc index 5bc4d9e..dddcb18 100644 --- a/docs/src/dev/provider/index.asciidoc +++ b/docs/src/dev/provider/index.asciidoc @@ -46,6 +46,86 @@ provided by TinkerPop (e.g. Gremlin Console, Gremlin Server, etc.) and 3rd-party Gremlin-JS, etc.) will integrate properly. Finally, please feel free to use the logo on the left to promote your TinkerPop3 implementation. +[[graph-structure-api]] +=== Graph Structure API + +The graph structure API of TinkerPop3 provides the interfaces necessary to create a TinkerPop enabled system and +exposes the basic components of a property graph to include `Graph`, `Vertex`, `Edge`, `VertexProperty` and `Property`. +The structure API can be used directly as follows: + +[source,java] +Graph graph = TinkerGraph.open(); <1> +Vertex marko = graph.addVertex(T.label, "person", T.id, 1, "name", "marko", "age", 29); <2> +Vertex vadas = graph.addVertex(T.label, "person", T.id, 2, "name", "vadas", "age", 27); +Vertex lop = graph.addVertex(T.label, "software", T.id, 3, "name", "lop", "lang", "java"); +Vertex josh = graph.addVertex(T.label, "person", T.id, 4, "name", "josh", "age", 32); +Vertex ripple = graph.addVertex(T.label, "software", T.id, 5, "name", "ripple", "lang", "java"); +Vertex peter = graph.addVertex(T.label, "person", T.id, 6, "name", "peter", "age", 35); +marko.addEdge("knows", vadas, T.id, 7, "weight", 0.5f); <3> +marko.addEdge("knows", josh, T.id, 8, "weight", 1.0f); +marko.addEdge("created", lop, T.id, 9, "weight", 0.4f); +josh.addEdge("created", ripple, T.id, 10, "weight", 1.0f); +josh.addEdge("created", lop, T.id, 11, "weight", 0.4f); +peter.addEdge("created", lop, T.id, 12, "weight", 0.2f); + +<1> Create a new in-memory `TinkerGraph` and assign it to the variable `graph`. +<2> Create a vertex along with a set of key/value pairs with `T.label` being the vertex label and `T.id` being the vertex id. +<3> Create an edge along with a set of key/value pairs with the edge label being specified as the first argument. + +In the above code all the vertices are created first and then their respective edges. There are two "accessor tokens": +`T.id` and `T.label`. When any of these, along with a set of other key value pairs is provided to +`Graph.addVertex(Object...)` or `Vertex.addEdge(String,Vertex,Object...)`, the respective element is created along +with the provided key/value pair properties appended to it. + +Below is a sequence of basic graph mutation operations represented in Java 8. One of the major differences between +TinkerPop2 and TinkerPop3 is that in TinkerPop3, the Java convention of using setters and getters has been abandoned +in favor of a syntax that is more aligned with the syntax of Gremlin-Groovy in TinkerPop2. Given that Gremlin-Java8 +and Gremlin-Groovy are nearly identical due to the inclusion of Java 8 lambdas, a big effort was made to ensure that +both languages are as similar as possible. + +image:basic-mutation.png[width=240,float=right] +[source,java] + +// create a new graph +Graph graph = TinkerGraph.open(); +// add a software vertex with a name property +Vertex gremlin = graph.addVertex(T.label, "software", + "name", "gremlin"); <1> +// only one vertex should exist +assert(IteratorUtils.count(graph.vertices()) == 1) +// no edges should exist as none have been created +assert(IteratorUtils.count(graph.edges()) == 0) +// add a new property +gremlin.property("created",2009) <2> +// add a new
[1/2] tinkerpop git commit: Removed references to Structure API from "user docs"
Repository: tinkerpop Updated Branches: refs/heads/tp33 ae9d7f694 -> 2862ff989 Removed references to Structure API from "user docs" Restricted such references to Provider documentation CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/6feff186 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/6feff186 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/6feff186 Branch: refs/heads/tp33 Commit: 6feff186984c6b1d71ba9dc6c9ace5e59e2d09e4 Parents: 9830a3f Author: Stephen Mallette Authored: Tue May 29 12:50:59 2018 -0400 Committer: Stephen Mallette Committed: Tue May 29 12:50:59 2018 -0400 -- docs/src/dev/provider/index.asciidoc| 80 ++ .../src/reference/gremlin-applications.asciidoc | 5 +- .../reference/implementations-neo4j.asciidoc| 10 +- docs/src/reference/intro.asciidoc | 148 ++- docs/src/reference/the-graph.asciidoc | 40 ++--- .../tutorials/getting-started/index.asciidoc| 27 ++-- 6 files changed, 140 insertions(+), 170 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6feff186/docs/src/dev/provider/index.asciidoc -- diff --git a/docs/src/dev/provider/index.asciidoc b/docs/src/dev/provider/index.asciidoc index 5bc4d9e..dddcb18 100644 --- a/docs/src/dev/provider/index.asciidoc +++ b/docs/src/dev/provider/index.asciidoc @@ -46,6 +46,86 @@ provided by TinkerPop (e.g. Gremlin Console, Gremlin Server, etc.) and 3rd-party Gremlin-JS, etc.) will integrate properly. Finally, please feel free to use the logo on the left to promote your TinkerPop3 implementation. +[[graph-structure-api]] +=== Graph Structure API + +The graph structure API of TinkerPop3 provides the interfaces necessary to create a TinkerPop enabled system and +exposes the basic components of a property graph to include `Graph`, `Vertex`, `Edge`, `VertexProperty` and `Property`. +The structure API can be used directly as follows: + +[source,java] +Graph graph = TinkerGraph.open(); <1> +Vertex marko = graph.addVertex(T.label, "person", T.id, 1, "name", "marko", "age", 29); <2> +Vertex vadas = graph.addVertex(T.label, "person", T.id, 2, "name", "vadas", "age", 27); +Vertex lop = graph.addVertex(T.label, "software", T.id, 3, "name", "lop", "lang", "java"); +Vertex josh = graph.addVertex(T.label, "person", T.id, 4, "name", "josh", "age", 32); +Vertex ripple = graph.addVertex(T.label, "software", T.id, 5, "name", "ripple", "lang", "java"); +Vertex peter = graph.addVertex(T.label, "person", T.id, 6, "name", "peter", "age", 35); +marko.addEdge("knows", vadas, T.id, 7, "weight", 0.5f); <3> +marko.addEdge("knows", josh, T.id, 8, "weight", 1.0f); +marko.addEdge("created", lop, T.id, 9, "weight", 0.4f); +josh.addEdge("created", ripple, T.id, 10, "weight", 1.0f); +josh.addEdge("created", lop, T.id, 11, "weight", 0.4f); +peter.addEdge("created", lop, T.id, 12, "weight", 0.2f); + +<1> Create a new in-memory `TinkerGraph` and assign it to the variable `graph`. +<2> Create a vertex along with a set of key/value pairs with `T.label` being the vertex label and `T.id` being the vertex id. +<3> Create an edge along with a set of key/value pairs with the edge label being specified as the first argument. + +In the above code all the vertices are created first and then their respective edges. There are two "accessor tokens": +`T.id` and `T.label`. When any of these, along with a set of other key value pairs is provided to +`Graph.addVertex(Object...)` or `Vertex.addEdge(String,Vertex,Object...)`, the respective element is created along +with the provided key/value pair properties appended to it. + +Below is a sequence of basic graph mutation operations represented in Java 8. One of the major differences between +TinkerPop2 and TinkerPop3 is that in TinkerPop3, the Java convention of using setters and getters has been abandoned +in favor of a syntax that is more aligned with the syntax of Gremlin-Groovy in TinkerPop2. Given that Gremlin-Java8 +and Gremlin-Groovy are nearly identical due to the inclusion of Java 8 lambdas, a big effort was made to ensure that +both languages are as similar as possible. + +image:basic-mutation.png[width=240,float=right] +[source,java] + +// create a new graph +Graph graph = TinkerGraph.open(); +// add a software vertex with a name property +Vertex gremlin = graph.addVertex(T.label, "software", + "name", "gremlin"); <1> +// only one vertex should exist +assert(IteratorUtils.count(graph.vertices()) == 1) +// no edges should exist as none have been created +assert(IteratorUtils.count(graph.edges()) == 0) +// add a new property +gremlin.property("created",2009) <2> +// add a new
[3/3] tinkerpop git commit: Merge branch 'tp33'
Merge branch 'tp33' Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/51f0ae64 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/51f0ae64 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/51f0ae64 Branch: refs/heads/master Commit: 51f0ae647c1e8ea9b1d8d04bfe4be299c3a8ce00 Parents: c22182b 2862ff9 Author: Stephen Mallette Authored: Tue May 29 12:53:33 2018 -0400 Committer: Stephen Mallette Committed: Tue May 29 12:53:33 2018 -0400 -- docs/src/dev/provider/index.asciidoc| 80 ++ .../src/reference/gremlin-applications.asciidoc | 5 +- .../reference/implementations-neo4j.asciidoc| 10 +- docs/src/reference/intro.asciidoc | 148 ++- docs/src/reference/the-graph.asciidoc | 40 ++--- 5 files changed, 126 insertions(+), 157 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/51f0ae64/docs/src/dev/provider/index.asciidoc -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/51f0ae64/docs/src/reference/gremlin-applications.asciidoc --
[2/2] 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/2862ff98 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/2862ff98 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/2862ff98 Branch: refs/heads/tp33 Commit: 2862ff989c810710583f3157a66cb9ef73f3d968 Parents: ae9d7f6 6feff18 Author: Stephen Mallette Authored: Tue May 29 12:53:22 2018 -0400 Committer: Stephen Mallette Committed: Tue May 29 12:53:22 2018 -0400 -- docs/src/dev/provider/index.asciidoc| 80 ++ .../src/reference/gremlin-applications.asciidoc | 5 +- .../reference/implementations-neo4j.asciidoc| 10 +- docs/src/reference/intro.asciidoc | 148 ++- docs/src/reference/the-graph.asciidoc | 40 ++--- 5 files changed, 126 insertions(+), 157 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2862ff98/docs/src/dev/provider/index.asciidoc -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2862ff98/docs/src/reference/gremlin-applications.asciidoc -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2862ff98/docs/src/reference/implementations-neo4j.asciidoc -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2862ff98/docs/src/reference/the-graph.asciidoc --
[2/3] 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/2862ff98 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/2862ff98 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/2862ff98 Branch: refs/heads/master Commit: 2862ff989c810710583f3157a66cb9ef73f3d968 Parents: ae9d7f6 6feff18 Author: Stephen Mallette Authored: Tue May 29 12:53:22 2018 -0400 Committer: Stephen Mallette Committed: Tue May 29 12:53:22 2018 -0400 -- docs/src/dev/provider/index.asciidoc| 80 ++ .../src/reference/gremlin-applications.asciidoc | 5 +- .../reference/implementations-neo4j.asciidoc| 10 +- docs/src/reference/intro.asciidoc | 148 ++- docs/src/reference/the-graph.asciidoc | 40 ++--- 5 files changed, 126 insertions(+), 157 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2862ff98/docs/src/dev/provider/index.asciidoc -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2862ff98/docs/src/reference/gremlin-applications.asciidoc -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2862ff98/docs/src/reference/implementations-neo4j.asciidoc -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2862ff98/docs/src/reference/the-graph.asciidoc --
[1/3] tinkerpop git commit: Removed references to Structure API from "user docs"
Repository: tinkerpop Updated Branches: refs/heads/master c22182b8c -> 51f0ae647 Removed references to Structure API from "user docs" Restricted such references to Provider documentation CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/6feff186 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/6feff186 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/6feff186 Branch: refs/heads/master Commit: 6feff186984c6b1d71ba9dc6c9ace5e59e2d09e4 Parents: 9830a3f Author: Stephen Mallette Authored: Tue May 29 12:50:59 2018 -0400 Committer: Stephen Mallette Committed: Tue May 29 12:50:59 2018 -0400 -- docs/src/dev/provider/index.asciidoc| 80 ++ .../src/reference/gremlin-applications.asciidoc | 5 +- .../reference/implementations-neo4j.asciidoc| 10 +- docs/src/reference/intro.asciidoc | 148 ++- docs/src/reference/the-graph.asciidoc | 40 ++--- .../tutorials/getting-started/index.asciidoc| 27 ++-- 6 files changed, 140 insertions(+), 170 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6feff186/docs/src/dev/provider/index.asciidoc -- diff --git a/docs/src/dev/provider/index.asciidoc b/docs/src/dev/provider/index.asciidoc index 5bc4d9e..dddcb18 100644 --- a/docs/src/dev/provider/index.asciidoc +++ b/docs/src/dev/provider/index.asciidoc @@ -46,6 +46,86 @@ provided by TinkerPop (e.g. Gremlin Console, Gremlin Server, etc.) and 3rd-party Gremlin-JS, etc.) will integrate properly. Finally, please feel free to use the logo on the left to promote your TinkerPop3 implementation. +[[graph-structure-api]] +=== Graph Structure API + +The graph structure API of TinkerPop3 provides the interfaces necessary to create a TinkerPop enabled system and +exposes the basic components of a property graph to include `Graph`, `Vertex`, `Edge`, `VertexProperty` and `Property`. +The structure API can be used directly as follows: + +[source,java] +Graph graph = TinkerGraph.open(); <1> +Vertex marko = graph.addVertex(T.label, "person", T.id, 1, "name", "marko", "age", 29); <2> +Vertex vadas = graph.addVertex(T.label, "person", T.id, 2, "name", "vadas", "age", 27); +Vertex lop = graph.addVertex(T.label, "software", T.id, 3, "name", "lop", "lang", "java"); +Vertex josh = graph.addVertex(T.label, "person", T.id, 4, "name", "josh", "age", 32); +Vertex ripple = graph.addVertex(T.label, "software", T.id, 5, "name", "ripple", "lang", "java"); +Vertex peter = graph.addVertex(T.label, "person", T.id, 6, "name", "peter", "age", 35); +marko.addEdge("knows", vadas, T.id, 7, "weight", 0.5f); <3> +marko.addEdge("knows", josh, T.id, 8, "weight", 1.0f); +marko.addEdge("created", lop, T.id, 9, "weight", 0.4f); +josh.addEdge("created", ripple, T.id, 10, "weight", 1.0f); +josh.addEdge("created", lop, T.id, 11, "weight", 0.4f); +peter.addEdge("created", lop, T.id, 12, "weight", 0.2f); + +<1> Create a new in-memory `TinkerGraph` and assign it to the variable `graph`. +<2> Create a vertex along with a set of key/value pairs with `T.label` being the vertex label and `T.id` being the vertex id. +<3> Create an edge along with a set of key/value pairs with the edge label being specified as the first argument. + +In the above code all the vertices are created first and then their respective edges. There are two "accessor tokens": +`T.id` and `T.label`. When any of these, along with a set of other key value pairs is provided to +`Graph.addVertex(Object...)` or `Vertex.addEdge(String,Vertex,Object...)`, the respective element is created along +with the provided key/value pair properties appended to it. + +Below is a sequence of basic graph mutation operations represented in Java 8. One of the major differences between +TinkerPop2 and TinkerPop3 is that in TinkerPop3, the Java convention of using setters and getters has been abandoned +in favor of a syntax that is more aligned with the syntax of Gremlin-Groovy in TinkerPop2. Given that Gremlin-Java8 +and Gremlin-Groovy are nearly identical due to the inclusion of Java 8 lambdas, a big effort was made to ensure that +both languages are as similar as possible. + +image:basic-mutation.png[width=240,float=right] +[source,java] + +// create a new graph +Graph graph = TinkerGraph.open(); +// add a software vertex with a name property +Vertex gremlin = graph.addVertex(T.label, "software", + "name", "gremlin"); <1> +// only one vertex should exist +assert(IteratorUtils.count(graph.vertices()) == 1) +// no edges should exist as none have been created +assert(IteratorUtils.count(graph.edges()) == 0) +// add a new property +gremlin.property("created",2009) <2> +// add a new