You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2018/03/05 14:27:02 UTC

tinkerpop git commit: Added GraphSON/Gryo 3.0 versions of "sink" data CTR

Repository: tinkerpop
Updated Branches:
  refs/heads/tp33 f3f85b2aa -> 875796372


Added GraphSON/Gryo 3.0 versions of "sink" data CTR


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/87579637
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/87579637
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/87579637

Branch: refs/heads/tp33
Commit: 875796372019977a177471f952637c4c80f68f97
Parents: f3f85b2
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Mar 5 09:26:18 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Mar 5 09:26:18 2018 -0500

----------------------------------------------------------------------
 data/tinkerpop-sink.json                        |   3 +++
 data/tinkerpop-sink.kryo                        | Bin 0 -> 288 bytes
 .../structure/IoDataGenerationTest.java         |  21 +++++++++++++++++++
 3 files changed, 24 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/87579637/data/tinkerpop-sink.json
----------------------------------------------------------------------
diff --git a/data/tinkerpop-sink.json b/data/tinkerpop-sink.json
new file mode 100644
index 0000000..c0844a3
--- /dev/null
+++ b/data/tinkerpop-sink.json
@@ -0,0 +1,3 @@
+{"id":{"@type":"g:Int32","@value":2000},"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":{"@type":"g:Int32","@value":5},"outV":{"@type":"g:Int32","@value":2000}}]},"outE":{"msg_pass_test_edge":[{"id":{"@type":"g:Int32","@value":4},"inV":{"@type":"g:Int32","@value":2001}},{"id":{"@type":"g:Int32","@value":5},"inV":{"@type":"g:Int32","@value":2000}}]},"properties":{"name":[{"id":{"@type":"g:Int64","@value":2},"value":"a"}]}}
+{"id":{"@type":"g:Int32","@value":2001},"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":{"@type":"g:Int32","@value":4},"outV":{"@type":"g:Int32","@value":2000}}]},"properties":{"name":[{"id":{"@type":"g:Int64","@value":3},"value":"b"}]}}
+{"id":{"@type":"g:Int32","@value":1000},"label":"loops","inE":{"self":[{"id":{"@type":"g:Int32","@value":1},"outV":{"@type":"g:Int32","@value":1000}}]},"outE":{"self":[{"id":{"@type":"g:Int32","@value":1},"inV":{"@type":"g:Int32","@value":1000}}]},"properties":{"name":[{"id":{"@type":"g:Int64","@value":0},"value":"loop"}]}}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/87579637/data/tinkerpop-sink.kryo
----------------------------------------------------------------------
diff --git a/data/tinkerpop-sink.kryo b/data/tinkerpop-sink.kryo
new file mode 100644
index 0000000..24a3468
Binary files /dev/null and b/data/tinkerpop-sink.kryo differ

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/87579637/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/IoDataGenerationTest.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/IoDataGenerationTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/IoDataGenerationTest.java
index 2c9f220..9ee0ce2 100644
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/IoDataGenerationTest.java
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/IoDataGenerationTest.java
@@ -180,6 +180,16 @@ public class IoDataGenerationTest {
      * No assertions.  Just write out the graph for convenience.
      */
     @Test
+    public void shouldWriteDEFAULTSinkGraphAsGryoV3d0() throws IOException {
+        final OutputStream os = new FileOutputStream(tempPath + "tinkerpop-sink.kryo");
+        GryoWriter.build().mapper(GryoMapper.build().version(GryoVersion.V3_0).create()).create().writeGraph(os, TinkerFactory.createKitchenSink());
+        os.close();
+    }
+
+    /**
+     * No assertions.  Just write out the graph for convenience.
+     */
+    @Test
     public void shouldWriteClassicGraphAsGraphML() throws IOException {
         try (final OutputStream os = new FileOutputStream(tempPath + "tinkerpop-classic.xml")) {
             GraphMLWriter.build().create().writeGraph(os, TinkerFactory.createClassic());
@@ -491,6 +501,17 @@ public class IoDataGenerationTest {
      * No assertions.  Just write out the graph for convenience.
      */
     @Test
+    public void shouldWriteDEFAULTSinkGraphAsGraphSONV3d0() throws IOException {
+        final OutputStream os = new FileOutputStream(tempPath + "tinkerpop-sink.json");
+        GraphSONWriter.build().mapper(GraphSONMapper.build().version(GraphSONVersion.V3_0).create()).create()
+                .writeGraph(os, TinkerFactory.createKitchenSink());
+        os.close();
+    }
+
+    /**
+     * No assertions.  Just write out the graph for convenience.
+     */
+    @Test
     public void shouldWriteClassicGraphNormalizedAsGraphSONV3d0() throws IOException {
         final OutputStream os = new FileOutputStream(tempPath + "tinkerpop-classic-normalized-v3d0.json");
         GraphSONWriter.build().mapper(GraphSONMapper.build().version(GraphSONVersion.V3_0).normalize(true).create()).create()