You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by ok...@apache.org on 2015/10/30 00:29:22 UTC
[01/50] incubator-tinkerpop git commit: Added
GraphComputer.config(key,
value). There is no general way to test this as general configurations outside
the scope of the fluent methods of GraphComputer are particular to the
underlying engine -- e.g. mapredu
Repository: incubator-tinkerpop
Updated Branches:
refs/heads/TINKERPOP3-925 3d2d6a690 -> 16b50052e
Added GraphComputer.config(key,value). There is no general way to test this as general configurations outside the scope of the fluent methods of GraphComputer are particular to the underlying engine -- e.g. mapreduce.mappers etc.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/2150b33d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/2150b33d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/2150b33d
Branch: refs/heads/TINKERPOP3-925
Commit: 2150b33d5cd8b783a4f91e198401f820b948250f
Parents: e3d126f
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Tue Oct 13 19:10:05 2015 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Tue Oct 13 19:10:05 2015 -0600
----------------------------------------------------------------------
.../tinkerpop/gremlin/process/computer/GraphComputerTest.java | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/2150b33d/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
index b546717..0026296 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
@@ -127,6 +127,11 @@ public class GraphComputerTest extends AbstractGremlinProcessTest {
}
@Override
+ public GraphComputer config(final String key, final Object value) {
+ return null;
+ }
+
+ @Override
public Future<ComputerResult> submit() {
return null;
}
[42/50] incubator-tinkerpop git commit: added buff gremlin logo.
Posted by ok...@apache.org.
added buff gremlin logo.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/c3224381
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/c3224381
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/c3224381
Branch: refs/heads/TINKERPOP3-925
Commit: c3224381f761ddbc00d095623e2a10672d9609c9
Parents: 736636b
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Thu Oct 29 09:32:44 2015 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Thu Oct 29 09:32:44 2015 -0600
----------------------------------------------------------------------
docs/static/images/gremlin-standing-strong.png | Bin 0 -> 30985 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/c3224381/docs/static/images/gremlin-standing-strong.png
----------------------------------------------------------------------
diff --git a/docs/static/images/gremlin-standing-strong.png b/docs/static/images/gremlin-standing-strong.png
new file mode 100644
index 0000000..23aa7a7
Binary files /dev/null and b/docs/static/images/gremlin-standing-strong.png differ
[27/50] incubator-tinkerpop git commit: added missing Apache license
header
Posted by ok...@apache.org.
added missing Apache license header
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/786e9cf7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/786e9cf7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/786e9cf7
Branch: refs/heads/TINKERPOP3-925
Commit: 786e9cf79b99b5361b2390a683718b5fce96a7ee
Parents: 3181d37
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Wed Oct 28 16:37:22 2015 +0100
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Wed Oct 28 16:37:22 2015 +0100
----------------------------------------------------------------------
.../optimization/Neo4jGraphStepStrategyTest.java | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/786e9cf7/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/strategy/optimization/Neo4jGraphStepStrategyTest.java
----------------------------------------------------------------------
diff --git a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/strategy/optimization/Neo4jGraphStepStrategyTest.java b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/strategy/optimization/Neo4jGraphStepStrategyTest.java
index 5c4c857..cc92ef9 100644
--- a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/strategy/optimization/Neo4jGraphStepStrategyTest.java
+++ b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/strategy/optimization/Neo4jGraphStepStrategyTest.java
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.apache.tinkerpop.gremlin.neo4j.process.traversal.strategy.optimization;
import org.apache.tinkerpop.gremlin.neo4j.AbstractNeo4jGremlinTest;
[36/50] incubator-tinkerpop git commit: Minor fix to the Session
OpProcessor formatting.
Posted by ok...@apache.org.
Minor fix to the Session OpProcessor formatting.
This was bad from 3.0.2-incubating unfortunately and not caught before release. Invoking CTR as this is just a text formatting change in the docs.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/4e0c867c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/4e0c867c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/4e0c867c
Branch: refs/heads/TINKERPOP3-925
Commit: 4e0c867c906ec57205a1331c09009f1f90f56235
Parents: 45bf33d
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Oct 29 07:30:44 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Oct 29 07:30:44 2015 -0400
----------------------------------------------------------------------
docs/src/gremlin-applications.asciidoc | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4e0c867c/docs/src/gremlin-applications.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/gremlin-applications.asciidoc b/docs/src/gremlin-applications.asciidoc
index 00d062a..34b760d 100644
--- a/docs/src/gremlin-applications.asciidoc
+++ b/docs/src/gremlin-applications.asciidoc
@@ -1330,8 +1330,7 @@ session state is not shared among them.
!Key !Description
!`authentication` !A request that contains the response to a server challenge for authentication
!`eval` !Evaluate a Gremlin script provided as a `String`
-|`close` |Close the specified session and rollback any open transactions.
-!=========================================================
+!`close` !Close the specified session and rollback any open transactions.
|=========================================================
'`authentication` operation arguments'
[26/50] incubator-tinkerpop git commit: Updates to upgrade docs on
3.1.0.
Posted by ok...@apache.org.
Updates to upgrade docs on 3.1.0.
Invoking CTR in this case as it is just a minor documentation update.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/ca00e359
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/ca00e359
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/ca00e359
Branch: refs/heads/TINKERPOP3-925
Commit: ca00e35984e2f94a0442eea96190dfe265da221e
Parents: b70f5f5
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Oct 28 11:36:04 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Oct 28 11:36:04 2015 -0400
----------------------------------------------------------------------
.../upgrade-release-3.1.x-incubating.asciidoc | 32 +++++++++++++++++++-
1 file changed, 31 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/ca00e359/docs/src/upgrade-release-3.1.x-incubating.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade-release-3.1.x-incubating.asciidoc b/docs/src/upgrade-release-3.1.x-incubating.asciidoc
index efbc15d..a1ae8b5 100644
--- a/docs/src/upgrade-release-3.1.x-incubating.asciidoc
+++ b/docs/src/upgrade-release-3.1.x-incubating.asciidoc
@@ -40,6 +40,11 @@ Important Changes
* Entire TinkerGraph instances can be serialized over Gryo.
* Hadoop1 support has been dropped. Hadoop2 is now supported. Giraph 1.1.0 is now supported and Spark of Hadoop2 YARN.
* The implementation and semantics of `GraphTraversal.group()` has changed. The previous model is deprecated and renamed to `groupV3d0()`.
+* `PartitionStrategy` now supports `VertexProperty` such those properties can be added to partitions.
+* The Jackson library is now "shaded" and included in the `gremlin-shaded` module.
+* Configuration for Netty link:http://netty.io/wiki/native-transports.html[native transport] support in Gremlin Server.
+* The `Channelizer` implementation for Gremlin Driver can now be changed via configuration.
+* TinkerGraph is now serializable over Gryo so it is possible to request subgraphs via Gremlin Server (and `:remote`).
Please see the link:https://github.com/apache/incubator-tinkerpop/blob/3.1.0-incubating/CHANGELOG.asciidoc#XXXXXXXXXXXXXXXXXXXXXXXXXXXX[changelog] for a complete list of all the modifications that are part of this release.
@@ -84,6 +89,7 @@ Gremlin-Groovy Updates
* The closure wrappers classes `GFunction`, `GSupplier`, `GConsumer` have been deprecated.
** In Groovy, a closure can be specified using `as Function` and thus, these wrappers are not needed.
+* The `GremlinExecutor.promoteBindings()` method which was previously deprecated has been removed.
Hadoop-Gremlin Updates
++++++++++++++++++++++
@@ -95,9 +101,24 @@ Hadoop-Gremlin Updates
Upgrading for Providers
~~~~~~~~~~~~~~~~~~~~~~~
+All providers should be aware that Jackson is now shaded to `gremlin-shaded` and could represent breaking change if
+there was usage of the dependency by way of TinkerPop, a direct dependency to Jackson may be required on the
+provider's side.
+
Graph System Providers
^^^^^^^^^^^^^^^^^^^^^^
+Decomposition of AbstractTransaction
+++++++++++++++++++++++++++++++++++++
+
+The `AbstractTransaction` class has been abstracted into two different classes supporting two different modes of
+operation: `AbstractThreadLocalTransaction` and `AbstractThreadedTransaction`, where the former should be used when
+supporting `ThreadLocal` transactions and the latter for threaded transactions. Of course, providers may still
+choose to build their own implementation on `AbstractTransaction` itself or simply implementing the `Transaction`
+interface.
+
+See link:https://issues.apache.org/jira/browse/TINKERPOP3-765[TINKERPOP3-765] for more information.
+
Transaction.close() Default Behavior
++++++++++++++++++++++++++++++++++++
@@ -114,4 +135,13 @@ See link:https://issues.apache.org/jira/browse/TINKERPOP3-805[TINKERPOP3-805] fo
Graph Traversal Updates
+++++++++++++++++++++++
-There were numerous changes to the `GraphTraversal` API. Nearly all changes are backwards compatible with respective "deprecated" annotations. Please review the respective updates specified in the "Graph System Users" section.
+There were numerous changes to the `GraphTraversal` API. Nearly all changes are backwards compatible with respective
+"deprecated" annotations. Please review the respective updates specified in the "Graph System Users" section.
+
+Element Removal
++++++++++++++++
+
+`Element.Exceptions.elementAlreadyRemoved` has been deprecated and test enforcement for consistency have been removed.
+ Providers are free to deal with deleted elements as they see fit.
+
+See link:https://issues.apache.org/jira/browse/TINKERPOP3-297[TINKERPOP3-297] for more information.
[03/50] incubator-tinkerpop git commit: added a reset() step.
Posted by ok...@apache.org.
added a reset() step.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/0841bbdc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/0841bbdc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/0841bbdc
Branch: refs/heads/TINKERPOP3-925
Commit: 0841bbdc009e4af20fb8bff7899b296eaad3c4da
Parents: 5c5bd06
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Tue Oct 20 14:26:50 2015 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Tue Oct 20 14:26:50 2015 -0600
----------------------------------------------------------------------
.../gremlin/process/traversal/step/map/GraphStep.java | 7 +++++++
1 file changed, 7 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/0841bbdc/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphStep.java
index 665f934..3a84281 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphStep.java
@@ -129,4 +129,11 @@ public class GraphStep<S, E extends Element> extends AbstractStep<S, E> implemen
}
}
}
+
+ @Override
+ public void reset() {
+ super.reset();
+ this.head = null;
+ this.iterator = EmptyIterator.instance();
+ }
}
[14/50] incubator-tinkerpop git commit: TINKERPOP3-922 Created
developer book.
Posted by ok...@apache.org.
TINKERPOP3-922 Created developer book.
Moved CONTRIBUTING and RELEASE to the developer book.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/3a3fdf75
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/3a3fdf75
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/3a3fdf75
Branch: refs/heads/TINKERPOP3-925
Commit: 3a3fdf751263036fa0974bfc1f6da8e4faba8ddc
Parents: c8f1b70
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Oct 27 17:28:39 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Oct 27 17:28:39 2015 -0400
----------------------------------------------------------------------
CONTRIBUTING.asciidoc | 246 +----------------------
RELEASE.asciidoc | 172 -----------------
docs/src/developer-contributing.asciidoc | 268 ++++++++++++++++++++++++++
docs/src/developer-release.asciidoc | 172 +++++++++++++++++
docs/src/developer.asciidoc | 29 +++
pom.xml | 29 ++-
6 files changed, 499 insertions(+), 417 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/3a3fdf75/CONTRIBUTING.asciidoc
----------------------------------------------------------------------
diff --git a/CONTRIBUTING.asciidoc b/CONTRIBUTING.asciidoc
index 14825fa..e2439c1 100644
--- a/CONTRIBUTING.asciidoc
+++ b/CONTRIBUTING.asciidoc
@@ -22,247 +22,5 @@ author. By submitting any copyrighted material via pull request, email, or other
you agree to license the material under the project's open source license and
warrant that you have the legal authority to do so.
-Building and Testing
---------------------
-
-TinkerPop requires `Java 1.8.0_40+` for proper building and proper operations.
-
-* Build Project: `mvn clean install`
-** Specify specific tests in a TinkerPop Suite to run with the `GREMLIN_TESTS` environment variable, along with the
-Maven project list argument, e.g.:
-+
-----
-export GREMLIN_TESTS='org.apache.tinkerpop.gremlin.process.traversal.step.map.PathTest$Traversals,org.apache.tinkerpop.gremlin.process.traversal.PathTest'
-mvn -Dmaven.javadoc.skip=true --projects tinkergraph-gremlin test
-----
-** Clean the `.groovy/grapes/org.apache.tinkerpop` directory on build: `mvn clean install -DcleanGrapes`
-** Turn off "heavy" logging in the "process" tests: `mvn clean install -DargLine="-DmuteTestLogs=true"`
-** The test suite for `neo4j-gremlin` is disabled by default - to turn it on: `mvn clean install -DincludeNeo4j`
-* Regenerate test data (only necessary given changes to IO classes): `mvn clean install -Dio` from `tinkergraph-gremlin` directory
-** If there are changes to the Gryo format, it may be necessary to generate the Grateful Dead dataset from GraphSON (see `IoDataGenerationTest.shouldWriteGratefulDead`)
-* Check license headers are present: `mvn apache-rat:check`
-* Build AsciiDocs (Hadoop and ZooKeeper must be running): `bin/process-docs.sh`
-** Build AsciiDocs (but don't evaluate code blocks): `bin/process-docs.sh --dryRun`
-** Process a single AsciiDoc file: +pass:[docs/preprocessor/preprocess-file.sh `pwd`/gremlin-console/target/apache-gremlin-console-*-standalone `pwd`/docs/src/xyz.asciidoc]+
-* Build JavaDocs: `mvn process-resources -Djavadoc`
-* Check for Apache License headers: `mvn apache-rat:check`
-* Check for newer dependencies: `mvn versions:display-dependency-updates` or `mvn versions:display-plugin-updates`
-* Deploy JavaDocs/AsciiDocs: `bin/publish-docs.sh svn-username`
-* Integration Tests: `mvn verify -DskipIntegrationTests=false`
-** Execute with the `-DincludeNeo4j` option to include transactional tests.
-** Execute with the `-DuseEpoll` option to try to use Netty native transport (works on Linux, but will fallback to Java NIO on other OS).
-* Performance Tests: `mvn verify -DskipPerformanceTests=false`
-
-IDE Setup with Intellij
------------------------
-
-This section refers specifically to setup within Intellij. TinkerPop has a module called `gremlin-shaded` which
-contains shaded dependencies for some libraries that are widely used and tend to introduce conflicts. To ensure
-that Intellij properly interprets this module after importing the Maven `pom.xml` perform the following steps:
-
-. Build `gremlin-shaded` from the command line with `mvn clean install`.
-. Right-click on the `gremlin-shaded` module in the project viewer of Intellij and select "Remove module".
-. In the "Maven Projects" Tool window and click the tool button for "Reimport All Maven projects" (go to
-`View | Tool Windows | Maven Projects` on the main menu if this panel is not activated).
-. At this point it should be possible to compile and run the tests within Intellij, but in the worst case, use
-`File | Invalidate Caches/Restart` to ensure that indices properly rebuild.
-
-Note that it maybe be necessary to re-execute these steps if the `gremlin-shaded` `pom.xml` is ever updated.
-
-Developers working on the `neo4j-gremlin` module should enabled the `include-neo4j` Maven profile in Intellij.
-This will ensure that tests will properly execute within the IDE.
-
-If Intellij complains about "duplicate sources" for the Groovy files when attempting to compile/run tests, then
-install the link:http://plugins.jetbrains.com/plugin/7442?pr=idea[GMavenPlus Intellij plugin].
-
-For Committers
---------------
-
-The guidelines that follow apply to those with commit access to the main repository:
-
-Communication
-~~~~~~~~~~~~~
-
-TinkerPop has a link:http://groups.google.com/group/gremlin-users[user mailing list] and a
-link:http://mail-archives.apache.org/mod_mbox/incubator-tinkerpop-dev/[developer mailing list]. As a committer,
-it is a good idea to join both.
-
-It would also be helpful to join the public link:https://s.apache.org/tinkerpop[TinkerPop HipChat room] for developer
-discussion. This helps contributors to communicate in a more real-time way. Anyone can join as a guest, but for
-regular contributors it may be best to request that an Apache HipChat account be created.
-
-Release Notes
-~~~~~~~~~~~~~
-
-There is a two-pronged approach to maintaining the change log and preparing the release notes.
-
-1. For work that is documented in JIRA, run the release notes report to include all of
-the tickets targeted for a specific release. This report can be included in the
-release announcement.
-
-2. The manual change log (`CHANGELOG.asciidoc`) can be used to highlight large
-changes, describe themes (e.g. "We focused on performance improvements") or to
-give voice to undocumented changes.
-
-Given the dependence on the JIRA report for generating additions to the `CHANGELOG.asciidoc`,
-which uses the title of the issue as the line presented in the release note report, titles should
-be edited prior to release to be useful in that context. In other words, an issue title should
-be understandable as a change in the fewest words possible while still conveying the gist of the
-change.
-
-Changes that break the public APIs should be marked with a "breaking" label and should be
-distinguished from other changes in the release notes.
-
-Branches
-~~~~~~~~
-
-The "master" branch is used for the main line of development and release branches are constructed
-for ongoing maintenance work. For example, the "tp30" branch is used to maintain the 3.0.x line
-while work on 3.1.x proceeds on "master".
-
-Other branches may be created for collaborating on features or for RFC's that
-other developers may want to inspect. It is suggested that the JIRA issue ID be
-used as the prefix, since that triggers certain automation, and it provides a
-way to account for the branch lifecycle, i.e. "Who's branch is this, and can I
-delete it?"
-
-For branches that are NOT associated with JIRA issues, developers should utilize their Apache ID as
-a branch name prefix. This provides a unique namespace, and also a way to account for the branch lifecycle.
-
-Developers should remove their own branches when they are no longer needed.
-
-Tags
-~~~~
-
-Tags are used for milestones, release candidates, and approved releases. Please
-refrain from creating arbitrary tags, as they produce permanent clutter.
-
-Issue Tracker Conventions
-~~~~~~~~~~~~~~~~~~~~~~~~~
-
-TinkerPop uses Apache JIRA as its link:https://issues.apache.org/jira/browse/TINKERPOP3[issue tracker]. JIRA is a
-very robust piece of software with many options and configurations. To simplify usage and ensure consistency across
-issues, the following conventions should be adhered to:
-
-* An issue's "status" should generally be in one of two states: `open` or `closed` (`reopened` is equivalent to `open`
-for our purposes).
-** An `open` issue is newly created, under consideration or otherwise in progress.
-** A `closed` issue is completed for purposes of release (i.e. code, testing, and documentation complete).
-** Issues in a `resolved` state should immediately be evaluated for movement to `closed` - issue become `resolved`
-by those who don't have the permissions to `close`.
-* An issue's "type" should be one of two options: `bug` or `improvement`.
-** A `bug` has a very specific meaning, referring to an error that prevents usage of TinkerPop AND does not have a
-reasonable workaround. Given that definition, a `bug` should generally have very high priority for a fix.
-** Everything else is an `improvement` in the sense that any other work is an enhancement to the current codebase.
-* The "component" should be representative of the primary area of code that it applies to and all issues should have
-this property set.
-* Issues are not assigned "labels" with one exception: the "breaking" label. The "breaking" label marks an issue
-as one that is representative of a change in the API that might affect users or vendors. This label is important when
-organizing release notes.
-* The "affects/fix version(s)" fields should be appropriately set, where the "fix version" implies the version on
-which that particular issue will completed.
-
-Code Style
-~~~~~~~~~~
-
-Contributors should examine the current code base to determine what the code style patterns are and should match their
-style to what is already present. Of specific note however, TinkerPop does not use "import wildcards" - IDEs should
-be adjusted accordingly to not auto-wildcard the imports.
-
-Deprecation
-~~~~~~~~~~~
-
-When possible, committers should avoid direct "breaking" change (e.g. removing a method from a class) and favor
-deprecation. Deprecation should come with sufficient documentation and notice especially when the change involves
-public APIs that might be utilized by users or implemented by vendors:
-
-* Mark the code with the `@Deprecated` annotation.
-* Use javadoc to further document the change with the following content:
-** `@deprecated As of release x.y.z, replaced by {@link SomeOtherClass#someNewMethod()}` - if the method is not
-replaced then the comment can simply read "not replaced". Additional comments that provide more context are
-encouraged.
-** `@see <a href="https://issues.apache.org/jira/browse/TINKERPOP3-XXX">TINKERPOP3-XXX</a>` - supply a link to the
-JIRA issue for reference.
-* All deprecation should be tied to a JIRA issue with a "breaking" label - the issue itself does not need to
-specifically or solely be about "deprecation" but it should be documented very clearly in the comments what was
-deprecated and what the path forward should be.
-* Be sure that deprecated methods are still under test - consider using javadoc/comments in the tests themselves to
-call out this fact.
-* Create a new JIRA issue to track removal of the deprecation for future evaluation - this issue should have the
-"breaking" label.
-* Provide a post to the developers and/or users mailing lists as the case requires to alert the community to the change.
-
-The JIRA issues that track removal of deprecated methods should be periodically evaluated to determine if it is
-prudent to schedule them into a release.
-
-Gremlin Language Test Cases
-~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-When writing a test case for a Gremlin step, be sure to use the following conventions.
-
-* The name of the traversal generator should start with `get`, use `X` for brackets, `_` for space, and the Gremlin-Groovy sugar syntax.
-** `get_g_V_hasLabelXpersonX_groupXaX_byXageX_byXsumX_name()`
-* When creating a test for a step that has both a barrier and sideEffect form (e.g. `group()`, `groupCount()`, etc.), test both representations.
-** `get_g_V_groupCount_byXnameX()`
-** `get_g_V_groupCountXaX_byXnameX_capXaX()`
-* The name of the actual test case should be the name of the traversal generator minus the `get_` prefix.
-* The Gremlin-Groovy version of the test should use the sugar syntax in order to test sugar (as Gremlin-Java8 tests test standard syntax).
-** `g.V.age.sum`
-* Avoid using lambdas in the test case unless that is explicitly what is being tested as OLAP systems will typically not be able to execute those tests.
-* `AbstractGremlinProcessTest` has various static methods to make writing a test case easy.
-** `checkResults(Arrays.asList("marko","josh"), traversal)`
-** `checkMap(new HashMap<String,Long>() {{ put("marko",1l); }}, traversal.next())`
-
-Review then Commit
-~~~~~~~~~~~~~~~~~~
-
-Code modifications must go through a link:http://www.apache.org/foundation/glossary.html#ReviewThenCommit[review-then-committ] (RTC)
-process before being merged into a release branch. All committers should follow the pattern below, where "you" refers to the
-committer wanting to put code into a release branch.
-
-* Make a JIRA ticket for the software problem you want to solve (i.e. a fix).
-* Fork the release branch that the fix will be put into.
-** The branch name should be the JIRA issue identifier (e.g. `TINKERPOP3-XXX`).
-* Develop your fix in your branch.
-* When your fix is complete and ready to merge, issue a link:https://git-scm.com/docs/git-request-pull[pull request].
-** Be certain that the test suite is passing.
-** If you updated documentation, be sure that the `process-docs.sh` is building the documentation correctly.
-* Before you can merge your branch into the release branch, you must have at least 3 +1 link:http://www.apache.org/foundation/glossary.html#ConsensusApproval[consensus votes].
-** Please see the Apache Software Foundations regulations regarding link:http://www.apache.org/foundation/voting.html#votes-on-code-modification[Voting on Code Modifications].
-* Votes are issued by TinkerPop committers as comments to the pull request.
-* Once 3 +1 votes are received, you are responsible for merging to the release branch and handling any merge conflicts.
-** If there is a higher version release branch that requires your fix (e.g. `3.y-1.z` fix going to a `3.y.z` release), be sure to merge to that release branch as well.
-* Be conscious of deleting your branch if it is no longer going to be used so stale branches don't pollute the repository.
-
-NOTE: These steps also generally apply to external pull requests from those who are not official Apache committers. In
-this case, the person responsible for the merge after voting is typically the first person available
-who is knowledgeable in the area that the pull request affects. Any additional coordination on merging can be handled
-via the pull request comment system.
-
-The following exceptions to the RTC (review-then-commit) model presented above are itemized below. It is up to the
-committer to self-regulate as the itemization below is not complete and only hints and the types of commits that do not
-require a review.
-
-* You are responsible for a release and need to manipulate files accordingly for the release.
-** `Gremlin.version()`, CHANGELOG dates, `pom.xml` version bumps, etc.
-* You are doing an minor change and it is obvious that an RTC is not required (would be a pointless burden to the community).
-** The fix is under the link:http://www.apache.org/foundation/glossary.html#CommitThenReview[commit-then-review] (CTR) policy and lazy consensus is sufficient, where a single -1 vote requires you to revert your changes.
-** Adding a test case, fixing spelling/grammar mistakes in the documentation, fixing LICENSE/NOTICE/etc. files, fixing a minor issue in an already merged branch.
-
-Pull Request Format
-^^^^^^^^^^^^^^^^^^^
-
-When you submit a pull request, be sure it uses the following style.
-
-* The title of the pull request is the JIRA ticket number + "colon" + the title of the JIRA ticket.
-* The first line of the pull request message should contain a link to the JIRA ticket.
-* Discuss what you did to solve the problem articulated in the JIRA ticket.
-* Discuss any "extra" work done that go beyond the assumed requirements of the JIRA ticket.
-* Be sure to explain what you did to prove that the issue is resolved.
-** Test cases written.
-** Integration tests run (if required for the work accomplished).
-** Documentation building (if required for the work accomplished).
-** Any manual testing (though this should be embodied in a test case).
-* Notes about what you will do when you merge to the respective release branch (e.g. update CHANGELOG).
-** These types of "on merge tweaks" are typically done to extremely dynamic files to combat and merge conflicts.
-* If you are a TinkerPop committer, you can VOTE on your own pull request, so please do so.
+Please see the "Developer Documentation" for more information on
+link:http://tinkerpop.incubator.apache.org/docs/3.1.0-SNAPSHOT/developer.html#_contributing[contributing] to TinkerPop.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/3a3fdf75/RELEASE.asciidoc
----------------------------------------------------------------------
diff --git a/RELEASE.asciidoc b/RELEASE.asciidoc
deleted file mode 100644
index bb3b69a..0000000
--- a/RELEASE.asciidoc
+++ /dev/null
@@ -1,172 +0,0 @@
-////
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-////
-Release Process
----------------
-
-This document describes the steps required to release a version of TinkerPop. The release is handled by a "release
-manager" (a committer fulfills this role), who ensures that the steps in this document are executed. The process is
-multi-phased and can therefore take several weeks to complete given the time needed for Apache voting and community
-feedback. Once a release point has been identified, the following phases represent the flow of "release":
-
-* Pre-flight check.
-* Optionally, produce a release candidate for community feedback.
-* Submit the official release for PMC vote.
-* Submit the official release for Incubator vote.
-* Release and promote.
-
-Pre-flight Check
-~~~~~~~~~~~~~~~~
-
-The "pre-flight check" is a list of things performed by the release manager during the weeks leading up to a scheduled
-day to release. These checks will help to ensure that that release day goes smoothly by identifying problems up early
-and communicating with other members of the community.
-
-. Fourteen days before release, issue an email to the dev mailing list to remind the community of the pending release.
-.. Note any important issues open in JIRA in that post.
-.. Request review and update of the "upgrade documentation" and CHANGELOG.
-. Seven days before release, announce the code freeze on the dev mailing list to remind the community that the branch
-under release is protected. Tweaks to documentation and other odds and ends related to release are still allowed
-during this period.
-. At some point during the week:
-.. Deploy a final SNAPSHOT to the snapshot repository.
-.. Review LICENSE and NOTICE files to make sure that no changes are needed.
-.. Review javadoc filters on the "Core API" docs to be sure nothing needs to change.
-. When all documentation changes are in place, use `bin/publish-docs.sh` to deploy a final `SNAPSHOT` representation
-of the docs and thus validate that there are no issues with the documentation generation process. Request review
-of the published documentation on the dev mailing list.
-
-Release Candidate
-~~~~~~~~~~~~~~~~~
-
-A release candidate is an unofficial release that is represented by a tagged version in the Git repository. It is
-offered in cases where there is significant change in a particular version and the potential for upgrades and problems
-might be high.
-
-. `mvn clean install -DincludeNeo4j`
-.. `mvn verify -DskipIntegrationTests=false -DincludeNeo4j`
-.. `mvn verify -DskipPerformanceTests=false`
-. `bin/publish-docs.sh <username>` - note that under a release candidate the documentation is published as SNAPSHOT
-. `mvn versions:set -DnewVersion=x.y.z -DgenerateBackupPoms=false` to update the project files to reference a non-SNAPSHOT version
-. `git diff` and review the updated files (expect all `pom.xml` files and this README)
-. `git commit -a -m "TinkerPop x.y.z release"` and `git push`
-. `git tag -a -m "TinkerPop x.y.z release" x.y.z` and `git push --tags`
-. `mvn clean install -Dmaven.test.skip=true`
-. `mvn versions:set -DnewVersion=x.y.z-SNAPSHOT -DgenerateBackupPoms=false` to go back to SNAPSHOT
-. `git commit -a -m "Returned to x.y.z-SNAPSHOT"` and `git push`
-. Announce the release candidate to `dev` mailing list and await feedback
-. Repeat as required or proceed to the next phase
-
-PMC Vote
-~~~~~~~~
-
-A positive vote for a particular release from the TinkerPop PMC is required to move to the following phase.
-
-. `mvn clean install`
-.. `mvn verify -DskipIntegrationTests=false -DincludeNeo4j`
-.. `mvn verify -DskipPerformanceTests=false`
-. Perform manual tests:
-.. Execute `:remote connect conf/remote.yaml` and send some requests to a running Gremlin Server instance.
-.. Execute `:?` to display the help in the Console.
-. Update `CHANGELOG.asciidoc`:
-.. Update the release date
-.. Generate the JIRA release notes report for the current version and append them to the `CHANGELOG.asciidoc`
-.. Organize "breaking" changes to be clearly marked (use JIRA and the "breaking" label to identify those)
-. Update "upgrade documentation":
-.. Update the release date.
-.. Update the link to CHANGELOG.asciidoc
-. `mvn versions:set -DnewVersion=x.y.z -DgenerateBackupPoms=false` to update project files to reference the non-SNAPSHOT version
-. `git diff` and review the updated files (expect all `pom.xml` files and this README)
-. `git commit -a -m "TinkerPop x.y.z release"` and `git push`
-. `git tag -a -m "TinkerPop x.y.z release" x.y.z` and `git push --tags`
-. `mvn clean install -Dmaven.test.skip=true`
-. `bin/publish-docs.sh <username>`
-. `mvn install -Papache-release -DcreateChecksum=true -Dmaven.test.skip=true`
-. Review generated artifacts to be sure they have both javadocs and asciidocs present
-. Upload artifacts to `https://dist.apache.org/repos/dist/dev/incubator/tinkerpop` for `[VOTE]` review.
-.. `svn co --depth empty https://dist.apache.org/repos/dist/dev/incubator/tinkerpop/ dev` and `mkdir dev/x.y.z`
-.. `cp ~/.m2/repository/org/apache/tinkerpop/gremlin-console/x.y.z/gremlin-console-x.y.z-distribution.zip* dev/x.y.z`
-.. `cp ~/.m2/repository/org/apache/tinkerpop/gremlin-server/x.y.z/gremlin-server-x.y.z-distribution.zip* dev/x.y.z`
-.. `cp ~/.m2/repository/org/apache/tinkerpop/tinkerpop/x.y.z/tinkerpop-x.y.z-source-release.zip* dev/x.y.z`
-.. `cd dev/x.y.z` and `for f in \*.zip*; do mv "$f" "apache-$f"; done`
-.. `cd ..; svn add x.y.z/; svn ci -m "TinkerPop x.y.z release"`
-. Execute `bin/validate-distribution.sh` and any other relevant testing.
-. Perform JIRA administration tasks:
-.. "Release" the current version and set the "release date"
-.. If there is to be a follow on release in the current line of code, create that new version specifying the "start date"
-.. Migrate the "Affected Version" of all unresolved issues to the next lowest common denominator version - if version 3.0.1 released then all 3.0.0 issues should move forward to 3.0.1 as they now "affect" that latest release
-. Submit for `[VOTE]` at `dev@tinkerpop.incubator.apache.org` (see email template below)
-. *Wait for vote acceptance* (72 hours)
-
-Incubator Vote
-~~~~~~~~~~~~~~
-
-A positive vote for a particular release from the Apache Incubator is required to move to the following phase.
-
-. Submit for `[VOTE]` at `general@incubator.apache.org` (see email template below)
-.. Include the vote tally: "Apache TinkerPop (http://tinkerpop.incubator.apache.org/) would like to release TinkerPop x.y.z. We had a dev@ VOTE which resulted in a tally of +1 (3), 0 (0), and -1 (0). We now present our artifacts for vote by Incubator."
-. *Wait for vote acceptance* (72 hours)
-
-Release & Promote
-~~~~~~~~~~~~~~~~~
-
-. `mvn clean install -Djavadoc -Dmaven.test.skip=true; bin/process-docs.sh` - rebuild source and docs of tagged release
-. `mvn deploy -Papache-release -DcreateChecksum=true -Dmaven.test.skip=true`- deploy signed artifacts with checksums to Apache Nexus
-. Review and close the staging repository (Apache Nexus at link:https://repository.apache.org/[https://repository.apache.org/]) - check that versions are correct and that all artifacts are present
-. `svn co --depth empty https://dist.apache.org/repos/dist/dev/incubator/tinkerpop dev; svn up dev/x.y.z`
-. `svn co --depth empty https://dist.apache.org/repos/dist/release/incubator/tinkerpop release; mkdir release/x.y.z`
-. `ls dev/x.y.z/ | grep '\-\(distribution\|source\-release\)\.zip' | sed -e 's/\(^[^ ]\*\)-distribution\([^ ]*\)/cp dev\/x.y.z\/\0 release\/x.y.z\/\1-bin\2/' -e 's/\(^[^ ]\*\)-source-release\([^ ]*\)/cp dev\/x.y.z\/\0 release\/x.y.z\/\1-src\2/' | /bin/sh`
-. `cd release; svn add x.y.z/; svn ci -m "TinkerPop x.y.z release"`
-. Update homepage with references to latest distribution and to other internal links elsewhere on the page.
-. Wait for Apache Central to sync the jars and src (link:http://repo1.maven.org/maven2/org/apache/tinkerpop/tinkerpop/[http://repo1.maven.org/maven2/org/apache/tinkerpop/tinkerpop/]).
-. Announce release on `dev@`/`gremlin-users@` mailing lists and tweet from `@apachetinkerpop`
-
-Example `[VOTE]` email:
-
-```
-[VOTE] TinkerPop x.y.z Release
-
-Hello,
-
-The release artifacts can be found at this location:
- https://dist.apache.org/repos/dist/dev/incubator/tinkerpop/x.y.z/
-
-The source distribution is provided by:
- apache-tinkerpop-x.y.z-source-release.zip
-
-Two binary distributions are provided for user convenience:
- apache-gremlin-console-x.y.z-distribution.zip
- apache-gremlin-server-x.y.z-distribution.zip
-
-The online docs can be found here:
- http://tinkerpop.incubator.apache.org/docs/x.y.z/ (user docs)
- http://tinkerpop.incubator.apache.org/docs/x.y.z/upgrade.html (upgrade docs)
- http://tinkerpop.incubator.apache.org/javadocs/x.y.z/core/ (core javadoc)
- http://tinkerpop.incubator.apache.org/javadocs/x.y.z/full/ (full javadoc)
-
-The tag in Apache Git can be found here:
- https://git-wip-us.apache.org/repos/asf?p=incubator-tinkerpop.git;...
-
-The release notes are available here:
- https://github.com/apache/incubator-tinkerpop/blob/master/CHANGELOG.asciidoc#...
-
-The [VOTE] will be open for the next 72 hours --- closing <DayOfTheWeek> (<Month> <Day> <Year>) at <Time> <TimeZone>.
-
-My vote is +1.
-
-Thank you very much,
-<TinkerPop Committer Name>
-```
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/3a3fdf75/docs/src/developer-contributing.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/developer-contributing.asciidoc b/docs/src/developer-contributing.asciidoc
new file mode 100644
index 0000000..dfa9d28
--- /dev/null
+++ b/docs/src/developer-contributing.asciidoc
@@ -0,0 +1,268 @@
+////
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+////
+Contributing
+============
+
+Contributions via GitHub pull requests are gladly accepted from their original
+author. By submitting any copyrighted material via pull request, email, or other means
+you agree to license the material under the project's open source license and
+warrant that you have the legal authority to do so.
+
+Building and Testing
+--------------------
+
+TinkerPop requires `Java 1.8.0_40+` for proper building and proper operations.
+
+* Build Project: `mvn clean install`
+** Specify specific tests in a TinkerPop Suite to run with the `GREMLIN_TESTS` environment variable, along with the
+Maven project list argument, e.g.:
++
+----
+export GREMLIN_TESTS='org.apache.tinkerpop.gremlin.process.traversal.step.map.PathTest$Traversals,org.apache.tinkerpop.gremlin.process.traversal.PathTest'
+mvn -Dmaven.javadoc.skip=true --projects tinkergraph-gremlin test
+----
+** Clean the `.groovy/grapes/org.apache.tinkerpop` directory on build: `mvn clean install -DcleanGrapes`
+** Turn off "heavy" logging in the "process" tests: `mvn clean install -DargLine="-DmuteTestLogs=true"`
+** The test suite for `neo4j-gremlin` is disabled by default - to turn it on: `mvn clean install -DincludeNeo4j`
+* Regenerate test data (only necessary given changes to IO classes): `mvn clean install -Dio` from `tinkergraph-gremlin` directory
+** If there are changes to the Gryo format, it may be necessary to generate the Grateful Dead dataset from GraphSON (see `IoDataGenerationTest.shouldWriteGratefulDead`)
+* Check license headers are present: `mvn apache-rat:check`
+* Build AsciiDocs (Hadoop and ZooKeeper must be running): `bin/process-docs.sh`
+** Build AsciiDocs (but don't evaluate code blocks): `bin/process-docs.sh --dryRun`
+** Process a single AsciiDoc file: +pass:[docs/preprocessor/preprocess-file.sh `pwd`/gremlin-console/target/apache-gremlin-console-*-standalone `pwd`/docs/src/xyz.asciidoc]+
+* Build JavaDocs: `mvn process-resources -Djavadoc`
+* Check for Apache License headers: `mvn apache-rat:check`
+* Check for newer dependencies: `mvn versions:display-dependency-updates` or `mvn versions:display-plugin-updates`
+* Deploy JavaDocs/AsciiDocs: `bin/publish-docs.sh svn-username`
+* Integration Tests: `mvn verify -DskipIntegrationTests=false`
+** Execute with the `-DincludeNeo4j` option to include transactional tests.
+** Execute with the `-DuseEpoll` option to try to use Netty native transport (works on Linux, but will fallback to Java NIO on other OS).
+* Performance Tests: `mvn verify -DskipPerformanceTests=false`
+
+IDE Setup with Intellij
+-----------------------
+
+This section refers specifically to setup within Intellij. TinkerPop has a module called `gremlin-shaded` which
+contains shaded dependencies for some libraries that are widely used and tend to introduce conflicts. To ensure
+that Intellij properly interprets this module after importing the Maven `pom.xml` perform the following steps:
+
+. Build `gremlin-shaded` from the command line with `mvn clean install`.
+. Right-click on the `gremlin-shaded` module in the project viewer of Intellij and select "Remove module".
+. In the "Maven Projects" Tool window and click the tool button for "Reimport All Maven projects" (go to
+`View | Tool Windows | Maven Projects` on the main menu if this panel is not activated).
+. At this point it should be possible to compile and run the tests within Intellij, but in the worst case, use
+`File | Invalidate Caches/Restart` to ensure that indices properly rebuild.
+
+Note that it maybe be necessary to re-execute these steps if the `gremlin-shaded` `pom.xml` is ever updated.
+
+Developers working on the `neo4j-gremlin` module should enabled the `include-neo4j` Maven profile in Intellij.
+This will ensure that tests will properly execute within the IDE.
+
+If Intellij complains about "duplicate sources" for the Groovy files when attempting to compile/run tests, then
+install the link:http://plugins.jetbrains.com/plugin/7442?pr=idea[GMavenPlus Intellij plugin].
+
+For Committers
+--------------
+
+The guidelines that follow apply to those with commit access to the main repository:
+
+Communication
+~~~~~~~~~~~~~
+
+TinkerPop has a link:http://groups.google.com/group/gremlin-users[user mailing list] and a
+link:http://mail-archives.apache.org/mod_mbox/incubator-tinkerpop-dev/[developer mailing list]. As a committer,
+it is a good idea to join both.
+
+It would also be helpful to join the public link:https://s.apache.org/tinkerpop[TinkerPop HipChat room] for developer
+discussion. This helps contributors to communicate in a more real-time way. Anyone can join as a guest, but for
+regular contributors it may be best to request that an Apache HipChat account be created.
+
+Release Notes
+~~~~~~~~~~~~~
+
+There is a two-pronged approach to maintaining the change log and preparing the release notes.
+
+1. For work that is documented in JIRA, run the release notes report to include all of
+the tickets targeted for a specific release. This report can be included in the
+release announcement.
+
+2. The manual change log (`CHANGELOG.asciidoc`) can be used to highlight large
+changes, describe themes (e.g. "We focused on performance improvements") or to
+give voice to undocumented changes.
+
+Given the dependence on the JIRA report for generating additions to the `CHANGELOG.asciidoc`,
+which uses the title of the issue as the line presented in the release note report, titles should
+be edited prior to release to be useful in that context. In other words, an issue title should
+be understandable as a change in the fewest words possible while still conveying the gist of the
+change.
+
+Changes that break the public APIs should be marked with a "breaking" label and should be
+distinguished from other changes in the release notes.
+
+Branches
+~~~~~~~~
+
+The "master" branch is used for the main line of development and release branches are constructed
+for ongoing maintenance work. For example, the "tp30" branch is used to maintain the 3.0.x line
+while work on 3.1.x proceeds on "master".
+
+Other branches may be created for collaborating on features or for RFC's that
+other developers may want to inspect. It is suggested that the JIRA issue ID be
+used as the prefix, since that triggers certain automation, and it provides a
+way to account for the branch lifecycle, i.e. "Who's branch is this, and can I
+delete it?"
+
+For branches that are NOT associated with JIRA issues, developers should utilize their Apache ID as
+a branch name prefix. This provides a unique namespace, and also a way to account for the branch lifecycle.
+
+Developers should remove their own branches when they are no longer needed.
+
+Tags
+~~~~
+
+Tags are used for milestones, release candidates, and approved releases. Please
+refrain from creating arbitrary tags, as they produce permanent clutter.
+
+Issue Tracker Conventions
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+TinkerPop uses Apache JIRA as its link:https://issues.apache.org/jira/browse/TINKERPOP3[issue tracker]. JIRA is a
+very robust piece of software with many options and configurations. To simplify usage and ensure consistency across
+issues, the following conventions should be adhered to:
+
+* An issue's "status" should generally be in one of two states: `open` or `closed` (`reopened` is equivalent to `open`
+for our purposes).
+** An `open` issue is newly created, under consideration or otherwise in progress.
+** A `closed` issue is completed for purposes of release (i.e. code, testing, and documentation complete).
+** Issues in a `resolved` state should immediately be evaluated for movement to `closed` - issue become `resolved`
+by those who don't have the permissions to `close`.
+* An issue's "type" should be one of two options: `bug` or `improvement`.
+** A `bug` has a very specific meaning, referring to an error that prevents usage of TinkerPop AND does not have a
+reasonable workaround. Given that definition, a `bug` should generally have very high priority for a fix.
+** Everything else is an `improvement` in the sense that any other work is an enhancement to the current codebase.
+* The "component" should be representative of the primary area of code that it applies to and all issues should have
+this property set.
+* Issues are not assigned "labels" with one exception: the "breaking" label. The "breaking" label marks an issue
+as one that is representative of a change in the API that might affect users or vendors. This label is important when
+organizing release notes.
+* The "affects/fix version(s)" fields should be appropriately set, where the "fix version" implies the version on
+which that particular issue will completed.
+
+Code Style
+~~~~~~~~~~
+
+Contributors should examine the current code base to determine what the code style patterns are and should match their
+style to what is already present. Of specific note however, TinkerPop does not use "import wildcards" - IDEs should
+be adjusted accordingly to not auto-wildcard the imports.
+
+Deprecation
+~~~~~~~~~~~
+
+When possible, committers should avoid direct "breaking" change (e.g. removing a method from a class) and favor
+deprecation. Deprecation should come with sufficient documentation and notice especially when the change involves
+public APIs that might be utilized by users or implemented by vendors:
+
+* Mark the code with the `@Deprecated` annotation.
+* Use javadoc to further document the change with the following content:
+** `@deprecated As of release x.y.z, replaced by {@link SomeOtherClass#someNewMethod()}` - if the method is not
+replaced then the comment can simply read "not replaced". Additional comments that provide more context are
+encouraged.
+** `@see <a href="https://issues.apache.org/jira/browse/TINKERPOP3-XXX">TINKERPOP3-XXX</a>` - supply a link to the
+JIRA issue for reference.
+* All deprecation should be tied to a JIRA issue with a "breaking" label - the issue itself does not need to
+specifically or solely be about "deprecation" but it should be documented very clearly in the comments what was
+deprecated and what the path forward should be.
+* Be sure that deprecated methods are still under test - consider using javadoc/comments in the tests themselves to
+call out this fact.
+* Create a new JIRA issue to track removal of the deprecation for future evaluation - this issue should have the
+"breaking" label.
+* Provide a post to the developers and/or users mailing lists as the case requires to alert the community to the change.
+
+The JIRA issues that track removal of deprecated methods should be periodically evaluated to determine if it is
+prudent to schedule them into a release.
+
+Gremlin Language Test Cases
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+When writing a test case for a Gremlin step, be sure to use the following conventions.
+
+* The name of the traversal generator should start with `get`, use `X` for brackets, `_` for space, and the Gremlin-Groovy sugar syntax.
+** `get_g_V_hasLabelXpersonX_groupXaX_byXageX_byXsumX_name()`
+* When creating a test for a step that has both a barrier and sideEffect form (e.g. `group()`, `groupCount()`, etc.), test both representations.
+** `get_g_V_groupCount_byXnameX()`
+** `get_g_V_groupCountXaX_byXnameX_capXaX()`
+* The name of the actual test case should be the name of the traversal generator minus the `get_` prefix.
+* The Gremlin-Groovy version of the test should use the sugar syntax in order to test sugar (as Gremlin-Java8 tests test standard syntax).
+** `g.V.age.sum`
+* Avoid using lambdas in the test case unless that is explicitly what is being tested as OLAP systems will typically not be able to execute those tests.
+* `AbstractGremlinProcessTest` has various static methods to make writing a test case easy.
+** `checkResults(Arrays.asList("marko","josh"), traversal)`
+** `checkMap(new HashMap<String,Long>() {{ put("marko",1l); }}, traversal.next())`
+
+Review then Commit
+~~~~~~~~~~~~~~~~~~
+
+Code modifications must go through a link:http://www.apache.org/foundation/glossary.html#ReviewThenCommit[review-then-committ] (RTC)
+process before being merged into a release branch. All committers should follow the pattern below, where "you" refers to the
+committer wanting to put code into a release branch.
+
+* Make a JIRA ticket for the software problem you want to solve (i.e. a fix).
+* Fork the release branch that the fix will be put into.
+** The branch name should be the JIRA issue identifier (e.g. `TINKERPOP3-XXX`).
+* Develop your fix in your branch.
+* When your fix is complete and ready to merge, issue a link:https://git-scm.com/docs/git-request-pull[pull request].
+** Be certain that the test suite is passing.
+** If you updated documentation, be sure that the `process-docs.sh` is building the documentation correctly.
+* Before you can merge your branch into the release branch, you must have at least 3 +1 link:http://www.apache.org/foundation/glossary.html#ConsensusApproval[consensus votes].
+** Please see the Apache Software Foundations regulations regarding link:http://www.apache.org/foundation/voting.html#votes-on-code-modification[Voting on Code Modifications].
+* Votes are issued by TinkerPop committers as comments to the pull request.
+* Once 3 +1 votes are received, you are responsible for merging to the release branch and handling any merge conflicts.
+** If there is a higher version release branch that requires your fix (e.g. `3.y-1.z` fix going to a `3.y.z` release), be sure to merge to that release branch as well.
+* Be conscious of deleting your branch if it is no longer going to be used so stale branches don't pollute the repository.
+
+NOTE: These steps also generally apply to external pull requests from those who are not official Apache committers. In
+this case, the person responsible for the merge after voting is typically the first person available
+who is knowledgeable in the area that the pull request affects. Any additional coordination on merging can be handled
+via the pull request comment system.
+
+The following exceptions to the RTC (review-then-commit) model presented above are itemized below. It is up to the
+committer to self-regulate as the itemization below is not complete and only hints and the types of commits that do not
+require a review.
+
+* You are responsible for a release and need to manipulate files accordingly for the release.
+** `Gremlin.version()`, CHANGELOG dates, `pom.xml` version bumps, etc.
+* You are doing an minor change and it is obvious that an RTC is not required (would be a pointless burden to the community).
+** The fix is under the link:http://www.apache.org/foundation/glossary.html#CommitThenReview[commit-then-review] (CTR) policy and lazy consensus is sufficient, where a single -1 vote requires you to revert your changes.
+** Adding a test case, fixing spelling/grammar mistakes in the documentation, fixing LICENSE/NOTICE/etc. files, fixing a minor issue in an already merged branch.
+
+Pull Request Format
+^^^^^^^^^^^^^^^^^^^
+
+When you submit a pull request, be sure it uses the following style.
+
+* The title of the pull request is the JIRA ticket number + "colon" + the title of the JIRA ticket.
+* The first line of the pull request message should contain a link to the JIRA ticket.
+* Discuss what you did to solve the problem articulated in the JIRA ticket.
+* Discuss any "extra" work done that go beyond the assumed requirements of the JIRA ticket.
+* Be sure to explain what you did to prove that the issue is resolved.
+** Test cases written.
+** Integration tests run (if required for the work accomplished).
+** Documentation building (if required for the work accomplished).
+** Any manual testing (though this should be embodied in a test case).
+* Notes about what you will do when you merge to the respective release branch (e.g. update CHANGELOG).
+** These types of "on merge tweaks" are typically done to extremely dynamic files to combat and merge conflicts.
+* If you are a TinkerPop committer, you can VOTE on your own pull request, so please do so.
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/3a3fdf75/docs/src/developer-release.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/developer-release.asciidoc b/docs/src/developer-release.asciidoc
new file mode 100644
index 0000000..e2b7eeb
--- /dev/null
+++ b/docs/src/developer-release.asciidoc
@@ -0,0 +1,172 @@
+////
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+////
+Release Process
+===============
+
+This document describes the steps required to release a version of TinkerPop. The release is handled by a "release
+manager" (a committer fulfills this role), who ensures that the steps in this document are executed. The process is
+multi-phased and can therefore take several weeks to complete given the time needed for Apache voting and community
+feedback. Once a release point has been identified, the following phases represent the flow of "release":
+
+* Pre-flight check.
+* Optionally, produce a release candidate for community feedback.
+* Submit the official release for PMC vote.
+* Submit the official release for Incubator vote.
+* Release and promote.
+
+Pre-flight Check
+----------------
+
+The "pre-flight check" is a list of things performed by the release manager during the weeks leading up to a scheduled
+day to release. These checks will help to ensure that that release day goes smoothly by identifying problems up early
+and communicating with other members of the community.
+
+. Fourteen days before release, issue an email to the dev mailing list to remind the community of the pending release.
+.. Note any important issues open in JIRA in that post.
+.. Request review and update of the "upgrade documentation" and CHANGELOG.
+. Seven days before release, announce the code freeze on the dev mailing list to remind the community that the branch
+under release is protected. Tweaks to documentation and other odds and ends related to release are still allowed
+during this period.
+. At some point during the week:
+.. Deploy a final SNAPSHOT to the snapshot repository.
+.. Review LICENSE and NOTICE files to make sure that no changes are needed.
+.. Review javadoc filters on the "Core API" docs to be sure nothing needs to change.
+. When all documentation changes are in place, use `bin/publish-docs.sh` to deploy a final `SNAPSHOT` representation
+of the docs and thus validate that there are no issues with the documentation generation process. Request review
+of the published documentation on the dev mailing list.
+
+Release Candidate
+-----------------
+
+A release candidate is an unofficial release that is represented by a tagged version in the Git repository. It is
+offered in cases where there is significant change in a particular version and the potential for upgrades and problems
+might be high.
+
+. `mvn clean install -DincludeNeo4j`
+.. `mvn verify -DskipIntegrationTests=false -DincludeNeo4j`
+.. `mvn verify -DskipPerformanceTests=false`
+. `bin/publish-docs.sh <username>` - note that under a release candidate the documentation is published as SNAPSHOT
+. `mvn versions:set -DnewVersion=x.y.z -DgenerateBackupPoms=false` to update the project files to reference a non-SNAPSHOT version
+. `git diff` and review the updated files (expect all `pom.xml` files and this README)
+. `git commit -a -m "TinkerPop x.y.z release"` and `git push`
+. `git tag -a -m "TinkerPop x.y.z release" x.y.z` and `git push --tags`
+. `mvn clean install -Dmaven.test.skip=true`
+. `mvn versions:set -DnewVersion=x.y.z-SNAPSHOT -DgenerateBackupPoms=false` to go back to SNAPSHOT
+. `git commit -a -m "Returned to x.y.z-SNAPSHOT"` and `git push`
+. Announce the release candidate to `dev` mailing list and await feedback
+. Repeat as required or proceed to the next phase
+
+PMC Vote
+--------
+
+A positive vote for a particular release from the TinkerPop PMC is required to move to the following phase.
+
+. `mvn clean install`
+.. `mvn verify -DskipIntegrationTests=false -DincludeNeo4j`
+.. `mvn verify -DskipPerformanceTests=false`
+. Perform manual tests:
+.. Execute `:remote connect conf/remote.yaml` and send some requests to a running Gremlin Server instance.
+.. Execute `:?` to display the help in the Console.
+. Update `CHANGELOG.asciidoc`:
+.. Update the release date
+.. Generate the JIRA release notes report for the current version and append them to the `CHANGELOG.asciidoc`
+.. Organize "breaking" changes to be clearly marked (use JIRA and the "breaking" label to identify those)
+. Update "upgrade documentation":
+.. Update the release date.
+.. Update the link to CHANGELOG.asciidoc
+. `mvn versions:set -DnewVersion=x.y.z -DgenerateBackupPoms=false` to update project files to reference the non-SNAPSHOT version
+. `git diff` and review the updated files (expect all `pom.xml` files and this README)
+. `git commit -a -m "TinkerPop x.y.z release"` and `git push`
+. `git tag -a -m "TinkerPop x.y.z release" x.y.z` and `git push --tags`
+. `mvn clean install -Dmaven.test.skip=true`
+. `bin/publish-docs.sh <username>`
+. `mvn install -Papache-release -DcreateChecksum=true -Dmaven.test.skip=true`
+. Review generated artifacts to be sure they have both javadocs and asciidocs present
+. Upload artifacts to `https://dist.apache.org/repos/dist/dev/incubator/tinkerpop` for `[VOTE]` review.
+.. `svn co --depth empty https://dist.apache.org/repos/dist/dev/incubator/tinkerpop/ dev` and `mkdir dev/x.y.z`
+.. `cp ~/.m2/repository/org/apache/tinkerpop/gremlin-console/x.y.z/gremlin-console-x.y.z-distribution.zip* dev/x.y.z`
+.. `cp ~/.m2/repository/org/apache/tinkerpop/gremlin-server/x.y.z/gremlin-server-x.y.z-distribution.zip* dev/x.y.z`
+.. `cp ~/.m2/repository/org/apache/tinkerpop/tinkerpop/x.y.z/tinkerpop-x.y.z-source-release.zip* dev/x.y.z`
+.. `cd dev/x.y.z` and `for f in \*.zip*; do mv "$f" "apache-$f"; done`
+.. `cd ..; svn add x.y.z/; svn ci -m "TinkerPop x.y.z release"`
+. Execute `bin/validate-distribution.sh` and any other relevant testing.
+. Perform JIRA administration tasks:
+.. "Release" the current version and set the "release date"
+.. If there is to be a follow on release in the current line of code, create that new version specifying the "start date"
+.. Migrate the "Affected Version" of all unresolved issues to the next lowest common denominator version - if version 3.0.1 released then all 3.0.0 issues should move forward to 3.0.1 as they now "affect" that latest release
+. Submit for `[VOTE]` at `dev@tinkerpop.incubator.apache.org` (see email template below)
+. *Wait for vote acceptance* (72 hours)
+
+Incubator Vote
+--------------
+
+A positive vote for a particular release from the Apache Incubator is required to move to the following phase.
+
+. Submit for `[VOTE]` at `general@incubator.apache.org` (see email template below)
+.. Include the vote tally: "Apache TinkerPop (http://tinkerpop.incubator.apache.org/) would like to release TinkerPop x.y.z. We had a dev@ VOTE which resulted in a tally of +1 (3), 0 (0), and -1 (0). We now present our artifacts for vote by Incubator."
+. *Wait for vote acceptance* (72 hours)
+
+Release & Promote
+-----------------
+
+. `mvn clean install -Djavadoc -Dmaven.test.skip=true; bin/process-docs.sh` - rebuild source and docs of tagged release
+. `mvn deploy -Papache-release -DcreateChecksum=true -Dmaven.test.skip=true`- deploy signed artifacts with checksums to Apache Nexus
+. Review and close the staging repository (Apache Nexus at link:https://repository.apache.org/[https://repository.apache.org/]) - check that versions are correct and that all artifacts are present
+. `svn co --depth empty https://dist.apache.org/repos/dist/dev/incubator/tinkerpop dev; svn up dev/x.y.z`
+. `svn co --depth empty https://dist.apache.org/repos/dist/release/incubator/tinkerpop release; mkdir release/x.y.z`
+. `ls dev/x.y.z/ | grep '\-\(distribution\|source\-release\)\.zip' | sed -e 's/\(^[^ ]\*\)-distribution\([^ ]*\)/cp dev\/x.y.z\/\0 release\/x.y.z\/\1-bin\2/' -e 's/\(^[^ ]\*\)-source-release\([^ ]*\)/cp dev\/x.y.z\/\0 release\/x.y.z\/\1-src\2/' | /bin/sh`
+. `cd release; svn add x.y.z/; svn ci -m "TinkerPop x.y.z release"`
+. Update homepage with references to latest distribution and to other internal links elsewhere on the page.
+. Wait for Apache Central to sync the jars and src (link:http://repo1.maven.org/maven2/org/apache/tinkerpop/tinkerpop/[http://repo1.maven.org/maven2/org/apache/tinkerpop/tinkerpop/]).
+. Announce release on `dev@`/`gremlin-users@` mailing lists and tweet from `@apachetinkerpop`
+
+Example `[VOTE]` email:
+
+```
+[VOTE] TinkerPop x.y.z Release
+
+Hello,
+
+The release artifacts can be found at this location:
+ https://dist.apache.org/repos/dist/dev/incubator/tinkerpop/x.y.z/
+
+The source distribution is provided by:
+ apache-tinkerpop-x.y.z-source-release.zip
+
+Two binary distributions are provided for user convenience:
+ apache-gremlin-console-x.y.z-distribution.zip
+ apache-gremlin-server-x.y.z-distribution.zip
+
+The online docs can be found here:
+ http://tinkerpop.incubator.apache.org/docs/x.y.z/ (user docs)
+ http://tinkerpop.incubator.apache.org/docs/x.y.z/upgrade.html (upgrade docs)
+ http://tinkerpop.incubator.apache.org/javadocs/x.y.z/core/ (core javadoc)
+ http://tinkerpop.incubator.apache.org/javadocs/x.y.z/full/ (full javadoc)
+
+The tag in Apache Git can be found here:
+ https://git-wip-us.apache.org/repos/asf?p=incubator-tinkerpop.git;...
+
+The release notes are available here:
+ https://github.com/apache/incubator-tinkerpop/blob/master/CHANGELOG.asciidoc#...
+
+The [VOTE] will be open for the next 72 hours --- closing <DayOfTheWeek> (<Month> <Day> <Year>) at <Time> <TimeZone>.
+
+My vote is +1.
+
+Thank you very much,
+<TinkerPop Committer Name>
+```
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/3a3fdf75/docs/src/developer.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/developer.asciidoc b/docs/src/developer.asciidoc
new file mode 100644
index 0000000..93db877
--- /dev/null
+++ b/docs/src/developer.asciidoc
@@ -0,0 +1,29 @@
+////
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+////
+image::apache-tinkerpop-logo.png[width=500]
+
+:toc-position: left
+
+Developer Documentation
+=======================
+
+This document contains information for TinkerPop developers, contributors, and community members. It focuses on
+technical information and other internal processes related to the project.
+
+include::developer-contributing.asciidoc[]
+
+include::developer-release.asciidoc[]
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/3a3fdf75/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 3280811..82fbb77 100644
--- a/pom.xml
+++ b/pom.xml
@@ -708,7 +708,7 @@ limitations under the License.
</configuration>
</execution>
<execution>
- <id>asciidoc-to-upgrade</id>
+ <id>asciidoc-to-upgrade-book</id>
<phase>generate-resources</phase>
<goals>
<goal>process-asciidoc</goal>
@@ -734,6 +734,33 @@ limitations under the License.
</attributes>
</configuration>
</execution>
+ <execution>
+ <id>asciidoc-to-developer-book</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>process-asciidoc</goal>
+ </goals>
+ <configuration>
+ <sourceDirectory>${asciidoc.input.dir}</sourceDirectory>
+ <sourceDocumentName>developer.asciidoc</sourceDocumentName>
+ <outputDirectory>${htmlsingle.output.dir}</outputDirectory>
+ <backend>html5</backend>
+ <doctype>book</doctype>
+ <attributes>
+ <imagesdir>images</imagesdir>
+ <encoding>UTF-8</encoding>
+ <toc>true</toc>
+ <toclevels>3</toclevels>
+ <toc-position>left</toc-position>
+ <!--<iconsdir>images/icons</iconsdir>-->
+ <!-- AsciiDoctor CSS3-based theme configuration -->
+ <stylesdir>${asciidoctor.style.dir}</stylesdir>
+ <stylesheet>tinkerpop.css</stylesheet>
+ <source-highlighter>coderay</source-highlighter>
+ <basedir>${project.basedir}</basedir>
+ </attributes>
+ </configuration>
+ </execution>
</executions>
</plugin>
</plugins>
[25/50] incubator-tinkerpop git commit: Merge branch 'master' into
TINKERPOP3-762
Posted by ok...@apache.org.
Merge branch 'master' into TINKERPOP3-762
Resolved Conflicts:
CHANGELOG.asciidoc
docs/src/upgrade-release-3.1.x-incubating.asciidoc
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/3181d37a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/3181d37a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/3181d37a
Branch: refs/heads/TINKERPOP3-925
Commit: 3181d37ad7e78375f62dd5f12210c4fd2f5a42b3
Parents: 0900d5f fad7e5b
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Wed Oct 28 16:21:13 2015 +0100
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Wed Oct 28 16:21:13 2015 +0100
----------------------------------------------------------------------
CHANGELOG.asciidoc | 32 +-
CONTRIBUTING.asciidoc | 24 +-
docs/src/acknowledgements.asciidoc | 19 +-
docs/src/conclusion.asciidoc | 6 +-
docs/src/gremlin-applications.asciidoc | 703 +++++++++++++++----
docs/src/implementations.asciidoc | 519 +++++++++++---
docs/src/intro.asciidoc | 173 ++++-
docs/src/preface.asciidoc | 42 +-
docs/src/the-graph.asciidoc | 245 +++++--
docs/src/the-graphcomputer.asciidoc | 197 +++++-
docs/src/the-traversal.asciidoc | 630 ++++++++++++-----
.../upgrade-release-3.0.x-incubating.asciidoc | 4 +-
.../upgrade-release-3.1.x-incubating.asciidoc | 26 +-
.../images/keep-on-traversin-tiedye-title.png | Bin 0 -> 943206 bytes
docs/static/images/keep-on-traversin-tiedye.png | Bin 0 -> 581914 bytes
docs/static/images/keep-on-traversin-title.png | Bin 0 -> 669529 bytes
docs/static/images/keep-on-traversin.png | Bin 0 -> 400941 bytes
docs/static/images/not-tinkerpop3-gremlin.png | Bin 0 -> 186676 bytes
docs/static/images/provider-integration.png | Bin 372429 -> 226464 bytes
docs/static/images/quantum-gremlin.png | Bin 0 -> 69142 bytes
docs/static/images/tinkerpop3.graffle | 236 +++----
.../gremlin/process/traversal/NumberHelper.java | 280 ++++++++
.../gremlin/process/traversal/Operator.java | 78 +-
.../process/traversal/lambda/LoopTraversal.java | 4 +
.../traversal/step/branch/RepeatStep.java | 8 +
.../traversal/OperatorExceptionTest.java | 39 +-
.../gremlin/process/traversal/OperatorTest.java | 100 ++-
.../driver/ser/GryoMessageSerializerV1d0.java | 13 +-
.../gremlin/driver/AbstractResultQueueTest.java | 23 +
.../gremlin/driver/ResultQueueTest.java | 15 +-
.../ser/GryoMessageSerializerV1d0Test.java | 55 ++
.../step/sideEffect/GroovySackTest.groovy | 4 +-
...linGroovyScriptEngineTimedInterruptTest.java | 12 +-
gremlin-server/pom.xml | 25 +
.../tinkerpop/gremlin/server/GremlinServer.java | 53 +-
.../tinkerpop/gremlin/server/Settings.java | 5 +
.../handler/NioGremlinBinaryRequestDecoder.java | 5 +
.../handler/WsGremlinBinaryRequestDecoder.java | 5 +
.../handler/WsGremlinCloseRequestDecoder.java | 5 +
.../handler/WsGremlinTextRequestDecoder.java | 5 +
.../AbstractGremlinServerIntegrationTest.java | 7 +-
.../server/GremlinDriverIntegrateTest.java | 72 +-
.../server/GremlinServerIntegrateTest.java | 100 +++
.../traversal/step/sideEffect/SackTest.java | 20 +-
.../conf/hadoop-grateful-gryo.properties | 2 +-
.../hadoop/structure/io/HadoopPools.java | 2 +-
.../tinkergraph/structure/TinkerFactory.java | 8 +-
.../tinkergraph/structure/TinkerGraph.java | 45 +-
.../tinkergraph/TinkerGraphProvider.java | 14 +-
.../structure/TinkerGraphIdManagerTest.java | 18 +-
.../tinkergraph/structure/TinkerGraphTest.java | 16 +-
51 files changed, 3009 insertions(+), 885 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/3181d37a/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --cc CHANGELOG.asciidoc
index 002361b,eb1936b..a43e443
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@@ -26,7 -25,8 +25,9 @@@ image::https://raw.githubusercontent.co
TinkerPop 3.1.0 (NOT OFFICIALLY RELEASED YET)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+* Added suppport for mid-traversal `V()`-steps.
+ * Fixed `Number` handling in `Operator` enums. Prior this change a lot of operations on mixed `Number` types returned a wrong result (wrong data type).
+ * Fixed a bug in Gremlin Server/Driver serializer where empty buffers were getting returned in certain cases.
* Renamed `ConjunctionX` to `ConnectiveX` because "conjunction" is assumed "and" (disjunction "or"), where "connective" is the parent concept.
* Removed `PathIdentityStep` as it was a hack that is now solved by `Traversal.Admin.addTraverserRequirement()`.
* Added `Traversal.Admin.addTraverserRequirement()` to allow a traversal strategy or source to add requirements (not only step determined anymore).
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/3181d37a/docs/src/the-traversal.asciidoc
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/3181d37a/docs/src/upgrade-release-3.1.x-incubating.asciidoc
----------------------------------------------------------------------
diff --cc docs/src/upgrade-release-3.1.x-incubating.asciidoc
index 92f1e6b,b9eca4e..8fa5963
--- a/docs/src/upgrade-release-3.1.x-incubating.asciidoc
+++ b/docs/src/upgrade-release-3.1.x-incubating.asciidoc
@@@ -35,8 -35,8 +35,9 @@@ Additional upgrade information can be f
Important Changes
~~~~~~~~~~~~~~~~~
+* Traversals now support mid-traversal `V()`-steps. Graph system providers should ensure that a mid-traversal `V()` can leverage any suitable index.
- * The Gephi Plugin has improved integration with Gephi, where manually inserting {{store}} steps to visualize a running traversal is no longer required.
+ * The data type of `Operator` enums will now always be the highest common data type of the two given numbers, rather than the data type of the first number, as it's been before.
+ * The Gephi Plugin has improved integration with Gephi, where manually inserting `store` steps to visualize a running traversal is no longer required.
* Entire TinkerGraph instances can be serialized over Gryo.
* Hadoop1 support has been dropped. Hadoop2 is now supported. Giraph 1.1.0 is now supported and Spark of Hadoop2 YARN.
* The implementation and semantics of `GraphTraversal.group()` has changed. The previous model is deprecated and renamed to `groupV3d0()`.
@@@ -114,4 -119,4 +120,8 @@@ See link:https://issues.apache.org/jira
Graph Traversal Updates
+++++++++++++++++++++++
++<<<<<<< HEAD
+There were numerous changes to the `GraphTraversal` API. Nearly all changes are backwards compatible with respective "deprecated" annotations. Please review the respective updates specified in the "Graph System Users" section.
++=======
+ There were numerous changes to the `GraphTraversal` API. Nearly all changes are backwards compatible with respective "deprecated" annotations. Please review the respective updates specified in the "Upgrading for Users" section.
++>>>>>>> master
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/3181d37a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java
----------------------------------------------------------------------
[11/50] incubator-tinkerpop git commit: implemented
GraphStep::hashCode()
Posted by ok...@apache.org.
implemented GraphStep::hashCode()
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/c35d08f2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/c35d08f2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/c35d08f2
Branch: refs/heads/TINKERPOP3-925
Commit: c35d08f255f4cdd4d498765291a08748423db460
Parents: 7b18447
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Tue Oct 27 15:47:42 2015 +0100
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Tue Oct 27 15:47:42 2015 +0100
----------------------------------------------------------------------
.../gremlin/process/traversal/step/map/GraphStep.java | 10 ++++++++++
1 file changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/c35d08f2/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphStep.java
index 3a84281..de3e669 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphStep.java
@@ -136,4 +136,14 @@ public class GraphStep<S, E extends Element> extends AbstractStep<S, E> implemen
this.head = null;
this.iterator = EmptyIterator.instance();
}
+
+
+ @Override
+ public int hashCode() {
+ int result = super.hashCode() ^ this.returnClass.hashCode();
+ for (final Object id : this.ids) {
+ result ^= id.hashCode();
+ }
+ return result;
+ }
}
[45/50] incubator-tinkerpop git commit: Merge remote-tracking branch
'origin/master'
Posted by ok...@apache.org.
Merge remote-tracking branch 'origin/master'
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/1478c43c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/1478c43c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/1478c43c
Branch: refs/heads/TINKERPOP3-925
Commit: 1478c43c6495d41869dcf63f1cea4029a2d61c55
Parents: 6be4a7d 70a12e6
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Oct 29 14:38:55 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Oct 29 14:38:55 2015 -0400
----------------------------------------------------------------------
CHANGELOG.asciidoc | 3 +
docs/src/the-traversal.asciidoc | 25 ++++
.../upgrade-release-3.1.x-incubating.asciidoc | 1 +
.../GephiTraversalVisualizationStrategy.groovy | 2 +-
.../traversal/TraversalVertexProgram.java | 4 +-
.../traversal/dsl/graph/GraphTraversal.java | 7 +-
.../dsl/graph/GraphTraversalSource.java | 10 +-
.../gremlin/process/traversal/dsl/graph/__.java | 9 +-
.../process/traversal/step/map/GraphStep.java | 149 +++++++++++++++++++
.../traversal/step/sideEffect/GraphStep.java | 101 -------------
.../strategy/decoration/ConnectiveStrategy.java | 3 +-
.../strategy/decoration/ElementIdStrategy.java | 2 +-
.../strategy/decoration/PartitionStrategy.java | 2 +-
.../strategy/decoration/SubgraphStrategy.java | 2 +-
.../finalization/LazyBarrierStrategy.java | 2 +-
.../ComputerVerificationStrategy.java | 5 +-
.../traversal/step/map/GraphStepTest.java | 41 +++++
.../ElementIdStrategyTraverseTest.java | 4 +-
.../PartitionStrategyTraverseTest.java | 4 +-
.../SubgraphStrategyTraverseTest.java | 5 +-
.../traversal/step/map/GroovyGraphTest.groovy | 50 +++++++
.../process/GroovyProcessComputerSuite.java | 2 +
.../process/GroovyProcessStandardSuite.java | 2 +
.../gremlin/process/ProcessComputerSuite.java | 2 +
.../gremlin/process/ProcessStandardSuite.java | 2 +
.../process/traversal/step/map/GraphTest.java | 109 ++++++++++++++
.../step/sideEffect/Neo4jGraphStep.java | 10 +-
.../optimization/Neo4jGraphStepStrategy.java | 13 +-
.../gremlin/neo4j/structure/Neo4jGraph.java | 1 +
.../gremlin/neo4j/Neo4jStrategySuite.java | 44 ++++++
.../gremlin/neo4j/Neo4jStrategyTest.java | 31 ++++
.../Neo4jGraphStepStrategyTest.java | 63 ++++++++
.../step/sideEffect/TinkerGraphStep.java | 10 +-
.../optimization/TinkerGraphStepStrategy.java | 13 +-
.../tinkergraph/structure/TinkerGraph.java | 1 +
.../tinkergraph/TinkerGraphStrategySuite.java | 44 ++++++
.../tinkergraph/TinkerGraphStrategyTest.java | 31 ++++
.../TinkerGraphStepStrategyTest.java | 20 +--
.../structure/TinkerGraphPlayTest.java | 11 ++
39 files changed, 680 insertions(+), 160 deletions(-)
----------------------------------------------------------------------
[28/50] incubator-tinkerpop git commit: Merge remote-tracking branch
'origin/master'
Posted by ok...@apache.org.
Merge remote-tracking branch 'origin/master'
Conflicts:
docs/src/upgrade-release-3.1.x-incubating.asciidoc
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/1b6bdf1f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/1b6bdf1f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/1b6bdf1f
Branch: refs/heads/TINKERPOP3-925
Commit: 1b6bdf1fdea4115c80aa4a5555bc0d4d819ce8e4
Parents: ca00e35 fad7e5b
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Oct 28 11:38:12 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Oct 28 11:38:12 2015 -0400
----------------------------------------------------------------------
.../upgrade-release-3.1.x-incubating.asciidoc | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1b6bdf1f/docs/src/upgrade-release-3.1.x-incubating.asciidoc
----------------------------------------------------------------------
diff --cc docs/src/upgrade-release-3.1.x-incubating.asciidoc
index a1ae8b5,b9eca4e..9a7d34f
--- a/docs/src/upgrade-release-3.1.x-incubating.asciidoc
+++ b/docs/src/upgrade-release-3.1.x-incubating.asciidoc
@@@ -89,15 -96,7 +101,8 @@@ Gremlin-Groovy Update
* The closure wrappers classes `GFunction`, `GSupplier`, `GConsumer` have been deprecated.
** In Groovy, a closure can be specified using `as Function` and thus, these wrappers are not needed.
+* The `GremlinExecutor.promoteBindings()` method which was previously deprecated has been removed.
- Hadoop-Gremlin Updates
- ++++++++++++++++++++++
-
- * Hadoop1 is no longer supported. Hadoop2 is now the only supported Hadoop version in TinkerPop.
- * The directory where application jars are stored in HDFS is now `hadoop-gremlin-x.y.z-libs`.
- ** This versioning is important so that cross-version TinkerPop use does not cause jar conflicts.
-
Upgrading for Providers
~~~~~~~~~~~~~~~~~~~~~~~
[50/50] incubator-tinkerpop git commit: merged master/.
Posted by ok...@apache.org.
merged master/.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/16b50052
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/16b50052
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/16b50052
Branch: refs/heads/TINKERPOP3-925
Commit: 16b50052eb27ebb365341dc3b6e90608b07a71e6
Parents: 3d2d6a6 9300485
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Thu Oct 29 17:29:02 2015 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Thu Oct 29 17:29:02 2015 -0600
----------------------------------------------------------------------
CHANGELOG.asciidoc | 4 +
CONTRIBUTING.asciidoc | 246 +----------------
RELEASE.asciidoc | 172 ------------
docs/src/developer-contributing.asciidoc | 272 +++++++++++++++++++
docs/src/developer-meetings.asciidoc | 64 +++++
docs/src/developer-release.asciidoc | 171 ++++++++++++
docs/src/developer.asciidoc | 31 +++
docs/src/gremlin-applications.asciidoc | 3 +-
docs/src/the-traversal.asciidoc | 25 ++
.../upgrade-release-3.1.x-incubating.asciidoc | 65 ++++-
docs/static/images/gremlin-standing-strong.png | Bin 0 -> 30985 bytes
.../process/computer/GiraphGraphComputer.java | 7 +
.../GephiTraversalVisualizationStrategy.groovy | 2 +-
.../gremlin/process/computer/GraphComputer.java | 16 +-
.../traversal/TraversalVertexProgram.java | 4 +-
.../traversal/dsl/graph/GraphTraversal.java | 7 +-
.../dsl/graph/GraphTraversalSource.java | 10 +-
.../gremlin/process/traversal/dsl/graph/__.java | 9 +-
.../process/traversal/step/map/GraphStep.java | 149 ++++++++++
.../traversal/step/sideEffect/GraphStep.java | 101 -------
.../step/util/TraversalComparator.java | 5 +-
.../strategy/decoration/ConnectiveStrategy.java | 3 +-
.../strategy/decoration/ElementIdStrategy.java | 2 +-
.../strategy/decoration/PartitionStrategy.java | 2 +-
.../strategy/decoration/SubgraphStrategy.java | 2 +-
.../finalization/LazyBarrierStrategy.java | 2 +-
.../ComputerVerificationStrategy.java | 39 ++-
.../process/traversal/util/TraversalHelper.java | 3 +
.../traversal/step/map/GraphStepTest.java | 41 +++
.../ElementIdStrategyTraverseTest.java | 4 +-
.../PartitionStrategyTraverseTest.java | 4 +-
.../SubgraphStrategyTraverseTest.java | 5 +-
.../traversal/step/map/GroovyGraphTest.groovy | 50 ++++
.../traversal/step/map/GroovyOrderTest.groovy | 10 +
.../process/GroovyProcessComputerSuite.java | 2 +
.../process/GroovyProcessStandardSuite.java | 2 +
.../handler/NioGremlinBinaryRequestDecoder.java | 5 +
.../handler/WsGremlinBinaryRequestDecoder.java | 5 +
.../handler/WsGremlinCloseRequestDecoder.java | 5 +
.../handler/WsGremlinTextRequestDecoder.java | 5 +
.../server/GremlinDriverIntegrateTest.java | 72 ++++-
.../server/GremlinServerIntegrateTest.java | 100 +++++++
.../gremlin/process/ProcessComputerSuite.java | 2 +
.../gremlin/process/ProcessStandardSuite.java | 2 +
.../process/computer/GraphComputerTest.java | 5 +
.../traversal/step/map/AddVertexTest.java | 2 +-
.../process/traversal/step/map/GraphTest.java | 109 ++++++++
.../process/traversal/step/map/OrderTest.java | 58 +++-
.../step/sideEffect/Neo4jGraphStep.java | 10 +-
.../optimization/Neo4jGraphStepStrategy.java | 13 +-
.../gremlin/neo4j/structure/Neo4jGraph.java | 1 +
.../traversal/strategy/Neo4jStrategySuite.java | 44 +++
.../traversal/strategy/Neo4jStrategyTest.java | 32 +++
.../Neo4jGraphStepStrategyTest.java | 76 ++++++
pom.xml | 34 ++-
.../process/computer/SparkGraphComputer.java | 16 +-
.../io/SparkContextPersistenceTest.java | 14 +-
.../process/computer/TinkerGraphComputer.java | 5 +
.../step/sideEffect/TinkerGraphStep.java | 10 +-
.../optimization/TinkerGraphStepStrategy.java | 13 +-
.../tinkergraph/structure/TinkerFactory.java | 8 +-
.../tinkergraph/structure/TinkerGraph.java | 59 +++-
.../tinkergraph/TinkerGraphProvider.java | 14 +-
.../strategy/TinkerGraphStrategySuite.java | 44 +++
.../strategy/TinkerGraphStrategyTest.java | 32 +++
.../TinkerGraphStepStrategyTest.java | 33 ++-
.../structure/TinkerGraphIdManagerTest.java | 18 +-
.../structure/TinkerGraphPlayTest.java | 11 +
.../tinkergraph/structure/TinkerGraphTest.java | 16 +-
69 files changed, 1751 insertions(+), 656 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/16b50052/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkGraphComputer.java
----------------------------------------------------------------------
diff --cc spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkGraphComputer.java
index 7134f26,c3593c1..ef2ae6f
--- 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
@@@ -80,20 -88,17 +90,20 @@@ public final class SparkGraphComputer e
public Future<ComputerResult> submit() {
super.validateStatePriorToExecution();
// apache and hadoop configurations that are used throughout the graph computer computation
- final org.apache.commons.configuration.Configuration apacheConfiguration = new HadoopConfiguration(this.hadoopGraph.configuration());
- this.sparkConfiguration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_OUTPUT_FORMAT_HAS_EDGES, this.persist.equals(GraphComputer.Persist.EDGES));
- final Configuration hadoopConfiguration = ConfUtil.makeHadoopConfiguration(this.sparkConfiguration);
- if (FileInputFormat.class.isAssignableFrom(hadoopConfiguration.getClass(Constants.GREMLIN_HADOOP_GRAPH_INPUT_FORMAT, InputFormat.class))) {
- try {
- final String inputLocation = FileSystem.get(hadoopConfiguration).getFileStatus(new Path(hadoopConfiguration.get(Constants.GREMLIN_HADOOP_INPUT_LOCATION))).getPath().toString();
- this.sparkConfiguration.setProperty(Constants.MAPREDUCE_INPUT_FILEINPUTFORMAT_INPUTDIR, inputLocation);
- hadoopConfiguration.set(Constants.MAPREDUCE_INPUT_FILEINPUTFORMAT_INPUTDIR, inputLocation);
- } catch (final IOException e) {
- throw new IllegalStateException(e.getMessage(), e);
++ final org.apache.commons.configuration.Configuration apacheConfiguration = new HadoopConfiguration(this.sparkConfiguration);
+ apacheConfiguration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_OUTPUT_FORMAT_HAS_EDGES, this.persist.equals(GraphComputer.Persist.EDGES));
+ final Configuration hadoopConfiguration = ConfUtil.makeHadoopConfiguration(apacheConfiguration);
+ if (null == hadoopConfiguration.get(Constants.GREMLIN_SPARK_GRAPH_INPUT_RDD_NAME, null)) {
+ if (FileInputFormat.class.isAssignableFrom(hadoopConfiguration.getClass(Constants.GREMLIN_HADOOP_GRAPH_INPUT_FORMAT, InputFormat.class))) {
+ try {
+ final String inputLocation = FileSystem.get(hadoopConfiguration).getFileStatus(new Path(hadoopConfiguration.get(Constants.GREMLIN_HADOOP_INPUT_LOCATION))).getPath().toString();
+ apacheConfiguration.setProperty(Constants.MAPREDUCE_INPUT_FILEINPUTFORMAT_INPUTDIR, inputLocation);
+ hadoopConfiguration.set(Constants.MAPREDUCE_INPUT_FILEINPUTFORMAT_INPUTDIR, inputLocation);
+ } catch (final IOException e) {
+ throw new IllegalStateException(e.getMessage(), e);
+ }
}
- }
+ } // else WARN that both an INPUT_FORMAT and INPUT_RDD_NAME were provided?
// create the completable future
return CompletableFuture.<ComputerResult>supplyAsync(() -> {
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/16b50052/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/io/SparkContextPersistenceTest.java
----------------------------------------------------------------------
diff --cc spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/io/SparkContextPersistenceTest.java
index e19d89f,0000000..cc0957f
mode 100644,000000..100644
--- a/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/io/SparkContextPersistenceTest.java
+++ b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/io/SparkContextPersistenceTest.java
@@@ -1,126 -1,0 +1,126 @@@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tinkerpop.gremlin.spark.process.computer.io;
+
+import org.apache.commons.configuration.BaseConfiguration;
+import org.apache.commons.configuration.Configuration;
+import org.apache.hadoop.mapreduce.lib.output.NullOutputFormat;
+import org.apache.spark.SparkConf;
+import org.apache.spark.SparkContext;
+import org.apache.spark.api.java.JavaSparkContext;
+import org.apache.tinkerpop.gremlin.hadoop.Constants;
+import org.apache.tinkerpop.gremlin.hadoop.structure.HadoopGraph;
+import org.apache.tinkerpop.gremlin.hadoop.structure.io.gryo.GryoInputFormat;
+import org.apache.tinkerpop.gremlin.hadoop.structure.util.ConfUtil;
+import org.apache.tinkerpop.gremlin.process.computer.GraphComputer;
+import org.apache.tinkerpop.gremlin.process.computer.bulkloading.BulkLoaderVertexProgram;
+import org.apache.tinkerpop.gremlin.process.computer.ranking.pagerank.PageRankVertexProgram;
+import org.apache.tinkerpop.gremlin.process.computer.traversal.TraversalVertexProgram;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
+import org.apache.tinkerpop.gremlin.process.traversal.engine.ComputerTraversalEngine;
+import org.apache.tinkerpop.gremlin.spark.process.computer.SparkGraphComputer;
+import org.apache.tinkerpop.gremlin.spark.process.computer.SparkHadoopGraphProvider;
+import org.apache.tinkerpop.gremlin.spark.process.computer.util.SparkHelper;
+import org.apache.tinkerpop.gremlin.structure.Graph;
+import org.apache.tinkerpop.gremlin.structure.io.IoCore;
- import org.apache.tinkerpop.gremlin.structure.io.gryo.GryoIo;
+import org.apache.tinkerpop.gremlin.structure.util.GraphFactory;
+import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;
+import org.junit.Test;
+
- import static org.junit.Assert.*;
++import static org.junit.Assert.assertEquals;
++import static org.junit.Assert.assertTrue;
+
+/**
+ * @author Marko A. Rodriguez (http://markorodriguez.com)
+ */
+public class SparkContextPersistenceTest {
+
+ @Test
+ public void shouldPersistRDDAcrossJobs() throws Exception {
+ final Configuration configuration = new BaseConfiguration();
+ configuration.setProperty("spark.master", "local[4]");
+ configuration.setProperty("spark.serializer", "org.apache.tinkerpop.gremlin.spark.structure.io.gryo.GryoSerializer");
+ configuration.setProperty(Graph.GRAPH, HadoopGraph.class.getName());
+ configuration.setProperty(Constants.GREMLIN_HADOOP_INPUT_LOCATION, SparkHadoopGraphProvider.PATHS.get("tinkerpop-modern.kryo"));
+ configuration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_INPUT_FORMAT, GryoInputFormat.class.getCanonicalName());
+ configuration.setProperty(Constants.GREMLIN_SPARK_GRAPH_OUTPUT_RDD, NullOutputFormat.class.getCanonicalName());
+ configuration.setProperty(Constants.GREMLIN_HADOOP_JARS_IN_DISTRIBUTED_CACHE, false);
+ configuration.setProperty(Constants.GREMLIN_SPARK_GRAPH_OUTPUT_RDD_NAME, "a-random-name-for-testing");
+ configuration.setProperty(Constants.GREMLIN_SPARK_PERSIST_CONTEXT, true);
+ Graph graph = GraphFactory.open(configuration);
+ graph.compute(SparkGraphComputer.class)
+ .result(GraphComputer.ResultGraph.NEW)
+ .persist(GraphComputer.Persist.NOTHING)
+ .program(TraversalVertexProgram.build()
+ .traversal(GraphTraversalSource.build().engine(ComputerTraversalEngine.build().computer(SparkGraphComputer.class)),
+ "gremlin-groovy",
+ "g.V()").create(graph)).submit().get();
+ ////////
+ SparkConf sparkConfiguration = new SparkConf();
+ sparkConfiguration.setAppName("shouldPersistRDDAcrossJobs");
+ ConfUtil.makeHadoopConfiguration(configuration).forEach(entry -> sparkConfiguration.set(entry.getKey(), entry.getValue()));
+ JavaSparkContext sparkContext = new JavaSparkContext(SparkContext.getOrCreate(sparkConfiguration));
+ assertTrue(SparkHelper.getPersistedRDD(sparkContext, "a-random-name-for-testing").isPresent());
+ ///////
+ configuration.setProperty(Constants.GREMLIN_SPARK_GRAPH_INPUT_RDD_NAME, "a-random-name-for-testing");
+ configuration.setProperty(Constants.GREMLIN_SPARK_GRAPH_OUTPUT_RDD_NAME, null);
+ graph = GraphFactory.open(configuration);
+ graph.compute(SparkGraphComputer.class)
+ .result(GraphComputer.ResultGraph.NEW)
+ .persist(GraphComputer.Persist.NOTHING)
+ .program(TraversalVertexProgram.build()
+ .traversal(GraphTraversalSource.build().engine(ComputerTraversalEngine.build().computer(SparkGraphComputer.class)),
+ "gremlin-groovy",
+ "g.V()").create(graph)).submit().get();
+ }
+
+ @Test
+ public void testBulkLoaderVertexProgramChain() throws Exception {
+ final Configuration readConfiguration = new BaseConfiguration();
+ readConfiguration.setProperty("spark.master", "local[4]");
+ readConfiguration.setProperty("spark.serializer", "org.apache.tinkerpop.gremlin.spark.structure.io.gryo.GryoSerializer");
+ readConfiguration.setProperty(Graph.GRAPH, HadoopGraph.class.getName());
+ readConfiguration.setProperty(Constants.GREMLIN_HADOOP_INPUT_LOCATION, SparkHadoopGraphProvider.PATHS.get("tinkerpop-modern.kryo"));
+ readConfiguration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_INPUT_FORMAT, GryoInputFormat.class.getCanonicalName());
+ readConfiguration.setProperty(Constants.GREMLIN_SPARK_GRAPH_OUTPUT_RDD, NullOutputFormat.class.getCanonicalName());
+ readConfiguration.setProperty(Constants.GREMLIN_HADOOP_OUTPUT_LOCATION, "target/test-output");
+ readConfiguration.setProperty(Constants.GREMLIN_HADOOP_JARS_IN_DISTRIBUTED_CACHE, false);
+ readConfiguration.setProperty(Constants.GREMLIN_SPARK_GRAPH_OUTPUT_RDD_NAME, "a-random-name-for-testing");
+ readConfiguration.setProperty(Constants.GREMLIN_SPARK_PERSIST_CONTEXT, true);
+ Graph graph = GraphFactory.open(readConfiguration);
+
+ ///////////////
+ final Configuration writeConfiguration = new BaseConfiguration();
+ writeConfiguration.setProperty(Graph.GRAPH, "org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph");
- writeConfiguration.setProperty(TinkerGraph.CONFIG_GRAPH_FORMAT, "gryo");
- writeConfiguration.setProperty(TinkerGraph.CONFIG_GRAPH_LOCATION, "target/test-output/tinkergraph.kryo");
++ writeConfiguration.setProperty(TinkerGraph.GREMLIN_TINKERGRAPH_GRAPH_FORMAT, "gryo");
++ writeConfiguration.setProperty(TinkerGraph.GREMLIN_TINKERGRAPH_GRAPH_LOCATION, "target/test-output/tinkergraph.kryo");
+ final Graph secondGraph = graph.compute(SparkGraphComputer.class).persist(GraphComputer.Persist.NOTHING).program(PageRankVertexProgram.build().create(graph)).submit().get().graph();
- secondGraph.configuration().setProperty(Constants.GREMLIN_SPARK_GRAPH_INPUT_RDD_NAME, "a-random-name-for-testing");
- secondGraph.configuration().setProperty(Constants.GREMLIN_SPARK_GRAPH_OUTPUT_RDD_NAME, null);
+ secondGraph.compute(SparkGraphComputer.class)
+ .persist(GraphComputer.Persist.NOTHING)
+ .workers(1)
++ .config(Constants.GREMLIN_SPARK_GRAPH_INPUT_RDD_NAME, "a-random-name-for-testing")
++ .config(Constants.GREMLIN_SPARK_GRAPH_OUTPUT_RDD_NAME, null)
+ .program(BulkLoaderVertexProgram.build().userSuppliedIds(true).writeGraph(writeConfiguration).create(secondGraph))
+ .submit().get();
+ final Graph finalGraph = TinkerGraph.open();
+ finalGraph.io(IoCore.gryo()).readGraph("target/test-output/tinkergraph.kryo");
- assertEquals(6l,finalGraph.traversal().V().count().next().longValue());
++ assertEquals(6l, finalGraph.traversal().V().count().next().longValue());
+ }
+}
[20/50] incubator-tinkerpop git commit: fixed up
upgrade-release-3.1.x doc to include note about TinkerGraph public static
String variables. This is a CTR.
Posted by ok...@apache.org.
fixed up upgrade-release-3.1.x doc to include note about TinkerGraph public static String variables. This is a CTR.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/fad7e5b9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/fad7e5b9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/fad7e5b9
Branch: refs/heads/TINKERPOP3-925
Commit: fad7e5b9081981a2f31ba8344d71a9bcf000affb
Parents: b70f5f5
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Wed Oct 28 07:07:03 2015 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Wed Oct 28 07:07:03 2015 -0600
----------------------------------------------------------------------
.../upgrade-release-3.1.x-incubating.asciidoc | 21 ++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/fad7e5b9/docs/src/upgrade-release-3.1.x-incubating.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade-release-3.1.x-incubating.asciidoc b/docs/src/upgrade-release-3.1.x-incubating.asciidoc
index efbc15d..b9eca4e 100644
--- a/docs/src/upgrade-release-3.1.x-incubating.asciidoc
+++ b/docs/src/upgrade-release-3.1.x-incubating.asciidoc
@@ -58,6 +58,18 @@ to closing where a user must now explicitly call `commit()` to persist their mut
See link:https://issues.apache.org/jira/browse/TINKERPOP3-805[TINKERPOP3-805] for more information.
+Hadoop-Gremlin Updates
+++++++++++++++++++++++
+
+* Hadoop1 is no longer supported. Hadoop2 is now the only supported Hadoop version in TinkerPop.
+* The directory where application jars are stored in HDFS is now `hadoop-gremlin-x.y.z-libs`.
+** This versioning is important so that cross-version TinkerPop use does not cause jar conflicts.
+
+TinkerGraph-Gremlin Updates
++++++++++++++++++++++++++++
+
+* The `public static String` configurations have been renamed. The old `public static` variables have been deprecated.
+
Gremlin Process
^^^^^^^^^^^^^^^
@@ -85,13 +97,6 @@ Gremlin-Groovy Updates
* The closure wrappers classes `GFunction`, `GSupplier`, `GConsumer` have been deprecated.
** In Groovy, a closure can be specified using `as Function` and thus, these wrappers are not needed.
-Hadoop-Gremlin Updates
-++++++++++++++++++++++
-
-* Hadoop1 is no longer supported. Hadoop2 is now the only supported Hadoop version in TinkerPop.
-* The directory where application jars are stored in HDFS is now `hadoop-gremlin-x.y.z-libs`.
-** This versioning is important so that cross-version TinkerPop use does not cause jar conflicts.
-
Upgrading for Providers
~~~~~~~~~~~~~~~~~~~~~~~
@@ -114,4 +119,4 @@ See link:https://issues.apache.org/jira/browse/TINKERPOP3-805[TINKERPOP3-805] fo
Graph Traversal Updates
+++++++++++++++++++++++
-There were numerous changes to the `GraphTraversal` API. Nearly all changes are backwards compatible with respective "deprecated" annotations. Please review the respective updates specified in the "Graph System Users" section.
+There were numerous changes to the `GraphTraversal` API. Nearly all changes are backwards compatible with respective "deprecated" annotations. Please review the respective updates specified in the "Upgrading for Users" section.
[39/50] incubator-tinkerpop git commit: merged TINKERPOP3-857 into
master/.
Posted by ok...@apache.org.
merged TINKERPOP3-857 into master/.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/d936191e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/d936191e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/d936191e
Branch: refs/heads/TINKERPOP3-925
Commit: d936191e8e9068d6af7c3597aa3db79e0ba16fc3
Parents: 0578a41 594f829
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Thu Oct 29 09:02:03 2015 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Thu Oct 29 09:02:03 2015 -0600
----------------------------------------------------------------------
.../process/computer/GiraphGraphComputer.java | 7 +++++
.../gremlin/process/computer/GraphComputer.java | 16 +++++++++--
.../process/computer/GraphComputerTest.java | 5 ++++
.../process/computer/SparkGraphComputer.java | 29 +++++++++++++-------
.../process/computer/TinkerGraphComputer.java | 5 ++++
5 files changed, 50 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
[23/50] incubator-tinkerpop git commit: mirrored approach to test
strategies from neo4j-gremlin into tinkergraph-gremlin
Posted by ok...@apache.org.
mirrored approach to test strategies from neo4j-gremlin into tinkergraph-gremlin
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/a71a1798
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/a71a1798
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/a71a1798
Branch: refs/heads/TINKERPOP3-925
Commit: a71a17983d389be2261a2cf12398c485a25813a7
Parents: 15d6e7a
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Wed Oct 28 16:06:30 2015 +0100
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Wed Oct 28 16:06:30 2015 +0100
----------------------------------------------------------------------
.../Neo4jGraphStepStrategyTest.java | 2 -
.../tinkergraph/structure/TinkerGraph.java | 14 +++----
.../tinkergraph/TinkerGraphStrategySuite.java | 44 ++++++++++++++++++++
.../tinkergraph/TinkerGraphStrategyTest.java | 31 ++++++++++++++
.../TinkerGraphStepStrategyTest.java | 17 ++++----
5 files changed, 89 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/a71a1798/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/strategy/optimization/Neo4jGraphStepStrategyTest.java
----------------------------------------------------------------------
diff --git a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/strategy/optimization/Neo4jGraphStepStrategyTest.java b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/strategy/optimization/Neo4jGraphStepStrategyTest.java
index 26070af..5c4c857 100644
--- a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/strategy/optimization/Neo4jGraphStepStrategyTest.java
+++ b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/strategy/optimization/Neo4jGraphStepStrategyTest.java
@@ -1,6 +1,5 @@
package org.apache.tinkerpop.gremlin.neo4j.process.traversal.strategy.optimization;
-import org.apache.tinkerpop.gremlin.LoadGraphWith;
import org.apache.tinkerpop.gremlin.neo4j.AbstractNeo4jGremlinTest;
import org.apache.tinkerpop.gremlin.neo4j.process.traversal.step.sideEffect.Neo4jGraphStep;
import org.apache.tinkerpop.gremlin.process.traversal.P;
@@ -16,7 +15,6 @@ import static org.junit.Assert.assertEquals;
public class Neo4jGraphStepStrategyTest extends AbstractNeo4jGremlinTest {
@Test
- @LoadGraphWith(LoadGraphWith.GraphData.MODERN)
public void shouldFoldInHasContainers() {
GraphTraversal.Admin traversal = g.V().has("name", "marko").asAdmin();
assertEquals(2, traversal.getSteps().size());
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/a71a1798/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java
index 456af19..8bec9e8 100644
--- a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java
+++ b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java
@@ -30,7 +30,6 @@ import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.apache.tinkerpop.gremlin.structure.VertexProperty;
import org.apache.tinkerpop.gremlin.structure.io.Io;
import org.apache.tinkerpop.gremlin.structure.io.IoCore;
-import org.apache.tinkerpop.gremlin.structure.io.gryo.GryoMapper;
import org.apache.tinkerpop.gremlin.structure.util.ElementHelper;
import org.apache.tinkerpop.gremlin.structure.util.GraphFactory;
import org.apache.tinkerpop.gremlin.structure.util.StringFactory;
@@ -68,6 +67,7 @@ import java.util.stream.Stream;
@Graph.OptIn(Graph.OptIn.SUITE_GROOVY_ENVIRONMENT)
@Graph.OptIn(Graph.OptIn.SUITE_GROOVY_ENVIRONMENT_INTEGRATE)
@Graph.OptIn(Graph.OptIn.SUITE_GROOVY_ENVIRONMENT_PERFORMANCE)
+@Graph.OptIn("org.apache.tinkerpop.gremlin.tinkergraph.TinkerGraphStrategySuite")
public final class TinkerGraph implements Graph {
static {
@@ -324,9 +324,9 @@ public final class TinkerGraph implements Graph {
public class TinkerGraphFeatures implements Features {
private final TinkerGraphGraphFeatures graphFeatures = new TinkerGraphGraphFeatures();
-private final TinkerGraphEdgeFeatures edgeFeatures = new TinkerGraphEdgeFeatures();
+ private final TinkerGraphEdgeFeatures edgeFeatures = new TinkerGraphEdgeFeatures();
private final TinkerGraphVertexFeatures vertexFeatures = new TinkerGraphVertexFeatures();
-
+
private TinkerGraphFeatures() {
}
@@ -351,11 +351,11 @@ private final TinkerGraphEdgeFeatures edgeFeatures = new TinkerGraphEdgeFeatures
}
}
-
+
public class TinkerGraphVertexFeatures implements Features.VertexFeatures {
private final TinkerGraphVertexPropertyFeatures vertexPropertyFeatures = new TinkerGraphVertexPropertyFeatures();
-
+
private TinkerGraphVertexFeatures() {
}
@@ -379,7 +379,7 @@ private final TinkerGraphEdgeFeatures edgeFeatures = new TinkerGraphEdgeFeatures
return defaultVertexPropertyCardinality;
}
}
-
+
public class TinkerGraphEdgeFeatures implements Features.EdgeFeatures {
private TinkerGraphEdgeFeatures() {
@@ -395,7 +395,7 @@ private final TinkerGraphEdgeFeatures edgeFeatures = new TinkerGraphEdgeFeatures
return edgeIdManager.allow(id);
}
}
-
+
public class TinkerGraphGraphFeatures implements Features.GraphFeatures {
private TinkerGraphGraphFeatures() {
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/a71a1798/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphStrategySuite.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphStrategySuite.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphStrategySuite.java
new file mode 100644
index 0000000..faffe9a
--- /dev/null
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphStrategySuite.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.tinkergraph;
+
+import org.apache.tinkerpop.gremlin.AbstractGremlinSuite;
+import org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine;
+import org.apache.tinkerpop.gremlin.tinkergraph.process.traversal.strategy.optimization.TinkerGraphStepStrategyTest;
+import org.junit.runners.model.InitializationError;
+import org.junit.runners.model.RunnerBuilder;
+
+/**
+ * @author Daniel Kuppitz (http://gremlin.guru)
+ */
+public class TinkerGraphStrategySuite extends AbstractGremlinSuite {
+
+ public TinkerGraphStrategySuite(final Class<?> klass, final RunnerBuilder builder) throws InitializationError {
+
+ super(klass, builder,
+ new Class<?>[]{
+ TinkerGraphStepStrategyTest.class
+ }, new Class<?>[]{
+ TinkerGraphStepStrategyTest.class
+ },
+ false,
+ TraversalEngine.Type.STANDARD);
+ }
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/a71a1798/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphStrategyTest.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphStrategyTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphStrategyTest.java
new file mode 100644
index 0000000..d355d4e
--- /dev/null
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphStrategyTest.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.tinkergraph;
+
+import org.apache.tinkerpop.gremlin.GraphProviderClass;
+import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;
+import org.junit.runner.RunWith;
+
+/**
+ * @author Daniel Kuppitz (http://gremlin.guru)
+ */
+@RunWith(TinkerGraphStrategySuite.class)
+@GraphProviderClass(provider = TinkerGraphProvider.class, graph = TinkerGraph.class)
+public class TinkerGraphStrategyTest {
+}
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/a71a1798/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/optimization/TinkerGraphStepStrategyTest.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/optimization/TinkerGraphStepStrategyTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/optimization/TinkerGraphStepStrategyTest.java
index 2abc802..097e12b 100644
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/optimization/TinkerGraphStepStrategyTest.java
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/optimization/TinkerGraphStepStrategyTest.java
@@ -18,27 +18,24 @@
*/
package org.apache.tinkerpop.gremlin.tinkergraph.process.traversal.strategy.optimization;
+import org.apache.tinkerpop.gremlin.AbstractGremlinTest;
import org.apache.tinkerpop.gremlin.process.traversal.P;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
-import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
import org.apache.tinkerpop.gremlin.process.traversal.step.filter.HasStep;
import org.apache.tinkerpop.gremlin.tinkergraph.process.traversal.step.sideEffect.TinkerGraphStep;
-import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
/**
* @author Marko A. Rodriguez (http://markorodriguez.com)
+ * @author Daniel Kuppitz (http://gremlin.guru)
*/
-public class TinkerGraphStepStrategyTest {
+public class TinkerGraphStepStrategyTest extends AbstractGremlinTest {
@Test
public void shouldFoldInHasContainers() {
- TinkerGraph graph = TinkerGraph.open();
- GraphTraversalSource g = graph.traversal();
- ////
GraphTraversal.Admin traversal = g.V().has("name", "marko").asAdmin();
assertEquals(2, traversal.getSteps().size());
assertEquals(HasStep.class, traversal.getEndStep().getClass());
@@ -47,8 +44,8 @@ public class TinkerGraphStepStrategyTest {
assertEquals(TinkerGraphStep.class, traversal.getStartStep().getClass());
assertEquals(TinkerGraphStep.class, traversal.getEndStep().getClass());
assertEquals(1, ((TinkerGraphStep) traversal.getStartStep()).getHasContainers().size());
- assertEquals("name", ((TinkerGraphStep<?,?>) traversal.getStartStep()).getHasContainers().get(0).getKey());
- assertEquals("marko", ((TinkerGraphStep<?,?>) traversal.getStartStep()).getHasContainers().get(0).getValue());
+ assertEquals("name", ((TinkerGraphStep<?, ?>) traversal.getStartStep()).getHasContainers().get(0).getKey());
+ assertEquals("marko", ((TinkerGraphStep<?, ?>) traversal.getStartStep()).getHasContainers().get(0).getValue());
////
traversal = g.V().has("name", "marko").has("age", P.gt(20)).asAdmin();
traversal.applyStrategies();
@@ -61,8 +58,8 @@ public class TinkerGraphStepStrategyTest {
assertEquals(3, traversal.getSteps().size());
assertEquals(TinkerGraphStep.class, traversal.getStartStep().getClass());
assertEquals(1, ((TinkerGraphStep) traversal.getStartStep()).getHasContainers().size());
- assertEquals("name", ((TinkerGraphStep<?,?>) traversal.getStartStep()).getHasContainers().get(0).getKey());
- assertEquals("marko", ((TinkerGraphStep<?,?>) traversal.getStartStep()).getHasContainers().get(0).getValue());
+ assertEquals("name", ((TinkerGraphStep<?, ?>) traversal.getStartStep()).getHasContainers().get(0).getKey());
+ assertEquals("marko", ((TinkerGraphStep<?, ?>) traversal.getStartStep()).getHasContainers().get(0).getValue());
assertEquals(HasStep.class, traversal.getEndStep().getClass());
}
[34/50] incubator-tinkerpop git commit: Merge branch 'master' into
TINKERPOP3-762
Posted by ok...@apache.org.
Merge branch 'master' into TINKERPOP3-762
Resolved Conflicts:
docs/src/upgrade-release-3.1.x-incubating.asciidoc
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/12c3c919
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/12c3c919
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/12c3c919
Branch: refs/heads/TINKERPOP3-925
Commit: 12c3c9190622ad97399652c635ecd58d3eb0843b
Parents: 0044040 45bf33d
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Wed Oct 28 21:24:11 2015 +0100
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Wed Oct 28 21:24:11 2015 +0100
----------------------------------------------------------------------
CONTRIBUTING.asciidoc | 246 +----------------
RELEASE.asciidoc | 172 ------------
docs/src/developer-contributing.asciidoc | 268 +++++++++++++++++++
docs/src/developer-release.asciidoc | 172 ++++++++++++
docs/src/developer.asciidoc | 29 ++
.../upgrade-release-3.1.x-incubating.asciidoc | 44 ++-
pom.xml | 29 +-
7 files changed, 538 insertions(+), 422 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/12c3c919/docs/src/upgrade-release-3.1.x-incubating.asciidoc
----------------------------------------------------------------------
[05/50] incubator-tinkerpop git commit: TINKERPOP3-910 Clears the
session channel attribute between requests.
Posted by ok...@apache.org.
TINKERPOP3-910 Clears the session channel attribute between requests.
If this value (and any other channel attribute) isn't cleared it will hang around until the next request as they are global to the channel. In this case, a first "in-session" request would succeed and put the channel in "session" mode. A future sessionless request would arrive and execute its serialization process in the sessions threads as the channel still had the session state from the previous request. This likely would have been easier to debug if the the onReadWrite stuff had been ThreadLocal as the in-session requests would have been in MANUAL mode and the sessionless request would have yielded a more clear error that the transaction was closed. Instead, because it was AUTO the sessionless request auto-opened the tx.
The tests for this are in the link referenced above. We'll need to merge those tests into this branch at some point to get this all to work together.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/43f64c2a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/43f64c2a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/43f64c2a
Branch: refs/heads/TINKERPOP3-925
Commit: 43f64c2a4aad965343ef87ce5407cb0b79d96714
Parents: 2b83c3d
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Oct 23 16:36:37 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Oct 23 16:36:37 2015 -0400
----------------------------------------------------------------------
.../gremlin/server/handler/NioGremlinBinaryRequestDecoder.java | 5 +++++
.../gremlin/server/handler/WsGremlinBinaryRequestDecoder.java | 5 +++++
.../gremlin/server/handler/WsGremlinCloseRequestDecoder.java | 5 +++++
.../gremlin/server/handler/WsGremlinTextRequestDecoder.java | 5 +++++
4 files changed, 20 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/43f64c2a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/NioGremlinBinaryRequestDecoder.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/NioGremlinBinaryRequestDecoder.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/NioGremlinBinaryRequestDecoder.java
index c6996a4..622a2f7 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/NioGremlinBinaryRequestDecoder.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/NioGremlinBinaryRequestDecoder.java
@@ -60,6 +60,11 @@ public class NioGremlinBinaryRequestDecoder extends ReplayingDecoder<NioGremlinB
final String contentType = contentTypeFrame.toString(CharsetUtil.UTF_8);
final MessageSerializer serializer = select(contentType, Serializers.DEFAULT_REQUEST_SERIALIZER);
+
+ // it's important to re-initialize these channel attributes as they apply globally to the channel. in
+ // other words, the next request to this channel might not come with the same configuration and mixed
+ // state can carry through from one request to the next
+ channelHandlerContext.channel().attr(StateKey.SESSION).set(null);
channelHandlerContext.channel().attr(StateKey.SERIALIZER).set(serializer);
channelHandlerContext.channel().attr(StateKey.USE_BINARY).set(true);
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/43f64c2a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/WsGremlinBinaryRequestDecoder.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/WsGremlinBinaryRequestDecoder.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/WsGremlinBinaryRequestDecoder.java
index 071eb18..773d33d 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/WsGremlinBinaryRequestDecoder.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/WsGremlinBinaryRequestDecoder.java
@@ -67,8 +67,13 @@ public class WsGremlinBinaryRequestDecoder extends MessageToMessageDecoder<Binar
final String contentType = contentTypeBytes.toString(UTF8);
final MessageSerializer serializer = select(contentType, Serializers.DEFAULT_REQUEST_SERIALIZER);
+ // it's important to re-initialize these channel attributes as they apply globally to the channel. in
+ // other words, the next request to this channel might not come with the same configuration and mixed
+ // state can carry through from one request to the next
+ channelHandlerContext.channel().attr(StateKey.SESSION).set(null);
channelHandlerContext.channel().attr(StateKey.SERIALIZER).set(serializer);
channelHandlerContext.channel().attr(StateKey.USE_BINARY).set(true);
+
try {
objects.add(serializer.deserializeRequest(messageBytes.discardReadBytes()));
} catch (SerializationException se) {
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/43f64c2a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/WsGremlinCloseRequestDecoder.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/WsGremlinCloseRequestDecoder.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/WsGremlinCloseRequestDecoder.java
index fc6f3cf..44a0906 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/WsGremlinCloseRequestDecoder.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/WsGremlinCloseRequestDecoder.java
@@ -67,8 +67,13 @@ public class WsGremlinCloseRequestDecoder extends MessageToMessageDecoder<CloseW
final String contentType = contentTypeBytes.toString(UTF8);
final MessageSerializer serializer = select(contentType, Serializers.DEFAULT_REQUEST_SERIALIZER);
+ // it's important to re-initialize these channel attributes as they apply globally to the channel. in
+ // other words, the next request to this channel might not come with the same configuration and mixed
+ // state can carry through from one request to the next
+ channelHandlerContext.channel().attr(StateKey.SESSION).set(null);
channelHandlerContext.channel().attr(StateKey.SERIALIZER).set(serializer);
channelHandlerContext.channel().attr(StateKey.USE_BINARY).set(true);
+
try {
objects.add(serializer.deserializeRequest(messageBytes.discardReadBytes()));
} catch (SerializationException se) {
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/43f64c2a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/WsGremlinTextRequestDecoder.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/WsGremlinTextRequestDecoder.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/WsGremlinTextRequestDecoder.java
index 9316c1b..5e05bc2 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/WsGremlinTextRequestDecoder.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/WsGremlinTextRequestDecoder.java
@@ -55,8 +55,13 @@ public class WsGremlinTextRequestDecoder extends MessageToMessageDecoder<TextWeb
// the default serializer must be a MessageTextSerializer instance to be compatible with this decoder
final MessageTextSerializer serializer = (MessageTextSerializer) select("application/json", Serializers.DEFAULT_REQUEST_SERIALIZER);
+ // it's important to re-initialize these channel attributes as they apply globally to the channel. in
+ // other words, the next request to this channel might not come with the same configuration and mixed
+ // state can carry through from one request to the next
+ channelHandlerContext.channel().attr(StateKey.SESSION).set(null);
channelHandlerContext.channel().attr(StateKey.SERIALIZER).set(serializer);
channelHandlerContext.channel().attr(StateKey.USE_BINARY).set(false);
+
objects.add(serializer.deserializeRequest(frame.text()));
} catch (SerializationException se) {
objects.add(RequestMessage.INVALID);
[19/50] incubator-tinkerpop git commit: added a docs section for
GraphStep
Posted by ok...@apache.org.
added a docs section for GraphStep
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/df443cc5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/df443cc5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/df443cc5
Branch: refs/heads/TINKERPOP3-925
Commit: df443cc5f71904c167ce86149d4275fc8ea6aa67
Parents: a976ca6
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Wed Oct 28 12:39:23 2015 +0100
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Wed Oct 28 12:39:23 2015 +0100
----------------------------------------------------------------------
docs/src/the-traversal.asciidoc | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/df443cc5/docs/src/the-traversal.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/the-traversal.asciidoc b/docs/src/the-traversal.asciidoc
index 554a241..9850b8a 100644
--- a/docs/src/the-traversal.asciidoc
+++ b/docs/src/the-traversal.asciidoc
@@ -545,6 +545,31 @@ g.V().values('age').sum() <6>
<5> The same as before, but using a built-in bi-function.
<6> The same as before, but using the <<sum-step,`sum()`-step>>.
+[[graph-step]]
+Graph Step
+~~~~~~~~~~
+
+The `V()`-step is usually used to start a `GraphTraversal`, but can also be used mid-traversal.
+
+[gremlin-groovy,modern]
+----
+g.V().has('name', within('marko', 'vadas', 'josh')).as('person').
+ V().has('name', within('lop', 'ripple')).addE('uses').from('person')
+----
+
+NOTE: Whether a mid-traversal `V()` uses an index or not, depends on a) whether suitable index exists and b) if the particular graph system provider implemented this functionality.
+
+[gremlin-groovy,modern]
+----
+g.V().has('name', within('marko', 'vadas', 'josh')).as('person').
+ V().has('name', within('lop', 'ripple')).addE('uses').from('person').toString() <1>
+g.V().has('name', within('marko', 'vadas', 'josh')).as('person').
+ V().has('name', within('lop', 'ripple')).addE('uses').from('person').iterate().toString() <2>
+----
+
+<1> Normally the `V()`-step will iterate over all vertices. However, graph strategies can fold `HasContainer`'s into a `GraphStep` to allow index lookups.
+<2> Whether the graph system provider supports mid-traversal `V()` index lookups or not can easily be determined by inspecting the `toString()` output of the iterated traversal. If `has` conditions were folded into the `V()`-step, an index - if one exists - will be used.
+
[[group-step]]
Group Step
~~~~~~~~~~
[44/50] incubator-tinkerpop git commit: Added meeting notes to
developer docs.
Posted by ok...@apache.org.
Added meeting notes to developer docs.
Invoking CTR for the meeting note additions.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/6be4a7d0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/6be4a7d0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/6be4a7d0
Branch: refs/heads/TINKERPOP3-925
Commit: 6be4a7d01991c2b5446d9fb5f1ebb5354910ba30
Parents: c322438
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Oct 29 14:37:55 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Oct 29 14:37:55 2015 -0400
----------------------------------------------------------------------
docs/src/developer-meetings.asciidoc | 64 +++++++++++++++++++++++++++++++
docs/src/developer.asciidoc | 4 +-
2 files changed, 67 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/6be4a7d0/docs/src/developer-meetings.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/developer-meetings.asciidoc b/docs/src/developer-meetings.asciidoc
new file mode 100644
index 0000000..f4407c8
--- /dev/null
+++ b/docs/src/developer-meetings.asciidoc
@@ -0,0 +1,64 @@
+////
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+////
+Meetings
+========
+
+October 29, 2015
+----------------
+
+The meeting was scheduled for 1:00pm EST, started on time and was held via Google Hangout hosted by Stephen Mallette.
+Meeting adjourned at 1:45pm EST.
+
+*Committers/PPMC Members*
+
+* Stephen Mallette
+* Marko Rodriguez
+* Daniel Kuppitz
+
+*Guests*
+
+_None_
+
+*Minutes**
+
+* Reviewed the scope of 3.1.0-incubating in JIRA in the context of the upcoming release date on November 16, 2015.
+* It was noted that with the new one week code freeze policy that the real cut-off date for work is November 9, 2015.
+* There was general consensus on the call that work should be accomplished in such a way that the code review process
+not drag into the code freeze time period. In other words, pull requests to the release branch should be completed
+well ahead of the 9th.
+
+Upon review of the tickets in JIRA assigned to 3.1.0-incubating, the following were removed from the 3.1.0-incubating
+roadmap:
+
+[width="100%",cols="2,5,5",options="header"]
+|=========================================================
+|ID |Description |Removal Reasoning
+|TINKERPOP3-891 |Re-examine Sandboxing Abstractions |Low priority and time limitations.
+|TINKERPOP3-890 |Remove the concept of branch/ package. |Awaiting step library definition in 3.2.0-incubating.
+|TINKERPOP3-873 |FoldStep should default to using BulkSet for efficiency. |Awaiting step library definition in 3.2.0-incubating.
+|TINKERPOP3-864 |Operator.mean would be nice. |Awaiting step library definition in 3.2.0-incubating.
+|TINKERPOP3-862 |Add a TraversalSourceStrategy that provides "locked" values. |Low priority and time limitations.
+|TINKERPOP3-854 |Remove PropertyMapStep in favor of multi-instruction construction. |Non-trivial given time limitations.
+|TINKERPOP3-789 |Choose then Enforce Semantics for Graph.close() |Non-trivial given time limitations.
+|TINKERPOP3-768 |MatchStep in OLAP should be smart about current vertex. |Non-trivial given time limitations.
+|TINKERPOP3-705 |Make use of a MemoryRDD instead of Accumulators in SparkGraphComputer? |Non-trivial given time limitations.
+|TINKERPOP3-659 |GraphConfiguration Class |Non-trivial given time limitations.
+|TINKERPOP3-623 |More output for OLAP jobs |Not clearly defined given time limitations.
+|TINKERPOP3-620 |Commutative Step Marker interface |Awaiting step library definition in 3.2.0-incubating
+|TINKERPOP3-550 |Gremlin IO needs to support both OLTP and OLAP naturally. |Not clearly defined given time limitations.
+|TINKERPOP3-479 |Consider Providing "getOrCreate" Functionality |Not clearly defined given time limitations.
+|=========================================================
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/6be4a7d0/docs/src/developer.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/developer.asciidoc b/docs/src/developer.asciidoc
index 93db877..e561018 100644
--- a/docs/src/developer.asciidoc
+++ b/docs/src/developer.asciidoc
@@ -26,4 +26,6 @@ technical information and other internal processes related to the project.
include::developer-contributing.asciidoc[]
-include::developer-release.asciidoc[]
\ No newline at end of file
+include::developer-release.asciidoc[]
+
+include::developer-meetings.asciidoc[]
\ No newline at end of file
[48/50] incubator-tinkerpop git commit: found a wacky named test in
AddVertexTest. Fixed it. CTR.
Posted by ok...@apache.org.
found a wacky named test in AddVertexTest. Fixed it. CTR.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/ac0924d3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/ac0924d3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/ac0924d3
Branch: refs/heads/TINKERPOP3-925
Commit: ac0924d3271157b4c1e3ac8984593d88a0b75288
Parents: 522c256
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Thu Oct 29 16:22:57 2015 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Thu Oct 29 16:22:57 2015 -0600
----------------------------------------------------------------------
.../gremlin/process/traversal/step/map/AddVertexTest.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/ac0924d3/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddVertexTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddVertexTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddVertexTest.java
index 3b2f8b5..5a616f8 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddVertexTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddVertexTest.java
@@ -209,7 +209,7 @@ public abstract class AddVertexTest extends AbstractGremlinTest {
@FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
@FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_PROPERTY)
@FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_MULTI_PROPERTIES)
- public void xxx() {
+ public void g_V_addVXanimalX_propertyXname_valuesXnameXX_propertyXname_an_animalX_propertyXvaluesXnameX_labelX() {
final Traversal<Vertex, Vertex> traversal = get_g_V_addVXanimalX_propertyXname_valuesXnameXX_propertyXname_an_animalX_propertyXvaluesXnameX_labelX();
printTraversalForm(traversal);
while (traversal.hasNext()) {
[35/50] incubator-tinkerpop git commit: Fixed. There is now
TraversalHelper.isNotBeyondElementId(). This ensures that any
CollectingBarrierStep or other end-step for TraverserMapReduce throws a
ComputerVerificationStrategyException is the by() modulation
Posted by ok...@apache.org.
Fixed. There is now TraversalHelper.isNotBeyondElementId(). This ensures that any CollectingBarrierStep or other end-step for TraverserMapReduce throws a ComputerVerificationStrategyException is the by() modulation tries to touch anything more than the Element id (though if its a string, list, etc. that is okay). I added @dkuppitz two examples that should work and now they do work. Furthermore, all existing traversal tests pass.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/d9cf614f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/d9cf614f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/d9cf614f
Branch: refs/heads/TINKERPOP3-925
Commit: d9cf614fcb1355a33bdf1ec007aa569f561f32b3
Parents: 45bf33d
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Wed Oct 28 15:30:31 2015 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Wed Oct 28 15:30:31 2015 -0600
----------------------------------------------------------------------
.../step/util/TraversalComparator.java | 5 +-
.../ComputerVerificationStrategy.java | 11 +---
.../process/traversal/util/TraversalHelper.java | 20 +++++++
.../traversal/step/map/GroovyOrderTest.groovy | 10 ++++
.../process/traversal/step/map/OrderTest.java | 58 +++++++++++++++++++-
5 files changed, 91 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d9cf614f/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/TraversalComparator.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/TraversalComparator.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/TraversalComparator.java
index 374a61b..fe65d58 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/TraversalComparator.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/TraversalComparator.java
@@ -19,6 +19,7 @@
package org.apache.tinkerpop.gremlin.process.traversal.step.util;
import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
+import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalUtil;
import java.io.Serializable;
@@ -44,7 +45,9 @@ public final class TraversalComparator<S, E> implements Comparator<S>, Serializa
@Override
public int compare(final S start1, final S start2) {
- return this.comparator.compare(TraversalUtil.apply(start1, this.traversal), TraversalUtil.apply(start2, this.traversal));
+ return start1 instanceof Traverser ?
+ this.comparator.compare(TraversalUtil.apply((Traverser.Admin<S>) start1, this.traversal), TraversalUtil.apply((Traverser.Admin<S>) start2, this.traversal)) :
+ this.comparator.compare(TraversalUtil.apply(start1, this.traversal), TraversalUtil.apply(start2, this.traversal));
}
@Override
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d9cf614f/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/ComputerVerificationStrategy.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/ComputerVerificationStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/ComputerVerificationStrategy.java
index 259531a..4561272 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/ComputerVerificationStrategy.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/ComputerVerificationStrategy.java
@@ -22,9 +22,6 @@ import org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.Computer
import org.apache.tinkerpop.gremlin.process.traversal.Step;
import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy;
-import org.apache.tinkerpop.gremlin.process.traversal.lambda.ConstantTraversal;
-import org.apache.tinkerpop.gremlin.process.traversal.lambda.IdentityTraversal;
-import org.apache.tinkerpop.gremlin.process.traversal.lambda.TokenTraversal;
import org.apache.tinkerpop.gremlin.process.traversal.step.Bypassing;
import org.apache.tinkerpop.gremlin.process.traversal.step.Mutating;
import org.apache.tinkerpop.gremlin.process.traversal.step.PathProcessor;
@@ -46,9 +43,6 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.util.ReducingBarrierS
import org.apache.tinkerpop.gremlin.process.traversal.step.util.SupplyingBarrierStep;
import org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy;
import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper;
-import org.apache.tinkerpop.gremlin.structure.Edge;
-import org.apache.tinkerpop.gremlin.structure.T;
-import org.apache.tinkerpop.gremlin.structure.Vertex;
import java.util.Arrays;
import java.util.HashSet;
@@ -83,10 +77,7 @@ public final class ComputerVerificationStrategy extends AbstractTraversalStrateg
throw new VerificationException("GraphComputer does not support traversals starting from a non-GraphStep: " + traversal.getStartStep(), traversal);
///
if (endStep instanceof CollectingBarrierStep && endStep instanceof TraversalParent) {
- if (((TraversalParent) endStep).getLocalChildren().stream().filter(t ->
- !(t instanceof IdentityTraversal) &&
- !(t instanceof ConstantTraversal) && // for SampleStep
- !(t instanceof TokenTraversal && ((TokenTraversal) t).getToken().equals(T.id))).findAny().isPresent())
+ if (((TraversalParent) endStep).getLocalChildren().stream().filter(t -> !TraversalHelper.isNotBeyondElementId(t)).findAny().isPresent())
throw new VerificationException("A final CollectingBarrierStep can not process an element beyond its id: " + endStep, traversal);
}
///
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d9cf614f/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/TraversalHelper.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/TraversalHelper.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/TraversalHelper.java
index f4f96c7..af98fa6 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/TraversalHelper.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/TraversalHelper.java
@@ -20,6 +20,8 @@ package org.apache.tinkerpop.gremlin.process.traversal.util;
import org.apache.tinkerpop.gremlin.process.traversal.Step;
import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
+import org.apache.tinkerpop.gremlin.process.traversal.lambda.ElementValueTraversal;
+import org.apache.tinkerpop.gremlin.process.traversal.lambda.TokenTraversal;
import org.apache.tinkerpop.gremlin.process.traversal.step.HasContainerHolder;
import org.apache.tinkerpop.gremlin.process.traversal.step.Scoping;
import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent;
@@ -31,6 +33,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.filter.WhereTraversal
import org.apache.tinkerpop.gremlin.process.traversal.step.map.EdgeVertexStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.MatchStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.PropertiesStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.PropertyMapStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.VertexStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.StartStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.util.BulkSet;
@@ -57,6 +60,23 @@ public final class TraversalHelper {
private TraversalHelper() {
}
+ public static boolean isNotBeyondElementId(final Traversal.Admin<?, ?> traversal) {
+ if (traversal instanceof TokenTraversal && !((TokenTraversal) traversal).getToken().equals(T.id))
+ return false;
+ else if (traversal instanceof ElementValueTraversal)
+ return false;
+ else
+ return !traversal.getSteps().stream()
+ .filter(step -> step instanceof VertexStep ||
+ step instanceof EdgeVertexStep ||
+ step instanceof PropertiesStep ||
+ step instanceof PropertyMapStep ||
+ (step instanceof TraversalParent &&
+ (((TraversalParent) step).getLocalChildren().stream().filter(t -> !TraversalHelper.isNotBeyondElementId(t)).findAny().isPresent() ||
+ ((TraversalParent) step).getGlobalChildren().stream().filter(t -> !TraversalHelper.isNotBeyondElementId(t)).findAny().isPresent())))
+ .findAny().isPresent();
+ }
+
public static boolean isLocalStarGraph(final Traversal.Admin<?, ?> traversal) {
return isLocalStarGraph(traversal, 'v');
}
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d9cf614f/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyOrderTest.groovy
----------------------------------------------------------------------
diff --git a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyOrderTest.groovy b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyOrderTest.groovy
index b2393d5..4b1168f 100644
--- a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyOrderTest.groovy
+++ b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyOrderTest.groovy
@@ -86,5 +86,15 @@ public abstract class GroovyOrderTest {
public Traversal<Vertex, Map<String, List<Vertex>>> get_g_V_group_byXlabelX_byXnameX_byXorderXlocalX_byXdecrXX() {
TraversalScriptHelper.compute("g.V.group.by(label).by(values('name').order().by(decr).fold())", g)
}
+
+ @Override
+ public Traversal<Vertex, List<Double>> get_g_V_localXbothE_weight_foldX_order_byXsumXlocalX_decrX() {
+ TraversalScriptHelper.compute("g.V.local(__.bothE.weight.fold).order.by(sum(local), decr)", g)
+ }
+
+ @Override
+ public Traversal<Vertex, Map<String, Object>> get_g_V_asXvX_mapXbothE_weight_foldX_sumXlocalX_asXsX_selectXv_sX_order_byXselectXsX_decrX() {
+ TraversalScriptHelper.compute("g.V.as('v').map(__.bothE.weight.fold).sum(local).as('s').select('v', 's').order.by(select('s'),decr)", g);
+ }
}
}
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d9cf614f/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderTest.java
index 99dae26..cb0674d 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderTest.java
@@ -70,6 +70,10 @@ public abstract class OrderTest extends AbstractGremlinProcessTest {
public abstract Traversal<Vertex, Map<String, List<Vertex>>> get_g_V_group_byXlabelX_byXnameX_byXorderXlocalX_byXdecrXX();
+ public abstract Traversal<Vertex, List<Double>> get_g_V_localXbothE_weight_foldX_order_byXsumXlocalX_decrX();
+
+ public abstract Traversal<Vertex, Map<String, Object>> get_g_V_asXvX_mapXbothE_weight_foldX_sumXlocalX_asXsX_selectXv_sX_order_byXselectXsX_decrX();
+
@Test
@LoadGraphWith(MODERN)
public void g_V_name_order() {
@@ -97,7 +101,7 @@ public abstract class OrderTest extends AbstractGremlinProcessTest {
@Test
@LoadGraphWith(MODERN)
public void g_V_order_byXname_incrX_name() {
- final Traversal<Vertex,String> traversal = get_g_V_order_byXname_incrX_name();
+ final Traversal<Vertex, String> traversal = get_g_V_order_byXname_incrX_name();
printTraversalForm(traversal);
assertCommon(traversal);
}
@@ -105,7 +109,7 @@ public abstract class OrderTest extends AbstractGremlinProcessTest {
@Test
@LoadGraphWith(MODERN)
public void g_V_order_byXnameX_name() {
- final Traversal<Vertex,String> traversal = get_g_V_order_byXnameX_name();
+ final Traversal<Vertex, String> traversal = get_g_V_order_byXnameX_name();
printTraversalForm(traversal);
assertCommon(traversal);
}
@@ -246,6 +250,47 @@ public abstract class OrderTest extends AbstractGremlinProcessTest {
assertEquals("vadas", list.get(0));
}
+ @Test
+ @LoadGraphWith(MODERN)
+ public void g_V_localXbothE_weight_foldX_order_byXsumXlocalX_decrX() {
+ final Traversal<Vertex, List<Double>> traversal = get_g_V_localXbothE_weight_foldX_order_byXsumXlocalX_decrX();
+ final List<List<Double>> list = traversal.toList();
+ assertEquals(list.get(0).size(), 3);
+ assertEquals(list.get(1).size(), 3);
+ //assertEquals(list.get(2).size(),3); // they both have value 1.0 and thus can't guarantee a tie order
+ //assertEquals(list.get(3).size(),1);
+ assertEquals(list.get(4).size(), 1);
+ assertEquals(list.get(5).size(), 1);
+ ///
+ assertEquals(2.4d, list.get(0).stream().reduce(0.0d, (a, b) -> a + b), 0.01d);
+ assertEquals(1.9d, list.get(1).stream().reduce(0.0d, (a, b) -> a + b), 0.01d);
+ assertEquals(1.0d, list.get(2).stream().reduce(0.0d, (a, b) -> a + b), 0.01d);
+ assertEquals(1.0d, list.get(3).stream().reduce(0.0d, (a, b) -> a + b), 0.01d);
+ assertEquals(0.5d, list.get(4).stream().reduce(0.0d, (a, b) -> a + b), 0.01d);
+ assertEquals(0.2d, list.get(5).stream().reduce(0.0d, (a, b) -> a + b), 0.01d);
+ }
+
+ @Test
+ @LoadGraphWith(MODERN)
+ public void g_V_asXvX_mapXbothE_weight_foldX_sumXlocalX_asXsX_selectXv_sX_order_byXselectXsX_decrX() {
+ final Traversal<Vertex, Map<String, Object>> traversal = get_g_V_asXvX_mapXbothE_weight_foldX_sumXlocalX_asXsX_selectXv_sX_order_byXselectXsX_decrX();
+ final List<Map<String, Object>> list = traversal.toList();
+ assertEquals(convertToVertex(graph, "josh"), list.get(0).get("v"));
+ assertEquals(2.4d, (Double) list.get(0).get("s"), 0.1d);
+ ///
+ assertEquals(convertToVertex(graph, "marko"), list.get(1).get("v"));
+ assertEquals(1.9d, (Double) list.get(1).get("s"), 0.1d);
+ //
+ assertEquals(1.0d, (Double) list.get(2).get("s"), 0.1d); // they both have 1.0 so you can't test the "v" as().
+ assertEquals(1.0d, (Double) list.get(3).get("s"), 0.1d);
+ ///
+ assertEquals(convertToVertex(graph, "vadas"), list.get(4).get("v"));
+ assertEquals(0.5d, (Double) list.get(4).get("s"), 0.1d);
+ ///
+ assertEquals(convertToVertex(graph, "peter"), list.get(5).get("v"));
+ assertEquals(0.2d, (Double) list.get(5).get("s"), 0.1d);
+ }
+
public static class Traversals extends OrderTest {
@Override
@@ -307,5 +352,14 @@ public abstract class OrderTest extends AbstractGremlinProcessTest {
return g.V().<String, List<Vertex>>group().by(T.label).by(__.values("name").order().by(Order.decr).fold());
}
+ @Override
+ public Traversal<Vertex, List<Double>> get_g_V_localXbothE_weight_foldX_order_byXsumXlocalX_decrX() {
+ return g.V().local(__.bothE().<Double>values("weight").fold()).order().by(__.sum(Scope.local), Order.decr);
+ }
+
+ @Override
+ public Traversal<Vertex, Map<String, Object>> get_g_V_asXvX_mapXbothE_weight_foldX_sumXlocalX_asXsX_selectXv_sX_order_byXselectXsX_decrX() {
+ return g.V().as("v").map(__.bothE().<Double>values("weight").fold()).sum(Scope.local).as("s").select("v", "s").order().by(__.select("s"), Order.decr);
+ }
}
}
[31/50] incubator-tinkerpop git commit: Merge branch 'master' into
TINKERPOP3-857
Posted by ok...@apache.org.
Merge branch 'master' into TINKERPOP3-857
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/ee6074f8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/ee6074f8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/ee6074f8
Branch: refs/heads/TINKERPOP3-925
Commit: ee6074f8753df97b0356c96560ffc50ce301fed9
Parents: 2150b33 45bf33d
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Wed Oct 28 13:20:11 2015 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Wed Oct 28 13:20:11 2015 -0600
----------------------------------------------------------------------
CHANGELOG.asciidoc | 41 +-
CONTRIBUTING.asciidoc | 218 +-----
RELEASE.asciidoc | 160 -----
bin/validate-distribution.sh | 8 +-
docs/preprocessor/awk/init-code-blocks.awk | 2 +
docs/preprocessor/preprocess-file.sh | 2 +-
docs/preprocessor/preprocess.sh | 6 +
docs/src/acknowledgements.asciidoc | 19 +-
docs/src/conclusion.asciidoc | 6 +-
docs/src/developer-contributing.asciidoc | 268 +++++++
docs/src/developer-release.asciidoc | 172 +++++
docs/src/developer.asciidoc | 29 +
docs/src/gremlin-applications.asciidoc | 703 +++++++++++++++----
docs/src/implementations.asciidoc | 660 ++++++++++++++---
docs/src/intro.asciidoc | 173 ++++-
docs/src/preface.asciidoc | 42 +-
docs/src/the-graph.asciidoc | 245 +++++--
docs/src/the-graphcomputer.asciidoc | 222 +++++-
docs/src/the-traversal.asciidoc | 644 ++++++++++++-----
.../upgrade-release-3.0.x-incubating.asciidoc | 6 +-
.../upgrade-release-3.1.x-incubating.asciidoc | 87 ++-
docs/static/images/grateful-gremlin.png | Bin 0 -> 59084 bytes
.../images/keep-on-traversin-tiedye-title.png | Bin 0 -> 943206 bytes
docs/static/images/keep-on-traversin-tiedye.png | Bin 0 -> 581914 bytes
docs/static/images/keep-on-traversin-title.png | Bin 0 -> 669529 bytes
docs/static/images/keep-on-traversin.png | Bin 0 -> 400941 bytes
docs/static/images/not-tinkerpop3-gremlin.png | Bin 0 -> 186676 bytes
docs/static/images/provider-integration.png | Bin 372429 -> 226464 bytes
docs/static/images/quantum-gremlin.png | Bin 0 -> 69142 bytes
docs/static/images/tinkerpop3.graffle | 236 +++----
giraph-gremlin/pom.xml | 21 +
.../groovy/plugin/HadoopGremlinPluginTest.java | 163 -----
.../giraph/groovy/plugin/HadoopPluginSuite.java | 36 -
...GiraphGraphComputerProcessIntegrateTest.java | 2 +-
.../computer/GiraphHadoopGraphProvider.java | 64 ++
.../computer/HadoopGiraphGraphProvider.java | 170 -----
...GraphComputerGroovyProcessIntegrateTest.java | 4 +-
.../GiraphHadoopGremlinPluginIntegrateTest.java | 6 +-
.../conf/neo4j-standalone.properties | 22 +
.../conf/tinkergraph-gryo.properties | 21 +
.../bulkloading/BulkLoaderVertexProgram.java | 13 +-
.../gremlin/process/traversal/NumberHelper.java | 280 ++++++++
.../gremlin/process/traversal/Operator.java | 78 +-
.../gremlin/process/traversal/Traversal.java | 10 +
.../process/traversal/TraversalStrategies.java | 4 +-
.../traversal/dsl/graph/GraphTraversal.java | 4 +-
.../dsl/graph/GraphTraversalSource.java | 49 +-
.../lambda/AbstractLambdaTraversal.java | 7 +
.../process/traversal/lambda/LoopTraversal.java | 4 +
.../traversal/step/branch/RepeatStep.java | 8 +
.../process/traversal/step/filter/AndStep.java | 2 +-
.../traversal/step/filter/ConjunctionStep.java | 81 ---
.../traversal/step/filter/ConnectiveStep.java | 81 +++
.../process/traversal/step/filter/OrStep.java | 2 +-
.../step/filter/WherePredicateStep.java | 10 +-
.../step/filter/WhereTraversalStep.java | 6 +-
.../process/traversal/step/map/MatchStep.java | 40 +-
.../traversal/step/util/PathIdentityStep.java | 48 --
.../decoration/ConjunctionStrategy.java | 114 ---
.../strategy/decoration/ConnectiveStrategy.java | 114 +++
.../AdjacentToIncidentStrategy.java | 4 +-
.../optimization/RangeByIsCountStrategy.java | 6 +-
.../B_LP_O_P_S_SE_SL_TraverserGenerator.java | 8 +-
.../B_LP_O_S_SE_SL_TraverserGenerator.java | 8 +-
.../B_O_S_SE_SL_TraverserGenerator.java | 8 +-
.../traverser/B_O_TraverserGenerator.java | 6 +-
.../traverser/LP_O_OB_P_S_SE_SL_Traverser.java | 98 +++
.../LP_O_OB_P_S_SE_SL_TraverserGenerator.java | 62 ++
.../traverser/LP_O_OB_S_SE_SL_Traverser.java | 99 +++
.../LP_O_OB_S_SE_SL_TraverserGenerator.java | 61 ++
.../traverser/O_OB_S_SE_SL_Traverser.java | 137 ++++
.../O_OB_S_SE_SL_TraverserGenerator.java | 59 ++
.../traverser/O_TraverserGenerator.java | 2 +-
.../traverser/TraverserRequirement.java | 8 +-
.../util/DefaultTraverserGeneratorFactory.java | 34 +-
.../gremlin/process/traversal/util/AndP.java | 3 +-
.../process/traversal/util/ConjunctionP.java | 117 ---
.../process/traversal/util/ConnectiveP.java | 115 +++
.../traversal/util/DefaultTraversal.java | 27 +
.../process/traversal/util/EmptyTraversal.java | 5 +
.../gremlin/process/traversal/util/OrP.java | 2 +-
.../process/traversal/util/TraversalHelper.java | 4 +-
.../gremlin/structure/io/gryo/GryoMapper.java | 10 +-
.../traversal/OperatorExceptionTest.java | 39 +-
.../gremlin/process/traversal/OperatorTest.java | 100 ++-
.../traversal/step/map/MatchStepTest.java | 6 +-
.../decoration/ConjunctionStrategyTest.java | 183 -----
.../decoration/ConnectiveStrategyTest.java | 183 +++++
.../DefaultTraverserGeneratorFactoryTest.java | 85 +++
.../driver/ser/GryoMessageSerializerV1d0.java | 13 +-
.../gremlin/driver/AbstractResultQueueTest.java | 23 +
.../gremlin/driver/ResultQueueTest.java | 15 +-
.../ser/GryoMessageSerializerV1d0Test.java | 55 ++
.../step/sideEffect/GroovySackTest.groovy | 9 +-
.../gremlin/groovy/loaders/StepLoader.groovy | 24 +-
.../groovy/util/DependencyGrabber.groovy | 73 +-
.../groovy/function/GBinaryOperator.java | 2 +
.../gremlin/groovy/function/GComparator.java | 2 +
.../gremlin/groovy/function/GFunction.java | 2 +
.../gremlin/groovy/function/GSupplier.java | 2 +
.../gremlin/groovy/function/GUnaryOperator.java | 2 +
...linGroovyScriptEngineTimedInterruptTest.java | 12 +-
.../groovy/util/DependencyGrabberTest.java | 101 +++
gremlin-server/pom.xml | 25 +
.../tinkerpop/gremlin/server/GremlinServer.java | 53 +-
.../tinkerpop/gremlin/server/Settings.java | 5 +
.../handler/NioGremlinBinaryRequestDecoder.java | 5 +
.../handler/WsGremlinBinaryRequestDecoder.java | 5 +
.../handler/WsGremlinCloseRequestDecoder.java | 5 +
.../handler/WsGremlinTextRequestDecoder.java | 5 +
.../AbstractGremlinServerIntegrationTest.java | 7 +-
.../server/GremlinDriverIntegrateTest.java | 72 +-
.../server/GremlinServerIntegrateTest.java | 100 +++
.../BulkLoaderVertexProgramTest.java | 123 +++-
.../process/traversal/step/filter/HasTest.java | 7 +-
.../traversal/step/sideEffect/SackTest.java | 41 +-
.../conf/hadoop-grateful-gryo.properties | 49 ++
hadoop-gremlin/pom.xml | 12 +
.../groovy/plugin/HadoopGremlinPlugin.java | 3 +-
.../hadoop/structure/io/HadoopPools.java | 2 +-
.../gremlin/hadoop/HadoopGraphProvider.java | 2 +-
.../groovy/plugin/HadoopGremlinPluginTest.java | 33 +-
.../hadoop/groovy/plugin/HadoopPluginSuite.java | 3 +-
pom.xml | 29 +-
spark-gremlin/pom.xml | 57 ++
.../groovy/plugin/HadoopGremlinPluginTest.java | 162 -----
.../spark/groovy/plugin/HadoopPluginSuite.java | 36 -
.../computer/HadoopSparkGraphProvider.java | 159 -----
.../SparkGraphComputerProcessIntegrateTest.java | 2 +-
.../computer/SparkHadoopGraphProvider.java | 53 ++
...GraphComputerGroovyProcessIntegrateTest.java | 4 +-
.../groovy/SparkHadoopGremlinPluginTest.java | 6 +-
.../process/computer/io/OutputRDDTest.java | 4 +-
.../tinkergraph/structure/TinkerFactory.java | 8 +-
.../tinkergraph/structure/TinkerGraph.java | 58 +-
.../tinkergraph/TinkerGraphProvider.java | 14 +-
.../TinkerGraphNoStrategyComputerProvider.java | 4 +-
.../process/TinkerGraphNoStrategyProvider.java | 4 +-
.../structure/TinkerGraphIdManagerTest.java | 18 +-
.../tinkergraph/structure/TinkerGraphTest.java | 16 +-
140 files changed, 5711 insertions(+), 2707 deletions(-)
----------------------------------------------------------------------
[21/50] incubator-tinkerpop git commit: added a srategy test suite
for Neo4j
Posted by ok...@apache.org.
added a srategy test suite for Neo4j
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/402e57d9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/402e57d9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/402e57d9
Branch: refs/heads/TINKERPOP3-925
Commit: 402e57d94fd71f2d652aded37becfe566d4ddad4
Parents: df443cc
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Wed Oct 28 15:32:26 2015 +0100
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Wed Oct 28 15:32:26 2015 +0100
----------------------------------------------------------------------
.../gremlin/neo4j/structure/Neo4jGraph.java | 1 +
.../gremlin/neo4j/Neo4jStrategySuite.java | 44 ++++++++++++++++++
.../gremlin/neo4j/Neo4jStrategyTest.java | 31 +++++++++++++
.../Neo4jGraphStepStrategyTest.java | 47 ++++++++++++++++++++
4 files changed, 123 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/402e57d9/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jGraph.java
----------------------------------------------------------------------
diff --git a/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jGraph.java b/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jGraph.java
index 0f8300e..7616dc6 100644
--- a/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jGraph.java
+++ b/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jGraph.java
@@ -71,6 +71,7 @@ import java.util.stream.Stream;
@Graph.OptIn(Graph.OptIn.SUITE_GROOVY_ENVIRONMENT_INTEGRATE)
@Graph.OptIn(Graph.OptIn.SUITE_GROOVY_ENVIRONMENT_PERFORMANCE)
@Graph.OptIn("org.apache.tinkerpop.gremlin.neo4j.NativeNeo4jSuite")
+@Graph.OptIn("org.apache.tinkerpop.gremlin.neo4j.Neo4jStrategySuite")
public final class Neo4jGraph implements Graph, WrappedGraph<Neo4jGraphAPI> {
public static final Logger LOGGER = LoggerFactory.getLogger(Neo4jGraph.class);
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/402e57d9/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/Neo4jStrategySuite.java
----------------------------------------------------------------------
diff --git a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/Neo4jStrategySuite.java b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/Neo4jStrategySuite.java
new file mode 100644
index 0000000..7c56d0d
--- /dev/null
+++ b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/Neo4jStrategySuite.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.neo4j;
+
+import org.apache.tinkerpop.gremlin.AbstractGremlinSuite;
+import org.apache.tinkerpop.gremlin.neo4j.process.traversal.strategy.optimization.Neo4jGraphStepStrategyTest;
+import org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine;
+import org.junit.runners.model.InitializationError;
+import org.junit.runners.model.RunnerBuilder;
+
+/**
+ * @author Daniel Kuppitz (http://gremlin.guru)
+ */
+public class Neo4jStrategySuite extends AbstractGremlinSuite {
+
+ public Neo4jStrategySuite(final Class<?> klass, final RunnerBuilder builder) throws InitializationError {
+
+ super(klass, builder,
+ new Class<?>[]{
+ Neo4jGraphStepStrategyTest.class
+ }, new Class<?>[]{
+ Neo4jGraphStepStrategyTest.class
+ },
+ false,
+ TraversalEngine.Type.STANDARD);
+ }
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/402e57d9/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/Neo4jStrategyTest.java
----------------------------------------------------------------------
diff --git a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/Neo4jStrategyTest.java b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/Neo4jStrategyTest.java
new file mode 100644
index 0000000..d0bdc0f
--- /dev/null
+++ b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/Neo4jStrategyTest.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.neo4j;
+
+import org.apache.tinkerpop.gremlin.GraphProviderClass;
+import org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jGraph;
+import org.junit.runner.RunWith;
+
+/**
+ * @author Daniel Kuppitz (http://gremlin.guru)
+ */
+@RunWith(Neo4jStrategySuite.class)
+@GraphProviderClass(provider = NoMultiNoMetaNeo4jGraphProvider.class, graph = Neo4jGraph.class)
+public class Neo4jStrategyTest {
+}
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/402e57d9/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/strategy/optimization/Neo4jGraphStepStrategyTest.java
----------------------------------------------------------------------
diff --git a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/strategy/optimization/Neo4jGraphStepStrategyTest.java b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/strategy/optimization/Neo4jGraphStepStrategyTest.java
new file mode 100644
index 0000000..26070af
--- /dev/null
+++ b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/strategy/optimization/Neo4jGraphStepStrategyTest.java
@@ -0,0 +1,47 @@
+package org.apache.tinkerpop.gremlin.neo4j.process.traversal.strategy.optimization;
+
+import org.apache.tinkerpop.gremlin.LoadGraphWith;
+import org.apache.tinkerpop.gremlin.neo4j.AbstractNeo4jGremlinTest;
+import org.apache.tinkerpop.gremlin.neo4j.process.traversal.step.sideEffect.Neo4jGraphStep;
+import org.apache.tinkerpop.gremlin.process.traversal.P;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.HasStep;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ * @author Daniel Kuppitz (http://gremlin.guru)
+ */
+public class Neo4jGraphStepStrategyTest extends AbstractNeo4jGremlinTest {
+
+ @Test
+ @LoadGraphWith(LoadGraphWith.GraphData.MODERN)
+ public void shouldFoldInHasContainers() {
+ GraphTraversal.Admin traversal = g.V().has("name", "marko").asAdmin();
+ assertEquals(2, traversal.getSteps().size());
+ assertEquals(HasStep.class, traversal.getEndStep().getClass());
+ traversal.applyStrategies();
+ assertEquals(1, traversal.getSteps().size());
+ assertEquals(Neo4jGraphStep.class, traversal.getStartStep().getClass());
+ assertEquals(Neo4jGraphStep.class, traversal.getEndStep().getClass());
+ assertEquals(1, ((Neo4jGraphStep) traversal.getStartStep()).getHasContainers().size());
+ assertEquals("name", ((Neo4jGraphStep<?, ?>) traversal.getStartStep()).getHasContainers().get(0).getKey());
+ assertEquals("marko", ((Neo4jGraphStep<?, ?>) traversal.getStartStep()).getHasContainers().get(0).getValue());
+ ////
+ traversal = g.V().has("name", "marko").has("age", P.gt(20)).asAdmin();
+ traversal.applyStrategies();
+ assertEquals(1, traversal.getSteps().size());
+ assertEquals(Neo4jGraphStep.class, traversal.getStartStep().getClass());
+ assertEquals(2, ((Neo4jGraphStep) traversal.getStartStep()).getHasContainers().size());
+ ////
+ traversal = g.V().has("name", "marko").out().has("name", "daniel").asAdmin();
+ traversal.applyStrategies();
+ assertEquals(3, traversal.getSteps().size());
+ assertEquals(Neo4jGraphStep.class, traversal.getStartStep().getClass());
+ assertEquals(1, ((Neo4jGraphStep) traversal.getStartStep()).getHasContainers().size());
+ assertEquals("name", ((Neo4jGraphStep<?, ?>) traversal.getStartStep()).getHasContainers().get(0).getKey());
+ assertEquals("marko", ((Neo4jGraphStep<?, ?>) traversal.getStartStep()).getHasContainers().get(0).getValue());
+ assertEquals(HasStep.class, traversal.getEndStep().getClass());
+ }
+}
[29/50] incubator-tinkerpop git commit: Update upgrading docs.
Posted by ok...@apache.org.
Update upgrading docs.
Invoking CTR as this is a minor documentation change.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/901ffd9d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/901ffd9d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/901ffd9d
Branch: refs/heads/TINKERPOP3-925
Commit: 901ffd9dafb50a99a0f7d217030401ae5df080cf
Parents: 1b6bdf1
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Oct 28 11:40:58 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Oct 28 11:40:58 2015 -0400
----------------------------------------------------------------------
docs/src/upgrade-release-3.1.x-incubating.asciidoc | 8 ++++++++
1 file changed, 8 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/901ffd9d/docs/src/upgrade-release-3.1.x-incubating.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade-release-3.1.x-incubating.asciidoc b/docs/src/upgrade-release-3.1.x-incubating.asciidoc
index 9a7d34f..d4eef54 100644
--- a/docs/src/upgrade-release-3.1.x-incubating.asciidoc
+++ b/docs/src/upgrade-release-3.1.x-incubating.asciidoc
@@ -150,3 +150,11 @@ Element Removal
Providers are free to deal with deleted elements as they see fit.
See link:https://issues.apache.org/jira/browse/TINKERPOP3-297[TINKERPOP3-297] for more information.
+
+VendorOptimizationStrategy Rename
++++++++++++++++++++++++++++++++++
+
+The `VendorOptimizationStrategy` has been renamed to `ProviderOptimizationStrategy`. This renaming is consistent
+with revised terminology for what were formerly referred to as "vendors".
+
+See link:https://issues.apache.org/jira/browse/TINKERPOP3-876[TINKERPOP3-876] for more information.
[09/50] incubator-tinkerpop git commit: Merge remote-tracking branch
'origin/TINKERPOP3-903'
Posted by ok...@apache.org.
Merge remote-tracking branch 'origin/TINKERPOP3-903'
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/c8f1b70c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/c8f1b70c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/c8f1b70c
Branch: refs/heads/TINKERPOP3-925
Commit: c8f1b70c1fd002355cff425117d87aa2f22fb664
Parents: 9d8da87 173228e
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Oct 27 07:11:03 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Oct 27 07:11:03 2015 -0400
----------------------------------------------------------------------
.../server/GremlinDriverIntegrateTest.java | 44 +++++++++++++++++++-
1 file changed, 43 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
[41/50] incubator-tinkerpop git commit: per @spmallette's VOTE
comment -- made isNotBeyondElementId() private and hidden in
ComputerVerificationStrategy with a TODO about how this needs to be 'proved'
by 3.2.0 and when we have the instruction set nailed
Posted by ok...@apache.org.
per @spmallette's VOTE comment -- made isNotBeyondElementId() private and hidden in ComputerVerificationStrategy with a TODO about how this needs to be 'proved' by 3.2.0 and when we have the instruction set nailed down. CTR.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/736636b7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/736636b7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/736636b7
Branch: refs/heads/TINKERPOP3-925
Commit: 736636b79c37c46dfa9d09a5b649b377e35133d4
Parents: baa9349
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Thu Oct 29 09:15:52 2015 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Thu Oct 29 09:15:52 2015 -0600
----------------------------------------------------------------------
.../ComputerVerificationStrategy.java | 29 +++++++++++++++++++-
.../process/traversal/util/TraversalHelper.java | 17 ------------
2 files changed, 28 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/736636b7/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/ComputerVerificationStrategy.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/ComputerVerificationStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/ComputerVerificationStrategy.java
index 4561272..6c48d61 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/ComputerVerificationStrategy.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/ComputerVerificationStrategy.java
@@ -22,6 +22,8 @@ import org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.Computer
import org.apache.tinkerpop.gremlin.process.traversal.Step;
import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy;
+import org.apache.tinkerpop.gremlin.process.traversal.lambda.ElementValueTraversal;
+import org.apache.tinkerpop.gremlin.process.traversal.lambda.TokenTraversal;
import org.apache.tinkerpop.gremlin.process.traversal.step.Bypassing;
import org.apache.tinkerpop.gremlin.process.traversal.step.Mutating;
import org.apache.tinkerpop.gremlin.process.traversal.step.PathProcessor;
@@ -32,7 +34,11 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.filter.RangeGlobalSte
import org.apache.tinkerpop.gremlin.process.traversal.step.filter.TailGlobalStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.filter.WherePredicateStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.filter.WhereTraversalStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.EdgeVertexStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.OrderGlobalStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.PropertiesStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.PropertyMapStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.VertexStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GraphStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.InjectStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SubgraphStep;
@@ -43,6 +49,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.util.ReducingBarrierS
import org.apache.tinkerpop.gremlin.process.traversal.step.util.SupplyingBarrierStep;
import org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy;
import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper;
+import org.apache.tinkerpop.gremlin.structure.T;
import java.util.Arrays;
import java.util.HashSet;
@@ -77,7 +84,7 @@ public final class ComputerVerificationStrategy extends AbstractTraversalStrateg
throw new VerificationException("GraphComputer does not support traversals starting from a non-GraphStep: " + traversal.getStartStep(), traversal);
///
if (endStep instanceof CollectingBarrierStep && endStep instanceof TraversalParent) {
- if (((TraversalParent) endStep).getLocalChildren().stream().filter(t -> !TraversalHelper.isNotBeyondElementId(t)).findAny().isPresent())
+ if (((TraversalParent) endStep).getLocalChildren().stream().filter(t -> !ComputerVerificationStrategy.isNotBeyondElementId(t)).findAny().isPresent())
throw new VerificationException("A final CollectingBarrierStep can not process an element beyond its id: " + endStep, traversal);
}
///
@@ -117,4 +124,24 @@ public final class ComputerVerificationStrategy extends AbstractTraversalStrateg
public static ComputerVerificationStrategy instance() {
return INSTANCE;
}
+
+ /*
+ * THIS NEEDS TO GO INTO TRAVERSAL HELPER ONCE WE GET THIS ALL STRAIGHTENED OUT WITH THE INSTRUCTION SET OF GREMLIN (TODO:)
+ */
+ private static boolean isNotBeyondElementId(final Traversal.Admin<?, ?> traversal) {
+ if (traversal instanceof TokenTraversal && !((TokenTraversal) traversal).getToken().equals(T.id))
+ return false;
+ else if (traversal instanceof ElementValueTraversal)
+ return false;
+ else
+ return !traversal.getSteps().stream()
+ .filter(step -> step instanceof VertexStep ||
+ step instanceof EdgeVertexStep ||
+ step instanceof PropertiesStep ||
+ step instanceof PropertyMapStep ||
+ (step instanceof TraversalParent &&
+ (((TraversalParent) step).getLocalChildren().stream().filter(t -> !ComputerVerificationStrategy.isNotBeyondElementId(t)).findAny().isPresent() ||
+ ((TraversalParent) step).getGlobalChildren().stream().filter(t -> !ComputerVerificationStrategy.isNotBeyondElementId(t)).findAny().isPresent())))
+ .findAny().isPresent();
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/736636b7/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/TraversalHelper.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/TraversalHelper.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/TraversalHelper.java
index af98fa6..a3a2dd6 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/TraversalHelper.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/TraversalHelper.java
@@ -60,23 +60,6 @@ public final class TraversalHelper {
private TraversalHelper() {
}
- public static boolean isNotBeyondElementId(final Traversal.Admin<?, ?> traversal) {
- if (traversal instanceof TokenTraversal && !((TokenTraversal) traversal).getToken().equals(T.id))
- return false;
- else if (traversal instanceof ElementValueTraversal)
- return false;
- else
- return !traversal.getSteps().stream()
- .filter(step -> step instanceof VertexStep ||
- step instanceof EdgeVertexStep ||
- step instanceof PropertiesStep ||
- step instanceof PropertyMapStep ||
- (step instanceof TraversalParent &&
- (((TraversalParent) step).getLocalChildren().stream().filter(t -> !TraversalHelper.isNotBeyondElementId(t)).findAny().isPresent() ||
- ((TraversalParent) step).getGlobalChildren().stream().filter(t -> !TraversalHelper.isNotBeyondElementId(t)).findAny().isPresent())))
- .findAny().isPresent();
- }
-
public static boolean isLocalStarGraph(final Traversal.Admin<?, ?> traversal) {
return isLocalStarGraph(traversal, 'v');
}
[15/50] incubator-tinkerpop git commit: Fixed the .properties file
keys consistent with TinkerPop pattern.
Posted by ok...@apache.org.
Fixed the .properties file keys consistent with TinkerPop pattern.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/12de257c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/12de257c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/12de257c
Branch: refs/heads/TINKERPOP3-925
Commit: 12de257cb43ea13b768ead04ce2a63108b608c8a
Parents: 9d8da87
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Tue Oct 27 17:35:00 2015 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Tue Oct 27 17:35:00 2015 -0600
----------------------------------------------------------------------
.../tinkergraph/structure/TinkerFactory.java | 8 +--
.../tinkergraph/structure/TinkerGraph.java | 58 +++++++++++++++-----
.../tinkergraph/TinkerGraphProvider.java | 14 ++---
.../structure/TinkerGraphIdManagerTest.java | 18 +++---
.../tinkergraph/structure/TinkerGraphTest.java | 16 +++---
5 files changed, 72 insertions(+), 42 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/12de257c/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerFactory.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerFactory.java b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerFactory.java
index 459a207..a1a1cad 100644
--- a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerFactory.java
+++ b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerFactory.java
@@ -41,9 +41,9 @@ public final class TinkerFactory {
public static TinkerGraph createClassic() {
final Configuration conf = new BaseConfiguration();
- conf.setProperty(TinkerGraph.CONFIG_VERTEX_ID, TinkerGraph.DefaultIdManager.INTEGER.name());
- conf.setProperty(TinkerGraph.CONFIG_EDGE_ID, TinkerGraph.DefaultIdManager.INTEGER.name());
- conf.setProperty(TinkerGraph.CONFIG_VERTEX_PROPERTY_ID, TinkerGraph.DefaultIdManager.INTEGER.name());
+ conf.setProperty(TinkerGraph.GREMLIN_TINKERGRAPH_VERTEX_ID_MANAGER, TinkerGraph.DefaultIdManager.INTEGER.name());
+ conf.setProperty(TinkerGraph.GREMLIN_TINKERGRAPH_EDGE_ID_MANAGER, TinkerGraph.DefaultIdManager.INTEGER.name());
+ conf.setProperty(TinkerGraph.GREMLIN_TINKERGRAPH_VERTEX_PROPERTY_ID_MANAGER, TinkerGraph.DefaultIdManager.INTEGER.name());
final TinkerGraph g = TinkerGraph.open(conf);
generateClassic(g);
@@ -88,7 +88,7 @@ public final class TinkerFactory {
public static TinkerGraph createTheCrew() {
final Configuration conf = new BaseConfiguration();
- conf.setProperty(TinkerGraph.CONFIG_DEFAULT_VERTEX_PROPERTY_CARDINALITY, VertexProperty.Cardinality.list.name());
+ conf.setProperty(TinkerGraph.GREMLIN_TINKERGRAPH_DEFAULT_VERTEX_PROPERTY_CARDINALITY, VertexProperty.Cardinality.list.name());
final TinkerGraph g = TinkerGraph.open(conf);
generateTheCrew(g);
return g;
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/12de257c/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java
index 456af19..921dd52 100644
--- a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java
+++ b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java
@@ -30,7 +30,6 @@ import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.apache.tinkerpop.gremlin.structure.VertexProperty;
import org.apache.tinkerpop.gremlin.structure.io.Io;
import org.apache.tinkerpop.gremlin.structure.io.IoCore;
-import org.apache.tinkerpop.gremlin.structure.io.gryo.GryoMapper;
import org.apache.tinkerpop.gremlin.structure.util.ElementHelper;
import org.apache.tinkerpop.gremlin.structure.util.GraphFactory;
import org.apache.tinkerpop.gremlin.structure.util.StringFactory;
@@ -78,12 +77,43 @@ public final class TinkerGraph implements Graph {
this.setProperty(Graph.GRAPH, TinkerGraph.class.getName());
}};
+ /**
+ * @deprecated As of release 3.1.0, replaced by {@link TinkerGraph#GREMLIN_TINKERGRAPH_VERTEX_ID_MANAGER}
+ */
+ @Deprecated
public static final String CONFIG_VERTEX_ID = "gremlin.tinkergraph.vertexIdManager";
+ /**
+ * @deprecated As of release 3.1.0, replaced by {@link TinkerGraph#GREMLIN_TINKERGRAPH_EDGE_ID_MANAGER}
+ */
+ @Deprecated
public static final String CONFIG_EDGE_ID = "gremlin.tinkergraph.edgeIdManager";
+ /**
+ * @deprecated As of release 3.1.0, replaced by {@link TinkerGraph#GREMLIN_TINKERGRAPH_VERTEX_PROPERTY_ID_MANAGER}
+ */
+ @Deprecated
public static final String CONFIG_VERTEX_PROPERTY_ID = "gremlin.tinkergraph.vertexPropertyIdManager";
+ /**
+ * @deprecated As of release 3.1.0, replaced by {@link TinkerGraph#GREMLIN_TINKERGRAPH_DEFAULT_VERTEX_PROPERTY_CARDINALITY}
+ */
+ @Deprecated
public static final String CONFIG_DEFAULT_VERTEX_PROPERTY_CARDINALITY = "gremlin.tinkergraph.defaultVertexPropertyCardinality";
+ /**
+ * @deprecated As of release 3.1.0, replaced by {@link TinkerGraph#GREMLIN_TINKERGRAPH_GRAPH_LOCATION}
+ */
+ @Deprecated
public static final String CONFIG_GRAPH_LOCATION = "gremlin.tinkergraph.graphLocation";
+ /**
+ * @deprecated As of release 3.1.0, replaced by {@link TinkerGraph#GREMLIN_TINKERGRAPH_GRAPH_FORMAT}
+ */
+ @Deprecated
public static final String CONFIG_GRAPH_FORMAT = "gremlin.tinkergraph.graphFormat";
+ ///////
+ public static final String GREMLIN_TINKERGRAPH_VERTEX_ID_MANAGER = "gremlin.tinkergraph.vertexIdManager";
+ public static final String GREMLIN_TINKERGRAPH_EDGE_ID_MANAGER = "gremlin.tinkergraph.edgeIdManager";
+ public static final String GREMLIN_TINKERGRAPH_VERTEX_PROPERTY_ID_MANAGER = "gremlin.tinkergraph.vertexPropertyIdManager";
+ public static final String GREMLIN_TINKERGRAPH_DEFAULT_VERTEX_PROPERTY_CARDINALITY = "gremlin.tinkergraph.defaultVertexPropertyCardinality";
+ public static final String GREMLIN_TINKERGRAPH_GRAPH_LOCATION = "gremlin.tinkergraph.graphLocation";
+ public static final String GREMLIN_TINKERGRAPH_GRAPH_FORMAT = "gremlin.tinkergraph.graphFormat";
private final TinkerGraphFeatures features = new TinkerGraphFeatures();
@@ -110,18 +140,18 @@ public final class TinkerGraph implements Graph {
*/
private TinkerGraph(final Configuration configuration) {
this.configuration = configuration;
- vertexIdManager = selectIdManager(configuration, CONFIG_VERTEX_ID, Vertex.class);
- edgeIdManager = selectIdManager(configuration, CONFIG_EDGE_ID, Edge.class);
- vertexPropertyIdManager = selectIdManager(configuration, CONFIG_VERTEX_PROPERTY_ID, VertexProperty.class);
+ vertexIdManager = selectIdManager(configuration, GREMLIN_TINKERGRAPH_VERTEX_ID_MANAGER, Vertex.class);
+ edgeIdManager = selectIdManager(configuration, GREMLIN_TINKERGRAPH_EDGE_ID_MANAGER, Edge.class);
+ vertexPropertyIdManager = selectIdManager(configuration, GREMLIN_TINKERGRAPH_VERTEX_PROPERTY_ID_MANAGER, VertexProperty.class);
defaultVertexPropertyCardinality = VertexProperty.Cardinality.valueOf(
- configuration.getString(CONFIG_DEFAULT_VERTEX_PROPERTY_CARDINALITY, VertexProperty.Cardinality.single.name()));
+ configuration.getString(GREMLIN_TINKERGRAPH_DEFAULT_VERTEX_PROPERTY_CARDINALITY, VertexProperty.Cardinality.single.name()));
- graphLocation = configuration.getString(CONFIG_GRAPH_LOCATION, null);
- graphFormat = configuration.getString(CONFIG_GRAPH_FORMAT, null);
+ graphLocation = configuration.getString(GREMLIN_TINKERGRAPH_GRAPH_LOCATION, null);
+ graphFormat = configuration.getString(GREMLIN_TINKERGRAPH_GRAPH_FORMAT, null);
if ((graphLocation != null && null == graphFormat) || (null == graphLocation && graphFormat != null))
throw new IllegalStateException(String.format("The %s and %s must both be specified if either is present",
- CONFIG_GRAPH_LOCATION, CONFIG_GRAPH_FORMAT));
+ GREMLIN_TINKERGRAPH_GRAPH_LOCATION, GREMLIN_TINKERGRAPH_GRAPH_FORMAT));
if (graphLocation != null) loadGraph();
}
@@ -324,9 +354,9 @@ public final class TinkerGraph implements Graph {
public class TinkerGraphFeatures implements Features {
private final TinkerGraphGraphFeatures graphFeatures = new TinkerGraphGraphFeatures();
-private final TinkerGraphEdgeFeatures edgeFeatures = new TinkerGraphEdgeFeatures();
+ private final TinkerGraphEdgeFeatures edgeFeatures = new TinkerGraphEdgeFeatures();
private final TinkerGraphVertexFeatures vertexFeatures = new TinkerGraphVertexFeatures();
-
+
private TinkerGraphFeatures() {
}
@@ -351,11 +381,11 @@ private final TinkerGraphEdgeFeatures edgeFeatures = new TinkerGraphEdgeFeatures
}
}
-
+
public class TinkerGraphVertexFeatures implements Features.VertexFeatures {
private final TinkerGraphVertexPropertyFeatures vertexPropertyFeatures = new TinkerGraphVertexPropertyFeatures();
-
+
private TinkerGraphVertexFeatures() {
}
@@ -379,7 +409,7 @@ private final TinkerGraphEdgeFeatures edgeFeatures = new TinkerGraphEdgeFeatures
return defaultVertexPropertyCardinality;
}
}
-
+
public class TinkerGraphEdgeFeatures implements Features.EdgeFeatures {
private TinkerGraphEdgeFeatures() {
@@ -395,7 +425,7 @@ private final TinkerGraphEdgeFeatures edgeFeatures = new TinkerGraphEdgeFeatures
return edgeIdManager.allow(id);
}
}
-
+
public class TinkerGraphGraphFeatures implements Features.GraphFeatures {
private TinkerGraphGraphFeatures() {
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/12de257c/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphProvider.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphProvider.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphProvider.java
index b41a552..fd3c160 100644
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphProvider.java
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphProvider.java
@@ -65,15 +65,15 @@ public class TinkerGraphProvider extends AbstractGraphProvider {
final String idMaker = (idManager.equals(TinkerGraph.DefaultIdManager.ANY) ? selectIdMakerFromTest(test, testMethodName) : idManager).name();
return new HashMap<String, Object>() {{
put(Graph.GRAPH, TinkerGraph.class.getName());
- put(TinkerGraph.CONFIG_VERTEX_ID, idMaker);
- put(TinkerGraph.CONFIG_EDGE_ID, idMaker);
- put(TinkerGraph.CONFIG_VERTEX_PROPERTY_ID, idMaker);
+ put(TinkerGraph.GREMLIN_TINKERGRAPH_VERTEX_ID_MANAGER, idMaker);
+ put(TinkerGraph.GREMLIN_TINKERGRAPH_EDGE_ID_MANAGER, idMaker);
+ put(TinkerGraph.GREMLIN_TINKERGRAPH_VERTEX_PROPERTY_ID_MANAGER, idMaker);
if (requiresListCardinalityAsDefault(loadGraphWith, test, testMethodName))
- put(TinkerGraph.CONFIG_DEFAULT_VERTEX_PROPERTY_CARDINALITY, VertexProperty.Cardinality.list.name());
+ put(TinkerGraph.GREMLIN_TINKERGRAPH_DEFAULT_VERTEX_PROPERTY_CARDINALITY, VertexProperty.Cardinality.list.name());
if (requiresPersistence(test, testMethodName)) {
- put(TinkerGraph.CONFIG_GRAPH_FORMAT, "gryo");
+ put(TinkerGraph.GREMLIN_TINKERGRAPH_GRAPH_FORMAT, "gryo");
final File tempDir = TestHelper.makeTestDataPath(test, "temp");
- put(TinkerGraph.CONFIG_GRAPH_LOCATION,
+ put(TinkerGraph.GREMLIN_TINKERGRAPH_GRAPH_LOCATION,
tempDir.getAbsolutePath() + File.separator + testMethodName + ".kryo");
}
}};
@@ -85,7 +85,7 @@ public class TinkerGraphProvider extends AbstractGraphProvider {
graph.close();
// in the even the graph is persisted we need to clean up
- final String graphLocation = configuration.getString(TinkerGraph.CONFIG_GRAPH_LOCATION, null);
+ final String graphLocation = configuration.getString(TinkerGraph.GREMLIN_TINKERGRAPH_GRAPH_LOCATION, null);
if (graphLocation != null) {
final File f = new File(graphLocation);
f.delete();
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/12de257c/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphIdManagerTest.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphIdManagerTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphIdManagerTest.java
index c26753e..f02de1c 100644
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphIdManagerTest.java
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphIdManagerTest.java
@@ -72,13 +72,13 @@ public class TinkerGraphIdManagerTest {
@BeforeClass
public static void setup() {
- longIdManagerConfig.addProperty(TinkerGraph.CONFIG_EDGE_ID, TinkerGraph.DefaultIdManager.LONG.name());
- longIdManagerConfig.addProperty(TinkerGraph.CONFIG_VERTEX_ID, TinkerGraph.DefaultIdManager.LONG.name());
- longIdManagerConfig.addProperty(TinkerGraph.CONFIG_VERTEX_PROPERTY_ID, TinkerGraph.DefaultIdManager.LONG.name());
+ longIdManagerConfig.addProperty(TinkerGraph.GREMLIN_TINKERGRAPH_EDGE_ID_MANAGER, TinkerGraph.DefaultIdManager.LONG.name());
+ longIdManagerConfig.addProperty(TinkerGraph.GREMLIN_TINKERGRAPH_VERTEX_ID_MANAGER, TinkerGraph.DefaultIdManager.LONG.name());
+ longIdManagerConfig.addProperty(TinkerGraph.GREMLIN_TINKERGRAPH_VERTEX_PROPERTY_ID_MANAGER, TinkerGraph.DefaultIdManager.LONG.name());
- integerIdManagerConfig.addProperty(TinkerGraph.CONFIG_EDGE_ID, TinkerGraph.DefaultIdManager.INTEGER.name());
- integerIdManagerConfig.addProperty(TinkerGraph.CONFIG_VERTEX_ID, TinkerGraph.DefaultIdManager.INTEGER.name());
- integerIdManagerConfig.addProperty(TinkerGraph.CONFIG_VERTEX_PROPERTY_ID, TinkerGraph.DefaultIdManager.INTEGER.name());
+ integerIdManagerConfig.addProperty(TinkerGraph.GREMLIN_TINKERGRAPH_EDGE_ID_MANAGER, TinkerGraph.DefaultIdManager.INTEGER.name());
+ integerIdManagerConfig.addProperty(TinkerGraph.GREMLIN_TINKERGRAPH_VERTEX_ID_MANAGER, TinkerGraph.DefaultIdManager.INTEGER.name());
+ integerIdManagerConfig.addProperty(TinkerGraph.GREMLIN_TINKERGRAPH_VERTEX_PROPERTY_ID_MANAGER, TinkerGraph.DefaultIdManager.INTEGER.name());
}
@Test
@@ -138,9 +138,9 @@ public class TinkerGraphIdManagerTest {
@BeforeClass
public static void setup() {
- idManagerConfig.addProperty(TinkerGraph.CONFIG_EDGE_ID, TinkerGraph.DefaultIdManager.UUID.name());
- idManagerConfig.addProperty(TinkerGraph.CONFIG_VERTEX_ID, TinkerGraph.DefaultIdManager.UUID.name());
- idManagerConfig.addProperty(TinkerGraph.CONFIG_VERTEX_PROPERTY_ID, TinkerGraph.DefaultIdManager.UUID.name());
+ idManagerConfig.addProperty(TinkerGraph.GREMLIN_TINKERGRAPH_EDGE_ID_MANAGER, TinkerGraph.DefaultIdManager.UUID.name());
+ idManagerConfig.addProperty(TinkerGraph.GREMLIN_TINKERGRAPH_VERTEX_ID_MANAGER, TinkerGraph.DefaultIdManager.UUID.name());
+ idManagerConfig.addProperty(TinkerGraph.GREMLIN_TINKERGRAPH_VERTEX_PROPERTY_ID_MANAGER, TinkerGraph.DefaultIdManager.UUID.name());
}
@Test
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/12de257c/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphTest.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphTest.java
index 3bc9f3c..b3dc64e 100644
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphTest.java
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphTest.java
@@ -285,7 +285,7 @@ public class TinkerGraphTest {
@Test(expected = IllegalStateException.class)
public void shouldRequireGraphLocationIfFormatIsSet() {
final Configuration conf = new BaseConfiguration();
- conf.setProperty(TinkerGraph.CONFIG_GRAPH_FORMAT, "graphml");
+ conf.setProperty(TinkerGraph.GREMLIN_TINKERGRAPH_GRAPH_FORMAT, "graphml");
TinkerGraph.open(conf);
}
@@ -325,7 +325,7 @@ public class TinkerGraphTest {
@Test(expected = IllegalStateException.class)
public void shouldRequireGraphFormatIfLocationIsSet() {
final Configuration conf = new BaseConfiguration();
- conf.setProperty(TinkerGraph.CONFIG_GRAPH_LOCATION, "/tmp");
+ conf.setProperty(TinkerGraph.GREMLIN_TINKERGRAPH_GRAPH_LOCATION, "/tmp");
TinkerGraph.open(conf);
}
@@ -336,8 +336,8 @@ public class TinkerGraphTest {
if (f.exists() && f.isFile()) f.delete();
final Configuration conf = new BaseConfiguration();
- conf.setProperty(TinkerGraph.CONFIG_GRAPH_FORMAT, "graphml");
- conf.setProperty(TinkerGraph.CONFIG_GRAPH_LOCATION, graphLocation);
+ conf.setProperty(TinkerGraph.GREMLIN_TINKERGRAPH_GRAPH_FORMAT, "graphml");
+ conf.setProperty(TinkerGraph.GREMLIN_TINKERGRAPH_GRAPH_LOCATION, graphLocation);
final TinkerGraph graph = TinkerGraph.open(conf);
TinkerFactory.generateModern(graph);
graph.close();
@@ -354,8 +354,8 @@ public class TinkerGraphTest {
if (f.exists() && f.isFile()) f.delete();
final Configuration conf = new BaseConfiguration();
- conf.setProperty(TinkerGraph.CONFIG_GRAPH_FORMAT, "graphson");
- conf.setProperty(TinkerGraph.CONFIG_GRAPH_LOCATION, graphLocation);
+ conf.setProperty(TinkerGraph.GREMLIN_TINKERGRAPH_GRAPH_FORMAT, "graphson");
+ conf.setProperty(TinkerGraph.GREMLIN_TINKERGRAPH_GRAPH_LOCATION, graphLocation);
final TinkerGraph graph = TinkerGraph.open(conf);
TinkerFactory.generateModern(graph);
graph.close();
@@ -372,8 +372,8 @@ public class TinkerGraphTest {
if (f.exists() && f.isFile()) f.delete();
final Configuration conf = new BaseConfiguration();
- conf.setProperty(TinkerGraph.CONFIG_GRAPH_FORMAT, "gryo");
- conf.setProperty(TinkerGraph.CONFIG_GRAPH_LOCATION, graphLocation);
+ conf.setProperty(TinkerGraph.GREMLIN_TINKERGRAPH_GRAPH_FORMAT, "gryo");
+ conf.setProperty(TinkerGraph.GREMLIN_TINKERGRAPH_GRAPH_LOCATION, graphLocation);
final TinkerGraph graph = TinkerGraph.open(conf);
TinkerFactory.generateModern(graph);
graph.close();
[22/50] incubator-tinkerpop git commit: Revert "verified that
TinkerGraph and Neo4jGraph fold HasContainers into GraphStep"
Posted by ok...@apache.org.
Revert "verified that TinkerGraph and Neo4jGraph fold HasContainers into GraphStep"
This reverts commit a976ca672456590999dfd8d26c7ee27ed558e572.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/15d6e7a4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/15d6e7a4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/15d6e7a4
Branch: refs/heads/TINKERPOP3-925
Commit: 15d6e7a47bac6609dd890635b568ca05e7862bf0
Parents: 402e57d
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Wed Oct 28 15:33:05 2015 +0100
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Wed Oct 28 15:33:05 2015 +0100
----------------------------------------------------------------------
.../structure/NativeNeo4jStructureTest.java | 26 +------------------
.../tinkergraph/structure/TinkerGraphTest.java | 27 --------------------
2 files changed, 1 insertion(+), 52 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/15d6e7a4/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/structure/NativeNeo4jStructureTest.java
----------------------------------------------------------------------
diff --git a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/structure/NativeNeo4jStructureTest.java b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/structure/NativeNeo4jStructureTest.java
index 3122513..7e32251 100644
--- a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/structure/NativeNeo4jStructureTest.java
+++ b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/structure/NativeNeo4jStructureTest.java
@@ -22,13 +22,10 @@ import org.apache.tinkerpop.gremlin.FeatureRequirement;
import org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine;
import org.apache.tinkerpop.gremlin.neo4j.AbstractNeo4jGremlinTest;
import org.apache.tinkerpop.gremlin.neo4j.process.traversal.LabelP;
-import org.apache.tinkerpop.gremlin.neo4j.process.traversal.step.sideEffect.Neo4jGraphStep;
import org.apache.tinkerpop.gremlin.neo4j.structure.trait.MultiMetaNeo4jTrait;
-import org.apache.tinkerpop.gremlin.process.traversal.Step;
import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
-import org.apache.tinkerpop.gremlin.structure.Edge;
import org.apache.tinkerpop.gremlin.structure.Graph;
import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
@@ -46,10 +43,7 @@ import javax.script.ScriptException;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.*;
/**
* @author Marko A. Rodriguez (http://markorodriguez.com)
@@ -486,22 +480,4 @@ public class NativeNeo4jStructureTest extends AbstractNeo4jGremlinTest {
});
}
- @Test
- public void shouldFoldHasContainerIntoGraphStep() {
- final GraphTraversal<Vertex, Edge> t = g
- .V().has("name", "foo").as("foo")
- .V().has("name", "bar").addE("foobar").from("foo");
-
- assertEquals(0, t.asAdmin().getSteps().stream().filter(s -> s instanceof Neo4jGraphStep).count());
-
- int neo4jGraphStepCounter = 0;
- for (final Step step : t.iterate().asAdmin().getSteps()) {
- if (step instanceof Neo4jGraphStep) {
- final Neo4jGraphStep gs = (Neo4jGraphStep) step;
- assertEquals(1, gs.getHasContainers().size());
- neo4jGraphStepCounter++;
- }
- }
- assertEquals(2, neo4jGraphStepCounter);
- }
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/15d6e7a4/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphTest.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphTest.java
index a8f2459..3bc9f3c 100644
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphTest.java
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphTest.java
@@ -22,14 +22,10 @@ import org.apache.commons.configuration.BaseConfiguration;
import org.apache.commons.configuration.Configuration;
import org.apache.tinkerpop.gremlin.TestHelper;
import org.apache.tinkerpop.gremlin.process.traversal.P;
-import org.apache.tinkerpop.gremlin.process.traversal.Step;
-import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
-import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
import org.apache.tinkerpop.gremlin.structure.Edge;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.apache.tinkerpop.gremlin.structure.io.IoCore;
import org.apache.tinkerpop.gremlin.structure.io.IoTest;
-import org.apache.tinkerpop.gremlin.tinkergraph.process.traversal.step.sideEffect.TinkerGraphStep;
import org.junit.Ignore;
import org.junit.Test;
@@ -286,7 +282,6 @@ public class TinkerGraphTest {
}
}
}
-
@Test(expected = IllegalStateException.class)
public void shouldRequireGraphLocationIfFormatIsSet() {
final Configuration conf = new BaseConfiguration();
@@ -327,7 +322,6 @@ public class TinkerGraphTest {
v.remove();
v.value("name");
}
-
@Test(expected = IllegalStateException.class)
public void shouldRequireGraphFormatIfLocationIsSet() {
final Configuration conf = new BaseConfiguration();
@@ -388,25 +382,4 @@ public class TinkerGraphTest {
IoTest.assertModernGraph(reloadedGraph, true, false);
reloadedGraph.close();
}
-
- @Test
- public void shouldFoldHasContainerIntoGraphStep() {
- final TinkerGraph graph = TinkerGraph.open();
- final GraphTraversalSource g = graph.traversal();
- final GraphTraversal<Vertex, Edge> t = g
- .V().has("name", "foo").as("foo")
- .V().has("name", "bar").addE("foobar").from("foo");
-
- assertEquals(0, t.asAdmin().getSteps().stream().filter(s -> s instanceof TinkerGraphStep).count());
-
- int tinkerGraphStepCounter = 0;
- for (final Step step : t.iterate().asAdmin().getSteps()) {
- if (step instanceof TinkerGraphStep) {
- final TinkerGraphStep gs = (TinkerGraphStep) step;
- assertEquals(1, gs.getHasContainers().size());
- tinkerGraphStepCounter++;
- }
- }
- assertEquals(2, tinkerGraphStepCounter);
- }
}
[43/50] incubator-tinkerpop git commit: merged mid-traversal V()
TINKERPOP3-762 and updated CHANGELOG for various recent features.
Posted by ok...@apache.org.
merged mid-traversal V() TINKERPOP3-762 and updated CHANGELOG for various recent features.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/70a12e69
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/70a12e69
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/70a12e69
Branch: refs/heads/TINKERPOP3-925
Commit: 70a12e69eced8fa0b4f85878a8d26c35ef15c1b0
Parents: c322438 12c3c91
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Thu Oct 29 10:42:57 2015 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Thu Oct 29 10:42:57 2015 -0600
----------------------------------------------------------------------
CHANGELOG.asciidoc | 3 +
docs/src/the-traversal.asciidoc | 25 ++++
.../upgrade-release-3.1.x-incubating.asciidoc | 1 +
.../GephiTraversalVisualizationStrategy.groovy | 2 +-
.../traversal/TraversalVertexProgram.java | 4 +-
.../traversal/dsl/graph/GraphTraversal.java | 7 +-
.../dsl/graph/GraphTraversalSource.java | 10 +-
.../gremlin/process/traversal/dsl/graph/__.java | 9 +-
.../process/traversal/step/map/GraphStep.java | 149 +++++++++++++++++++
.../traversal/step/sideEffect/GraphStep.java | 101 -------------
.../strategy/decoration/ConnectiveStrategy.java | 3 +-
.../strategy/decoration/ElementIdStrategy.java | 2 +-
.../strategy/decoration/PartitionStrategy.java | 2 +-
.../strategy/decoration/SubgraphStrategy.java | 2 +-
.../finalization/LazyBarrierStrategy.java | 2 +-
.../ComputerVerificationStrategy.java | 5 +-
.../traversal/step/map/GraphStepTest.java | 41 +++++
.../ElementIdStrategyTraverseTest.java | 4 +-
.../PartitionStrategyTraverseTest.java | 4 +-
.../SubgraphStrategyTraverseTest.java | 5 +-
.../traversal/step/map/GroovyGraphTest.groovy | 50 +++++++
.../process/GroovyProcessComputerSuite.java | 2 +
.../process/GroovyProcessStandardSuite.java | 2 +
.../gremlin/process/ProcessComputerSuite.java | 2 +
.../gremlin/process/ProcessStandardSuite.java | 2 +
.../process/traversal/step/map/GraphTest.java | 109 ++++++++++++++
.../step/sideEffect/Neo4jGraphStep.java | 10 +-
.../optimization/Neo4jGraphStepStrategy.java | 13 +-
.../gremlin/neo4j/structure/Neo4jGraph.java | 1 +
.../gremlin/neo4j/Neo4jStrategySuite.java | 44 ++++++
.../gremlin/neo4j/Neo4jStrategyTest.java | 31 ++++
.../Neo4jGraphStepStrategyTest.java | 63 ++++++++
.../step/sideEffect/TinkerGraphStep.java | 10 +-
.../optimization/TinkerGraphStepStrategy.java | 13 +-
.../tinkergraph/structure/TinkerGraph.java | 1 +
.../tinkergraph/TinkerGraphStrategySuite.java | 44 ++++++
.../tinkergraph/TinkerGraphStrategyTest.java | 31 ++++
.../TinkerGraphStepStrategyTest.java | 20 +--
.../structure/TinkerGraphPlayTest.java | 11 ++
39 files changed, 680 insertions(+), 160 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/70a12e69/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --cc CHANGELOG.asciidoc
index eb1936b,a43e443..d773c02
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@@ -25,6 -25,7 +25,9 @@@ image::https://raw.githubusercontent.co
TinkerPop 3.1.0 (NOT OFFICIALLY RELEASED YET)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-* Added suppport for mid-traversal `V()`-steps.
++* Renamed the `public static String` configuration variable names of TinkerGraph (deprecated old variables).
++* Added `GraphComputer.config(key,value)` to allow engine-specific configurations.
++* Added suppport for mid-traversal `V()`-steps (`GraphStep` semantics updated).
* Fixed `Number` handling in `Operator` enums. Prior this change a lot of operations on mixed `Number` types returned a wrong result (wrong data type).
* Fixed a bug in Gremlin Server/Driver serializer where empty buffers were getting returned in certain cases.
* Renamed `ConjunctionX` to `ConnectiveX` because "conjunction" is assumed "and" (disjunction "or"), where "connective" is the parent concept.
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/70a12e69/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/ComputerVerificationStrategy.java
----------------------------------------------------------------------
diff --cc gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/ComputerVerificationStrategy.java
index 6c48d61,bb0c453..bc8528c
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/ComputerVerificationStrategy.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/ComputerVerificationStrategy.java
@@@ -34,12 -35,8 +34,12 @@@ import org.apache.tinkerpop.gremlin.pro
import org.apache.tinkerpop.gremlin.process.traversal.step.filter.TailGlobalStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.filter.WherePredicateStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.filter.WhereTraversalStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.EdgeVertexStep;
+ import org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.OrderGlobalStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.PropertiesStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.PropertyMapStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.VertexStep;
- import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GraphStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.InjectStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SubgraphStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.util.CollectingBarrierStep;
@@@ -83,8 -80,14 +83,11 @@@ public final class ComputerVerification
if (!(traversal.getStartStep() instanceof GraphStep))
throw new VerificationException("GraphComputer does not support traversals starting from a non-GraphStep: " + traversal.getStartStep(), traversal);
///
+ if (traversal.getSteps().stream().filter(step -> step instanceof GraphStep).count() > 1)
+ throw new VerificationException("GraphComputer does not support mid-traversal V()/E()", traversal);
+ ///
if (endStep instanceof CollectingBarrierStep && endStep instanceof TraversalParent) {
- if (((TraversalParent) endStep).getLocalChildren().stream().filter(t ->
- !(t instanceof IdentityTraversal) &&
- !(t instanceof ConstantTraversal) && // for SampleStep
- !(t instanceof TokenTraversal && ((TokenTraversal) t).getToken().equals(T.id))).findAny().isPresent())
+ if (((TraversalParent) endStep).getLocalChildren().stream().filter(t -> !ComputerVerificationStrategy.isNotBeyondElementId(t)).findAny().isPresent())
throw new VerificationException("A final CollectingBarrierStep can not process an element beyond its id: " + endStep, traversal);
}
///
[10/50] incubator-tinkerpop git commit: added another GraphStep
traversal test
Posted by ok...@apache.org.
added another GraphStep traversal test
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/7b18447d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/7b18447d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/7b18447d
Branch: refs/heads/TINKERPOP3-925
Commit: 7b18447d3641811c291c309180d5688642a8a053
Parents: 6c0e0bd
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Tue Oct 27 15:47:02 2015 +0100
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Tue Oct 27 15:47:02 2015 +0100
----------------------------------------------------------------------
.../traversal/step/map/GroovyGraphTest.groovy | 7 +++++
.../process/traversal/step/map/GraphTest.java | 31 ++++++++++++++++++++
2 files changed, 38 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/7b18447d/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyGraphTest.groovy
----------------------------------------------------------------------
diff --git a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyGraphTest.groovy b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyGraphTest.groovy
index 6167799..44a891e 100644
--- a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyGraphTest.groovy
+++ b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyGraphTest.groovy
@@ -21,6 +21,7 @@ package org.apache.tinkerpop.gremlin.process.traversal.step.map
import org.apache.tinkerpop.gremlin.process.traversal.Traversal
import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalScriptHelper
+import org.apache.tinkerpop.gremlin.structure.Edge
import org.apache.tinkerpop.gremlin.structure.Vertex
/**
@@ -39,5 +40,11 @@ public abstract class GroovyGraphTest {
public Traversal<Vertex, String> get_g_V_hasXname_GarciaX_inXsungByX_asXsongX_V_hasXname_Willie_DixonX_inXwrittenByX_whereXeqXsongXX_name() {
TraversalScriptHelper.compute("g.V.has('name','Garcia').in('sungBy').as('song').V.has('name','Willie_Dixon').in('writtenBy').where(eq('song')).name", g)
}
+
+ @Override
+ public Traversal<Vertex, Edge> get_g_V_hasLabelXpersonX_asXpX_VXsoftwareX_addInEXuses_pX() {
+ def software = g.V().hasLabel("software").toList()
+ TraversalScriptHelper.compute("g.V().hasLabel('person').as('p').V(software).addE('uses').from('p')", g, "software", software)
+ }
}
}
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/7b18447d/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphTest.java
index dbb7c95..4153125 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphTest.java
@@ -19,6 +19,7 @@
package org.apache.tinkerpop.gremlin.process.traversal.step.map;
+import org.apache.tinkerpop.gremlin.FeatureRequirement;
import org.apache.tinkerpop.gremlin.LoadGraphWith;
import org.apache.tinkerpop.gremlin.process.AbstractGremlinProcessTest;
import org.apache.tinkerpop.gremlin.process.GremlinProcessRunner;
@@ -26,14 +27,18 @@ import org.apache.tinkerpop.gremlin.process.IgnoreEngine;
import org.apache.tinkerpop.gremlin.process.traversal.P;
import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
import org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine;
+import org.apache.tinkerpop.gremlin.structure.Edge;
+import org.apache.tinkerpop.gremlin.structure.Graph;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.util.Arrays;
+import java.util.List;
import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData.GRATEFUL;
import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData.MODERN;
+import static org.junit.Assert.assertEquals;
/**
* @author Marko A. Rodriguez (http://markorodriguez.com)
@@ -45,6 +50,8 @@ public abstract class GraphTest extends AbstractGremlinProcessTest {
public abstract Traversal<Vertex, String> get_g_V_hasXname_GarciaX_inXsungByX_asXsongX_V_hasXname_Willie_DixonX_inXwrittenByX_whereXeqXsongXX_name();
+ public abstract Traversal<Vertex, Edge> get_g_V_hasLabelXpersonX_asXpX_VXsoftwareX_addInEXuses_pX();
+
@Test
@LoadGraphWith(MODERN)
public void g_VX1X_V_valuesXnameX() {
@@ -62,6 +69,24 @@ public abstract class GraphTest extends AbstractGremlinProcessTest {
checkResults(Arrays.asList("MY BABE", "HOOCHIE COOCHIE MAN"), traversal);
}
+ @Test
+ @LoadGraphWith(MODERN)
+ @IgnoreEngine(TraversalEngine.Type.COMPUTER)
+ @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+ public void g_V_hasLabelXpersonX_asXpX_VXsoftwareX_addInEXuses_pX() {
+ final Traversal<Vertex, Edge> traversal = get_g_V_hasLabelXpersonX_asXpX_VXsoftwareX_addInEXuses_pX();
+ printTraversalForm(traversal);
+ int counter = 0;
+ while (traversal.hasNext()) {
+ final Edge edge = traversal.next();
+ assertEquals("uses", edge.label());
+ assertEquals("person", edge.outVertex().label());
+ assertEquals("software", edge.inVertex().label());
+ counter++;
+ }
+ assertEquals(8, counter);
+ }
+
public static class Traversals extends GraphTest {
@Override
@@ -74,5 +99,11 @@ public abstract class GraphTest extends AbstractGremlinProcessTest {
return g.V().has("artist", "name", "Garcia").in("sungBy").as("song")
.V().has("artist", "name", "Willie_Dixon").in("writtenBy").where(P.eq("song")).values("name");
}
+
+ @Override
+ public Traversal<Vertex, Edge> get_g_V_hasLabelXpersonX_asXpX_VXsoftwareX_addInEXuses_pX() {
+ final List<Vertex> software = g.V().hasLabel("software").toList();
+ return g.V().hasLabel("person").as("p").V(software).addE("uses").from("p");
+ }
}
}
\ No newline at end of file
[18/50] incubator-tinkerpop git commit: Merge remote-tracking branch
'origin/TINKERPOP3-910'
Posted by ok...@apache.org.
Merge remote-tracking branch 'origin/TINKERPOP3-910'
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/b70f5f54
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/b70f5f54
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/b70f5f54
Branch: refs/heads/TINKERPOP3-925
Commit: b70f5f5465d2e91245af7586f4a7fbf738f57939
Parents: 55cdc2d 23356d4
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Oct 28 05:32:13 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Oct 28 05:32:13 2015 -0400
----------------------------------------------------------------------
.../handler/NioGremlinBinaryRequestDecoder.java | 5 +
.../handler/WsGremlinBinaryRequestDecoder.java | 5 +
.../handler/WsGremlinCloseRequestDecoder.java | 5 +
.../handler/WsGremlinTextRequestDecoder.java | 5 +
.../server/GremlinDriverIntegrateTest.java | 28 ++++++
.../server/GremlinServerIntegrateTest.java | 100 +++++++++++++++++++
6 files changed, 148 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/b70f5f54/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java
----------------------------------------------------------------------
[07/50] incubator-tinkerpop git commit: added a more complex
mid-traversal V() traversal test
Posted by ok...@apache.org.
added a more complex mid-traversal V() traversal test
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/6c0e0bd9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/6c0e0bd9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/6c0e0bd9
Branch: refs/heads/TINKERPOP3-925
Commit: 6c0e0bd9d0ade9ca62cf1f2a6bdb7a5a3ad0293e
Parents: 7dd6212
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Sun Oct 25 16:15:09 2015 +0100
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Sun Oct 25 16:15:09 2015 +0100
----------------------------------------------------------------------
.../traversal/step/map/GroovyGraphTest.groovy | 6 ++++++
.../process/traversal/step/map/GraphTest.java | 22 +++++++++++++++++++-
2 files changed, 27 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/6c0e0bd9/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyGraphTest.groovy
----------------------------------------------------------------------
diff --git a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyGraphTest.groovy b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyGraphTest.groovy
index a010006..6167799 100644
--- a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyGraphTest.groovy
+++ b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyGraphTest.groovy
@@ -29,9 +29,15 @@ import org.apache.tinkerpop.gremlin.structure.Vertex
public abstract class GroovyGraphTest {
public static class Traversals extends GraphTest {
+
@Override
public Traversal<Vertex, String> get_g_VX1X_V_valuesXnameX(final Object v1Id) {
TraversalScriptHelper.compute("g.V(v1Id).V.name", g, "v1Id", v1Id);
}
+
+ @Override
+ public Traversal<Vertex, String> get_g_V_hasXname_GarciaX_inXsungByX_asXsongX_V_hasXname_Willie_DixonX_inXwrittenByX_whereXeqXsongXX_name() {
+ TraversalScriptHelper.compute("g.V.has('name','Garcia').in('sungBy').as('song').V.has('name','Willie_Dixon').in('writtenBy').where(eq('song')).name", g)
+ }
}
}
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/6c0e0bd9/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphTest.java
index 77804ca..dbb7c95 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphTest.java
@@ -22,13 +22,17 @@ package org.apache.tinkerpop.gremlin.process.traversal.step.map;
import org.apache.tinkerpop.gremlin.LoadGraphWith;
import org.apache.tinkerpop.gremlin.process.AbstractGremlinProcessTest;
import org.apache.tinkerpop.gremlin.process.GremlinProcessRunner;
+import org.apache.tinkerpop.gremlin.process.IgnoreEngine;
+import org.apache.tinkerpop.gremlin.process.traversal.P;
import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
+import org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.util.Arrays;
+import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData.GRATEFUL;
import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData.MODERN;
/**
@@ -39,6 +43,8 @@ public abstract class GraphTest extends AbstractGremlinProcessTest {
public abstract Traversal<Vertex, String> get_g_VX1X_V_valuesXnameX(final Object v1Id);
+ public abstract Traversal<Vertex, String> get_g_V_hasXname_GarciaX_inXsungByX_asXsongX_V_hasXname_Willie_DixonX_inXwrittenByX_whereXeqXsongXX_name();
+
@Test
@LoadGraphWith(MODERN)
public void g_VX1X_V_valuesXnameX() {
@@ -47,12 +53,26 @@ public abstract class GraphTest extends AbstractGremlinProcessTest {
checkResults(Arrays.asList("marko", "vadas", "lop", "josh", "ripple", "peter"), traversal);
}
+ @Test
+ @LoadGraphWith(GRATEFUL)
+ @IgnoreEngine(TraversalEngine.Type.COMPUTER)
+ public void g_V_hasXname_GarciaX_inXsungByX_asXsongX_V_hasXname_Willie_DixonX_inXwrittenByX_whereXeqXsongXX_name() {
+ final Traversal<Vertex, String> traversal = get_g_V_hasXname_GarciaX_inXsungByX_asXsongX_V_hasXname_Willie_DixonX_inXwrittenByX_whereXeqXsongXX_name();
+ printTraversalForm(traversal);
+ checkResults(Arrays.asList("MY BABE", "HOOCHIE COOCHIE MAN"), traversal);
+ }
+
public static class Traversals extends GraphTest {
@Override
public Traversal<Vertex, String> get_g_VX1X_V_valuesXnameX(final Object v1Id) {
return g.V(v1Id).V().values("name");
}
- }
+ @Override
+ public Traversal<Vertex, String> get_g_V_hasXname_GarciaX_inXsungByX_asXsongX_V_hasXname_Willie_DixonX_inXwrittenByX_whereXeqXsongXX_name() {
+ return g.V().has("artist", "name", "Garcia").in("sungBy").as("song")
+ .V().has("artist", "name", "Willie_Dixon").in("writtenBy").where(P.eq("song")).values("name");
+ }
+ }
}
\ No newline at end of file
[04/50] incubator-tinkerpop git commit: Merge branch 'master' into
TINKERPOP3-762
Posted by ok...@apache.org.
Merge branch 'master' into TINKERPOP3-762
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/7dd62126
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/7dd62126
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/7dd62126
Branch: refs/heads/TINKERPOP3-925
Commit: 7dd62126c67ade1b59016ab017e6bec7b8e70cc1
Parents: 0841bbd e8936f5
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Tue Oct 20 15:34:06 2015 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Tue Oct 20 15:34:06 2015 -0600
----------------------------------------------------------------------
CHANGELOG.asciidoc | 1 +
.../upgrade-release-3.1.x-incubating.asciidoc | 41 +++++
.../process/traversal/TraversalStrategies.java | 4 +-
.../traversal/dsl/graph/GraphTraversal.java | 4 +-
.../process/traversal/step/filter/AndStep.java | 2 +-
.../traversal/step/filter/ConjunctionStep.java | 81 --------
.../traversal/step/filter/ConnectiveStep.java | 81 ++++++++
.../process/traversal/step/filter/OrStep.java | 2 +-
.../step/filter/WherePredicateStep.java | 10 +-
.../step/filter/WhereTraversalStep.java | 6 +-
.../process/traversal/step/map/MatchStep.java | 40 ++--
.../decoration/ConjunctionStrategy.java | 115 ------------
.../strategy/decoration/ConnectiveStrategy.java | 115 ++++++++++++
.../AdjacentToIncidentStrategy.java | 4 +-
.../optimization/RangeByIsCountStrategy.java | 6 +-
.../gremlin/process/traversal/util/AndP.java | 3 +-
.../process/traversal/util/ConjunctionP.java | 117 ------------
.../process/traversal/util/ConnectiveP.java | 115 ++++++++++++
.../gremlin/process/traversal/util/OrP.java | 2 +-
.../process/traversal/util/TraversalHelper.java | 4 +-
.../traversal/step/map/MatchStepTest.java | 6 +-
.../decoration/ConjunctionStrategyTest.java | 183 -------------------
.../decoration/ConnectiveStrategyTest.java | 183 +++++++++++++++++++
.../TinkerGraphNoStrategyComputerProvider.java | 4 +-
.../process/TinkerGraphNoStrategyProvider.java | 4 +-
25 files changed, 585 insertions(+), 548 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/7dd62126/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/7dd62126/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/ConnectiveStrategy.java
----------------------------------------------------------------------
diff --cc gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/ConnectiveStrategy.java
index 0000000,ffde90a..a3e6b77
mode 000000,100644..100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/ConnectiveStrategy.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/ConnectiveStrategy.java
@@@ -1,0 -1,114 +1,115 @@@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+ package org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration;
+
+ import org.apache.tinkerpop.gremlin.process.traversal.Step;
+ import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
+ import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy;
+ import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
+ import org.apache.tinkerpop.gremlin.process.traversal.step.filter.AndStep;
+ import org.apache.tinkerpop.gremlin.process.traversal.step.filter.ConnectiveStep;
+ import org.apache.tinkerpop.gremlin.process.traversal.step.filter.OrStep;
++import org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphStep;
+ import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.ProfileStep;
+ import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.StartStep;
+ import org.apache.tinkerpop.gremlin.process.traversal.step.util.ComputerAwareStep;
+ import org.apache.tinkerpop.gremlin.process.traversal.step.util.EmptyStep;
+ import org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy;
+ import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper;
+
+ import java.util.Set;
+
+ /**
+ * ConnectiveStrategy rewrites the binary conjunction form of {@code a.and().b} into a {@link AndStep} of
+ * {@code and(a,b)} (likewise for {@link OrStep}).
+ * <p/>
+ *
+ * @author Marko A. Rodriguez (http://markorodriguez.com)
+ * @author Daniel Kuppitz (http://gremlin.guru)
+ * @example <pre>
+ * __.has("name","stephen").or().where(__.out("knows").has("name","stephen")) // is replaced by __.or(__.has("name","stephen"), __.where(__.out("knows").has("name","stephen")))
+ * __.out("a").out("b").and().out("c").or().out("d") // is replaced by __.or(__.and(__.out("a").out("b"), __.out("c")), __.out("d"))
+ * __.as("a").out().as("b").and().as("c").in().as("d") // is replaced by __.and(__.as("a").out().as("b"), __.as("c").in().as("d"))
+ * </pre>
+ */
+ public final class ConnectiveStrategy extends AbstractTraversalStrategy<TraversalStrategy.DecorationStrategy> implements TraversalStrategy.DecorationStrategy {
+
+ private static final ConnectiveStrategy INSTANCE = new ConnectiveStrategy();
+
+ private ConnectiveStrategy() {
+ }
+
+ @Override
+ public void apply(final Traversal.Admin<?, ?> traversal) {
+ if (TraversalHelper.hasStepOfAssignableClass(ConnectiveStep.class, traversal)) {
+ processConjunctionMarkers(traversal);
+ }
+ }
+
+ private static boolean legalCurrentStep(final Step<?, ?> step) {
- return !(step instanceof EmptyStep || step instanceof ProfileStep || step instanceof ComputerAwareStep.EndStep || (step instanceof StartStep && !StartStep.isVariableStartStep(step)));
++ return !(step instanceof EmptyStep || step instanceof ProfileStep || step instanceof ComputerAwareStep.EndStep || (step instanceof StartStep && !StartStep.isVariableStartStep(step)) || GraphStep.isStartStep(step));
+ }
+
+ private static void processConjunctionMarkers(final Traversal.Admin<?, ?> traversal) {
+ processConjunctionMarker(OrStep.class, traversal);
+ processConjunctionMarker(AndStep.class, traversal);
+ }
+
+ private static void processConjunctionMarker(final Class<? extends ConnectiveStep> markerClass, final Traversal.Admin<?, ?> traversal) {
+
+ TraversalHelper.getStepsOfClass(markerClass, traversal).stream()
+ .filter(conjunctionStep -> conjunctionStep.getLocalChildren().isEmpty())
+ .findFirst().ifPresent(conjunctionStep -> {
+
+ Step<?, ?> currentStep = conjunctionStep.getNextStep();
+ final Traversal.Admin<?, ?> rightTraversal = __.start().asAdmin();
+ if (!conjunctionStep.getLabels().isEmpty()) {
+ final StartStep<?> startStep = new StartStep<>(rightTraversal);
+ final Set<String> conjunctionLabels = ((Step<?, ?>) conjunctionStep).getLabels();
+ conjunctionLabels.forEach(startStep::addLabel);
+ conjunctionLabels.forEach(label -> conjunctionStep.removeLabel(label));
+ rightTraversal.addStep(startStep);
+ }
+ while (legalCurrentStep(currentStep)) {
+ final Step<?, ?> nextStep = currentStep.getNextStep();
+ rightTraversal.addStep(currentStep);
+ traversal.removeStep(currentStep);
+ currentStep = nextStep;
+ }
+ processConjunctionMarkers(rightTraversal);
+
+ currentStep = conjunctionStep.getPreviousStep();
+ final Traversal.Admin<?, ?> leftTraversal = __.start().asAdmin();
+ while (legalCurrentStep(currentStep)) {
+ final Step<?, ?> previousStep = currentStep.getPreviousStep();
+ leftTraversal.addStep(0, currentStep);
+ traversal.removeStep(currentStep);
+ currentStep = previousStep;
+ }
+ processConjunctionMarkers(leftTraversal);
+
+ conjunctionStep.addLocalChild(leftTraversal);
+ conjunctionStep.addLocalChild(rightTraversal);
+ });
+ }
+
+ public static ConnectiveStrategy instance() {
+ return INSTANCE;
+ }
+ }
[47/50] incubator-tinkerpop git commit: TINKERPOP3-933 Distributions
named properly for initial vote.
Posted by ok...@apache.org.
TINKERPOP3-933 Distributions named properly for initial vote.
Invoking CTR for this small change.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/522c256a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/522c256a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/522c256a
Branch: refs/heads/TINKERPOP3-925
Commit: 522c256a17b0f7b1650f20fde9fe57b6568e25da
Parents: 553f91f
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Oct 29 16:40:25 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Oct 29 16:40:25 2015 -0400
----------------------------------------------------------------------
docs/src/developer-release.asciidoc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/522c256a/docs/src/developer-release.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/developer-release.asciidoc b/docs/src/developer-release.asciidoc
index ef7349c..ade3fa8 100644
--- a/docs/src/developer-release.asciidoc
+++ b/docs/src/developer-release.asciidoc
@@ -102,7 +102,8 @@ A positive vote for a particular release from the TinkerPop PMC is required to m
.. `cp ~/.m2/repository/org/apache/tinkerpop/gremlin-console/x.y.z/gremlin-console-x.y.z-distribution.zip* dev/x.y.z`
.. `cp ~/.m2/repository/org/apache/tinkerpop/gremlin-server/x.y.z/gremlin-server-x.y.z-distribution.zip* dev/x.y.z`
.. `cp ~/.m2/repository/org/apache/tinkerpop/tinkerpop/x.y.z/tinkerpop-x.y.z-source-release.zip* dev/x.y.z`
-.. `cd dev/x.y.z` and `for f in \*.zip*; do mv "$f" "apache-$f"; done`
+.. `cd dev/x.y.z`
+.. pass:[<code>ls * | xargs -n1 -I {} echo "mv apache-{} {}" | sed -e 's/distribution/bin/' -e 's/source-release/src/' -e s'/^\(.*\) \(.*\) \(.*\)$/\1 \3 \2/' | /bin/bash</code>]
.. `cd ..; svn add x.y.z/; svn ci -m "TinkerPop x.y.z release"`
. Execute `bin/validate-distribution.sh` and any other relevant testing.
. Perform JIRA administration tasks:
@@ -127,7 +128,6 @@ Release & Promote
. Close the staging repository at link:https://repository.apache.org/[Apache Nexus]) and then release.
. `svn co --depth empty https://dist.apache.org/repos/dist/dev/incubator/tinkerpop dev; svn up dev/x.y.z`
. `svn co --depth empty https://dist.apache.org/repos/dist/release/incubator/tinkerpop release; mkdir release/x.y.z`
-. `ls dev/x.y.z/ | grep '\-\(distribution\|source\-release\)\.zip' | sed -e 's/\(^[^ ]\*\)-distribution\([^ ]*\)/cp dev\/x.y.z\/\0 release\/x.y.z\/\1-bin\2/' -e 's/\(^[^ ]\*\)-source-release\([^ ]*\)/cp dev\/x.y.z\/\0 release\/x.y.z\/\1-src\2/' | /bin/sh`
. `cd release; svn add x.y.z/; svn ci -m "TinkerPop x.y.z release"`
. Update homepage with references to latest distribution and to other internal links elsewhere on the page.
. Wait for Apache Central to sync the jars and src (link:http://repo1.maven.org/maven2/org/apache/tinkerpop/tinkerpop/[http://repo1.maven.org/maven2/org/apache/tinkerpop/tinkerpop/]).
[12/50] incubator-tinkerpop git commit: added a GraphStep core test
(hashCode() verification)
Posted by ok...@apache.org.
added a GraphStep core test (hashCode() verification)
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/d83bf71b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/d83bf71b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/d83bf71b
Branch: refs/heads/TINKERPOP3-925
Commit: d83bf71b6ace35f3f0cdf582ba95a67b595fac27
Parents: c35d08f
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Tue Oct 27 15:48:44 2015 +0100
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Tue Oct 27 15:48:44 2015 +0100
----------------------------------------------------------------------
.../traversal/step/map/GraphStepTest.java | 41 ++++++++++++++++++++
1 file changed, 41 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d83bf71b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphStepTest.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphStepTest.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphStepTest.java
new file mode 100644
index 0000000..6ea38bc
--- /dev/null
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphStepTest.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.process.traversal.step.map;
+
+import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
+import org.apache.tinkerpop.gremlin.process.traversal.step.StepTest;
+
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * @author Daniel Kuppitz (http://gremlin.guru)
+ */
+public class GraphStepTest extends StepTest {
+
+ @Override
+ protected List<Traversal> getTraversals() {
+ return Arrays.asList(
+ __.V(),
+ __.V(1,4),
+ __.V(2,3)
+ );
+ }
+}
[46/50] incubator-tinkerpop git commit: Modifications to release
process
Posted by ok...@apache.org.
Modifications to release process
Based on things learned in the 3.0.2-incubating release it made some sense to move some steps around. Most specifically, I moved staging the nexus repo to PMC Vote stage as that saves rebuilding later after incubator general VOTE.
I'm going to CTR this one but @okram can you just take a quick review on this commit to make sure i'm not hurting myself in some way for next release.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/553f91fc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/553f91fc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/553f91fc
Branch: refs/heads/TINKERPOP3-925
Commit: 553f91fcf89f14bb99c60d5e055d65e2b36d01f5
Parents: 1478c43
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Oct 29 15:12:49 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Oct 29 15:12:49 2015 -0400
----------------------------------------------------------------------
docs/src/developer-release.asciidoc | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/553f91fc/docs/src/developer-release.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/developer-release.asciidoc b/docs/src/developer-release.asciidoc
index e2b7eeb..ef7349c 100644
--- a/docs/src/developer-release.asciidoc
+++ b/docs/src/developer-release.asciidoc
@@ -92,9 +92,10 @@ A positive vote for a particular release from the TinkerPop PMC is required to m
. `git diff` and review the updated files (expect all `pom.xml` files and this README)
. `git commit -a -m "TinkerPop x.y.z release"` and `git push`
. `git tag -a -m "TinkerPop x.y.z release" x.y.z` and `git push --tags`
-. `mvn clean install -Dmaven.test.skip=true`
+. `mvn clean install -Dmaven.test.skip=true` - need to build first so that the right version of the console is used with `bin/publish-docs.sh`
. `bin/publish-docs.sh <username>`
-. `mvn install -Papache-release -DcreateChecksum=true -Dmaven.test.skip=true`
+. `mvn install -Papache-release -Djavadoc -DcreateChecksum=true -Dmaven.test.skip=true`
+. `mvn deploy -Papache-release -DcreateChecksum=true -Dmaven.test.skip=true`- deploy signed artifacts with checksums to link:https://repository.apache.org/[Apache Nexus]. Review (artifacts versions, file sizes, anything that might be out of place - request another committer to review as well) but do NOT close/release the staging repository at this time.
. Review generated artifacts to be sure they have both javadocs and asciidocs present
. Upload artifacts to `https://dist.apache.org/repos/dist/dev/incubator/tinkerpop` for `[VOTE]` review.
.. `svn co --depth empty https://dist.apache.org/repos/dist/dev/incubator/tinkerpop/ dev` and `mkdir dev/x.y.z`
@@ -123,9 +124,7 @@ A positive vote for a particular release from the Apache Incubator is required t
Release & Promote
-----------------
-. `mvn clean install -Djavadoc -Dmaven.test.skip=true; bin/process-docs.sh` - rebuild source and docs of tagged release
-. `mvn deploy -Papache-release -DcreateChecksum=true -Dmaven.test.skip=true`- deploy signed artifacts with checksums to Apache Nexus
-. Review and close the staging repository (Apache Nexus at link:https://repository.apache.org/[https://repository.apache.org/]) - check that versions are correct and that all artifacts are present
+. Close the staging repository at link:https://repository.apache.org/[Apache Nexus]) and then release.
. `svn co --depth empty https://dist.apache.org/repos/dist/dev/incubator/tinkerpop dev; svn up dev/x.y.z`
. `svn co --depth empty https://dist.apache.org/repos/dist/release/incubator/tinkerpop release; mkdir release/x.y.z`
. `ls dev/x.y.z/ | grep '\-\(distribution\|source\-release\)\.zip' | sed -e 's/\(^[^ ]\*\)-distribution\([^ ]*\)/cp dev\/x.y.z\/\0 release\/x.y.z\/\1-bin\2/' -e 's/\(^[^ ]\*\)-source-release\([^ ]*\)/cp dev\/x.y.z\/\0 release\/x.y.z\/\1-src\2/' | /bin/sh`
[06/50] incubator-tinkerpop git commit: TINKERPOP3-903 Add a test to
validate that results of all sizes stream properly.
Posted by ok...@apache.org.
TINKERPOP3-903 Add a test to validate that results of all sizes stream properly.
This is an amendment to TINKERPOP-903 which was already merged and closed.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/173228e7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/173228e7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/173228e7
Branch: refs/heads/TINKERPOP3-925
Commit: 173228e776ea88b5856d0f02cd4c2070e8f5463c
Parents: b2ef5a3
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Sat Oct 24 06:38:35 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Sat Oct 24 06:38:35 2015 -0400
----------------------------------------------------------------------
.../server/GremlinDriverIntegrateTest.java | 44 +++++++++++++++++++-
1 file changed, 43 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/173228e7/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java
index 575f96e..769f216 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java
@@ -20,8 +20,11 @@ package org.apache.tinkerpop.gremlin.server;
import org.apache.commons.lang.exception.ExceptionUtils;
import org.apache.tinkerpop.gremlin.TestHelper;
-import org.apache.tinkerpop.gremlin.driver.*;
import org.apache.tinkerpop.gremlin.driver.Channelizer;
+import org.apache.tinkerpop.gremlin.driver.Client;
+import org.apache.tinkerpop.gremlin.driver.Cluster;
+import org.apache.tinkerpop.gremlin.driver.Result;
+import org.apache.tinkerpop.gremlin.driver.ResultSet;
import org.apache.tinkerpop.gremlin.driver.exception.ConnectionException;
import org.apache.tinkerpop.gremlin.driver.exception.ResponseException;
import org.apache.tinkerpop.gremlin.driver.message.ResponseStatusCode;
@@ -108,6 +111,45 @@ public class GremlinDriverIntegrateTest extends AbstractGremlinServerIntegration
}
@Test
+ public void shouldHandleResultsOfAllSizes() throws Exception {
+ final Cluster cluster = Cluster.open();
+ final Client client = cluster.connect();
+
+ final String script = "g.V().drop().iterate();\n" +
+ "\n" +
+ "List ids = new ArrayList();\n" +
+ "\n" +
+ "int ii = 0;\n" +
+ "Vertex v = graph.addVertex();\n" +
+ "v.property(\"ii\", ii);\n" +
+ "v.property(\"sin\", Math.sin(ii));\n" +
+ "ids.add(v.id());\n" +
+ "\n" +
+ "Random rand = new Random();\n" +
+ "for (; ii < size; ii++) {\n" +
+ " v = graph.addVertex();\n" +
+ " v.property(\"ii\", ii);\n" +
+ " v.property(\"sin\", Math.sin(ii/5.0));\n" +
+ " Vertex u = g.V(ids.get(rand.nextInt(ids.size()))).next();\n" +
+ " v.addEdge(\"linked\", u);\n" +
+ " ids.add(u.id());\n" +
+ " ids.add(v.id());\n" +
+ "}\n" +
+ "g.V()";
+
+ final List<Integer> sizes = Arrays.asList(1, 10, 20, 50, 75, 100, 250, 500, 750, 1000, 5000, 10000);
+ for (Integer size : sizes) {
+ final Map<String, Object> params = new HashMap<>();
+ params.put("size", size - 1);
+ final ResultSet results = client.submit(script, params);
+
+ assertEquals(size.intValue(), results.all().get().size());
+ }
+
+ cluster.close();
+ }
+
+ @Test
public void shouldFailWithBadClientSideSerialization() throws Exception {
final Cluster cluster = Cluster.open();
final Client client = cluster.connect();
[49/50] incubator-tinkerpop git commit: The mid-traversal V() work
did not include a test case for testing hasContainer fold-ins for TinkerGraph
nor Neo4jGraph (@dkuppitz). I just added a test. Both pass. Also,
the XXXStratgegySuite classes were in the w
Posted by ok...@apache.org.
The mid-traversal V() work did not include a test case for testing hasContainer fold-ins for TinkerGraph nor Neo4jGraph (@dkuppitz). I just added a test. Both pass. Also, the XXXStratgegySuite classes were in the wrong packages -- reorganized (@dkuppitz). Updated CHANGELOG with note about relocation of GraphStep package.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/9300485e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/9300485e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/9300485e
Branch: refs/heads/TINKERPOP3-925
Commit: 9300485eb3f1a8e4cbf63133e038d64fe6c52372
Parents: ac0924d
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Thu Oct 29 17:04:44 2015 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Thu Oct 29 17:04:44 2015 -0600
----------------------------------------------------------------------
CHANGELOG.asciidoc | 1 +
.../upgrade-release-3.1.x-incubating.asciidoc | 5 +++
.../gremlin/neo4j/structure/Neo4jGraph.java | 2 +-
.../gremlin/neo4j/Neo4jStrategySuite.java | 44 --------------------
.../gremlin/neo4j/Neo4jStrategyTest.java | 31 --------------
.../traversal/strategy/Neo4jStrategySuite.java | 44 ++++++++++++++++++++
.../traversal/strategy/Neo4jStrategyTest.java | 32 ++++++++++++++
.../Neo4jGraphStepStrategyTest.java | 13 ++++++
.../tinkergraph/structure/TinkerGraph.java | 2 +-
.../tinkergraph/TinkerGraphStrategySuite.java | 44 --------------------
.../tinkergraph/TinkerGraphStrategyTest.java | 31 --------------
.../strategy/TinkerGraphStrategySuite.java | 44 ++++++++++++++++++++
.../strategy/TinkerGraphStrategyTest.java | 32 ++++++++++++++
.../TinkerGraphStepStrategyTest.java | 13 ++++++
14 files changed, 186 insertions(+), 152 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/9300485e/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index d773c02..8bd6e51 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -27,6 +27,7 @@ TinkerPop 3.1.0 (NOT OFFICIALLY RELEASED YET)
* Renamed the `public static String` configuration variable names of TinkerGraph (deprecated old variables).
* Added `GraphComputer.config(key,value)` to allow engine-specific configurations.
+* `GraphStep` is no longer in the `sideEffect`-package and is now in `map`-package (breaking change).
* Added suppport for mid-traversal `V()`-steps (`GraphStep` semantics updated).
* Fixed `Number` handling in `Operator` enums. Prior this change a lot of operations on mixed `Number` types returned a wrong result (wrong data type).
* Fixed a bug in Gremlin Server/Driver serializer where empty buffers were getting returned in certain cases.
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/9300485e/docs/src/upgrade-release-3.1.x-incubating.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade-release-3.1.x-incubating.asciidoc b/docs/src/upgrade-release-3.1.x-incubating.asciidoc
index 1e52cb5..b50dd7e 100644
--- a/docs/src/upgrade-release-3.1.x-incubating.asciidoc
+++ b/docs/src/upgrade-release-3.1.x-incubating.asciidoc
@@ -35,6 +35,7 @@ Additional upgrade information can be found here:
Important Changes
~~~~~~~~~~~~~~~~~
+* `GraphStep` is no longer in `sideEffect`-package, but now in `map`-package as traversals support mid-traversal `V()`.
* Traversals now support mid-traversal `V()`-steps. Graph system providers should ensure that a mid-traversal `V()` can leverage any suitable index.
* The data type of `Operator` enums will now always be the highest common data type of the two given numbers, rather than the data type of the first number, as it's been before.
* The Gephi Plugin has improved integration with Gephi, where manually inserting `store` steps to visualize a running traversal is no longer required.
@@ -144,6 +145,10 @@ Graph Traversal Updates
There were numerous changes to the `GraphTraversal` API. Nearly all changes are backwards compatible with respective
"deprecated" annotations. Please review the respective updates specified in the "Graph System Users" section.
+* `GraphStep` is no longer in `sideEffect` package. Now in `map` package.
+* Make sure mid-traversal `GraphStep` calls are folding `HasContainers` in for index-lookups.
+* Think about copying `TinkerGraphStepStrategyTest` for your implementation so you know folding is happening correctly.
+
Element Removal
+++++++++++++++
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/9300485e/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jGraph.java
----------------------------------------------------------------------
diff --git a/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jGraph.java b/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jGraph.java
index 7616dc6..010e592 100644
--- a/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jGraph.java
+++ b/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jGraph.java
@@ -71,7 +71,7 @@ import java.util.stream.Stream;
@Graph.OptIn(Graph.OptIn.SUITE_GROOVY_ENVIRONMENT_INTEGRATE)
@Graph.OptIn(Graph.OptIn.SUITE_GROOVY_ENVIRONMENT_PERFORMANCE)
@Graph.OptIn("org.apache.tinkerpop.gremlin.neo4j.NativeNeo4jSuite")
-@Graph.OptIn("org.apache.tinkerpop.gremlin.neo4j.Neo4jStrategySuite")
+@Graph.OptIn("org.apache.tinkerpop.gremlin.neo4j.process.traversal.strategy.Neo4jStrategySuite")
public final class Neo4jGraph implements Graph, WrappedGraph<Neo4jGraphAPI> {
public static final Logger LOGGER = LoggerFactory.getLogger(Neo4jGraph.class);
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/9300485e/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/Neo4jStrategySuite.java
----------------------------------------------------------------------
diff --git a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/Neo4jStrategySuite.java b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/Neo4jStrategySuite.java
deleted file mode 100644
index 7c56d0d..0000000
--- a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/Neo4jStrategySuite.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tinkerpop.gremlin.neo4j;
-
-import org.apache.tinkerpop.gremlin.AbstractGremlinSuite;
-import org.apache.tinkerpop.gremlin.neo4j.process.traversal.strategy.optimization.Neo4jGraphStepStrategyTest;
-import org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine;
-import org.junit.runners.model.InitializationError;
-import org.junit.runners.model.RunnerBuilder;
-
-/**
- * @author Daniel Kuppitz (http://gremlin.guru)
- */
-public class Neo4jStrategySuite extends AbstractGremlinSuite {
-
- public Neo4jStrategySuite(final Class<?> klass, final RunnerBuilder builder) throws InitializationError {
-
- super(klass, builder,
- new Class<?>[]{
- Neo4jGraphStepStrategyTest.class
- }, new Class<?>[]{
- Neo4jGraphStepStrategyTest.class
- },
- false,
- TraversalEngine.Type.STANDARD);
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/9300485e/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/Neo4jStrategyTest.java
----------------------------------------------------------------------
diff --git a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/Neo4jStrategyTest.java b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/Neo4jStrategyTest.java
deleted file mode 100644
index d0bdc0f..0000000
--- a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/Neo4jStrategyTest.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tinkerpop.gremlin.neo4j;
-
-import org.apache.tinkerpop.gremlin.GraphProviderClass;
-import org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jGraph;
-import org.junit.runner.RunWith;
-
-/**
- * @author Daniel Kuppitz (http://gremlin.guru)
- */
-@RunWith(Neo4jStrategySuite.class)
-@GraphProviderClass(provider = NoMultiNoMetaNeo4jGraphProvider.class, graph = Neo4jGraph.class)
-public class Neo4jStrategyTest {
-}
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/9300485e/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/strategy/Neo4jStrategySuite.java
----------------------------------------------------------------------
diff --git a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/strategy/Neo4jStrategySuite.java b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/strategy/Neo4jStrategySuite.java
new file mode 100644
index 0000000..0004bc2
--- /dev/null
+++ b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/strategy/Neo4jStrategySuite.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.neo4j.process.traversal.strategy;
+
+import org.apache.tinkerpop.gremlin.AbstractGremlinSuite;
+import org.apache.tinkerpop.gremlin.neo4j.process.traversal.strategy.optimization.Neo4jGraphStepStrategyTest;
+import org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine;
+import org.junit.runners.model.InitializationError;
+import org.junit.runners.model.RunnerBuilder;
+
+/**
+ * @author Daniel Kuppitz (http://gremlin.guru)
+ */
+public class Neo4jStrategySuite extends AbstractGremlinSuite {
+
+ public Neo4jStrategySuite(final Class<?> klass, final RunnerBuilder builder) throws InitializationError {
+
+ super(klass, builder,
+ new Class<?>[]{
+ Neo4jGraphStepStrategyTest.class
+ }, new Class<?>[]{
+ Neo4jGraphStepStrategyTest.class
+ },
+ false,
+ TraversalEngine.Type.STANDARD);
+ }
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/9300485e/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/strategy/Neo4jStrategyTest.java
----------------------------------------------------------------------
diff --git a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/strategy/Neo4jStrategyTest.java b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/strategy/Neo4jStrategyTest.java
new file mode 100644
index 0000000..5363e1f
--- /dev/null
+++ b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/strategy/Neo4jStrategyTest.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.neo4j.process.traversal.strategy;
+
+import org.apache.tinkerpop.gremlin.GraphProviderClass;
+import org.apache.tinkerpop.gremlin.neo4j.NoMultiNoMetaNeo4jGraphProvider;
+import org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jGraph;
+import org.junit.runner.RunWith;
+
+/**
+ * @author Daniel Kuppitz (http://gremlin.guru)
+ */
+@RunWith(Neo4jStrategySuite.class)
+@GraphProviderClass(provider = NoMultiNoMetaNeo4jGraphProvider.class, graph = Neo4jGraph.class)
+public class Neo4jStrategyTest {
+}
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/9300485e/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/strategy/optimization/Neo4jGraphStepStrategyTest.java
----------------------------------------------------------------------
diff --git a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/strategy/optimization/Neo4jGraphStepStrategyTest.java b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/strategy/optimization/Neo4jGraphStepStrategyTest.java
index cc92ef9..0611e23 100644
--- a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/strategy/optimization/Neo4jGraphStepStrategyTest.java
+++ b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/strategy/optimization/Neo4jGraphStepStrategyTest.java
@@ -59,5 +59,18 @@ public class Neo4jGraphStepStrategyTest extends AbstractNeo4jGremlinTest {
assertEquals("name", ((Neo4jGraphStep<?, ?>) traversal.getStartStep()).getHasContainers().get(0).getKey());
assertEquals("marko", ((Neo4jGraphStep<?, ?>) traversal.getStartStep()).getHasContainers().get(0).getValue());
assertEquals(HasStep.class, traversal.getEndStep().getClass());
+ ////
+ traversal = g.V().has("name", "marko").out().V().has("name", "daniel").asAdmin();
+ traversal.applyStrategies();
+ assertEquals(3, traversal.getSteps().size());
+ assertEquals(Neo4jGraphStep.class, traversal.getStartStep().getClass());
+ assertEquals(1, ((Neo4jGraphStep) traversal.getStartStep()).getHasContainers().size());
+ assertEquals("name", ((Neo4jGraphStep<?, ?>) traversal.getStartStep()).getHasContainers().get(0).getKey());
+ assertEquals("marko", ((Neo4jGraphStep<?, ?>) traversal.getStartStep()).getHasContainers().get(0).getValue());
+ assertEquals(Neo4jGraphStep.class, traversal.getSteps().get(2).getClass());
+ assertEquals(1, ((Neo4jGraphStep) traversal.getSteps().get(2)).getHasContainers().size());
+ assertEquals("name", ((Neo4jGraphStep<?, ?>) traversal.getSteps().get(2)).getHasContainers().get(0).getKey());
+ assertEquals("daniel", ((Neo4jGraphStep<?,?>) traversal.getSteps().get(2)).getHasContainers().get(0).getValue());
+ assertEquals(Neo4jGraphStep.class, traversal.getEndStep().getClass());
}
}
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/9300485e/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java
index 4ca542c..9fc1d3e 100644
--- a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java
+++ b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java
@@ -67,7 +67,7 @@ import java.util.stream.Stream;
@Graph.OptIn(Graph.OptIn.SUITE_GROOVY_ENVIRONMENT)
@Graph.OptIn(Graph.OptIn.SUITE_GROOVY_ENVIRONMENT_INTEGRATE)
@Graph.OptIn(Graph.OptIn.SUITE_GROOVY_ENVIRONMENT_PERFORMANCE)
-@Graph.OptIn("org.apache.tinkerpop.gremlin.tinkergraph.TinkerGraphStrategySuite")
+@Graph.OptIn("org.apache.tinkerpop.gremlin.tinkergraph.process.traversal.strategy.TinkerGraphStrategySuite")
public final class TinkerGraph implements Graph {
static {
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/9300485e/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphStrategySuite.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphStrategySuite.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphStrategySuite.java
deleted file mode 100644
index faffe9a..0000000
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphStrategySuite.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tinkerpop.gremlin.tinkergraph;
-
-import org.apache.tinkerpop.gremlin.AbstractGremlinSuite;
-import org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine;
-import org.apache.tinkerpop.gremlin.tinkergraph.process.traversal.strategy.optimization.TinkerGraphStepStrategyTest;
-import org.junit.runners.model.InitializationError;
-import org.junit.runners.model.RunnerBuilder;
-
-/**
- * @author Daniel Kuppitz (http://gremlin.guru)
- */
-public class TinkerGraphStrategySuite extends AbstractGremlinSuite {
-
- public TinkerGraphStrategySuite(final Class<?> klass, final RunnerBuilder builder) throws InitializationError {
-
- super(klass, builder,
- new Class<?>[]{
- TinkerGraphStepStrategyTest.class
- }, new Class<?>[]{
- TinkerGraphStepStrategyTest.class
- },
- false,
- TraversalEngine.Type.STANDARD);
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/9300485e/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphStrategyTest.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphStrategyTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphStrategyTest.java
deleted file mode 100644
index d355d4e..0000000
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphStrategyTest.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tinkerpop.gremlin.tinkergraph;
-
-import org.apache.tinkerpop.gremlin.GraphProviderClass;
-import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;
-import org.junit.runner.RunWith;
-
-/**
- * @author Daniel Kuppitz (http://gremlin.guru)
- */
-@RunWith(TinkerGraphStrategySuite.class)
-@GraphProviderClass(provider = TinkerGraphProvider.class, graph = TinkerGraph.class)
-public class TinkerGraphStrategyTest {
-}
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/9300485e/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/TinkerGraphStrategySuite.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/TinkerGraphStrategySuite.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/TinkerGraphStrategySuite.java
new file mode 100644
index 0000000..3982918
--- /dev/null
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/TinkerGraphStrategySuite.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.tinkergraph.process.traversal.strategy;
+
+import org.apache.tinkerpop.gremlin.AbstractGremlinSuite;
+import org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine;
+import org.apache.tinkerpop.gremlin.tinkergraph.process.traversal.strategy.optimization.TinkerGraphStepStrategyTest;
+import org.junit.runners.model.InitializationError;
+import org.junit.runners.model.RunnerBuilder;
+
+/**
+ * @author Daniel Kuppitz (http://gremlin.guru)
+ */
+public class TinkerGraphStrategySuite extends AbstractGremlinSuite {
+
+ public TinkerGraphStrategySuite(final Class<?> klass, final RunnerBuilder builder) throws InitializationError {
+
+ super(klass, builder,
+ new Class<?>[]{
+ TinkerGraphStepStrategyTest.class
+ }, new Class<?>[]{
+ TinkerGraphStepStrategyTest.class
+ },
+ false,
+ TraversalEngine.Type.STANDARD);
+ }
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/9300485e/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/TinkerGraphStrategyTest.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/TinkerGraphStrategyTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/TinkerGraphStrategyTest.java
new file mode 100644
index 0000000..7942626
--- /dev/null
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/TinkerGraphStrategyTest.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.tinkergraph.process.traversal.strategy;
+
+import org.apache.tinkerpop.gremlin.GraphProviderClass;
+import org.apache.tinkerpop.gremlin.tinkergraph.TinkerGraphProvider;
+import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;
+import org.junit.runner.RunWith;
+
+/**
+ * @author Daniel Kuppitz (http://gremlin.guru)
+ */
+@RunWith(TinkerGraphStrategySuite.class)
+@GraphProviderClass(provider = TinkerGraphProvider.class, graph = TinkerGraph.class)
+public class TinkerGraphStrategyTest {
+}
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/9300485e/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/optimization/TinkerGraphStepStrategyTest.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/optimization/TinkerGraphStepStrategyTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/optimization/TinkerGraphStepStrategyTest.java
index e497808..6e4850d 100644
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/optimization/TinkerGraphStepStrategyTest.java
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/optimization/TinkerGraphStepStrategyTest.java
@@ -64,6 +64,19 @@ public class TinkerGraphStepStrategyTest extends AbstractGremlinProcessTest {
assertEquals("name", ((TinkerGraphStep<?, ?>) traversal.getStartStep()).getHasContainers().get(0).getKey());
assertEquals("marko", ((TinkerGraphStep<?, ?>) traversal.getStartStep()).getHasContainers().get(0).getValue());
assertEquals(HasStep.class, traversal.getEndStep().getClass());
+ ////
+ traversal = g.V().has("name", "marko").out().V().has("name", "daniel").asAdmin();
+ traversal.applyStrategies();
+ assertEquals(3, traversal.getSteps().size());
+ assertEquals(TinkerGraphStep.class, traversal.getStartStep().getClass());
+ assertEquals(1, ((TinkerGraphStep) traversal.getStartStep()).getHasContainers().size());
+ assertEquals("name", ((TinkerGraphStep<?, ?>) traversal.getStartStep()).getHasContainers().get(0).getKey());
+ assertEquals("marko", ((TinkerGraphStep<?, ?>) traversal.getStartStep()).getHasContainers().get(0).getValue());
+ assertEquals(TinkerGraphStep.class, traversal.getSteps().get(2).getClass());
+ assertEquals(1, ((TinkerGraphStep) traversal.getSteps().get(2)).getHasContainers().size());
+ assertEquals("name", ((TinkerGraphStep<?, ?>) traversal.getSteps().get(2)).getHasContainers().get(0).getKey());
+ assertEquals("daniel", ((TinkerGraphStep<?,?>) traversal.getSteps().get(2)).getHasContainers().get(0).getValue());
+ assertEquals(TinkerGraphStep.class, traversal.getEndStep().getClass());
}
}
[17/50] incubator-tinkerpop git commit: TINKERPOP3-910 Added an
assert as suggested by @pluradj in the PR.
Posted by ok...@apache.org.
TINKERPOP3-910 Added an assert as suggested by @pluradj in the PR.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/23356d4c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/23356d4c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/23356d4c
Branch: refs/heads/TINKERPOP3-925
Commit: 23356d4cb27d13745833f9150a283e7a8a2816e1
Parents: 0b57371
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Oct 28 05:30:31 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Oct 28 05:30:31 2015 -0400
----------------------------------------------------------------------
.../tinkerpop/gremlin/server/GremlinServerIntegrateTest.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/23356d4c/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
index 77dccd5..0b4f7cd 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
@@ -608,7 +608,7 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration
latch3.countDown();
});
- latch3.await(1500, TimeUnit.MILLISECONDS);
+ assertTrue(latch3.await(1500, TimeUnit.MILLISECONDS));
// Check to see if the transaction is closed.
final CountDownLatch latch4 = new CountDownLatch(1);
[08/50] incubator-tinkerpop git commit: added tests around single
channel in session and sessionless requests
Posted by ok...@apache.org.
added tests around single channel in session and sessionless requests
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/0b573712
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/0b573712
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/0b573712
Branch: refs/heads/TINKERPOP3-925
Commit: 0b573712c58c3f115a19b4c7542add3d7bbeb8fe
Parents: 43f64c2
Author: Dylan Millikin <dy...@brightzone.fr>
Authored: Mon Oct 26 11:18:50 2015 +0100
Committer: Dylan Millikin <dy...@brightzone.fr>
Committed: Mon Oct 26 13:48:12 2015 +0100
----------------------------------------------------------------------
.../server/GremlinDriverIntegrateTest.java | 28 ++++++
.../server/GremlinServerIntegrateTest.java | 100 +++++++++++++++++++
2 files changed, 128 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/0b573712/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java
index 575f96e..3e0f821 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java
@@ -99,6 +99,7 @@ public class GremlinDriverIntegrateTest extends AbstractGremlinServerIntegration
case "shouldExecuteScriptInSessionOnTransactionalGraph":
case "shouldExecuteSessionlessScriptOnTransactionalGraph":
case "shouldExecuteScriptInSessionOnTransactionalWithManualTransactionsGraph":
+ case "shouldExecuteInSessionAndSessionlessWithoutOpeningTransaction":
deleteDirectory(new File("/tmp/neo4j"));
settings.graphs.put("graph", "conf/neo4j-empty.properties");
break;
@@ -616,6 +617,33 @@ public class GremlinDriverIntegrateTest extends AbstractGremlinServerIntegration
}
@Test
+ public void shouldExecuteInSessionAndSessionlessWithoutOpeningTransaction() throws Exception {
+ assumeNeo4jIsPresent();
+
+ final Cluster cluster = Cluster.build().create();
+ final Client sessionClient = cluster.connect(name.getMethodName());
+ final Client sessionlessClient = cluster.connect();
+
+ //open transaction in session, then add vertex and commit
+ sessionClient.submit("graph.tx().open()").all().get();
+ final Vertex vertexBeforeTx = sessionClient.submit("v=graph.addVertex(\"name\",\"stephen\")").all().get().get(0).getVertex();
+ assertEquals("stephen", vertexBeforeTx.values("name").next());
+ sessionClient.submit("graph.tx().commit()").all().get();
+
+ // check that session transaction is closed
+ final boolean isOpen = sessionClient.submit("graph.tx().isOpen()").all().get().get(0).getBoolean();
+ assertTrue("Transaction should be closed", !isOpen);
+
+ //run a sessionless read
+ sessionlessClient.submit("graph.traversal().V()").all().get();
+
+ // check that session transaction is still closed
+ final boolean isOpenAfterSessionless = sessionClient.submit("graph.tx().isOpen()").all().get().get(0).getBoolean();
+ assertTrue("Transaction should stil be closed", !isOpenAfterSessionless);
+
+ }
+
+ @Test
public void shouldExecuteSessionlessScriptOnTransactionalGraph() throws Exception {
assumeNeo4jIsPresent();
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/0b573712/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
index 2e65a56..77dccd5 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
@@ -18,6 +18,7 @@
*/
package org.apache.tinkerpop.gremlin.server;
+import java.io.File;
import org.apache.commons.lang.exception.ExceptionUtils;
import org.apache.log4j.Logger;
import org.apache.tinkerpop.gremlin.driver.Client;
@@ -41,6 +42,7 @@ import org.junit.Before;
import org.junit.Test;
import java.nio.channels.ClosedChannelException;
+import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
@@ -119,6 +121,10 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration
processorSettings.config.put(SessionOpProcessor.CONFIG_SESSION_TIMEOUT, 3000l);
settings.processors.add(processorSettings);
break;
+ case "shouldExecuteInSessionAndSessionlessWithoutOpeningTransactionWithSingleClient":
+ deleteDirectory(new File("/tmp/neo4j"));
+ settings.graphs.put("graph", "conf/neo4j-empty.properties");
+ break;
}
return settings;
@@ -562,4 +568,98 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration
cluster.close();
}
}
+
+ @Test
+ public void shouldExecuteInSessionAndSessionlessWithoutOpeningTransactionWithSingleClient() throws Exception {
+ assumeNeo4jIsPresent();
+
+ final SimpleClient client = new WebSocketClient();
+
+ //open a transaction, create a vertex, commit
+ final CountDownLatch latch = new CountDownLatch(1);
+ final RequestMessage OpenRequest = RequestMessage.build(Tokens.OPS_EVAL)
+ .processor("session")
+ .addArg(Tokens.ARGS_SESSION, name.getMethodName())
+ .addArg(Tokens.ARGS_GREMLIN, "graph.tx().open()")
+ .create();
+ client.submit(OpenRequest, (r) -> {
+ latch.countDown();
+ });
+ assertTrue(latch.await(1500, TimeUnit.MILLISECONDS));
+
+ final CountDownLatch latch2 = new CountDownLatch(1);
+ final RequestMessage AddRequest = RequestMessage.build(Tokens.OPS_EVAL)
+ .processor("session")
+ .addArg(Tokens.ARGS_SESSION, name.getMethodName())
+ .addArg(Tokens.ARGS_GREMLIN, "v=graph.addVertex(\"name\",\"stephen\")")
+ .create();
+ client.submit(AddRequest, (r) -> {
+ latch2.countDown();
+ });
+ assertTrue(latch2.await(1500, TimeUnit.MILLISECONDS));
+
+ final CountDownLatch latch3 = new CountDownLatch(1);
+ final RequestMessage CommitRequest = RequestMessage.build(Tokens.OPS_EVAL)
+ .processor("session")
+ .addArg(Tokens.ARGS_SESSION, name.getMethodName())
+ .addArg(Tokens.ARGS_GREMLIN, "graph.tx().commit()")
+ .create();
+ client.submit(CommitRequest, (r) -> {
+ latch3.countDown();
+
+ });
+ latch3.await(1500, TimeUnit.MILLISECONDS);
+
+ // Check to see if the transaction is closed.
+ final CountDownLatch latch4 = new CountDownLatch(1);
+ final AtomicBoolean isOpen = new AtomicBoolean(false);
+ final RequestMessage CheckRequest = RequestMessage.build(Tokens.OPS_EVAL)
+ .processor("session")
+ .addArg(Tokens.ARGS_SESSION, name.getMethodName())
+ .addArg(Tokens.ARGS_GREMLIN, "graph.tx().isOpen()")
+ .create();
+ client.submit(CheckRequest, (r) -> {
+ ArrayList<Boolean> response = (ArrayList) r.getResult().getData();
+ isOpen.set(response.get(0));
+ latch4.countDown();
+ });
+ assertTrue(latch4.await(1500, TimeUnit.MILLISECONDS));
+
+ // make sure no extra message sneak in
+ Thread.sleep(1000);
+
+ assertTrue("Transaction should be closed", !isOpen.get());
+
+ //lets run a sessionless read
+ final CountDownLatch latch5 = new CountDownLatch(1);
+ final RequestMessage sessionlessRequest = RequestMessage.build(Tokens.OPS_EVAL)
+ .addArg(Tokens.ARGS_GREMLIN, "graph.traversal().V()")
+ .create();
+ client.submit(sessionlessRequest, (r) -> {
+ latch5.countDown();
+ });
+ assertTrue(latch5.await(1500, TimeUnit.MILLISECONDS));
+
+ // Check to see if the transaction is still closed.
+ final CountDownLatch latch6 = new CountDownLatch(1);
+ final AtomicBoolean isStillOpen = new AtomicBoolean(false);
+ final RequestMessage CheckAgainRequest = RequestMessage.build(Tokens.OPS_EVAL)
+ .processor("session")
+ .addArg(Tokens.ARGS_SESSION, name.getMethodName())
+ .addArg(Tokens.ARGS_GREMLIN, "graph.tx().isOpen()")
+ .create();
+ client.submit(CheckAgainRequest, (r) -> {
+ ArrayList<Boolean> response = (ArrayList) r.getResult().getData();
+ isStillOpen.set(response.get(0));
+ latch6.countDown();
+ });
+ assertTrue(latch6.await(1500, TimeUnit.MILLISECONDS));
+
+ // make sure no extra message sneak in
+ Thread.sleep(1000);
+
+ assertTrue("Transaction should still be closed", !isStillOpen.get());
+ }
+
+
}
[24/50] incubator-tinkerpop git commit: updated CHANGELOG and release
doc
Posted by ok...@apache.org.
updated CHANGELOG and release doc
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/0900d5f6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/0900d5f6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/0900d5f6
Branch: refs/heads/TINKERPOP3-925
Commit: 0900d5f6875ef278a20e6512c1b0f7b77d8586b2
Parents: a71a179
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Wed Oct 28 16:16:22 2015 +0100
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Wed Oct 28 16:16:22 2015 +0100
----------------------------------------------------------------------
CHANGELOG.asciidoc | 1 +
docs/src/upgrade-release-3.1.x-incubating.asciidoc | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/0900d5f6/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 80e658c..002361b 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/incubator-tinkerpop/master/docs/
TinkerPop 3.1.0 (NOT OFFICIALLY RELEASED YET)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+* Added suppport for mid-traversal `V()`-steps.
* Renamed `ConjunctionX` to `ConnectiveX` because "conjunction" is assumed "and" (disjunction "or"), where "connective" is the parent concept.
* Removed `PathIdentityStep` as it was a hack that is now solved by `Traversal.Admin.addTraverserRequirement()`.
* Added `Traversal.Admin.addTraverserRequirement()` to allow a traversal strategy or source to add requirements (not only step determined anymore).
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/0900d5f6/docs/src/upgrade-release-3.1.x-incubating.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade-release-3.1.x-incubating.asciidoc b/docs/src/upgrade-release-3.1.x-incubating.asciidoc
index c2425a3..92f1e6b 100644
--- a/docs/src/upgrade-release-3.1.x-incubating.asciidoc
+++ b/docs/src/upgrade-release-3.1.x-incubating.asciidoc
@@ -35,6 +35,7 @@ Additional upgrade information can be found here:
Important Changes
~~~~~~~~~~~~~~~~~
+* Traversals now support mid-traversal `V()`-steps. Graph system providers should ensure that a mid-traversal `V()` can leverage any suitable index.
* The Gephi Plugin has improved integration with Gephi, where manually inserting {{store}} steps to visualize a running traversal is no longer required.
* Entire TinkerGraph instances can be serialized over Gryo.
* Hadoop1 support has been dropped. Hadoop2 is now supported. Giraph 1.1.0 is now supported and Spark of Hadoop2 YARN.
@@ -113,4 +114,4 @@ See link:https://issues.apache.org/jira/browse/TINKERPOP3-805[TINKERPOP3-805] fo
Graph Traversal Updates
+++++++++++++++++++++++
-There were numerous changes to the `GraphTraversal` API. Nearly all changes are backwards compatible with respective "deprecated" annotations. Please review the respective updates specified in the "Graph System Users" section.
\ No newline at end of file
+There were numerous changes to the `GraphTraversal` API. Nearly all changes are backwards compatible with respective "deprecated" annotations. Please review the respective updates specified in the "Graph System Users" section.
[16/50] incubator-tinkerpop git commit: Merge branch 'TINKERPOP3-926'
Posted by ok...@apache.org.
Merge branch 'TINKERPOP3-926'
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/55cdc2dc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/55cdc2dc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/55cdc2dc
Branch: refs/heads/TINKERPOP3-925
Commit: 55cdc2dc4c451004d2f032a64e0fa412a2a8ebf4
Parents: c8f1b70 12de257
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Wed Oct 28 03:13:56 2015 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Wed Oct 28 03:13:56 2015 -0600
----------------------------------------------------------------------
.../tinkergraph/structure/TinkerFactory.java | 8 +--
.../tinkergraph/structure/TinkerGraph.java | 58 +++++++++++++++-----
.../tinkergraph/TinkerGraphProvider.java | 14 ++---
.../structure/TinkerGraphIdManagerTest.java | 18 +++---
.../tinkergraph/structure/TinkerGraphTest.java | 16 +++---
5 files changed, 72 insertions(+), 42 deletions(-)
----------------------------------------------------------------------
[37/50] incubator-tinkerpop git commit: Rename the travis profile to
ci
Posted by ok...@apache.org.
Rename the travis profile to ci
We don't use travis anymore and ci is more general so seems like a better name. Invoking CTR as this is a small administrative change.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/48ab6903
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/48ab6903
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/48ab6903
Branch: refs/heads/TINKERPOP3-925
Commit: 48ab690378e12a533b99d5d8b837cf64fa201e20
Parents: 4e0c867
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Oct 29 08:02:42 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Oct 29 08:02:42 2015 -0400
----------------------------------------------------------------------
pom.xml | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/48ab6903/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 82fbb77..ef1f4ae 100644
--- a/pom.xml
+++ b/pom.xml
@@ -914,11 +914,12 @@ limitations under the License.
</profile>
<profile>
- <id>travis</id>
+ <!-- Continuous Integration - mutes test logs -->
+ <id>ci</id>
<activation>
<activeByDefault>false</activeByDefault>
<property>
- <name>travis</name>
+ <name>ci</name>
</property>
</activation>
[30/50] incubator-tinkerpop git commit: Merge remote-tracking branch
'origin/TINKERPOP3-922'
Posted by ok...@apache.org.
Merge remote-tracking branch 'origin/TINKERPOP3-922'
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/45bf33dd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/45bf33dd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/45bf33dd
Branch: refs/heads/TINKERPOP3-925
Commit: 45bf33dde128e3afd53c7a3bf94409c021f0890a
Parents: 901ffd9 3a3fdf7
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Oct 28 12:06:45 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Oct 28 12:06:45 2015 -0400
----------------------------------------------------------------------
CONTRIBUTING.asciidoc | 246 +----------------------
RELEASE.asciidoc | 172 -----------------
docs/src/developer-contributing.asciidoc | 268 ++++++++++++++++++++++++++
docs/src/developer-release.asciidoc | 172 +++++++++++++++++
docs/src/developer.asciidoc | 29 +++
pom.xml | 29 ++-
6 files changed, 499 insertions(+), 417 deletions(-)
----------------------------------------------------------------------
[40/50] incubator-tinkerpop git commit: Merge branch 'TINKERPOP3-918'
of https://github.com/apache/incubator-tinkerpop
Posted by ok...@apache.org.
Merge branch 'TINKERPOP3-918' of https://github.com/apache/incubator-tinkerpop
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/baa93494
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/baa93494
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/baa93494
Branch: refs/heads/TINKERPOP3-925
Commit: baa9349418b0fcddba368490cda5dd565dd82218
Parents: d936191 d9cf614
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Thu Oct 29 09:02:50 2015 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Thu Oct 29 09:02:50 2015 -0600
----------------------------------------------------------------------
.../step/util/TraversalComparator.java | 5 +-
.../ComputerVerificationStrategy.java | 11 +---
.../process/traversal/util/TraversalHelper.java | 20 +++++++
.../traversal/step/map/GroovyOrderTest.groovy | 10 ++++
.../process/traversal/step/map/OrderTest.java | 58 +++++++++++++++++++-
5 files changed, 91 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
[38/50] incubator-tinkerpop git commit: Added note about CTR to the
developer docs.
Posted by ok...@apache.org.
Added note about CTR to the developer docs.
Invoking CTR as this is a minor adjustment to the docs.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/0578a41c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/0578a41c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/0578a41c
Branch: refs/heads/TINKERPOP3-925
Commit: 0578a41c1aab2cb596dfe4db638021d34ed96c00
Parents: 48ab690
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Oct 29 08:09:13 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Oct 29 08:09:13 2015 -0400
----------------------------------------------------------------------
docs/src/developer-contributing.asciidoc | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/0578a41c/docs/src/developer-contributing.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/developer-contributing.asciidoc b/docs/src/developer-contributing.asciidoc
index dfa9d28..951c1b0 100644
--- a/docs/src/developer-contributing.asciidoc
+++ b/docs/src/developer-contributing.asciidoc
@@ -240,7 +240,7 @@ who is knowledgeable in the area that the pull request affects. Any additional c
via the pull request comment system.
The following exceptions to the RTC (review-then-commit) model presented above are itemized below. It is up to the
-committer to self-regulate as the itemization below is not complete and only hints and the types of commits that do not
+committer to self-regulate as the itemization below is not complete and only hints at the types of commits that do not
require a review.
* You are responsible for a release and need to manipulate files accordingly for the release.
@@ -249,6 +249,10 @@ require a review.
** The fix is under the link:http://www.apache.org/foundation/glossary.html#CommitThenReview[commit-then-review] (CTR) policy and lazy consensus is sufficient, where a single -1 vote requires you to revert your changes.
** Adding a test case, fixing spelling/grammar mistakes in the documentation, fixing LICENSE/NOTICE/etc. files, fixing a minor issue in an already merged branch.
+When the committer chooses CTR, it is considered good form to include something in the commit message that explains
+that CTR was invoked and the reason for doing so. For example, "Invoking CTR as this change encompasses minor
+adjustments to text formatting."
+
Pull Request Format
^^^^^^^^^^^^^^^^^^^
[13/50] incubator-tinkerpop git commit: verified that TinkerGraph and
Neo4jGraph fold HasContainers into GraphStep
Posted by ok...@apache.org.
verified that TinkerGraph and Neo4jGraph fold HasContainers into GraphStep
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/a976ca67
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/a976ca67
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/a976ca67
Branch: refs/heads/TINKERPOP3-925
Commit: a976ca672456590999dfd8d26c7ee27ed558e572
Parents: d83bf71
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Tue Oct 27 17:33:01 2015 +0100
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Tue Oct 27 17:33:01 2015 +0100
----------------------------------------------------------------------
.../structure/NativeNeo4jStructureTest.java | 26 ++++++++++++++++++-
.../tinkergraph/structure/TinkerGraphTest.java | 27 ++++++++++++++++++++
2 files changed, 52 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/a976ca67/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/structure/NativeNeo4jStructureTest.java
----------------------------------------------------------------------
diff --git a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/structure/NativeNeo4jStructureTest.java b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/structure/NativeNeo4jStructureTest.java
index 7e32251..3122513 100644
--- a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/structure/NativeNeo4jStructureTest.java
+++ b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/structure/NativeNeo4jStructureTest.java
@@ -22,10 +22,13 @@ import org.apache.tinkerpop.gremlin.FeatureRequirement;
import org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine;
import org.apache.tinkerpop.gremlin.neo4j.AbstractNeo4jGremlinTest;
import org.apache.tinkerpop.gremlin.neo4j.process.traversal.LabelP;
+import org.apache.tinkerpop.gremlin.neo4j.process.traversal.step.sideEffect.Neo4jGraphStep;
import org.apache.tinkerpop.gremlin.neo4j.structure.trait.MultiMetaNeo4jTrait;
+import org.apache.tinkerpop.gremlin.process.traversal.Step;
import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
+import org.apache.tinkerpop.gremlin.structure.Edge;
import org.apache.tinkerpop.gremlin.structure.Graph;
import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
@@ -43,7 +46,10 @@ import javax.script.ScriptException;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
/**
* @author Marko A. Rodriguez (http://markorodriguez.com)
@@ -480,4 +486,22 @@ public class NativeNeo4jStructureTest extends AbstractNeo4jGremlinTest {
});
}
+ @Test
+ public void shouldFoldHasContainerIntoGraphStep() {
+ final GraphTraversal<Vertex, Edge> t = g
+ .V().has("name", "foo").as("foo")
+ .V().has("name", "bar").addE("foobar").from("foo");
+
+ assertEquals(0, t.asAdmin().getSteps().stream().filter(s -> s instanceof Neo4jGraphStep).count());
+
+ int neo4jGraphStepCounter = 0;
+ for (final Step step : t.iterate().asAdmin().getSteps()) {
+ if (step instanceof Neo4jGraphStep) {
+ final Neo4jGraphStep gs = (Neo4jGraphStep) step;
+ assertEquals(1, gs.getHasContainers().size());
+ neo4jGraphStepCounter++;
+ }
+ }
+ assertEquals(2, neo4jGraphStepCounter);
+ }
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/a976ca67/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphTest.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphTest.java
index 3bc9f3c..a8f2459 100644
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphTest.java
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphTest.java
@@ -22,10 +22,14 @@ import org.apache.commons.configuration.BaseConfiguration;
import org.apache.commons.configuration.Configuration;
import org.apache.tinkerpop.gremlin.TestHelper;
import org.apache.tinkerpop.gremlin.process.traversal.P;
+import org.apache.tinkerpop.gremlin.process.traversal.Step;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
import org.apache.tinkerpop.gremlin.structure.Edge;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.apache.tinkerpop.gremlin.structure.io.IoCore;
import org.apache.tinkerpop.gremlin.structure.io.IoTest;
+import org.apache.tinkerpop.gremlin.tinkergraph.process.traversal.step.sideEffect.TinkerGraphStep;
import org.junit.Ignore;
import org.junit.Test;
@@ -282,6 +286,7 @@ public class TinkerGraphTest {
}
}
}
+
@Test(expected = IllegalStateException.class)
public void shouldRequireGraphLocationIfFormatIsSet() {
final Configuration conf = new BaseConfiguration();
@@ -322,6 +327,7 @@ public class TinkerGraphTest {
v.remove();
v.value("name");
}
+
@Test(expected = IllegalStateException.class)
public void shouldRequireGraphFormatIfLocationIsSet() {
final Configuration conf = new BaseConfiguration();
@@ -382,4 +388,25 @@ public class TinkerGraphTest {
IoTest.assertModernGraph(reloadedGraph, true, false);
reloadedGraph.close();
}
+
+ @Test
+ public void shouldFoldHasContainerIntoGraphStep() {
+ final TinkerGraph graph = TinkerGraph.open();
+ final GraphTraversalSource g = graph.traversal();
+ final GraphTraversal<Vertex, Edge> t = g
+ .V().has("name", "foo").as("foo")
+ .V().has("name", "bar").addE("foobar").from("foo");
+
+ assertEquals(0, t.asAdmin().getSteps().stream().filter(s -> s instanceof TinkerGraphStep).count());
+
+ int tinkerGraphStepCounter = 0;
+ for (final Step step : t.iterate().asAdmin().getSteps()) {
+ if (step instanceof TinkerGraphStep) {
+ final TinkerGraphStep gs = (TinkerGraphStep) step;
+ assertEquals(1, gs.getHasContainers().size());
+ tinkerGraphStepCounter++;
+ }
+ }
+ assertEquals(2, tinkerGraphStepCounter);
+ }
}
[33/50] incubator-tinkerpop git commit: ignored GraphStep test in
computer mode
Posted by ok...@apache.org.
ignored GraphStep test in computer mode
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/00440409
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/00440409
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/00440409
Branch: refs/heads/TINKERPOP3-925
Commit: 0044040920124006290bcce399b9aaa363063160
Parents: 786e9cf
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Wed Oct 28 20:56:35 2015 +0100
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Wed Oct 28 20:56:35 2015 +0100
----------------------------------------------------------------------
.../strategy/optimization/TinkerGraphStepStrategyTest.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/00440409/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/optimization/TinkerGraphStepStrategyTest.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/optimization/TinkerGraphStepStrategyTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/optimization/TinkerGraphStepStrategyTest.java
index 097e12b..e497808 100644
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/optimization/TinkerGraphStepStrategyTest.java
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/optimization/TinkerGraphStepStrategyTest.java
@@ -18,8 +18,10 @@
*/
package org.apache.tinkerpop.gremlin.tinkergraph.process.traversal.strategy.optimization;
-import org.apache.tinkerpop.gremlin.AbstractGremlinTest;
+import org.apache.tinkerpop.gremlin.process.AbstractGremlinProcessTest;
+import org.apache.tinkerpop.gremlin.process.IgnoreEngine;
import org.apache.tinkerpop.gremlin.process.traversal.P;
+import org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
import org.apache.tinkerpop.gremlin.process.traversal.step.filter.HasStep;
import org.apache.tinkerpop.gremlin.tinkergraph.process.traversal.step.sideEffect.TinkerGraphStep;
@@ -32,9 +34,10 @@ import static org.junit.Assert.assertEquals;
* @author Daniel Kuppitz (http://gremlin.guru)
*/
-public class TinkerGraphStepStrategyTest extends AbstractGremlinTest {
+public class TinkerGraphStepStrategyTest extends AbstractGremlinProcessTest {
@Test
+ @IgnoreEngine(TraversalEngine.Type.COMPUTER)
public void shouldFoldInHasContainers() {
GraphTraversal.Admin traversal = g.V().has("name", "marko").asAdmin();
assertEquals(2, traversal.getSteps().size());
[32/50] incubator-tinkerpop git commit: GiraphGraphComputer will be
smart about workers() and GIRAPH_WORKERS. Added more JavaDoc to
GraphComputer.config().
Posted by ok...@apache.org.
GiraphGraphComputer will be smart about workers() and GIRAPH_WORKERS. Added more JavaDoc to GraphComputer.config().
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/594f829d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/594f829d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/594f829d
Branch: refs/heads/TINKERPOP3-925
Commit: 594f829dee2d4c7b056271418b31626c53cb7681
Parents: ee6074f
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Wed Oct 28 13:42:05 2015 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Wed Oct 28 13:42:05 2015 -0600
----------------------------------------------------------------------
.../gremlin/giraph/process/computer/GiraphGraphComputer.java | 1 +
.../apache/tinkerpop/gremlin/process/computer/GraphComputer.java | 1 +
2 files changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/594f829d/giraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/giraph/process/computer/GiraphGraphComputer.java
----------------------------------------------------------------------
diff --git a/giraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/giraph/process/computer/GiraphGraphComputer.java b/giraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/giraph/process/computer/GiraphGraphComputer.java
index 7c09259..1e5dbd8 100644
--- a/giraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/giraph/process/computer/GiraphGraphComputer.java
+++ b/giraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/giraph/process/computer/GiraphGraphComputer.java
@@ -95,6 +95,7 @@ public final class GiraphGraphComputer extends AbstractHadoopGraphComputer imple
@Override
public GraphComputer config(final String key, final Object value) {
this.giraphConfiguration.set(key, value.toString());
+ this.useWorkerThreadsInConfiguration = this.giraphConfiguration.getInt(GiraphConstants.MAX_WORKERS, -666) != -666 || this.giraphConfiguration.getInt(GiraphConstants.NUM_COMPUTE_THREADS.getKey(), -666) != -666;
return this;
}
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/594f829d/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputer.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputer.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputer.java
index 2ae63e2..bfb7bde 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputer.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputer.java
@@ -107,6 +107,7 @@ public interface GraphComputer {
* Set an arbitrary configuration key/value for the underlying {@link org.apache.commons.configuration.Configuration} in the {@link GraphComputer}.
* Typically, the other fluent methods in {@link GraphComputer} should be used to configure the computation.
* However, for some custom configuration in the underlying engine, this method should be used.
+ * Different GraphComputer implementations will have different key/values and thus, parameters placed here are generally not universal to all GraphComputer implementations.
*
* @param key the key of the configuration
* @param value the value of the configuration
[02/50] incubator-tinkerpop git commit: GraphStep no longer extends
StartStep. It now takes a boolean isStart in its constructor. Moreover,
it is no longer a SideEffectStep but a FlatMapStep so it moved to the map/
package. TinkerGraphStepStrateagy and N
Posted by ok...@apache.org.
GraphStep no longer extends StartStep. It now takes a boolean isStart in its constructor. Moreover, it is no longer a SideEffectStep but a FlatMapStep so it moved to the map/ package. TinkerGraphStepStrateagy and Neo4jGRaphStepStrategy had to be updated to look for ALL GraphStep instances in the traversal and optimize them. Note that @spmallette work in ElementIdStrategy, PartitionStrategy, etc. already did 'for all graph steps' so that didnt need updating. Updated __ and GraphTraversal with V(). I added a new test class called GraphTest with one simple test. I'm passing this off to @dkuppitz to populate GraphTest with compliacated examples. Also, we need to decided if we want mid-traversal E().
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/5c5bd06e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/5c5bd06e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/5c5bd06e
Branch: refs/heads/TINKERPOP3-925
Commit: 5c5bd06ebbd4ad6781ba46349ebb638f93b4f469
Parents: 49f09ec
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Tue Oct 20 14:09:03 2015 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Tue Oct 20 14:09:03 2015 -0600
----------------------------------------------------------------------
.../GephiTraversalVisualizationStrategy.groovy | 2 +-
.../traversal/TraversalVertexProgram.java | 4 +-
.../traversal/dsl/graph/GraphTraversal.java | 7 +-
.../dsl/graph/GraphTraversalSource.java | 10 +-
.../gremlin/process/traversal/dsl/graph/__.java | 9 +-
.../process/traversal/step/map/GraphStep.java | 132 +++++++++++++++++++
.../traversal/step/sideEffect/GraphStep.java | 101 --------------
.../decoration/ConjunctionStrategy.java | 3 +-
.../strategy/decoration/ElementIdStrategy.java | 2 +-
.../strategy/decoration/PartitionStrategy.java | 2 +-
.../strategy/decoration/SubgraphStrategy.java | 2 +-
.../finalization/LazyBarrierStrategy.java | 2 +-
.../ComputerVerificationStrategy.java | 7 +-
.../ElementIdStrategyTraverseTest.java | 4 +-
.../PartitionStrategyTraverseTest.java | 4 +-
.../SubgraphStrategyTraverseTest.java | 5 +-
.../traversal/step/map/GroovyGraphTest.groovy | 37 ++++++
.../process/GroovyProcessComputerSuite.java | 2 +
.../process/GroovyProcessStandardSuite.java | 2 +
.../gremlin/process/ProcessComputerSuite.java | 2 +
.../gremlin/process/ProcessStandardSuite.java | 2 +
.../process/traversal/step/map/GraphTest.java | 58 ++++++++
.../step/sideEffect/Neo4jGraphStep.java | 10 +-
.../optimization/Neo4jGraphStepStrategy.java | 13 +-
.../step/sideEffect/TinkerGraphStep.java | 10 +-
.../optimization/TinkerGraphStepStrategy.java | 13 +-
.../TinkerGraphStepStrategyTest.java | 8 +-
.../structure/TinkerGraphPlayTest.java | 11 ++
28 files changed, 308 insertions(+), 156 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5c5bd06e/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/plugin/GephiTraversalVisualizationStrategy.groovy
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/plugin/GephiTraversalVisualizationStrategy.groovy b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/plugin/GephiTraversalVisualizationStrategy.groovy
index c099502..7e390b0 100644
--- a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/plugin/GephiTraversalVisualizationStrategy.groovy
+++ b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/plugin/GephiTraversalVisualizationStrategy.groovy
@@ -28,7 +28,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.map.EdgeOtherVertexSt
import org.apache.tinkerpop.gremlin.process.traversal.step.map.EdgeVertexStep
import org.apache.tinkerpop.gremlin.process.traversal.step.map.VertexStep
import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.AggregateStep
-import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GraphStep
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphStep
import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.LambdaSideEffectStep
import org.apache.tinkerpop.gremlin.process.traversal.step.util.BulkSet
import org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5c5bd06e/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/TraversalVertexProgram.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/TraversalVertexProgram.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/TraversalVertexProgram.java
index 07075f6..fe01ea2 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/TraversalVertexProgram.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/TraversalVertexProgram.java
@@ -37,7 +37,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.TraversalSource;
import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
import org.apache.tinkerpop.gremlin.process.traversal.TraverserGenerator;
import org.apache.tinkerpop.gremlin.process.traversal.step.MapReducer;
-import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GraphStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SideEffectCapStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.util.ReducingBarrierStep;
import org.apache.tinkerpop.gremlin.process.traversal.traverser.util.TraverserSet;
@@ -152,7 +152,7 @@ public final class TraversalVertexProgram implements VertexProgram<TraverserSet<
if (!(this.traversal.getStartStep() instanceof GraphStep))
throw new UnsupportedOperationException("TraversalVertexProgram currently only supports GraphStep starts on vertices or edges");
- final GraphStep<Element> graphStep = (GraphStep<Element>) this.traversal.getStartStep();
+ final GraphStep<Element, Element> graphStep = (GraphStep<Element, Element>) this.traversal.getStartStep();
final String future = graphStep.getNextStep().getId();
final TraverserGenerator traverserGenerator = this.traversal.getTraverserGenerator();
if (graphStep.returnsVertex()) { // VERTICES (process the first step locally)
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5c5bd06e/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
index d264860..53b8d3b 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
@@ -18,7 +18,6 @@
*/
package org.apache.tinkerpop.gremlin.process.traversal.dsl.graph;
-import org.apache.tinkerpop.gremlin.structure.Column;
import org.apache.tinkerpop.gremlin.process.traversal.Order;
import org.apache.tinkerpop.gremlin.process.traversal.P;
import org.apache.tinkerpop.gremlin.process.traversal.Path;
@@ -73,6 +72,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.map.DedupLocalStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.EdgeOtherVertexStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.EdgeVertexStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.FoldStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.GroupCountStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.GroupStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.GroupStepV3d0;
@@ -133,6 +133,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.util.TraversalCompara
import org.apache.tinkerpop.gremlin.process.traversal.step.util.Tree;
import org.apache.tinkerpop.gremlin.process.traversal.traverser.util.TraverserSet;
import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper;
+import org.apache.tinkerpop.gremlin.structure.Column;
import org.apache.tinkerpop.gremlin.structure.Direction;
import org.apache.tinkerpop.gremlin.structure.Edge;
import org.apache.tinkerpop.gremlin.structure.Element;
@@ -258,6 +259,10 @@ public interface GraphTraversal<S, E> extends Traversal<S, E> {
return this.asAdmin().addStep(new ConstantStep<E, E2>(this.asAdmin(), e));
}
+ public default GraphTraversal<S, Vertex> V(final Object... vertexIdsOrElements) {
+ return this.asAdmin().addStep(new GraphStep<>(this.asAdmin(), Vertex.class, false, vertexIdsOrElements));
+ }
+
/**
* Map the {@link Vertex} to its adjacent vertices given a direction and edge labels.
*
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5c5bd06e/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java
index 875d717..8395ace 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.java
@@ -26,7 +26,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy;
import org.apache.tinkerpop.gremlin.process.traversal.engine.ComputerTraversalEngine;
import org.apache.tinkerpop.gremlin.process.traversal.engine.StandardTraversalEngine;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.AddVertexStartStep;
-import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GraphStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphStep;
import org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement;
import org.apache.tinkerpop.gremlin.structure.Edge;
import org.apache.tinkerpop.gremlin.structure.Graph;
@@ -118,12 +118,12 @@ public class GraphTraversalSource implements TraversalSource {
public GraphTraversal<Vertex, Vertex> V(final Object... vertexIds) {
final GraphTraversal.Admin<Vertex, Vertex> traversal = this.generateTraversal();
- return traversal.addStep(new GraphStep<>(traversal, Vertex.class, vertexIds));
+ return traversal.addStep(new GraphStep<>(traversal, Vertex.class, true, vertexIds));
}
public GraphTraversal<Edge, Edge> E(final Object... edgesIds) {
final GraphTraversal.Admin<Edge, Edge> traversal = this.generateTraversal();
- return traversal.addStep(new GraphStep<>(traversal, Edge.class, edgesIds));
+ return traversal.addStep(new GraphStep<>(traversal, Edge.class, true, edgesIds));
}
//// UTILITIES
@@ -292,11 +292,11 @@ public class GraphTraversalSource implements TraversalSource {
}
public GraphTraversal<Vertex, Vertex> V(final Object... vertexIds) {
- return this.traversal.addStep(new GraphStep<>(this.traversal, Vertex.class, vertexIds));
+ return this.traversal.addStep(new GraphStep<>(this.traversal, Vertex.class, true, vertexIds));
}
public GraphTraversal<Edge, Edge> E(final Object... edgesIds) {
- return this.traversal.addStep(new GraphStep<>(this.traversal, Edge.class, edgesIds));
+ return this.traversal.addStep(new GraphStep<>(this.traversal, Edge.class, true, edgesIds));
}
//// UTILITIES
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5c5bd06e/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/__.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/__.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/__.java
index 4bd6a3c..f90d9dd 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/__.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/__.java
@@ -18,7 +18,6 @@
*/
package org.apache.tinkerpop.gremlin.process.traversal.dsl.graph;
-import org.apache.tinkerpop.gremlin.structure.Column;
import org.apache.tinkerpop.gremlin.process.traversal.P;
import org.apache.tinkerpop.gremlin.process.traversal.Path;
import org.apache.tinkerpop.gremlin.process.traversal.Pop;
@@ -27,6 +26,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
import org.apache.tinkerpop.gremlin.process.traversal.step.util.Tree;
import org.apache.tinkerpop.gremlin.process.traversal.traverser.util.TraverserSet;
+import org.apache.tinkerpop.gremlin.structure.Column;
import org.apache.tinkerpop.gremlin.structure.Direction;
import org.apache.tinkerpop.gremlin.structure.Edge;
import org.apache.tinkerpop.gremlin.structure.Property;
@@ -114,6 +114,13 @@ public class __ {
}
/**
+ * @see {@link GraphTraversal#V(Object...)}
+ */
+ public static <A> GraphTraversal<A, Vertex> V(final Object... vertexIdsOrElements) {
+ return __.<A>start().V(vertexIdsOrElements);
+ }
+
+ /**
* @see {@link GraphTraversal#to(Direction, String...)}
*/
public static <A> GraphTraversal<A, Vertex> to(final Direction direction, final String... edgeLabels) {
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5c5bd06e/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphStep.java
new file mode 100644
index 0000000..665f934
--- /dev/null
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphStep.java
@@ -0,0 +1,132 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.process.traversal.step.map;
+
+import org.apache.tinkerpop.gremlin.process.traversal.Step;
+import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
+import org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine;
+import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
+import org.apache.tinkerpop.gremlin.process.traversal.step.EngineDependent;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep;
+import org.apache.tinkerpop.gremlin.process.traversal.util.FastNoSuchElementException;
+import org.apache.tinkerpop.gremlin.structure.Edge;
+import org.apache.tinkerpop.gremlin.structure.Element;
+import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.tinkerpop.gremlin.structure.util.StringFactory;
+import org.apache.tinkerpop.gremlin.util.iterator.EmptyIterator;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.function.Supplier;
+
+/**
+ * @author Marko A. Rodriguez (http://markorodriguez.com)
+ * @author Pieter Martin
+ */
+public class GraphStep<S, E extends Element> extends AbstractStep<S, E> implements EngineDependent {
+
+ protected final Class<E> returnClass;
+ protected Object[] ids;
+ protected transient Supplier<Iterator<E>> iteratorSupplier;
+ protected boolean isStart;
+ protected boolean done = false;
+ private Traverser.Admin<S> head = null;
+ private Iterator<E> iterator = EmptyIterator.instance();
+
+
+ public GraphStep(final Traversal.Admin traversal, final Class<E> returnClass, final boolean isStart, final Object... ids) {
+ super(traversal);
+ this.returnClass = returnClass;
+ this.ids = (ids.length == 1 && ids[0] instanceof Collection) ? ((Collection) ids[0]).toArray(new Object[((Collection) ids[0]).size()]) : ids;
+ this.isStart = isStart;
+ this.iteratorSupplier = () -> (Iterator<E>) (Vertex.class.isAssignableFrom(this.returnClass) ?
+ this.getTraversal().getGraph().get().vertices(this.ids) :
+ this.getTraversal().getGraph().get().edges(this.ids));
+ }
+
+ public String toString() {
+ return StringFactory.stepString(this, Arrays.toString(this.ids), this.returnClass.getSimpleName().toLowerCase());
+ }
+
+ public Class<E> getReturnClass() {
+ return this.returnClass;
+ }
+
+ public boolean isStartStep() {
+ return this.isStart;
+ }
+
+ public static boolean isStartStep(final Step<?, ?> step) {
+ return step instanceof GraphStep && ((GraphStep) step).isStartStep();
+ }
+
+ public boolean returnsVertex() {
+ return this.returnClass.equals(Vertex.class);
+ }
+
+ public boolean returnsEdge() {
+ return this.returnClass.equals(Edge.class);
+ }
+
+ public void setIteratorSupplier(final Supplier<Iterator<E>> iteratorSupplier) {
+ this.iteratorSupplier = iteratorSupplier;
+ }
+
+ public Object[] getIds() {
+ return this.ids;
+ }
+
+ public void clearIds() {
+ this.ids = new Object[0];
+ }
+
+ @Override
+ public void onEngine(final TraversalEngine traversalEngine) {
+ if (traversalEngine.isComputer()) {
+ this.iteratorSupplier = Collections::emptyIterator;
+ for (int i = 0; i < this.ids.length; i++) { // if this is going to OLAP, convert to ids so you don't serialize elements
+ if (this.ids[i] instanceof Element)
+ this.ids[i] = ((Element) this.ids[i]).id();
+ }
+ }
+ }
+
+ @Override
+ protected Traverser<E> processNextStart() {
+ while (true) {
+ if (this.iterator.hasNext()) {
+ return this.isStart ? this.getTraversal().getTraverserGenerator().generate(this.iterator.next(), (Step) this, 1l) : this.head.split(this.iterator.next(), this);
+ } else {
+ if (this.isStart) {
+ if (this.done)
+ throw FastNoSuchElementException.instance();
+ else {
+ this.done = true;
+ this.iterator = null == this.iteratorSupplier ? EmptyIterator.instance() : this.iteratorSupplier.get();
+ }
+ } else {
+ this.head = this.starts.next();
+ this.iterator = null == this.iteratorSupplier ? EmptyIterator.instance() : this.iteratorSupplier.get();
+ }
+ }
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5c5bd06e/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/GraphStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/GraphStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/GraphStep.java
deleted file mode 100644
index b0472b2..0000000
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/GraphStep.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect;
-
-import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
-import org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine;
-import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
-import org.apache.tinkerpop.gremlin.process.traversal.step.EngineDependent;
-import org.apache.tinkerpop.gremlin.structure.Edge;
-import org.apache.tinkerpop.gremlin.structure.Element;
-import org.apache.tinkerpop.gremlin.structure.Vertex;
-import org.apache.tinkerpop.gremlin.structure.util.StringFactory;
-import org.apache.tinkerpop.gremlin.util.iterator.EmptyIterator;
-
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.function.Supplier;
-
-/**
- * @author Marko A. Rodriguez (http://markorodriguez.com)
- * @author Pieter Martin
- */
-public class GraphStep<S extends Element> extends StartStep<S> implements EngineDependent {
-
- protected final Class<S> returnClass;
- protected Object[] ids;
- protected transient Supplier<Iterator<S>> iteratorSupplier;
-
- public GraphStep(final Traversal.Admin traversal, final Class<S> returnClass, final Object... ids) {
- super(traversal);
- this.returnClass = returnClass;
- this.ids = (ids.length == 1 && ids[0] instanceof Collection) ? ((Collection) ids[0]).toArray(new Object[((Collection) ids[0]).size()]) : ids;
- this.iteratorSupplier = () -> (Iterator<S>) (Vertex.class.isAssignableFrom(this.returnClass) ?
- this.getTraversal().getGraph().get().vertices(this.ids) :
- this.getTraversal().getGraph().get().edges(this.ids));
- }
-
- public String toString() {
- return StringFactory.stepString(this, Arrays.toString(this.ids), this.returnClass.getSimpleName().toLowerCase());
- }
-
- public Class<S> getReturnClass() {
- return this.returnClass;
- }
-
- public boolean returnsVertex() {
- return this.returnClass.equals(Vertex.class);
- }
-
- public boolean returnsEdge() {
- return this.returnClass.equals(Edge.class);
- }
-
- public void setIteratorSupplier(final Supplier<Iterator<S>> iteratorSupplier) {
- this.iteratorSupplier = iteratorSupplier;
- }
-
- public Object[] getIds() {
- return this.ids;
- }
-
- public void clearIds() {
- this.ids = new Object[0];
- }
-
- @Override
- public void onEngine(final TraversalEngine traversalEngine) {
- if (traversalEngine.isComputer()) {
- this.iteratorSupplier = Collections::emptyIterator;
- for(int i=0; i<this.ids.length; i++) { // if this is going to OLAP, convert to ids so you don't serialize elements
- if(this.ids[i] instanceof Element)
- this.ids[i] = ((Element)this.ids[i]).id();
- }
- }
- }
-
- @Override
- protected Traverser<S> processNextStart() {
- if (this.first)
- this.start = null == this.iteratorSupplier ? EmptyIterator.instance() : this.iteratorSupplier.get();
- return super.processNextStart();
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5c5bd06e/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/ConjunctionStrategy.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/ConjunctionStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/ConjunctionStrategy.java
index 7bf7177..3da7740 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/ConjunctionStrategy.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/ConjunctionStrategy.java
@@ -25,6 +25,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
import org.apache.tinkerpop.gremlin.process.traversal.step.filter.AndStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.filter.ConjunctionStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.filter.OrStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.ProfileStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.StartStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.util.ComputerAwareStep;
@@ -62,7 +63,7 @@ public final class ConjunctionStrategy extends AbstractTraversalStrategy<Travers
}
private static boolean legalCurrentStep(final Step<?, ?> step) {
- return !(step instanceof EmptyStep || step instanceof ProfileStep || step instanceof ComputerAwareStep.EndStep || (step instanceof StartStep && !StartStep.isVariableStartStep(step)));
+ return !(step instanceof EmptyStep || step instanceof ProfileStep || step instanceof ComputerAwareStep.EndStep || (step instanceof StartStep && !StartStep.isVariableStartStep(step)) || GraphStep.isStartStep(step));
}
private static void processConjunctionMarkers(final Traversal.Admin<?, ?> traversal) {
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5c5bd06e/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/ElementIdStrategy.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/ElementIdStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/ElementIdStrategy.java
index 2965c96..40ac805 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/ElementIdStrategy.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/ElementIdStrategy.java
@@ -29,7 +29,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.map.AddVertexStartSte
import org.apache.tinkerpop.gremlin.process.traversal.step.map.AddVertexStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.IdStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.PropertiesStep;
-import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GraphStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.util.HasContainer;
import org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy;
import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper;
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5c5bd06e/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/PartitionStrategy.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/PartitionStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/PartitionStrategy.java
index aaabddc..58e641b 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/PartitionStrategy.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/PartitionStrategy.java
@@ -38,7 +38,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.map.PropertiesStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.PropertyMapStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.VertexStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.AddPropertyStep;
-import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GraphStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.util.HasContainer;
import org.apache.tinkerpop.gremlin.process.traversal.step.util.Parameters;
import org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy;
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5c5bd06e/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategy.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategy.java
index 3b2767c..e2488fb 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategy.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategy.java
@@ -29,7 +29,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.map.AddVertexStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.EdgeOtherVertexStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.EdgeVertexStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.VertexStep;
-import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GraphStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphStep;
import org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy;
import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper;
import org.apache.tinkerpop.gremlin.structure.Direction;
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5c5bd06e/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/finalization/LazyBarrierStrategy.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/finalization/LazyBarrierStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/finalization/LazyBarrierStrategy.java
index d9b6ae1..cb58762 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/finalization/LazyBarrierStrategy.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/finalization/LazyBarrierStrategy.java
@@ -25,7 +25,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.HasContainerHolder;
import org.apache.tinkerpop.gremlin.process.traversal.step.filter.FilterStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.EdgeVertexStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.VertexStep;
-import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GraphStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.util.CollectingBarrierStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.LambdaCollectingBarrierStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.util.ReducingBarrierStep;
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5c5bd06e/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/ComputerVerificationStrategy.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/ComputerVerificationStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/ComputerVerificationStrategy.java
index 259531a..bb0c453 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/ComputerVerificationStrategy.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/ComputerVerificationStrategy.java
@@ -35,8 +35,8 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.filter.RangeGlobalSte
import org.apache.tinkerpop.gremlin.process.traversal.step.filter.TailGlobalStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.filter.WherePredicateStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.filter.WhereTraversalStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.OrderGlobalStep;
-import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GraphStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.InjectStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SubgraphStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.util.CollectingBarrierStep;
@@ -46,9 +46,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.util.ReducingBarrierS
import org.apache.tinkerpop.gremlin.process.traversal.step.util.SupplyingBarrierStep;
import org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy;
import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper;
-import org.apache.tinkerpop.gremlin.structure.Edge;
import org.apache.tinkerpop.gremlin.structure.T;
-import org.apache.tinkerpop.gremlin.structure.Vertex;
import java.util.Arrays;
import java.util.HashSet;
@@ -82,6 +80,9 @@ public final class ComputerVerificationStrategy extends AbstractTraversalStrateg
if (!(traversal.getStartStep() instanceof GraphStep))
throw new VerificationException("GraphComputer does not support traversals starting from a non-GraphStep: " + traversal.getStartStep(), traversal);
///
+ if (traversal.getSteps().stream().filter(step -> step instanceof GraphStep).count() > 1)
+ throw new VerificationException("GraphComputer does not support mid-traversal V()/E()", traversal);
+ ///
if (endStep instanceof CollectingBarrierStep && endStep instanceof TraversalParent) {
if (((TraversalParent) endStep).getLocalChildren().stream().filter(t ->
!(t instanceof IdentityTraversal) &&
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5c5bd06e/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/ElementIdStrategyTraverseTest.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/ElementIdStrategyTraverseTest.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/ElementIdStrategyTraverseTest.java
index f05d938..5e8f4f9 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/ElementIdStrategyTraverseTest.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/ElementIdStrategyTraverseTest.java
@@ -26,7 +26,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.map.AddEdgeStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.AddVertexStartStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.AddVertexStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.PropertiesStep;
-import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GraphStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphStep;
import org.apache.tinkerpop.gremlin.structure.Graph;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Test;
@@ -49,7 +49,7 @@ public class ElementIdStrategyTraverseTest {
static {
final Graph mockedGraph = mock(Graph.class);
final DefaultGraphTraversal t = new DefaultGraphTraversal<>(mockedGraph);
- t.asAdmin().addStep(new GraphStep<>(t.asAdmin(), Vertex.class));
+ t.asAdmin().addStep(new GraphStep<>(t.asAdmin(), Vertex.class, true));
traversalWithAddV = t.addV();
}
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5c5bd06e/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/PartitionStrategyTraverseTest.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/PartitionStrategyTraverseTest.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/PartitionStrategyTraverseTest.java
index b2e075f..a8f809a 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/PartitionStrategyTraverseTest.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/PartitionStrategyTraverseTest.java
@@ -26,7 +26,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.filter.HasStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.AddEdgeStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.AddVertexStartStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.AddVertexStep;
-import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GraphStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.util.HasContainer;
import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper;
import org.apache.tinkerpop.gremlin.structure.Edge;
@@ -149,7 +149,7 @@ public class PartitionStrategyTraverseTest {
when(features.vertex()).thenReturn(vertexFeatures);
when(vertexFeatures.getCardinality(any())).thenReturn(VertexProperty.Cardinality.single);
final DefaultGraphTraversal t = new DefaultGraphTraversal<>(mockedGraph);
- if (clazz != null) t.asAdmin().addStep(new GraphStep<>(t.asAdmin(), clazz));
+ if (clazz != null) t.asAdmin().addStep(new GraphStep<>(t.asAdmin(), clazz, true));
return t;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5c5bd06e/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategyTraverseTest.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategyTraverseTest.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategyTraverseTest.java
index 5ca15e6..c0778e0 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategyTraverseTest.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategyTraverseTest.java
@@ -22,9 +22,8 @@ import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.DefaultGraphTraversal;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
import org.apache.tinkerpop.gremlin.process.traversal.step.filter.TraversalFilterStep;
-import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GraphStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphStep;
import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper;
-import org.apache.tinkerpop.gremlin.structure.Direction;
import org.apache.tinkerpop.gremlin.structure.Graph;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Test;
@@ -47,7 +46,7 @@ public class SubgraphStrategyTraverseTest {
static {
final Graph mockedGraph = mock(Graph.class);
final DefaultGraphTraversal t = new DefaultGraphTraversal<>(mockedGraph);
- t.asAdmin().addStep(new GraphStep<>(t.asAdmin(), Vertex.class));
+ t.asAdmin().addStep(new GraphStep<>(t.asAdmin(), Vertex.class, true));
traversalWithAddV = t.addV();
}
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5c5bd06e/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyGraphTest.groovy
----------------------------------------------------------------------
diff --git a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyGraphTest.groovy b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyGraphTest.groovy
new file mode 100644
index 0000000..a010006
--- /dev/null
+++ b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyGraphTest.groovy
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tinkerpop.gremlin.process.traversal.step.map
+
+import org.apache.tinkerpop.gremlin.process.traversal.Traversal
+import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalScriptHelper
+import org.apache.tinkerpop.gremlin.structure.Vertex
+
+/**
+ * @author Marko A. Rodriguez (http://markorodriguez.com)
+ */
+public abstract class GroovyGraphTest {
+
+ public static class Traversals extends GraphTest {
+ @Override
+ public Traversal<Vertex, String> get_g_VX1X_V_valuesXnameX(final Object v1Id) {
+ TraversalScriptHelper.compute("g.V(v1Id).V.name", g, "v1Id", v1Id);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5c5bd06e/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/process/GroovyProcessComputerSuite.java
----------------------------------------------------------------------
diff --git a/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/process/GroovyProcessComputerSuite.java b/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/process/GroovyProcessComputerSuite.java
index 55d67e4..2c1381c 100644
--- a/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/process/GroovyProcessComputerSuite.java
+++ b/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/process/GroovyProcessComputerSuite.java
@@ -48,6 +48,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.map.GroovyCoalesceTes
import org.apache.tinkerpop.gremlin.process.traversal.step.map.GroovyConstantTest;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.GroovyCountTest;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.GroovyFoldTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.GroovyGraphTest;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.GroovyLoopsTest;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.GroovyMapKeysTest;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.GroovyMapTest;
@@ -127,6 +128,7 @@ public class GroovyProcessComputerSuite extends ProcessComputerSuite {
GroovyConstantTest.Traversals.class,
GroovyCountTest.Traversals.class,
GroovyFoldTest.Traversals.class,
+ GroovyGraphTest.Traversals.class,
GroovyLoopsTest.Traversals.class,
GroovyMapTest.Traversals.class,
GroovyMapKeysTest.Traversals.class,
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5c5bd06e/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/process/GroovyProcessStandardSuite.java
----------------------------------------------------------------------
diff --git a/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/process/GroovyProcessStandardSuite.java b/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/process/GroovyProcessStandardSuite.java
index bd05ce0..1698eed 100644
--- a/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/process/GroovyProcessStandardSuite.java
+++ b/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/process/GroovyProcessStandardSuite.java
@@ -49,6 +49,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.map.GroovyCoalesceTes
import org.apache.tinkerpop.gremlin.process.traversal.step.map.GroovyConstantTest;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.GroovyCountTest;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.GroovyFoldTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.GroovyGraphTest;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.GroovyLoopsTest;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.GroovyMapKeysTest;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.GroovyMapTest;
@@ -126,6 +127,7 @@ public class GroovyProcessStandardSuite extends ProcessStandardSuite {
GroovyConstantTest.Traversals.class,
GroovyCountTest.Traversals.class,
GroovyFoldTest.Traversals.class,
+ GroovyGraphTest.Traversals.class,
GroovyLoopsTest.Traversals.class,
GroovyMapTest.Traversals.class,
GroovyMapKeysTest.Traversals.class,
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5c5bd06e/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessComputerSuite.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessComputerSuite.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessComputerSuite.java
index e2d4476..3943b92 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessComputerSuite.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessComputerSuite.java
@@ -48,6 +48,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.map.ConstantTest;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.CountTest;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.FlatMapTest;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.FoldTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphTest;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.LoopsTest;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.MapKeysTest;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.MapTest;
@@ -133,6 +134,7 @@ public class ProcessComputerSuite extends AbstractGremlinSuite {
CountTest.Traversals.class,
FlatMapTest.Traversals.class,
FoldTest.Traversals.class,
+ GraphTest.Traversals.class,
LoopsTest.Traversals.class,
MapTest.Traversals.class,
MapKeysTest.Traversals.class,
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5c5bd06e/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessStandardSuite.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessStandardSuite.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessStandardSuite.java
index ccb2848..1091812 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessStandardSuite.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessStandardSuite.java
@@ -48,6 +48,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.map.ConstantTest;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.CountTest;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.FlatMapTest;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.FoldTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphTest;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.LoopsTest;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.MapKeysTest;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.MapTest;
@@ -133,6 +134,7 @@ public class ProcessStandardSuite extends AbstractGremlinSuite {
CountTest.Traversals.class,
FlatMapTest.Traversals.class,
FoldTest.Traversals.class,
+ GraphTest.Traversals.class,
LoopsTest.Traversals.class,
MapTest.Traversals.class,
MapKeysTest.Traversals.class,
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5c5bd06e/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphTest.java
new file mode 100644
index 0000000..77804ca
--- /dev/null
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphTest.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tinkerpop.gremlin.process.traversal.step.map;
+
+import org.apache.tinkerpop.gremlin.LoadGraphWith;
+import org.apache.tinkerpop.gremlin.process.AbstractGremlinProcessTest;
+import org.apache.tinkerpop.gremlin.process.GremlinProcessRunner;
+import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
+import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.util.Arrays;
+
+import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData.MODERN;
+
+/**
+ * @author Marko A. Rodriguez (http://markorodriguez.com)
+ */
+@RunWith(GremlinProcessRunner.class)
+public abstract class GraphTest extends AbstractGremlinProcessTest {
+
+ public abstract Traversal<Vertex, String> get_g_VX1X_V_valuesXnameX(final Object v1Id);
+
+ @Test
+ @LoadGraphWith(MODERN)
+ public void g_VX1X_V_valuesXnameX() {
+ final Traversal<Vertex, String> traversal = get_g_VX1X_V_valuesXnameX(convertToVertexId(graph, "marko"));
+ printTraversalForm(traversal);
+ checkResults(Arrays.asList("marko", "vadas", "lop", "josh", "ripple", "peter"), traversal);
+ }
+
+ public static class Traversals extends GraphTest {
+
+ @Override
+ public Traversal<Vertex, String> get_g_VX1X_V_valuesXnameX(final Object v1Id) {
+ return g.V(v1Id).V().values("name");
+ }
+ }
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5c5bd06e/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/step/sideEffect/Neo4jGraphStep.java
----------------------------------------------------------------------
diff --git a/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/step/sideEffect/Neo4jGraphStep.java b/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/step/sideEffect/Neo4jGraphStep.java
index 488f0d2..3c22567 100644
--- a/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/step/sideEffect/Neo4jGraphStep.java
+++ b/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/step/sideEffect/Neo4jGraphStep.java
@@ -20,7 +20,7 @@ package org.apache.tinkerpop.gremlin.neo4j.process.traversal.step.sideEffect;
import org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jGraph;
import org.apache.tinkerpop.gremlin.process.traversal.step.HasContainerHolder;
-import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GraphStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.util.HasContainer;
import org.apache.tinkerpop.gremlin.structure.Edge;
import org.apache.tinkerpop.gremlin.structure.Element;
@@ -39,14 +39,14 @@ import java.util.List;
* @author Stephen Mallette (http://stephen.genoprime.com)
* @author Pieter Martin
*/
-public final class Neo4jGraphStep<S extends Element> extends GraphStep<S> implements HasContainerHolder {
+public final class Neo4jGraphStep<S, E extends Element> extends GraphStep<S, E> implements HasContainerHolder {
private final List<HasContainer> hasContainers = new ArrayList<>();
- public Neo4jGraphStep(final GraphStep<S> originalGraphStep) {
- super(originalGraphStep.getTraversal(), originalGraphStep.getReturnClass(), originalGraphStep.getIds());
+ public Neo4jGraphStep(final GraphStep<S, E> originalGraphStep) {
+ super(originalGraphStep.getTraversal(), originalGraphStep.getReturnClass(), originalGraphStep.isStartStep(), originalGraphStep.getIds());
originalGraphStep.getLabels().forEach(this::addLabel);
- this.setIteratorSupplier(() -> (Iterator<S>) (Vertex.class.isAssignableFrom(this.returnClass) ? this.vertices() : this.edges()));
+ this.setIteratorSupplier(() -> (Iterator<E>) (Vertex.class.isAssignableFrom(this.returnClass) ? this.vertices() : this.edges()));
}
private Iterator<? extends Edge> edges() {
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5c5bd06e/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/strategy/optimization/Neo4jGraphStepStrategy.java
----------------------------------------------------------------------
diff --git a/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/strategy/optimization/Neo4jGraphStepStrategy.java b/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/strategy/optimization/Neo4jGraphStepStrategy.java
index daf8276..2ec4deb 100644
--- a/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/strategy/optimization/Neo4jGraphStepStrategy.java
+++ b/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/strategy/optimization/Neo4jGraphStepStrategy.java
@@ -23,7 +23,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.Step;
import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy;
import org.apache.tinkerpop.gremlin.process.traversal.step.HasContainerHolder;
-import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GraphStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphStep;
import org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy;
import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper;
@@ -43,12 +43,9 @@ public final class Neo4jGraphStepStrategy extends AbstractTraversalStrategy<Trav
if (traversal.getEngine().isComputer())
return;
- final Step<?, ?> startStep = traversal.getStartStep();
- if (startStep instanceof GraphStep) {
- final GraphStep<?> originalGraphStep = (GraphStep) startStep;
- final Neo4jGraphStep<?> neo4jGraphStep = new Neo4jGraphStep<>(originalGraphStep);
- TraversalHelper.replaceStep(startStep, (Step) neo4jGraphStep, traversal);
-
+ TraversalHelper.getStepsOfClass(GraphStep.class, traversal).forEach(originalGraphStep -> {
+ final Neo4jGraphStep<?, ?> neo4jGraphStep = new Neo4jGraphStep<>(originalGraphStep);
+ TraversalHelper.replaceStep(originalGraphStep, (Step) neo4jGraphStep, traversal);
Step<?, ?> currentStep = neo4jGraphStep.getNextStep();
while (currentStep instanceof HasContainerHolder) {
((HasContainerHolder) currentStep).getHasContainers().forEach(neo4jGraphStep::addHasContainer);
@@ -56,7 +53,7 @@ public final class Neo4jGraphStepStrategy extends AbstractTraversalStrategy<Trav
traversal.removeStep(currentStep);
currentStep = currentStep.getNextStep();
}
- }
+ });
}
public static Neo4jGraphStepStrategy instance() {
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5c5bd06e/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/step/sideEffect/TinkerGraphStep.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/step/sideEffect/TinkerGraphStep.java b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/step/sideEffect/TinkerGraphStep.java
index 39bec60..b0a5714 100644
--- a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/step/sideEffect/TinkerGraphStep.java
+++ b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/step/sideEffect/TinkerGraphStep.java
@@ -20,7 +20,7 @@ package org.apache.tinkerpop.gremlin.tinkergraph.process.traversal.step.sideEffe
import org.apache.tinkerpop.gremlin.process.traversal.Compare;
import org.apache.tinkerpop.gremlin.process.traversal.step.HasContainerHolder;
-import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GraphStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.util.HasContainer;
import org.apache.tinkerpop.gremlin.structure.Edge;
import org.apache.tinkerpop.gremlin.structure.Element;
@@ -41,19 +41,19 @@ import java.util.stream.Collectors;
* @author Marko A. Rodriguez (http://markorodriguez.com)
* @author Pieter Martin
*/
-public final class TinkerGraphStep<S extends Element> extends GraphStep<S> implements HasContainerHolder {
+public final class TinkerGraphStep<S, E extends Element> extends GraphStep<S, E> implements HasContainerHolder {
private final List<HasContainer> hasContainers = new ArrayList<>();
- public TinkerGraphStep(final GraphStep<S> originalGraphStep) {
- super(originalGraphStep.getTraversal(), originalGraphStep.getReturnClass(), originalGraphStep.getIds());
+ public TinkerGraphStep(final GraphStep<S, E> originalGraphStep) {
+ super(originalGraphStep.getTraversal(), originalGraphStep.getReturnClass(), originalGraphStep.isStartStep(), originalGraphStep.getIds());
originalGraphStep.getLabels().forEach(this::addLabel);
// we used to only setIteratorSupplier() if there were no ids OR the first id was instanceof Element,
// but that allowed the filter in g.V(v).has('k','v') to be ignored. this created problems for
// PartitionStrategy which wants to prevent someone from passing "v" from one TraversalSource to
// another TraversalSource using a different partition
- this.setIteratorSupplier(() -> (Iterator<S>) (Vertex.class.isAssignableFrom(this.returnClass) ? this.vertices() : this.edges()));
+ this.setIteratorSupplier(() -> (Iterator<E>) (Vertex.class.isAssignableFrom(this.returnClass) ? this.vertices() : this.edges()));
}
private Iterator<? extends Edge> edges() {
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5c5bd06e/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/optimization/TinkerGraphStepStrategy.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/optimization/TinkerGraphStepStrategy.java b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/optimization/TinkerGraphStepStrategy.java
index 25ce6a7..05e9c20 100644
--- a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/optimization/TinkerGraphStepStrategy.java
+++ b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/optimization/TinkerGraphStepStrategy.java
@@ -22,7 +22,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.Step;
import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy;
import org.apache.tinkerpop.gremlin.process.traversal.step.HasContainerHolder;
-import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GraphStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphStep;
import org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy;
import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper;
import org.apache.tinkerpop.gremlin.tinkergraph.process.traversal.step.sideEffect.TinkerGraphStep;
@@ -42,12 +42,9 @@ public final class TinkerGraphStepStrategy extends AbstractTraversalStrategy<Tra
if (traversal.getEngine().isComputer())
return;
- final Step<?, ?> startStep = traversal.getStartStep();
- if (startStep instanceof GraphStep) {
- final GraphStep<?> originalGraphStep = (GraphStep) startStep;
- final TinkerGraphStep<?> tinkerGraphStep = new TinkerGraphStep<>(originalGraphStep);
- TraversalHelper.replaceStep(startStep, (Step) tinkerGraphStep, traversal);
-
+ TraversalHelper.getStepsOfClass(GraphStep.class, traversal).forEach(originalGraphStep -> {
+ final TinkerGraphStep<?,?> tinkerGraphStep = new TinkerGraphStep<>(originalGraphStep);
+ TraversalHelper.replaceStep(originalGraphStep, (Step) tinkerGraphStep, traversal);
Step<?, ?> currentStep = tinkerGraphStep.getNextStep();
while (currentStep instanceof HasContainerHolder) {
((HasContainerHolder) currentStep).getHasContainers().forEach(tinkerGraphStep::addHasContainer);
@@ -55,7 +52,7 @@ public final class TinkerGraphStepStrategy extends AbstractTraversalStrategy<Tra
traversal.removeStep(currentStep);
currentStep = currentStep.getNextStep();
}
- }
+ });
}
public static TinkerGraphStepStrategy instance() {
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5c5bd06e/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/optimization/TinkerGraphStepStrategyTest.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/optimization/TinkerGraphStepStrategyTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/optimization/TinkerGraphStepStrategyTest.java
index 0535f54..2abc802 100644
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/optimization/TinkerGraphStepStrategyTest.java
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/strategy/optimization/TinkerGraphStepStrategyTest.java
@@ -47,8 +47,8 @@ public class TinkerGraphStepStrategyTest {
assertEquals(TinkerGraphStep.class, traversal.getStartStep().getClass());
assertEquals(TinkerGraphStep.class, traversal.getEndStep().getClass());
assertEquals(1, ((TinkerGraphStep) traversal.getStartStep()).getHasContainers().size());
- assertEquals("name", ((TinkerGraphStep<?>) traversal.getStartStep()).getHasContainers().get(0).getKey());
- assertEquals("marko", ((TinkerGraphStep<?>) traversal.getStartStep()).getHasContainers().get(0).getValue());
+ assertEquals("name", ((TinkerGraphStep<?,?>) traversal.getStartStep()).getHasContainers().get(0).getKey());
+ assertEquals("marko", ((TinkerGraphStep<?,?>) traversal.getStartStep()).getHasContainers().get(0).getValue());
////
traversal = g.V().has("name", "marko").has("age", P.gt(20)).asAdmin();
traversal.applyStrategies();
@@ -61,8 +61,8 @@ public class TinkerGraphStepStrategyTest {
assertEquals(3, traversal.getSteps().size());
assertEquals(TinkerGraphStep.class, traversal.getStartStep().getClass());
assertEquals(1, ((TinkerGraphStep) traversal.getStartStep()).getHasContainers().size());
- assertEquals("name", ((TinkerGraphStep<?>) traversal.getStartStep()).getHasContainers().get(0).getKey());
- assertEquals("marko", ((TinkerGraphStep<?>) traversal.getStartStep()).getHasContainers().get(0).getValue());
+ assertEquals("name", ((TinkerGraphStep<?,?>) traversal.getStartStep()).getHasContainers().get(0).getKey());
+ assertEquals("marko", ((TinkerGraphStep<?,?>) traversal.getStartStep()).getHasContainers().get(0).getValue());
assertEquals(HasStep.class, traversal.getEndStep().getClass());
}
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5c5bd06e/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphPlayTest.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphPlayTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphPlayTest.java
index 1228947..06994e2 100644
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphPlayTest.java
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphPlayTest.java
@@ -47,6 +47,17 @@ public class TinkerGraphPlayTest {
@Test
@Ignore
+ public void testPlay8() throws Exception {
+ Graph graph = TinkerFactory.createModern();
+ GraphTraversalSource g = graph.traversal(); //GraphTraversalSource.computer());
+ Traversal traversal = g.V(1).V().values("name");
+ traversal.forEachRemaining(System.out::println);
+ System.out.println(traversal);
+
+ }
+
+ @Test
+ @Ignore
public void benchmarkGroup() throws Exception {
Graph graph = TinkerGraph.open();
GraphTraversalSource g = graph.traversal(GraphTraversalSource.computer());