You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by dk...@apache.org on 2016/03/28 19:06:16 UTC
[01/31] incubator-tinkerpop git commit: Update slf4j to 1.7.19
Repository: incubator-tinkerpop
Updated Branches:
refs/heads/docker b3b38444f -> fa6da7ee7
Update slf4j to 1.7.19
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/fc40b933
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/fc40b933
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/fc40b933
Branch: refs/heads/docker
Commit: fc40b9338e6bd7d6cc7c050fa5b0df0e916be593
Parents: da5abb0
Author: Hendy Irawan <he...@hendyirawan.com>
Authored: Tue Mar 15 20:13:23 2016 +0700
Committer: Hendy Irawan <he...@hendyirawan.com>
Committed: Tue Mar 15 20:13:23 2016 +0700
----------------------------------------------------------------------
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/fc40b933/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index acef6c6..29d7f4c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -133,7 +133,7 @@ limitations under the License.
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<skipIntegrationTests>true</skipIntegrationTests>
<skipPerformanceTests>true</skipPerformanceTests>
- <slf4j.version>1.7.12</slf4j.version>
+ <slf4j.version>1.7.19</slf4j.version>
<hadoop.version>2.7.1</hadoop.version>
<java.tuples.version>1.2</java.tuples.version>
<javadoc-plugin.version>2.10.1</javadoc-plugin.version>
[20/31] incubator-tinkerpop git commit: initialize JAVA_OPTIONS if
it's not already set
Posted by dk...@apache.org.
initialize JAVA_OPTIONS if it's not already set
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/2749d8d8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/2749d8d8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/2749d8d8
Branch: refs/heads/docker
Commit: 2749d8d885f8aec60466ba7411e7dd13e155f62d
Parents: 7d3731b
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Thu Mar 24 21:10:11 2016 +0100
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Thu Mar 24 21:10:11 2016 +0100
----------------------------------------------------------------------
gremlin-console/src/main/bin/gremlin.sh | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/2749d8d8/gremlin-console/src/main/bin/gremlin.sh
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/bin/gremlin.sh b/gremlin-console/src/main/bin/gremlin.sh
index 215e69f..f6e8051 100755
--- a/gremlin-console/src/main/bin/gremlin.sh
+++ b/gremlin-console/src/main/bin/gremlin.sh
@@ -24,6 +24,7 @@ set -u
DIR="$( cd -P "$( dirname "$0" )" && pwd )"
SYSTEM_EXT_DIR="${DIR}/../ext"
+JAVA_OPTIONS=${JAVA_OPTIONS:-}
if [ ! -z "${JAVA_OPTIONS}" ]; then
USER_EXT_DIR=$(grep -o '\-Dtinkerpop.ext=\(\([^"][^ ]*\)\|\("[^"]*"\)\)' <<< "${JAVA_OPTIONS}" | cut -f2 -d '=' | xargs -0 echo)
[22/31] incubator-tinkerpop git commit: Changed test settings to not
log WARN for the eval processor.
Posted by dk...@apache.org.
Changed test settings to not log WARN for the eval processor.
The output was overly verbose and didn't really provide too much information for tests that were passing/failing.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/80a47c63
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/80a47c63
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/80a47c63
Branch: refs/heads/docker
Commit: 80a47c635c92f7be1af4eaa7874d87b8243e0423
Parents: 58f912b
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Mar 25 07:48:59 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Mar 25 07:48:59 2016 -0400
----------------------------------------------------------------------
gremlin-server/src/test/resources/log4j-test.properties | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/80a47c63/gremlin-server/src/test/resources/log4j-test.properties
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/resources/log4j-test.properties b/gremlin-server/src/test/resources/log4j-test.properties
index ef436fe..f3e437b 100644
--- a/gremlin-server/src/test/resources/log4j-test.properties
+++ b/gremlin-server/src/test/resources/log4j-test.properties
@@ -18,4 +18,6 @@
log4j.rootLogger=WARN, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=[%p] %C - %m%n
\ No newline at end of file
+log4j.appender.stdout.layout.ConversionPattern=[%p] %C - %m%n
+
+log4j.logger.org.apache.tinkerpop.gremlin.server.op.AbstractEvalOpProcessor=ERROR
\ No newline at end of file
[16/31] incubator-tinkerpop git commit: removed jackson from NOTICE
files
Posted by dk...@apache.org.
removed jackson from NOTICE files
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/18b2fe6f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/18b2fe6f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/18b2fe6f
Branch: refs/heads/docker
Commit: 18b2fe6f8b23ccf6c9e6dc593ae6a943291de8ab
Parents: 2f32f0c
Author: Dylan Millikin <dm...@apache.org>
Authored: Thu Mar 24 02:50:52 2016 -0400
Committer: Dylan Millikin <dm...@apache.org>
Committed: Thu Mar 24 02:50:52 2016 -0400
----------------------------------------------------------------------
gremlin-console/src/main/static/NOTICE | 24 ------------------------
gremlin-server/src/main/static/NOTICE | 24 ------------------------
2 files changed, 48 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/18b2fe6f/gremlin-console/src/main/static/NOTICE
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/static/NOTICE b/gremlin-console/src/main/static/NOTICE
index 0901755..6e8865f 100644
--- a/gremlin-console/src/main/static/NOTICE
+++ b/gremlin-console/src/main/static/NOTICE
@@ -57,27 +57,3 @@ Copyright (c) 2010, The JAVATUPLES team (http://www.javatuples.org)
Netty
------------------------------------------------------------------------
Copyright 2014 The Netty Project
-
-------------------------------------------------------------------------
-Jackson databind - shaded in gremlin-shaded to org.apache.tinkerpop.shaded.jackson
-------------------------------------------------------------------------
-# Jackson JSON processor
-
-Jackson is a high-performance, Free/Open Source JSON processing library.
-It was originally written by Tatu Saloranta (tatu.saloranta@iki.fi), and has
-been in development since 2007.
-It is currently developed by a community of developers, as well as supported
-commercially by FasterXML.com.
-
-## Licensing
-
-Jackson core and extension components may be licensed under different licenses.
-To find the details that apply to this artifact see the accompanying LICENSE file.
-For more information, including possible other licensing options, contact
-FasterXML.com (http://fasterxml.com).
-
-## Credits
-
-A list of contributors may be found from CREDITS file, which is included
-in some artifacts (usually source distributions); but is always available
-from the source code management (SCM) system project uses.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/18b2fe6f/gremlin-server/src/main/static/NOTICE
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/static/NOTICE b/gremlin-server/src/main/static/NOTICE
index 9055cf6..13a3bc6 100644
--- a/gremlin-server/src/main/static/NOTICE
+++ b/gremlin-server/src/main/static/NOTICE
@@ -58,27 +58,3 @@ LongAdder), which was released with the following comments:
Netty
------------------------------------------------------------------------
Copyright 2014 The Netty Project
-
-------------------------------------------------------------------------
-Jackson databind - shaded in gremlin-shaded to org.apache.tinkerpop.shaded.jackson
-------------------------------------------------------------------------
-# Jackson JSON processor
-
-Jackson is a high-performance, Free/Open Source JSON processing library.
-It was originally written by Tatu Saloranta (tatu.saloranta@iki.fi), and has
-been in development since 2007.
-It is currently developed by a community of developers, as well as supported
-commercially by FasterXML.com.
-
-## Licensing
-
-Jackson core and extension components may be licensed under different licenses.
-To find the details that apply to this artifact see the accompanying LICENSE file.
-For more information, including possible other licensing options, contact
-FasterXML.com (http://fasterxml.com).
-
-## Credits
-
-A list of contributors may be found from CREDITS file, which is included
-in some artifacts (usually source distributions); but is always available
-from the source code management (SCM) system project uses.
\ No newline at end of file
[04/31] incubator-tinkerpop git commit: Use netty 3.7.1.Final
Posted by dk...@apache.org.
Use netty 3.7.1.Final
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/eb382a2d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/eb382a2d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/eb382a2d
Branch: refs/heads/docker
Commit: eb382a2d0dfbdc6bf3af543e0777eeda4eba816a
Parents: 18c0ae3
Author: Hendy Irawan <ce...@gmail.com>
Authored: Tue Mar 15 21:05:46 2016 +0700
Committer: Hendy Irawan <ce...@gmail.com>
Committed: Tue Mar 15 21:05:46 2016 +0700
----------------------------------------------------------------------
hadoop-gremlin/pom.xml | 6 ++++++
1 file changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/eb382a2d/hadoop-gremlin/pom.xml
----------------------------------------------------------------------
diff --git a/hadoop-gremlin/pom.xml b/hadoop-gremlin/pom.xml
index 694ec83..2ddcb15 100644
--- a/hadoop-gremlin/pom.xml
+++ b/hadoop-gremlin/pom.xml
@@ -48,6 +48,12 @@ limitations under the License.
<version>${hadoop.version}</version>
<exclusions>
<exclusion>
+ <!-- see: https://github.com/apache/hadoop/pull/84 -->
+ <groupId>io.netty</groupId>
+ <artifactId>netty</artifactId>
+ </exclusion>
+
+ <exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
[25/31] incubator-tinkerpop git commit: Merge branch 'TINKERPOP-1109'
into tp31
Posted by dk...@apache.org.
Merge branch 'TINKERPOP-1109' into tp31
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/207b0b39
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/207b0b39
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/207b0b39
Branch: refs/heads/docker
Commit: 207b0b391d8b38ade1be99ad799aae970f1174d6
Parents: 5037da0 1b6a343
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Fri Mar 25 14:00:19 2016 +0100
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Fri Mar 25 14:00:19 2016 +0100
----------------------------------------------------------------------
gremlin-console/src/main/bin/gremlin.sh | 23 +++++++++++----
.../tinkerpop/gremlin/console/Console.groovy | 7 ++---
.../tinkerpop/gremlin/console/ConsoleFs.groovy | 30 ++++++++++++++++++++
.../tinkerpop/gremlin/console/Mediator.groovy | 11 ++-----
.../console/commands/InstallCommand.groovy | 4 +--
5 files changed, 55 insertions(+), 20 deletions(-)
----------------------------------------------------------------------
[31/31] incubator-tinkerpop git commit: Merge branch 'tp31' into
docker
Posted by dk...@apache.org.
Merge branch 'tp31' into docker
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/fa6da7ee
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/fa6da7ee
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/fa6da7ee
Branch: refs/heads/docker
Commit: fa6da7ee79fb72c160aa74a353991ef5acc3c0b7
Parents: 1db8dcd 106b357
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Mon Mar 28 19:04:15 2016 +0200
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Mon Mar 28 19:04:15 2016 +0200
----------------------------------------------------------------------
CHANGELOG.asciidoc | 5 ++
.../src/reference/gremlin-applications.asciidoc | 27 ++++++-
.../reference/implementations-hadoop.asciidoc | 2 +-
docs/src/reference/the-traversal.asciidoc | 1 +
.../tutorials/getting-started/index.asciidoc | 4 +-
giraph-gremlin/pom.xml | 12 ++-
gremlin-console/src/main/bin/gremlin.sh | 23 ++++--
.../tinkerpop/gremlin/console/Console.groovy | 7 +-
.../tinkerpop/gremlin/console/ConsoleFs.groovy | 30 ++++++++
.../tinkerpop/gremlin/console/Mediator.groovy | 11 +--
.../console/commands/InstallCommand.groovy | 4 +-
.../groovy/plugin/DriverRemoteAcceptor.java | 3 +-
gremlin-console/src/main/static/NOTICE | 3 +-
.../structure/io/graphson/GraphSONModule.java | 4 +-
.../io/graphson/GraphSONSerializers.java | 38 ++++++++++
.../tinkerpop/gremlin/driver/Connection.java | 5 +-
...raphSONMessageSerializerGremlinV1d0Test.java | 36 ++++++++-
.../ser/GraphSONMessageSerializerV1d0Test.java | 42 +++++++++++
gremlin-server/src/main/static/NOTICE | 2 +-
.../server/GremlinDriverIntegrateTest.java | 21 ++++++
.../src/test/resources/log4j-test.properties | 4 +-
gremlin-shaded/pom.xml | 2 +-
.../gremlin/structure/SerializationTest.java | 78 +++++++++++++++++++-
hadoop-gremlin/pom.xml | 12 ++-
pom.xml | 4 +-
spark-gremlin/pom.xml | 2 +-
26 files changed, 342 insertions(+), 40 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/fa6da7ee/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --cc CHANGELOG.asciidoc
index bbb71fc,8df9c03..5d7995b
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@@ -26,7 -26,11 +26,12 @@@ image::https://raw.githubusercontent.co
TinkerPop 3.1.2 (NOT OFFICIALLY RELEASED YET)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+* Provided Docker script that allows the execution of several build tasks within a Docker container.
+ * Changed `DriverRemoteAcceptor` to send scripts as multi-line.
+ * Fixed a bug in `gremlin-driver` where connections were not returning to the pool after many consecutive errors.
+ * Fixed a bug where `tree()` did not serialize into GraphSON.
+ * Bumped to SLF4j 1.7.19.
+ * Bumped to Apache Hadoop 2.7.2.
* Fixed a bug in `gremlin-driver` where a really fast call to get a `Future` to wait for a result might not register an error raised from the server.
* Fixed a severe bug where `LP_O_OB_P_S_SE_SL_Traverser` was not registered with `GryoMapper`.
* The future from `GremlinExecutor.eval()` is completed after the entire evaluation lifecyle is completed.
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/fa6da7ee/pom.xml
----------------------------------------------------------------------
[10/31] incubator-tinkerpop git commit: Merge remote-tracking branch
'ceefour/patch-3' into tp31
Posted by dk...@apache.org.
Merge remote-tracking branch 'ceefour/patch-3' into tp31
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/fe197c18
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/fe197c18
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/fe197c18
Branch: refs/heads/docker
Commit: fe197c18beccdb7b533fd76288f84a20815535c6
Parents: 08ed04b 9154660
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Fri Mar 18 12:24:34 2016 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Fri Mar 18 12:24:34 2016 -0600
----------------------------------------------------------------------
giraph-gremlin/pom.xml | 10 ++++++++++
hadoop-gremlin/pom.xml | 12 +++++++++++-
pom.xml | 2 +-
3 files changed, 22 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
[30/31] incubator-tinkerpop git commit: fixed a typo
Posted by dk...@apache.org.
fixed a typo
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/1db8dcdb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/1db8dcdb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/1db8dcdb
Branch: refs/heads/docker
Commit: 1db8dcdbf64678d3f084d4db57b808afc6fc563e
Parents: b3b3844
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Mon Mar 28 19:03:12 2016 +0200
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Mon Mar 28 19:03:12 2016 +0200
----------------------------------------------------------------------
docs/src/dev/developer/contributing.asciidoc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1db8dcdb/docs/src/dev/developer/contributing.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/dev/developer/contributing.asciidoc b/docs/src/dev/developer/contributing.asciidoc
index 8a4f735..6d87fc8 100644
--- a/docs/src/dev/developer/contributing.asciidoc
+++ b/docs/src/dev/developer/contributing.asciidoc
@@ -106,7 +106,7 @@ supported:
* build Java docs
* build user docs
-A list of command line options is provided by `docker.build.sh --help`. The container will install,
+A list of command line options is provided by `docker/build.sh --help`. The container will install,
configure and start all required dependencies, such as Hadoop.
If the container is used to generate the user docs, it will start a web server and show the URL that
[23/31] incubator-tinkerpop git commit: TINKERPOP-1239 Connections
were not be returned to the connection pool properly.
Posted by dk...@apache.org.
TINKERPOP-1239 Connections were not be returned to the connection pool properly.
Excessive failures quickly drained the pool and resulted in TimeoutException for the driver. The fix was fairly simple as some poorly placed curly braces (or lack of curly braces) didn't allow an important line of code to execute. Added a test to validate that things were behaving properly now. 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/2a2086c0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/2a2086c0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/2a2086c0
Branch: refs/heads/docker
Commit: 2a2086c01716a4ceb654ade2cf07da3fbf271ab1
Parents: 80a47c6
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Mar 25 07:49:49 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Mar 25 07:51:44 2016 -0400
----------------------------------------------------------------------
.../tinkerpop/gremlin/driver/Connection.java | 5 +++--
.../server/GremlinDriverIntegrateTest.java | 21 ++++++++++++++++++++
2 files changed, 24 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/2a2086c0/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Connection.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Connection.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Connection.java
index 5fc0e48..a5dd7d5 100644
--- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Connection.java
+++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Connection.java
@@ -210,10 +210,11 @@ final class Connection {
// succeed. instead, the Connection gets replaced which destroys the dead channel on the
// client and allows a new one to be reconstructed.
readCompleted.exceptionally(t -> {
- if (t instanceof IOException)
+ if (t instanceof IOException) {
if (pool != null) pool.replaceConnection(thisConnection);
- else
+ } else {
thisConnection.returnToPool();
+ }
// close was signaled in closeAsync() but there were pending messages at that time. attempt
// the shutdown if the returned result cleared up the last pending message
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/2a2086c0/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 054e0ca..6912545 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
@@ -130,6 +130,27 @@ public class GremlinDriverIntegrateTest extends AbstractGremlinServerIntegration
}
@Test
+ public void shouldEventuallySucceedAfterMuchFailure() throws Exception {
+ final Cluster cluster = Cluster.build().addContactPoint("localhost").create();
+ final Client client = cluster.connect();
+
+ // tested independently to 10000 iterations but for speed, bumped back to 1000
+ IntStream.range(0,1000).forEach(i -> {
+ try {
+ client.submit("1 + 9 9").all().join().get(0).getInt();
+ fail("Should not have gone through due to syntax error");
+ } catch (Exception ex) {
+ final Throwable root = ExceptionUtils.getRootCause(ex);
+ assertThat(root, instanceOf(ResponseException.class));
+ }
+ });
+
+ assertEquals(2, client.submit("1+1").all().join().get(0).getInt());
+
+ cluster.close();
+ }
+
+ @Test
public void shouldEventuallySucceedOnSameServer() throws Exception {
stopServer();
[03/31] incubator-tinkerpop git commit: Use netty 3.7.1.Final
Posted by dk...@apache.org.
Use netty 3.7.1.Final
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/18c0ae38
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/18c0ae38
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/18c0ae38
Branch: refs/heads/docker
Commit: 18c0ae3855bc09265b67b77e943f4d468ac13202
Parents: 76fe300
Author: Hendy Irawan <ce...@gmail.com>
Authored: Tue Mar 15 20:56:33 2016 +0700
Committer: Hendy Irawan <ce...@gmail.com>
Committed: Tue Mar 15 20:56:33 2016 +0700
----------------------------------------------------------------------
hadoop-gremlin/pom.xml | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/18c0ae38/hadoop-gremlin/pom.xml
----------------------------------------------------------------------
diff --git a/hadoop-gremlin/pom.xml b/hadoop-gremlin/pom.xml
index 2221d76..694ec83 100644
--- a/hadoop-gremlin/pom.xml
+++ b/hadoop-gremlin/pom.xml
@@ -37,6 +37,12 @@ limitations under the License.
<version>${project.version}</version>
</dependency>
<dependency>
+ <!-- see: https://github.com/apache/hadoop/pull/84 -->
+ <groupId>io.netty</groupId>
+ <artifactId>netty</artifactId>
+ <version>3.7.1.Final</version>
+ </dependency>
+ <dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
<version>${hadoop.version}</version>
@@ -161,7 +167,7 @@ limitations under the License.
<configuration>
<archive>
<manifestEntries>
- <Gremlin-Plugin-Dependencies>org.apache.hadoop:hadoop-client:2.7.1
+ <Gremlin-Plugin-Dependencies>org.apache.hadoop:hadoop-client:2.7.2
</Gremlin-Plugin-Dependencies>
</manifestEntries>
</archive>
[13/31] incubator-tinkerpop git commit: handle user defined plugin
directories
Posted by dk...@apache.org.
handle user defined plugin directories
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/7d3731b2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/7d3731b2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/7d3731b2
Branch: refs/heads/docker
Commit: 7d3731b258ee2b185242ca3e6d04993310c98d05
Parents: af827fb
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Wed Mar 23 13:13:12 2016 +0100
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Wed Mar 23 13:13:12 2016 +0100
----------------------------------------------------------------------
gremlin-console/src/main/bin/gremlin.sh | 22 ++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/7d3731b2/gremlin-console/src/main/bin/gremlin.sh
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/bin/gremlin.sh b/gremlin-console/src/main/bin/gremlin.sh
index c592117..215e69f 100755
--- a/gremlin-console/src/main/bin/gremlin.sh
+++ b/gremlin-console/src/main/bin/gremlin.sh
@@ -22,6 +22,17 @@
set -e
set -u
+DIR="$( cd -P "$( dirname "$0" )" && pwd )"
+SYSTEM_EXT_DIR="${DIR}/../ext"
+
+if [ ! -z "${JAVA_OPTIONS}" ]; then
+ USER_EXT_DIR=$(grep -o '\-Dtinkerpop.ext=\(\([^"][^ ]*\)\|\("[^"]*"\)\)' <<< "${JAVA_OPTIONS}" | cut -f2 -d '=' | xargs -0 echo)
+ if [ ! -z "${USER_EXT_DIR}" -a ! -d "${USER_EXT_DIR}" ]; then
+ mkdir -p "${USER_EXT_DIR}"
+ cp -R ${SYSTEM_EXT_DIR}/* ${USER_EXT_DIR}/
+ fi
+fi
+
case `uname` in
CYGWIN*)
CP="`dirname $0`"/../config
@@ -38,9 +49,9 @@ while [ -h "$SOURCE" ]; do
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
done
-DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
-CP=$CP:$( find -L "$DIR"/../ext -mindepth 1 -maxdepth 1 -type d | \
- sort | sed 's/$/\/plugin\/*/' | tr '\n' ':' )
+
+CP=$CP:$( find -L "${SYSTEM_EXT_DIR}" "${USER_EXT_DIR:-${SYSTEM_EXT_DIR}}" -mindepth 1 -maxdepth 1 -type d | \
+ sort -u | sed 's/$/\/plugin\/*/' | tr '\n' ':' )
export CLASSPATH="${CLASSPATH:-}:$CP"
@@ -87,9 +98,8 @@ done
# Remove processed options from $@. Anything after -e is preserved by the break;; in the case
shift $(( $OPTIND - 1 ))
-if [ -z "${JAVA_OPTIONS:-}" ]; then
- JAVA_OPTIONS="-Dtinkerpop.ext=$DIR/../ext -Dlog4j.configuration=conf/log4j-console.properties -Dgremlin.log4j.level=$GREMLIN_LOG_LEVEL"
-fi
+JAVA_OPTIONS="${JAVA_OPTIONS} -Dtinkerpop.ext=${USER_EXT_DIR:-${SYSTEM_EXT_DIR}} -Dlog4j.configuration=conf/log4j-console.properties -Dgremlin.log4j.level=$GREMLIN_LOG_LEVEL"
+JAVA_OPTIONS=$(awk -vRS=' ' '!/^$/ {if (!x[$0]++) print}' <<< "${JAVA_OPTIONS}" | grep -v '^$' | paste -sd ' ' -)
if [ -n "$SCRIPT_DEBUG" ]; then
echo "CLASSPATH: $CLASSPATH"
[19/31] incubator-tinkerpop git commit: added a note in the changelog
for TINKERPOP-732
Posted by dk...@apache.org.
added a note in the changelog for TINKERPOP-732
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/58f912b1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/58f912b1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/58f912b1
Branch: refs/heads/docker
Commit: 58f912b1199cb5ee99c3a45f28343c01a19312da
Parents: 9dca398
Author: Dylan Millikin <dm...@apache.org>
Authored: Thu Mar 24 11:16:32 2016 -0400
Committer: Dylan Millikin <dm...@apache.org>
Committed: Thu Mar 24 11:16:32 2016 -0400
----------------------------------------------------------------------
CHANGELOG.asciidoc | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/58f912b1/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index f569257..93d5a81 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/incubator-tinkerpop/master/docs/
TinkerPop 3.1.2 (NOT OFFICIALLY RELEASED YET)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+* Fixed a bug where tree() did not serialize into GraphSON
* Bumped to SLF4j 1.7.19.
* Bumped to Apache Hadoop 2.7.2.
* Fixed a bug in `gremlin-driver` where a really fast call to get a `Future` to wait for a result might not register an error raised from the server.
[28/31] incubator-tinkerpop git commit: Added a section for Gremlin
Server metrics to reference docs.
Posted by dk...@apache.org.
Added a section for Gremlin Server metrics to reference 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/c8732958
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/c8732958
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/c8732958
Branch: refs/heads/docker
Commit: c8732958f072691b3a040c4f5cdc36502882fa4e
Parents: 8f2fd15
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Mar 28 12:12:16 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Mar 28 12:12:16 2016 -0400
----------------------------------------------------------------------
.../src/reference/gremlin-applications.asciidoc | 27 ++++++++++++++++++--
1 file changed, 25 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/c8732958/docs/src/reference/gremlin-applications.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc
index 8d4936a..379780c 100644
--- a/docs/src/reference/gremlin-applications.asciidoc
+++ b/docs/src/reference/gremlin-applications.asciidoc
@@ -1154,8 +1154,8 @@ Gremlin Server can accept requests and return results using different serializat
serialization is configured by the `serializers` setting described in the table above. Note that some serializers
have additional configuration options as defined by the `serializers[X].config` setting. The `config` setting is a
`Map` where the keys and values get passed to the serializer at its initialization. The available and/or expected
- keys are dependent on the serializer being used. Gremlin Server comes packaged with two different serializers:
- GraphSON and Gryo.
+keys are dependent on the serializer being used. Gremlin Server comes packaged with two different serializers:
+GraphSON and Gryo.
GraphSON
++++++++
@@ -1222,6 +1222,29 @@ important to use cases where server types need to be coerced to client types (i.
but not on the client). Implementations should typically instantiate `ClassResolver` implementations that are
extensions of the `GryoClassResolver` as this class is important to most serialization tasks in TinkerPop.
+Metrics
+^^^^^^^
+
+Gremlin Server produces metrics about its operations that can yield some insight into how it is performing. These
+metrics are exposed in a variety of ways:
+
+* Directly to the console where Gremlin Server is running
+* CSV file
+* link:http://ganglia.info/[Ganglia]
+* link:http://graphite.wikidot.com/[Graphite]
+* link:http://www.slf4j.org/[SLF4j]
+* link:https://en.wikipedia.org/wiki/Java_Management_Extensions[JMX]
+
+The configuration of each of these outputs is described in the Gremlin Server <<_configuring_2, Configuring>> section.
+Regardless of the output, the metrics gathered are the same. Each metric is prefixed with
+`org.apache.tinkerpop.gremlin.server.GremlinServer` and the following metrics are reported:
+
+* `sessions` - the number of sessions open at the time the metric was last measured.
+* `errors` - the number of total errors, mean rate, as well as the 1, 5, and 15-minute error rates.
+* `op.eval` - the number of script evaluations, mean rate, 1, 5, and 15 minute rates, minimum, maximum, median, mean,
+and standard deviation evaluation times, as well as the 75th, 95th, 98th, 99th and 99.9th percentile evaluation times
+(note that these time apply to both sessionless and in-session requests).
+
Best Practices
~~~~~~~~~~~~~~
[06/31] incubator-tinkerpop git commit: TINKERPOP-732 added support
for tree() results to be serialized over GraphSON
Posted by dk...@apache.org.
TINKERPOP-732 added support for tree() results to be serialized over GraphSON
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/c01f1970
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/c01f1970
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/c01f1970
Branch: refs/heads/docker
Commit: c01f19708a56452c368919133bee38c0e00bd3a2
Parents: e8b6f8e
Author: Dylan Millikin <dm...@apache.org>
Authored: Wed Mar 16 12:32:44 2016 -0400
Committer: Dylan Millikin <dm...@apache.org>
Committed: Wed Mar 16 12:32:44 2016 -0400
----------------------------------------------------------------------
.../structure/io/graphson/GraphSONModule.java | 2 +
.../io/graphson/GraphSONSerializers.java | 38 ++++++++++++++
gremlin-shaded/pom.xml | 2 +-
.../gremlin/structure/SerializationTest.java | 53 ++++++++++++++++++++
4 files changed, 94 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/c01f1970/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONModule.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONModule.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONModule.java
index 821a5dd..075c73b 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONModule.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONModule.java
@@ -42,6 +42,7 @@ import java.time.YearMonth;
import java.time.ZoneOffset;
import java.time.ZonedDateTime;
import java.util.Map;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.Tree;
/**
* The set of serializers that handle the core graph interfaces. These serializers support normalization which
@@ -77,6 +78,7 @@ abstract class GraphSONModule extends SimpleModule {
addSerializer(TraversalMetrics.class, new GraphSONSerializers.TraversalMetricsJacksonSerializer());
addSerializer(TraversalExplanation.class, new GraphSONSerializers.TraversalExplanationJacksonSerializer());
addSerializer(Path.class, new GraphSONSerializers.PathJacksonSerializer());
+ addSerializer(Tree.class, new GraphSONSerializers.TreeJacksonSerializer());
addSerializer(StarGraphGraphSONSerializer.DirectionalStarGraph.class, new StarGraphGraphSONSerializer(normalize));
// java.util
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/c01f1970/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializers.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializers.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializers.java
index e21bb0e..0712cd1 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializers.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializers.java
@@ -48,7 +48,10 @@ import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import java.util.concurrent.TimeUnit;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.Tree;
+import org.apache.tinkerpop.gremlin.structure.T;
/**
* GraphSON serializers for graph-based objects such as vertices, edges, properties, and paths. These serializers
@@ -257,6 +260,41 @@ final class GraphSONSerializers {
}
}
+
+ final static class TreeJacksonSerializer extends StdSerializer<Tree> {
+
+ public TreeJacksonSerializer() {
+ super(Tree.class);
+ }
+
+ @Override
+ public void serialize(final Tree tree, final JsonGenerator jsonGenerator, final SerializerProvider serializerProvider) throws IOException, JsonGenerationException {
+ ser(tree, jsonGenerator, null);
+ }
+
+ @Override
+ public void serializeWithType(final Tree tree, final JsonGenerator jsonGenerator,
+ final SerializerProvider serializerProvider, final TypeSerializer typeSerializer)
+ throws IOException, JsonProcessingException {
+ ser(tree, jsonGenerator, typeSerializer);
+ }
+
+ private static void ser(final Tree tree, final JsonGenerator jsonGenerator, final TypeSerializer typeSerializer)
+ throws IOException {
+ jsonGenerator.writeStartObject(); // {
+
+ Set<Map.Entry<Element, Tree<T>>> set = tree.entrySet();
+ for(Map.Entry<Element, Tree<T>> entry : set)
+ {
+ jsonGenerator.writeObjectFieldStart(entry.getKey().id().toString());
+ if (typeSerializer != null) jsonGenerator.writeStringField(GraphSONTokens.CLASS, HashMap.class.getName());
+ jsonGenerator.writeObjectField(GraphSONTokens.KEY, entry.getKey());
+ jsonGenerator.writeObjectField(GraphSONTokens.VALUE, entry.getValue());
+ jsonGenerator.writeEndObject();
+ }
+ jsonGenerator.writeEndObject();
+ }
+ }
/**
* Maps in the JVM can have {@link Object} as a key, but in JSON they must be a {@link String}.
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/c01f1970/gremlin-shaded/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-shaded/pom.xml b/gremlin-shaded/pom.xml
index a8d1d9b..56f7dd4 100644
--- a/gremlin-shaded/pom.xml
+++ b/gremlin-shaded/pom.xml
@@ -50,7 +50,7 @@ limitations under the License.
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<!-- Update the shade plugin config whenever you change this version -->
- <version>2.5.3</version>
+ <version>2.7.0</version>
<optional>true</optional>
</dependency>
</dependencies>
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/c01f1970/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/SerializationTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/SerializationTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/SerializationTest.java
index c7bf8b4..5fb8fb0 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/SerializationTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/SerializationTest.java
@@ -46,6 +46,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.Tree;
import static org.junit.Assert.*;
@@ -349,5 +350,57 @@ public class SerializationTest {
assertTrue(metrics0.containsKey(GraphSONTokens.COUNTS));
assertTrue(metrics0.containsKey(GraphSONTokens.DURATION));
}
+
+ @Test
+ @LoadGraphWith(LoadGraphWith.GraphData.MODERN)
+ public void shouldSerializeTree() throws Exception {
+ final ObjectMapper mapper = graph.io(GraphSONIo.build()).mapper().create().createMapper();
+ final Tree t = g.V(1).out().properties("name").tree().next();
+ final String json = mapper.writeValueAsString(t);
+
+ final HashMap<String, Object> m = (HashMap<String, Object>) mapper.readValue(json, mapTypeReference);
+
+ // Check Structure
+ assertEquals(1, m.size());
+ assertTrue(m.containsKey("1"));
+
+ // Check Structure n+1
+ final HashMap<String, Object> branch = (HashMap<String, Object>) m.get("1");
+ assertEquals(2, branch.size());
+ assertTrue(branch.containsKey(GraphSONTokens.KEY));
+ assertTrue(branch.containsKey(GraphSONTokens.VALUE));
+
+ //Check n+1 key (traversed element)
+ final HashMap<String, Object> branchKey = (HashMap<String, Object>) branch.get(GraphSONTokens.KEY);
+ assertTrue(branchKey.containsKey(GraphSONTokens.ID));
+ assertTrue(branchKey.containsKey(GraphSONTokens.LABEL));
+ assertTrue(branchKey.containsKey(GraphSONTokens.TYPE));
+ assertTrue(branchKey.containsKey(GraphSONTokens.PROPERTIES));
+ assertEquals(1, branchKey.get(GraphSONTokens.ID));
+ assertEquals("person", branchKey.get(GraphSONTokens.LABEL));
+ assertEquals("vertex", branchKey.get(GraphSONTokens.TYPE));
+ final HashMap<String, List<HashMap<String, Object>>> branchKeyProps = (HashMap<String, List<HashMap<String, Object>>>) branchKey.get(GraphSONTokens.PROPERTIES);
+ assertEquals("marko", branchKeyProps.get("name").get(0).get("value"));
+ assertEquals(29, branchKeyProps.get("age").get(0).get("value"));
+
+ //Check n+1 value (traversed element)
+ final HashMap<String, Object> branchValue = (HashMap<String, Object>) branch.get(GraphSONTokens.VALUE);
+ assertEquals(3, branchValue.size());
+ assertTrue(branchValue.containsKey("2"));
+ assertTrue(branchValue.containsKey("3"));
+ assertTrue(branchValue.containsKey("4"));
+
+ // Check that vp[] functioned properly
+ final HashMap<String, HashMap<String, Object>> branch2 = (HashMap<String, HashMap<String, Object>>) branchValue.get("2");
+ assertTrue(branch2.containsKey(GraphSONTokens.KEY));
+ assertTrue(branch2.containsKey(GraphSONTokens.VALUE));
+ final HashMap<String, HashMap<String, Object>> branch2Prop = (HashMap<String, HashMap<String, Object>>) branch2.get(GraphSONTokens.VALUE).get("2");
+ assertTrue(branch2Prop.get(GraphSONTokens.KEY).containsKey(GraphSONTokens.ID));
+ assertTrue(branch2Prop.get(GraphSONTokens.KEY).containsKey(GraphSONTokens.VALUE));
+ assertTrue(branch2Prop.get(GraphSONTokens.KEY).containsKey(GraphSONTokens.LABEL));
+ assertEquals("name", branch2Prop.get(GraphSONTokens.KEY).get(GraphSONTokens.LABEL));
+ assertEquals("vadas", branch2Prop.get(GraphSONTokens.KEY).get(GraphSONTokens.VALUE));
+ assertEquals(2, branch2Prop.get(GraphSONTokens.KEY).get(GraphSONTokens.ID));
+ }
}
}
[18/31] incubator-tinkerpop git commit: Merge branch 'TINKERPOP-733'
into tp31
Posted by dk...@apache.org.
Merge branch 'TINKERPOP-733' into tp31
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/9dca3985
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/9dca3985
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/9dca3985
Branch: refs/heads/docker
Commit: 9dca39854c08a1da3a6764ed4add670f8dc9ff33
Parents: 94f4d3f e92e45b
Author: Dylan Millikin <dm...@apache.org>
Authored: Thu Mar 24 11:14:23 2016 -0400
Committer: Dylan Millikin <dm...@apache.org>
Committed: Thu Mar 24 11:14:23 2016 -0400
----------------------------------------------------------------------
gremlin-console/src/main/static/NOTICE | 3 +-
.../structure/io/graphson/GraphSONModule.java | 4 +-
.../io/graphson/GraphSONSerializers.java | 38 ++++++++++
...raphSONMessageSerializerGremlinV1d0Test.java | 36 +++++++++-
.../ser/GraphSONMessageSerializerV1d0Test.java | 42 +++++++++++
gremlin-server/src/main/static/NOTICE | 2 +-
gremlin-shaded/pom.xml | 2 +-
.../gremlin/structure/SerializationTest.java | 76 +++++++++++++++++++-
8 files changed, 197 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
[05/31] incubator-tinkerpop git commit: Make hadoop-gremlin and
giraph-gremlin pass enforcer
Posted by dk...@apache.org.
Make hadoop-gremlin and giraph-gremlin pass enforcer
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/91546603
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/91546603
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/91546603
Branch: refs/heads/docker
Commit: 915466039ff1bca2d773e7d56c8bbebf243a9d65
Parents: eb382a2
Author: Hendy Irawan <ce...@gmail.com>
Authored: Tue Mar 15 21:31:11 2016 +0700
Committer: Hendy Irawan <ce...@gmail.com>
Committed: Tue Mar 15 21:31:11 2016 +0700
----------------------------------------------------------------------
giraph-gremlin/pom.xml | 10 ++++++++++
hadoop-gremlin/pom.xml | 22 ++++++++++------------
2 files changed, 20 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/91546603/giraph-gremlin/pom.xml
----------------------------------------------------------------------
diff --git a/giraph-gremlin/pom.xml b/giraph-gremlin/pom.xml
index 727e1cb..347bd0d 100644
--- a/giraph-gremlin/pom.xml
+++ b/giraph-gremlin/pom.xml
@@ -25,6 +25,16 @@ limitations under the License.
</parent>
<artifactId>giraph-gremlin</artifactId>
<name>Apache TinkerPop :: Giraph Gremlin</name>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <!-- see: https://github.com/apache/hadoop/pull/84 -->
+ <groupId>io.netty</groupId>
+ <artifactId>netty</artifactId>
+ <version>3.7.1.Final</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.tinkerpop</groupId>
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/91546603/hadoop-gremlin/pom.xml
----------------------------------------------------------------------
diff --git a/hadoop-gremlin/pom.xml b/hadoop-gremlin/pom.xml
index 2ddcb15..ee18ca9 100644
--- a/hadoop-gremlin/pom.xml
+++ b/hadoop-gremlin/pom.xml
@@ -25,6 +25,16 @@ limitations under the License.
</parent>
<artifactId>hadoop-gremlin</artifactId>
<name>Apache TinkerPop :: Hadoop Gremlin</name>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <!-- see: https://github.com/apache/hadoop/pull/84 -->
+ <groupId>io.netty</groupId>
+ <artifactId>netty</artifactId>
+ <version>3.7.1.Final</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.tinkerpop</groupId>
@@ -37,23 +47,11 @@ limitations under the License.
<version>${project.version}</version>
</dependency>
<dependency>
- <!-- see: https://github.com/apache/hadoop/pull/84 -->
- <groupId>io.netty</groupId>
- <artifactId>netty</artifactId>
- <version>3.7.1.Final</version>
- </dependency>
- <dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
<version>${hadoop.version}</version>
<exclusions>
<exclusion>
- <!-- see: https://github.com/apache/hadoop/pull/84 -->
- <groupId>io.netty</groupId>
- <artifactId>netty</artifactId>
- </exclusion>
-
- <exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
[29/31] incubator-tinkerpop git commit: Added a note for has(label,
key, value) in reference docs. CTR
Posted by dk...@apache.org.
Added a note for has(label, key, value) in reference docs. 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/106b3572
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/106b3572
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/106b3572
Branch: refs/heads/docker
Commit: 106b35721ef92edecf45b2c9ded4a00a084f3794
Parents: c873295
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Mar 28 12:37:26 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Mar 28 12:37:26 2016 -0400
----------------------------------------------------------------------
docs/src/reference/the-traversal.asciidoc | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/106b3572/docs/src/reference/the-traversal.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc
index d509826..9b3b42b 100644
--- a/docs/src/reference/the-traversal.asciidoc
+++ b/docs/src/reference/the-traversal.asciidoc
@@ -718,6 +718,7 @@ It is possible to filter vertices, edges, and vertex properties based on their p
(*filter*). There are numerous variations on `has()` including:
* `has(key,value)`: Remove the traverser if its element does not have the provided key/value property.
+ * `has(label, key, value)`: Remove the traverser if its element does not have the specified label and provided key/value property.
* `has(key,predicate)`: Remove the traverser if its element does not have a key value that satisfies the bi-predicate. For more information on predicates, please read <<a-note-on-predicates,A Note on Predicates>>.
* `hasLabel(labels...)`: Remove the traverser if its element does not have any of the labels.
* `hasId(ids...)`: Remove the traverser if its element does not have any of the ids.
[09/31] incubator-tinkerpop git commit: Use mirrors for download
location.
Posted by dk...@apache.org.
Use mirrors for download location.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/08ed04b8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/08ed04b8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/08ed04b8
Branch: refs/heads/docker
Commit: 08ed04b81608f2403999ea69d758f804b07447c9
Parents: 46f4d9d
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Mar 18 08:52:30 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Mar 18 08:52:30 2016 -0400
----------------------------------------------------------------------
docs/src/tutorials/getting-started/index.asciidoc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/08ed04b8/docs/src/tutorials/getting-started/index.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/tutorials/getting-started/index.asciidoc b/docs/src/tutorials/getting-started/index.asciidoc
index bfdfe97..7b82751 100644
--- a/docs/src/tutorials/getting-started/index.asciidoc
+++ b/docs/src/tutorials/getting-started/index.asciidoc
@@ -51,11 +51,11 @@ NOTE: Are you unsure of what a vertex or edge is? That topic is covered in the <
but please allow the tutorial to get you oriented with the Gremlin Console first, so that you have an understanding of
the tool that will help you with your learning experience.
-Download the console, unpackage it and start it:
+link:https://www.apache.org/dyn/closer.lua/incubator/tinkerpop/x.y.z/apache-gremlin-console-x.y.z-bin.zip[Download the console],
+unpackage it and start it:
[source,text]
----
-$ curl -L -O http://archive.apache.org/dist/incubator/tinkerpop/x.y.z/apache-gremlin-console-x.y.z-bin.zip
$ unzip apache-gremlin-console-x.y.z-bin.zip
$ cd apache-gremlin-console-x.y.z-bin.zip
$ bin/gremlin.sh
[24/31] incubator-tinkerpop git commit: Update changelog.
Posted by dk...@apache.org.
Update changelog.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/5037da02
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/5037da02
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/5037da02
Branch: refs/heads/docker
Commit: 5037da022fb87d5776639f51c42678aa1697ed3a
Parents: 2a2086c
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Mar 25 07:53:21 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Mar 25 07:53:21 2016 -0400
----------------------------------------------------------------------
CHANGELOG.asciidoc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5037da02/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 93d5a81..c29a717 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,7 +26,8 @@ image::https://raw.githubusercontent.com/apache/incubator-tinkerpop/master/docs/
TinkerPop 3.1.2 (NOT OFFICIALLY RELEASED YET)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-* Fixed a bug where tree() did not serialize into GraphSON
+* Fixed a bug in `gremlin-driver` where connections were not returning to the pool after many consecutive errors.
+* Fixed a bug where `tree()` did not serialize into GraphSON.
* Bumped to SLF4j 1.7.19.
* Bumped to Apache Hadoop 2.7.2.
* Fixed a bug in `gremlin-driver` where a really fast call to get a `Future` to wait for a result might not register an error raised from the server.
[07/31] incubator-tinkerpop git commit: Added mentions to notice.
Added tests and made a slight correction to serialization
Posted by dk...@apache.org.
Added mentions to notice. Added tests and made a slight correction to serialization
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/edb61f5e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/edb61f5e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/edb61f5e
Branch: refs/heads/docker
Commit: edb61f5e356dc30fc75a318bbf41e887f6bd361b
Parents: c01f197
Author: Dylan Millikin <dm...@apache.org>
Authored: Thu Mar 17 23:11:30 2016 -0400
Committer: Dylan Millikin <dm...@apache.org>
Committed: Thu Mar 17 23:11:30 2016 -0400
----------------------------------------------------------------------
gremlin-console/src/main/static/NOTICE | 26 +++++++++++-
.../structure/io/graphson/GraphSONModule.java | 4 +-
.../io/graphson/GraphSONSerializers.java | 12 +++---
...raphSONMessageSerializerGremlinV1d0Test.java | 37 ++++++++++++++++-
.../ser/GraphSONMessageSerializerV1d0Test.java | 43 ++++++++++++++++++++
gremlin-server/src/main/static/NOTICE | 26 +++++++++++-
gremlin-shaded/pom.xml | 2 +-
.../gremlin/structure/SerializationTest.java | 23 ++++++++++-
8 files changed, 160 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/edb61f5e/gremlin-console/src/main/static/NOTICE
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/static/NOTICE b/gremlin-console/src/main/static/NOTICE
index b9fa6eb..0901755 100644
--- a/gremlin-console/src/main/static/NOTICE
+++ b/gremlin-console/src/main/static/NOTICE
@@ -56,4 +56,28 @@ Copyright (c) 2010, The JAVATUPLES team (http://www.javatuples.org)
------------------------------------------------------------------------
Netty
------------------------------------------------------------------------
-Copyright 2014 The Netty Project
\ No newline at end of file
+Copyright 2014 The Netty Project
+
+------------------------------------------------------------------------
+Jackson databind - shaded in gremlin-shaded to org.apache.tinkerpop.shaded.jackson
+------------------------------------------------------------------------
+# Jackson JSON processor
+
+Jackson is a high-performance, Free/Open Source JSON processing library.
+It was originally written by Tatu Saloranta (tatu.saloranta@iki.fi), and has
+been in development since 2007.
+It is currently developed by a community of developers, as well as supported
+commercially by FasterXML.com.
+
+## Licensing
+
+Jackson core and extension components may be licensed under different licenses.
+To find the details that apply to this artifact see the accompanying LICENSE file.
+For more information, including possible other licensing options, contact
+FasterXML.com (http://fasterxml.com).
+
+## Credits
+
+A list of contributors may be found from CREDITS file, which is included
+in some artifacts (usually source distributions); but is always available
+from the source code management (SCM) system project uses.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/edb61f5e/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONModule.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONModule.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONModule.java
index 075c73b..7cc6c91 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONModule.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONModule.java
@@ -78,9 +78,9 @@ abstract class GraphSONModule extends SimpleModule {
addSerializer(TraversalMetrics.class, new GraphSONSerializers.TraversalMetricsJacksonSerializer());
addSerializer(TraversalExplanation.class, new GraphSONSerializers.TraversalExplanationJacksonSerializer());
addSerializer(Path.class, new GraphSONSerializers.PathJacksonSerializer());
- addSerializer(Tree.class, new GraphSONSerializers.TreeJacksonSerializer());
addSerializer(StarGraphGraphSONSerializer.DirectionalStarGraph.class, new StarGraphGraphSONSerializer(normalize));
-
+ addSerializer(Tree.class, new GraphSONSerializers.TreeJacksonSerializer());
+
// java.util
addSerializer(Map.Entry.class, new JavaUtilSerializers.MapEntryJacksonSerializer());
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/edb61f5e/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializers.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializers.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializers.java
index 0712cd1..cf56218 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializers.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializers.java
@@ -51,7 +51,6 @@ import java.util.Map;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import org.apache.tinkerpop.gremlin.process.traversal.step.util.Tree;
-import org.apache.tinkerpop.gremlin.structure.T;
/**
* GraphSON serializers for graph-based objects such as vertices, edges, properties, and paths. These serializers
@@ -282,12 +281,13 @@ final class GraphSONSerializers {
private static void ser(final Tree tree, final JsonGenerator jsonGenerator, final TypeSerializer typeSerializer)
throws IOException {
jsonGenerator.writeStartObject(); // {
+ if (typeSerializer != null) jsonGenerator.writeStringField(GraphSONTokens.CLASS, HashMap.class.getName());
- Set<Map.Entry<Element, Tree<T>>> set = tree.entrySet();
- for(Map.Entry<Element, Tree<T>> entry : set)
+ Set<Map.Entry<Element, Tree>> set = tree.entrySet();
+ for(Map.Entry<Element, Tree> entry : set)
{
- jsonGenerator.writeObjectFieldStart(entry.getKey().id().toString());
- if (typeSerializer != null) jsonGenerator.writeStringField(GraphSONTokens.CLASS, HashMap.class.getName());
+ jsonGenerator.writeObjectFieldStart(entry.getKey().id().toString());
+ if (typeSerializer != null) jsonGenerator.writeStringField(GraphSONTokens.CLASS, HashMap.class.getName());
jsonGenerator.writeObjectField(GraphSONTokens.KEY, entry.getKey());
jsonGenerator.writeObjectField(GraphSONTokens.VALUE, entry.getValue());
jsonGenerator.writeEndObject();
@@ -295,7 +295,7 @@ final class GraphSONSerializers {
jsonGenerator.writeEndObject();
}
}
-
+
/**
* Maps in the JVM can have {@link Object} as a key, but in JSON they must be a {@link String}.
*/
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/edb61f5e/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerGremlinV1d0Test.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerGremlinV1d0Test.java b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerGremlinV1d0Test.java
index de719c1..7ff6a7e 100644
--- a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerGremlinV1d0Test.java
+++ b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerGremlinV1d0Test.java
@@ -43,6 +43,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.Tree;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
@@ -254,6 +255,40 @@ public class GraphSONMessageSerializerGremlinV1d0Test {
assertEquals(new Integer(1000), deserializedMap.get("1"));
}
+ @Test
+ public void shouldSerializeToJsonTree() throws Exception {
+ final TinkerGraph graph = TinkerFactory.createClassic();
+ final GraphTraversalSource g = graph.traversal();
+ //final Iterable<Tree> iterable = IteratorUtils.list(g.V(1).out().properties("name").tree());
+ final Map t = g.V(1).out().properties("name").tree().next();
+
+ final ResponseMessage response = convert(t);
+ assertCommon(response);
+
+ final Map<String, Map<String, Map>> deserializedMap = (Map<String, Map<String, Map>>) response.getResult().getData();
+
+ assertEquals(1, deserializedMap.size());
+
+ //check the first object and it's properties
+ Map<String,Object> vertex = deserializedMap.get("1").get("key");
+ Map<String,List<Map>> vertexProperties = (Map<String, List<Map>>)vertex.get("properties");
+ assertEquals(1, (int)vertex.get("id"));
+ assertEquals("marko", vertexProperties.get("name").get(0).get("value"));
+
+ //check objects tree structure
+ //check Vertex property
+ Map<String, Map<String, Map>> subTreeMap = deserializedMap.get("1").get("value");
+ Map<String, Map<String, Map>> subTreeMap2 = subTreeMap.get("2").get("value");
+ Map<String, String> vertexPropertiesDeep = subTreeMap2.get("3").get("key");
+ assertEquals("vadas", vertexPropertiesDeep.get("value"));
+ assertEquals("name", vertexPropertiesDeep.get("label"));
+
+ // check subitem
+ Map<String,Object> vertex2 = subTreeMap.get("3").get("key");
+ Map<String,List<Map>> vertexProperties2 = (Map<String, List<Map>>)vertex2.get("properties");
+
+ assertEquals("lop", vertexProperties2.get("name").get(0).get("value"));
+ }
@Test
public void shouldSerializeFullResponseMessage() throws Exception {
@@ -287,7 +322,7 @@ public class GraphSONMessageSerializerGremlinV1d0Test {
assertEquals(ResponseStatusCode.SUCCESS.getValue(), deserialized.getStatus().getCode().getValue());
assertEquals("worked", deserialized.getStatus().getMessage());
}
-
+
private void assertCommon(final ResponseMessage response) {
assertEquals(requestId, response.getRequestId());
assertEquals(ResponseStatusCode.SUCCESS, response.getStatus().getCode());
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/edb61f5e/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerV1d0Test.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerV1d0Test.java b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerV1d0Test.java
index de4b4b6..e9e4f80 100644
--- a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerV1d0Test.java
+++ b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerV1d0Test.java
@@ -57,6 +57,7 @@ import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.Tree;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.is;
@@ -407,6 +408,48 @@ public class GraphSONMessageSerializerV1d0Test {
assertEquals(ResponseStatusCode.SUCCESS.getValue(), deserialized.getStatus().getCode().getValue());
assertEquals("worked", deserialized.getStatus().getMessage());
}
+
+ @Test
+ public void shouldSerializeToJsonTree() throws Exception {
+ final TinkerGraph graph = TinkerFactory.createClassic();
+ final GraphTraversalSource g = graph.traversal();
+ //final Iterable<Tree> iterable = IteratorUtils.list(g.V(1).out().properties("name").tree());
+ final Tree t = g.V(1).out().properties("name").tree().next();
+
+
+ final String results = SERIALIZER.serializeResponseAsString(ResponseMessage.build(msg).result(t).create());
+
+ final JsonNode json = mapper.readTree(results);
+
+ assertNotNull(json);
+ assertEquals(msg.getRequestId().toString(), json.get(SerTokens.TOKEN_REQUEST).asText());
+ final JsonNode converted = json.get(SerTokens.TOKEN_RESULT).get(SerTokens.TOKEN_DATA);
+ assertNotNull(converted);
+
+ //check the first object and it's properties
+ assertEquals(1, converted.get("1").get("key").get("id").asInt());
+ assertEquals("marko", converted.get("1").get("key").get("properties").get("name").get(0).get("value").asText());
+
+ //check objects tree structure
+ //check Vertex property
+ assertEquals("vadas", converted.get("1")
+ .get("value")
+ .get("2")
+ .get("value")
+ .get("3").get("key").get("value").asText());
+ assertEquals("name", converted.get("1")
+ .get("value")
+ .get("2")
+ .get("value")
+ .get("3").get("key").get("label").asText());
+
+ // check subitem
+ assertEquals("lop", converted.get("1")
+ .get("value")
+ .get("3")
+ .get("key")
+ .get("properties").get("name").get(0).get("value").asText());
+ }
private class FunObject {
private String val;
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/edb61f5e/gremlin-server/src/main/static/NOTICE
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/static/NOTICE b/gremlin-server/src/main/static/NOTICE
index a767d39..9055cf6 100644
--- a/gremlin-server/src/main/static/NOTICE
+++ b/gremlin-server/src/main/static/NOTICE
@@ -57,4 +57,28 @@ LongAdder), which was released with the following comments:
------------------------------------------------------------------------
Netty
------------------------------------------------------------------------
-Copyright 2014 The Netty Project
\ No newline at end of file
+Copyright 2014 The Netty Project
+
+------------------------------------------------------------------------
+Jackson databind - shaded in gremlin-shaded to org.apache.tinkerpop.shaded.jackson
+------------------------------------------------------------------------
+# Jackson JSON processor
+
+Jackson is a high-performance, Free/Open Source JSON processing library.
+It was originally written by Tatu Saloranta (tatu.saloranta@iki.fi), and has
+been in development since 2007.
+It is currently developed by a community of developers, as well as supported
+commercially by FasterXML.com.
+
+## Licensing
+
+Jackson core and extension components may be licensed under different licenses.
+To find the details that apply to this artifact see the accompanying LICENSE file.
+For more information, including possible other licensing options, contact
+FasterXML.com (http://fasterxml.com).
+
+## Credits
+
+A list of contributors may be found from CREDITS file, which is included
+in some artifacts (usually source distributions); but is always available
+from the source code management (SCM) system project uses.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/edb61f5e/gremlin-shaded/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-shaded/pom.xml b/gremlin-shaded/pom.xml
index 56f7dd4..d3eeb55 100644
--- a/gremlin-shaded/pom.xml
+++ b/gremlin-shaded/pom.xml
@@ -50,7 +50,7 @@ limitations under the License.
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<!-- Update the shade plugin config whenever you change this version -->
- <version>2.7.0</version>
+ <version>2.7.2</version>
<optional>true</optional>
</dependency>
</dependencies>
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/edb61f5e/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/SerializationTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/SerializationTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/SerializationTest.java
index 5fb8fb0..87afa7d 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/SerializationTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/SerializationTest.java
@@ -47,6 +47,7 @@ import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import org.apache.tinkerpop.gremlin.process.traversal.step.util.Tree;
+import static org.hamcrest.CoreMatchers.instanceOf;
import static org.junit.Assert.*;
@@ -223,8 +224,28 @@ public class SerializationTest {
assertEquals(before.getDuration(TimeUnit.MILLISECONDS), after.getDuration(TimeUnit.MILLISECONDS));
assertEquals(before.getMetrics(0).getCounts(), after.getMetrics(0).getCounts());
}
- }
+
+ @Test
+ @LoadGraphWith(LoadGraphWith.GraphData.MODERN)
+ public void shouldSerializeTree() throws Exception {
+ final GryoIo gryoIo = graph.io(GryoIo.build());
+ final GryoWriter gryoWriter = gryoIo.writer().create();
+ final GryoReader gryoReader = gryoIo.reader().create();
+ final Tree before = g.V(1).out().properties("name").tree().next();
+
+ final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+ gryoWriter.writeObject(outputStream, before);
+
+ final ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray());
+ final Tree after = gryoReader.readObject(inputStream, Tree.class);
+ assertNotNull(after);
+ //Seeing as Tree implements Serializable the following assertions should be sufficent.
+ assertThat("Type does not match", after, instanceOf(Tree.class));
+ assertEquals("The objects differ", after, before);
+ }
+ }
+
public static class GraphSONTest extends AbstractGremlinTest {
private final TypeReference<HashMap<String, Object>> mapTypeReference = new TypeReference<HashMap<String, Object>>() {
};
[02/31] incubator-tinkerpop git commit: Update hadoop to 2.7.2
Posted by dk...@apache.org.
Update hadoop to 2.7.2
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/76fe3004
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/76fe3004
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/76fe3004
Branch: refs/heads/docker
Commit: 76fe3004025847b9de9e5fd209aff936a6947821
Parents: da5abb0
Author: Hendy Irawan <he...@hendyirawan.com>
Authored: Tue Mar 15 20:14:33 2016 +0700
Committer: Hendy Irawan <he...@hendyirawan.com>
Committed: Tue Mar 15 20:14:33 2016 +0700
----------------------------------------------------------------------
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/76fe3004/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index acef6c6..99194f3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -134,7 +134,7 @@ limitations under the License.
<skipIntegrationTests>true</skipIntegrationTests>
<skipPerformanceTests>true</skipPerformanceTests>
<slf4j.version>1.7.12</slf4j.version>
- <hadoop.version>2.7.1</hadoop.version>
+ <hadoop.version>2.7.2</hadoop.version>
<java.tuples.version>1.2</java.tuples.version>
<javadoc-plugin.version>2.10.1</javadoc-plugin.version>
[26/31] incubator-tinkerpop git commit: Changed
`DriverRemoteAcceptor` to issue scripts as multi-line.
Posted by dk...@apache.org.
Changed `DriverRemoteAcceptor` to issue scripts as multi-line.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/fab3473a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/fab3473a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/fab3473a
Branch: refs/heads/docker
Commit: fab3473af98a09bc8cd3b8dfd0dc1ead4a5a9874
Parents: 207b0b3
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Mar 25 13:31:31 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Mar 25 13:32:07 2016 -0400
----------------------------------------------------------------------
CHANGELOG.asciidoc | 1 +
.../gremlin/console/groovy/plugin/DriverRemoteAcceptor.java | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/fab3473a/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index c29a717..8df9c03 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/incubator-tinkerpop/master/docs/
TinkerPop 3.1.2 (NOT OFFICIALLY RELEASED YET)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+* Changed `DriverRemoteAcceptor` to send scripts as multi-line.
* Fixed a bug in `gremlin-driver` where connections were not returning to the pool after many consecutive errors.
* Fixed a bug where `tree()` did not serialize into GraphSON.
* Bumped to SLF4j 1.7.19.
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/fab3473a/gremlin-console/src/main/java/org/apache/tinkerpop/gremlin/console/groovy/plugin/DriverRemoteAcceptor.java
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/java/org/apache/tinkerpop/gremlin/console/groovy/plugin/DriverRemoteAcceptor.java b/gremlin-console/src/main/java/org/apache/tinkerpop/gremlin/console/groovy/plugin/DriverRemoteAcceptor.java
index c32a593..7733524 100644
--- a/gremlin-console/src/main/java/org/apache/tinkerpop/gremlin/console/groovy/plugin/DriverRemoteAcceptor.java
+++ b/gremlin-console/src/main/java/org/apache/tinkerpop/gremlin/console/groovy/plugin/DriverRemoteAcceptor.java
@@ -28,6 +28,7 @@ import org.apache.tinkerpop.gremlin.groovy.plugin.RemoteException;
import org.apache.commons.lang.exception.ExceptionUtils;
import org.apache.tinkerpop.gremlin.structure.util.ElementHelper;
import org.codehaus.groovy.tools.shell.Groovysh;
+import org.codehaus.groovy.tools.shell.Parser;
import javax.security.sasl.SaslException;
import java.io.FileNotFoundException;
@@ -137,7 +138,7 @@ public class DriverRemoteAcceptor implements RemoteAcceptor {
@Override
public Object submit(final List<String> args) throws RemoteException {
- final String line = RemoteAcceptor.getScript(String.join(" ", args), this.shell);
+ final String line = RemoteAcceptor.getScript(String.join(Parser.getNEWLINE(), args), this.shell);
try {
final List<Result> resultSet = send(line);
[15/31] incubator-tinkerpop git commit: Updated changelog.
Posted by dk...@apache.org.
Updated changelog.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/94f4d3f3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/94f4d3f3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/94f4d3f3
Branch: refs/heads/docker
Commit: 94f4d3f346fea8c0fdb4120a3ced750852c756b7
Parents: 1b4aec4
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Mar 23 13:36:51 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Mar 23 13:36:51 2016 -0400
----------------------------------------------------------------------
CHANGELOG.asciidoc | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/94f4d3f3/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 1733330..f569257 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/incubator-tinkerpop/master/docs/
TinkerPop 3.1.2 (NOT OFFICIALLY RELEASED YET)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+* Bumped to SLF4j 1.7.19.
* Bumped to Apache Hadoop 2.7.2.
* Fixed a bug in `gremlin-driver` where a really fast call to get a `Future` to wait for a result might not register an error raised from the server.
* Fixed a severe bug where `LP_O_OB_P_S_SE_SL_Traverser` was not registered with `GryoMapper`.
[17/31] incubator-tinkerpop git commit: sync
Posted by dk...@apache.org.
sync
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/e92e45b8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/e92e45b8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/e92e45b8
Branch: refs/heads/docker
Commit: e92e45b8c0a6ea54d618a3a7aa3c41f83eddb79d
Parents: 18b2fe6
Author: Dylan Millikin <dm...@apache.org>
Authored: Thu Mar 24 09:52:34 2016 -0400
Committer: Dylan Millikin <dm...@apache.org>
Committed: Thu Mar 24 09:52:34 2016 -0400
----------------------------------------------------------------------
gremlin-console/src/main/static/NOTICE | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/e92e45b8/gremlin-console/src/main/static/NOTICE
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/static/NOTICE b/gremlin-console/src/main/static/NOTICE
index 6e8865f..3139931 100644
--- a/gremlin-console/src/main/static/NOTICE
+++ b/gremlin-console/src/main/static/NOTICE
@@ -57,3 +57,4 @@ Copyright (c) 2010, The JAVATUPLES team (http://www.javatuples.org)
Netty
------------------------------------------------------------------------
Copyright 2014 The Netty Project
+
[14/31] incubator-tinkerpop git commit: Merge branch 'patch-2' of
https://github.com/ceefour/incubator-tinkerpop into tp31
Posted by dk...@apache.org.
Merge branch 'patch-2' of https://github.com/ceefour/incubator-tinkerpop into tp31
Newer version of slf4j included some good bug fixes since the version previously used. CTR
Conflicts:
pom.xml
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/1b4aec49
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/1b4aec49
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/1b4aec49
Branch: refs/heads/docker
Commit: 1b4aec491a93601c80df57c55068501ac12f885c
Parents: 6c4dc6f fc40b93
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Mar 23 13:35:31 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Mar 23 13:35:31 2016 -0400
----------------------------------------------------------------------
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1b4aec49/pom.xml
----------------------------------------------------------------------
diff --cc pom.xml
index 99194f3,29d7f4c..ea6314a
--- a/pom.xml
+++ b/pom.xml
@@@ -133,8 -133,8 +133,8 @@@ limitations under the License
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<skipIntegrationTests>true</skipIntegrationTests>
<skipPerformanceTests>true</skipPerformanceTests>
- <slf4j.version>1.7.12</slf4j.version>
+ <slf4j.version>1.7.19</slf4j.version>
- <hadoop.version>2.7.1</hadoop.version>
+ <hadoop.version>2.7.2</hadoop.version>
<java.tuples.version>1.2</java.tuples.version>
<javadoc-plugin.version>2.10.1</javadoc-plugin.version>
[11/31] incubator-tinkerpop git commit: Refactored to allow Console
to fall back to user directories if tinkerpop.ext not specified.
Posted by dk...@apache.org.
Refactored to allow Console to fall back to user directories if tinkerpop.ext not specified.
This is a more consistent way to deal with the file system and will allow better system level installs where gremlin.sh is shared.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/af827fb1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/af827fb1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/af827fb1
Branch: refs/heads/docker
Commit: af827fb18c415d9ca85d1f1c9480b8eb03ac7263
Parents: 08ed04b
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Mar 18 14:46:58 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Mar 18 14:46:58 2016 -0400
----------------------------------------------------------------------
.../tinkerpop/gremlin/console/Console.groovy | 7 ++---
.../tinkerpop/gremlin/console/ConsoleFs.groovy | 31 ++++++++++++++++++++
.../tinkerpop/gremlin/console/Mediator.groovy | 11 ++-----
.../console/commands/InstallCommand.groovy | 4 +--
4 files changed, 39 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/af827fb1/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
index a66728c..66b8b0e 100644
--- a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
+++ b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
@@ -34,7 +34,6 @@ import org.codehaus.groovy.tools.shell.util.Preferences
import org.fusesource.jansi.Ansi
import org.fusesource.jansi.AnsiConsole
-import java.nio.charset.Charset
import java.util.concurrent.TimeUnit
import java.util.prefs.PreferenceChangeEvent
import java.util.prefs.PreferenceChangeListener
@@ -59,7 +58,6 @@ class Console {
private static final int DEFAULT_ITERATION_MAX = 100
private static int maxIteration = DEFAULT_ITERATION_MAX
- private static final String HISTORY_FILE = ".gremlin_groovy_history"
private static final String STANDARD_INPUT_PROMPT = "gremlin> "
private static final String STANDARD_RESULT_PROMPT = "==>"
private static final String IMPORT_SPACE = "import "
@@ -72,6 +70,7 @@ class Console {
private final IO io = new IO(System.in, System.out, System.err)
private final Groovysh groovy
+
public Console(final String initScriptFile) {
io.out.println()
io.out.println(" \\,,,/")
@@ -111,11 +110,11 @@ class Console {
final InteractiveShellRunner runner = new InteractiveShellRunner(groovy, handlePrompt)
runner.setErrorHandler(handleError)
try {
- final FileHistory history = new FileHistory(new File(System.getProperty("user.home") + System.getProperty("file.separator") + HISTORY_FILE))
+ final FileHistory history = new FileHistory(new File(ConsoleFs.HISTORY_FILE))
groovy.setHistory(history)
runner.setHistory(history)
} catch (IOException ignored) {
- io.err.println("Unable to create history file: " + HISTORY_FILE)
+ io.err.println("Unable to create history file: " + ConsoleFs.HISTORY_FILE)
}
GremlinLoader.load()
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/af827fb1/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/ConsoleFs.groovy
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/ConsoleFs.groovy b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/ConsoleFs.groovy
new file mode 100644
index 0000000..78f7724
--- /dev/null
+++ b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/ConsoleFs.groovy
@@ -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.console
+
+/**
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+class ConsoleFs {
+ public static final String FILE_SEP = System.getProperty("file.separator")
+ private static final String CONSOLE_USER_HOME = System.getProperty("user.home", ".") + FILE_SEP + "gremlin-console" + FILE_SEP + "ext";
+ public static final CONSOLE_HOME_DIR = System.getProperty("tinkerpop.ext", CONSOLE_USER_HOME) + FILE_SEP
+
+ public static final String PLUGIN_CONFIG_FILE = CONSOLE_HOME_DIR + "plugins.txt"
+ public static final String HISTORY_FILE = System.getProperty("user.home", ".") + FILE_SEP + ".gremlin_groovy_history"
+}
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/af827fb1/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Mediator.groovy
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Mediator.groovy b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Mediator.groovy
index e4ceb7e..a1235fa 100644
--- a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Mediator.groovy
+++ b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Mediator.groovy
@@ -34,13 +34,8 @@ class Mediator {
private final Console console
-
- private static String FILE_SEP = System.getProperty("file.separator")
private static String LINE_SEP = System.getProperty("line.separator")
- private static final String PLUGIN_CONFIG_FILE =
- System.getProperty("tinkerpop.ext", System.getProperty("user.dir", ".") + FILE_SEP + "ext") + FILE_SEP + "plugins.txt"
-
public Mediator(final Console console) {
this.console = console
}
@@ -76,7 +71,7 @@ class Mediator {
}
def writePluginState() {
- def file = new File(PLUGIN_CONFIG_FILE)
+ def file = new File(ConsoleFs.PLUGIN_CONFIG_FILE)
// ensure that the directories exist to hold the file.
file.mkdirs()
@@ -84,7 +79,7 @@ class Mediator {
if (file.exists())
file.delete()
- new File(PLUGIN_CONFIG_FILE).withWriter { out ->
+ new File(ConsoleFs.PLUGIN_CONFIG_FILE).withWriter { out ->
activePlugins().each { k, v -> out << (k + LINE_SEP) }
}
}
@@ -94,7 +89,7 @@ class Mediator {
}
static def readPluginState() {
- def file = new File(PLUGIN_CONFIG_FILE)
+ def file = new File(ConsoleFs.PLUGIN_CONFIG_FILE)
return file.exists() ? file.readLines() : []
}
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/af827fb1/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/commands/InstallCommand.groovy
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/commands/InstallCommand.groovy b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/commands/InstallCommand.groovy
index a2efe2a..a680757 100644
--- a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/commands/InstallCommand.groovy
+++ b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/commands/InstallCommand.groovy
@@ -18,6 +18,7 @@
*/
package org.apache.tinkerpop.gremlin.console.commands
+import org.apache.tinkerpop.gremlin.console.ConsoleFs
import org.apache.tinkerpop.gremlin.console.Mediator
import org.apache.tinkerpop.gremlin.console.plugin.PluggedIn
import org.apache.tinkerpop.gremlin.groovy.plugin.Artifact
@@ -34,7 +35,6 @@ import org.codehaus.groovy.tools.shell.Groovysh
*/
class InstallCommand extends CommandSupport {
- private final static String fileSep = System.getProperty("file.separator")
private final Mediator mediator
public InstallCommand(final Groovysh shell, final Mediator mediator) {
@@ -46,7 +46,7 @@ class InstallCommand extends CommandSupport {
def Object execute(final List<String> arguments) {
final def artifact = createArtifact(arguments)
try {
- def grabber = new DependencyGrabber(shell.getInterp().getClassLoader(), System.getProperty("user.dir") + fileSep + "ext")
+ def grabber = new DependencyGrabber(shell.getInterp().getClassLoader(), ConsoleFs.CONSOLE_HOME_DIR)
grabber.copyDependenciesToPath(artifact)
final def dep = grabber.makeDepsMap(artifact)
[12/31] incubator-tinkerpop git commit: updated CHANGELOG and docs to
reflect Hadoop 2.7.2 support. Giraph and Spark pom.xml manifest needed
updating.
Posted by dk...@apache.org.
updated CHANGELOG and docs to reflect Hadoop 2.7.2 support. Giraph and Spark pom.xml manifest needed updating.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/6c4dc6f1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/6c4dc6f1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/6c4dc6f1
Branch: refs/heads/docker
Commit: 6c4dc6f1459601c0d8a6307e175d167ef6af3e5b
Parents: fe197c1
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Fri Mar 18 13:07:42 2016 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Fri Mar 18 13:07:42 2016 -0600
----------------------------------------------------------------------
CHANGELOG.asciidoc | 1 +
docs/src/reference/implementations-hadoop.asciidoc | 2 +-
giraph-gremlin/pom.xml | 2 +-
spark-gremlin/pom.xml | 2 +-
4 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/6c4dc6f1/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index ea53882..1733330 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/incubator-tinkerpop/master/docs/
TinkerPop 3.1.2 (NOT OFFICIALLY RELEASED YET)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+* Bumped to Apache Hadoop 2.7.2.
* Fixed a bug in `gremlin-driver` where a really fast call to get a `Future` to wait for a result might not register an error raised from the server.
* Fixed a severe bug where `LP_O_OB_P_S_SE_SL_Traverser` was not registered with `GryoMapper`.
* The future from `GremlinExecutor.eval()` is completed after the entire evaluation lifecyle is completed.
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/6c4dc6f1/docs/src/reference/implementations-hadoop.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/implementations-hadoop.asciidoc b/docs/src/reference/implementations-hadoop.asciidoc
index 59c7412..54ed776 100644
--- a/docs/src/reference/implementations-hadoop.asciidoc
+++ b/docs/src/reference/implementations-hadoop.asciidoc
@@ -34,7 +34,7 @@ using both TinkerPop3's OLTP and OLAP graph computing models.
IMPORTANT: This section assumes that the user has a Hadoop 2.x cluster functioning. For more information on getting
started with Hadoop, please see the
-link:http://hadoop.apache.org/docs/r2.7.1/hadoop-project-dist/hadoop-common/SingleCluster.html[Single Node Setup]
+link:http://hadoop.apache.org/docs/r2.7.2/hadoop-project-dist/hadoop-common/SingleCluster.html[Single Node Setup]
tutorial. Moreover, if using `GiraphGraphComputer` or `SparkGraphComputer` it is advisable that the reader also
familiarize their self with Giraph (link:http://giraph.apache.org/quick_start.html[Getting Started]) and Spark
(link:http://spark.apache.org/docs/latest/quick-start.html[Quick Start]).
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/6c4dc6f1/giraph-gremlin/pom.xml
----------------------------------------------------------------------
diff --git a/giraph-gremlin/pom.xml b/giraph-gremlin/pom.xml
index 347bd0d..190f5c8 100644
--- a/giraph-gremlin/pom.xml
+++ b/giraph-gremlin/pom.xml
@@ -248,7 +248,7 @@ limitations under the License.
<configuration>
<archive>
<manifestEntries>
- <Gremlin-Plugin-Dependencies>org.apache.hadoop:hadoop-client:2.7.1
+ <Gremlin-Plugin-Dependencies>org.apache.hadoop:hadoop-client:2.7.2
</Gremlin-Plugin-Dependencies>
</manifestEntries>
</archive>
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/6c4dc6f1/spark-gremlin/pom.xml
----------------------------------------------------------------------
diff --git a/spark-gremlin/pom.xml b/spark-gremlin/pom.xml
index 6e4ab17..e671d69 100644
--- a/spark-gremlin/pom.xml
+++ b/spark-gremlin/pom.xml
@@ -382,7 +382,7 @@
<configuration>
<archive>
<manifestEntries>
- <Gremlin-Plugin-Dependencies>org.apache.hadoop:hadoop-client:2.7.1
+ <Gremlin-Plugin-Dependencies>org.apache.hadoop:hadoop-client:2.7.2
</Gremlin-Plugin-Dependencies>
<!-- deletes the servlet-api jar from the path after install - causes conflicts -->
<Gremlin-Plugin-Paths>servlet-api-2.5.jar=</Gremlin-Plugin-Paths>
[21/31] incubator-tinkerpop git commit: No need to default to user
home if tinkerpop.ext is not supplied.
Posted by dk...@apache.org.
No need to default to user home if tinkerpop.ext is not supplied.
Default instead to the ext/ directory which is supplied by default in gremlin.sh.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/1b6a343a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/1b6a343a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/1b6a343a
Branch: refs/heads/docker
Commit: 1b6a343adfee1b5195e397120867fe02dd2727ce
Parents: 2749d8d
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Mar 24 15:44:34 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Mar 24 16:11:12 2016 -0400
----------------------------------------------------------------------
.../groovy/org/apache/tinkerpop/gremlin/console/ConsoleFs.groovy | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1b6a343a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/ConsoleFs.groovy
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/ConsoleFs.groovy b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/ConsoleFs.groovy
index 78f7724..f0cf4a7 100644
--- a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/ConsoleFs.groovy
+++ b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/ConsoleFs.groovy
@@ -23,8 +23,7 @@ package org.apache.tinkerpop.gremlin.console
*/
class ConsoleFs {
public static final String FILE_SEP = System.getProperty("file.separator")
- private static final String CONSOLE_USER_HOME = System.getProperty("user.home", ".") + FILE_SEP + "gremlin-console" + FILE_SEP + "ext";
- public static final CONSOLE_HOME_DIR = System.getProperty("tinkerpop.ext", CONSOLE_USER_HOME) + FILE_SEP
+ public static final CONSOLE_HOME_DIR = System.getProperty("tinkerpop.ext", "ext") + FILE_SEP
public static final String PLUGIN_CONFIG_FILE = CONSOLE_HOME_DIR + "plugins.txt"
public static final String HISTORY_FILE = System.getProperty("user.home", ".") + FILE_SEP + ".gremlin_groovy_history"
[08/31] incubator-tinkerpop git commit: removed some commented code
Posted by dk...@apache.org.
removed some commented code
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/2f32f0cf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/2f32f0cf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/2f32f0cf
Branch: refs/heads/docker
Commit: 2f32f0cf0e158a1a8a2c4fbdc4956bf4fd29fa14
Parents: edb61f5
Author: Dylan Millikin <dm...@apache.org>
Authored: Fri Mar 18 01:02:38 2016 -0400
Committer: Dylan Millikin <dm...@apache.org>
Committed: Fri Mar 18 01:02:38 2016 -0400
----------------------------------------------------------------------
.../gremlin/structure/io/graphson/GraphSONSerializers.java | 2 +-
.../driver/ser/GraphSONMessageSerializerGremlinV1d0Test.java | 1 -
.../gremlin/driver/ser/GraphSONMessageSerializerV1d0Test.java | 1 -
.../org/apache/tinkerpop/gremlin/structure/SerializationTest.java | 2 +-
4 files changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/2f32f0cf/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializers.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializers.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializers.java
index cf56218..aaca316 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializers.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializers.java
@@ -280,7 +280,7 @@ final class GraphSONSerializers {
private static void ser(final Tree tree, final JsonGenerator jsonGenerator, final TypeSerializer typeSerializer)
throws IOException {
- jsonGenerator.writeStartObject(); // {
+ jsonGenerator.writeStartObject();
if (typeSerializer != null) jsonGenerator.writeStringField(GraphSONTokens.CLASS, HashMap.class.getName());
Set<Map.Entry<Element, Tree>> set = tree.entrySet();
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/2f32f0cf/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerGremlinV1d0Test.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerGremlinV1d0Test.java b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerGremlinV1d0Test.java
index 7ff6a7e..0091a5f 100644
--- a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerGremlinV1d0Test.java
+++ b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerGremlinV1d0Test.java
@@ -259,7 +259,6 @@ public class GraphSONMessageSerializerGremlinV1d0Test {
public void shouldSerializeToJsonTree() throws Exception {
final TinkerGraph graph = TinkerFactory.createClassic();
final GraphTraversalSource g = graph.traversal();
- //final Iterable<Tree> iterable = IteratorUtils.list(g.V(1).out().properties("name").tree());
final Map t = g.V(1).out().properties("name").tree().next();
final ResponseMessage response = convert(t);
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/2f32f0cf/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerV1d0Test.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerV1d0Test.java b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerV1d0Test.java
index e9e4f80..a4cee54 100644
--- a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerV1d0Test.java
+++ b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerV1d0Test.java
@@ -413,7 +413,6 @@ public class GraphSONMessageSerializerV1d0Test {
public void shouldSerializeToJsonTree() throws Exception {
final TinkerGraph graph = TinkerFactory.createClassic();
final GraphTraversalSource g = graph.traversal();
- //final Iterable<Tree> iterable = IteratorUtils.list(g.V(1).out().properties("name").tree());
final Tree t = g.V(1).out().properties("name").tree().next();
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/2f32f0cf/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/SerializationTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/SerializationTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/SerializationTest.java
index 87afa7d..a99bcd5 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/SerializationTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/SerializationTest.java
@@ -240,7 +240,7 @@ public class SerializationTest {
final ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray());
final Tree after = gryoReader.readObject(inputStream, Tree.class);
assertNotNull(after);
- //Seeing as Tree implements Serializable the following assertions should be sufficent.
+ //The following assertions should be sufficent.
assertThat("Type does not match", after, instanceOf(Tree.class));
assertEquals("The objects differ", after, before);
}
[27/31] incubator-tinkerpop git commit: corrected an issues in tree()
tests that made neo4j tests fail
Posted by dk...@apache.org.
corrected an issues in tree() tests that made neo4j tests fail
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/8f2fd159
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/8f2fd159
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/8f2fd159
Branch: refs/heads/docker
Commit: 8f2fd1591114fd9e6a667b55de1caa2e000b7254
Parents: fab3473
Author: Dylan Millikin <dm...@apache.org>
Authored: Sat Mar 26 22:56:54 2016 +0100
Committer: Dylan Millikin <dm...@apache.org>
Committed: Sat Mar 26 22:56:54 2016 +0100
----------------------------------------------------------------------
.../gremlin/structure/SerializationTest.java | 24 +++++++++++---------
1 file changed, 13 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/8f2fd159/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/SerializationTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/SerializationTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/SerializationTest.java
index a99bcd5..8d02c72 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/SerializationTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/SerializationTest.java
@@ -232,7 +232,7 @@ public class SerializationTest {
final GryoWriter gryoWriter = gryoIo.writer().create();
final GryoReader gryoReader = gryoIo.reader().create();
- final Tree before = g.V(1).out().properties("name").tree().next();
+ final Tree before = g.V(convertToVertexId("marko")).out().properties("name").tree().next();
final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
gryoWriter.writeObject(outputStream, before);
@@ -376,17 +376,17 @@ public class SerializationTest {
@LoadGraphWith(LoadGraphWith.GraphData.MODERN)
public void shouldSerializeTree() throws Exception {
final ObjectMapper mapper = graph.io(GraphSONIo.build()).mapper().create().createMapper();
- final Tree t = g.V(1).out().properties("name").tree().next();
+ final Tree t = g.V(convertToVertexId("marko")).out().properties("name").tree().next();
final String json = mapper.writeValueAsString(t);
final HashMap<String, Object> m = (HashMap<String, Object>) mapper.readValue(json, mapTypeReference);
// Check Structure
assertEquals(1, m.size());
- assertTrue(m.containsKey("1"));
+ assertTrue(m.containsKey(convertToVertexId("marko").toString()));
// Check Structure n+1
- final HashMap<String, Object> branch = (HashMap<String, Object>) m.get("1");
+ final HashMap<String, Object> branch = (HashMap<String, Object>) m.get(convertToVertexId("marko").toString());
assertEquals(2, branch.size());
assertTrue(branch.containsKey(GraphSONTokens.KEY));
assertTrue(branch.containsKey(GraphSONTokens.VALUE));
@@ -397,7 +397,7 @@ public class SerializationTest {
assertTrue(branchKey.containsKey(GraphSONTokens.LABEL));
assertTrue(branchKey.containsKey(GraphSONTokens.TYPE));
assertTrue(branchKey.containsKey(GraphSONTokens.PROPERTIES));
- assertEquals(1, branchKey.get(GraphSONTokens.ID));
+ assertEquals(convertToVertexId("marko").toString(), branchKey.get(GraphSONTokens.ID).toString());
assertEquals("person", branchKey.get(GraphSONTokens.LABEL));
assertEquals("vertex", branchKey.get(GraphSONTokens.TYPE));
final HashMap<String, List<HashMap<String, Object>>> branchKeyProps = (HashMap<String, List<HashMap<String, Object>>>) branchKey.get(GraphSONTokens.PROPERTIES);
@@ -407,21 +407,23 @@ public class SerializationTest {
//Check n+1 value (traversed element)
final HashMap<String, Object> branchValue = (HashMap<String, Object>) branch.get(GraphSONTokens.VALUE);
assertEquals(3, branchValue.size());
- assertTrue(branchValue.containsKey("2"));
- assertTrue(branchValue.containsKey("3"));
- assertTrue(branchValue.containsKey("4"));
+ assertTrue(branchValue.containsKey(convertToVertexId("vadas").toString()));
+ assertTrue(branchValue.containsKey(convertToVertexId("lop").toString()));
+ assertTrue(branchValue.containsKey(convertToVertexId("josh").toString()));
// Check that vp[] functioned properly
- final HashMap<String, HashMap<String, Object>> branch2 = (HashMap<String, HashMap<String, Object>>) branchValue.get("2");
+ final HashMap<String, HashMap<String, Object>> branch2 = (HashMap<String, HashMap<String, Object>>) branchValue.get(convertToVertexId("vadas").toString());
assertTrue(branch2.containsKey(GraphSONTokens.KEY));
assertTrue(branch2.containsKey(GraphSONTokens.VALUE));
- final HashMap<String, HashMap<String, Object>> branch2Prop = (HashMap<String, HashMap<String, Object>>) branch2.get(GraphSONTokens.VALUE).get("2");
+
+ final Map.Entry entry = branch2.get(GraphSONTokens.VALUE).entrySet().iterator().next();
+ final HashMap<String, HashMap<String, Object>> branch2Prop = (HashMap<String, HashMap<String, Object>>) entry.getValue();
assertTrue(branch2Prop.get(GraphSONTokens.KEY).containsKey(GraphSONTokens.ID));
assertTrue(branch2Prop.get(GraphSONTokens.KEY).containsKey(GraphSONTokens.VALUE));
assertTrue(branch2Prop.get(GraphSONTokens.KEY).containsKey(GraphSONTokens.LABEL));
assertEquals("name", branch2Prop.get(GraphSONTokens.KEY).get(GraphSONTokens.LABEL));
assertEquals("vadas", branch2Prop.get(GraphSONTokens.KEY).get(GraphSONTokens.VALUE));
- assertEquals(2, branch2Prop.get(GraphSONTokens.KEY).get(GraphSONTokens.ID));
+ assertEquals(entry.getKey().toString(), branch2Prop.get(GraphSONTokens.KEY).get(GraphSONTokens.ID).toString());
}
}
}