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 2015/04/24 16:37:50 UTC
incubator-tinkerpop git commit: Made the cache for
GryoReader.readGraph be Map.
Repository: incubator-tinkerpop
Updated Branches:
refs/heads/refactor-io 8d41ec2a2 -> a92e1cead
Made the cache for GryoReader.readGraph be Map<StarVertex,Vertex>.
Enforces the notion that the serialization is always StarVertex.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/a92e1cea
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/a92e1cea
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/a92e1cea
Branch: refs/heads/refactor-io
Commit: a92e1ceadeb69e7342c6c3ff01150c732a425ff7
Parents: 8d41ec2
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Apr 24 10:36:58 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Apr 24 10:36:58 2015 -0400
----------------------------------------------------------------------
.../apache/tinkerpop/gremlin/structure/io/gryo/GryoReader.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/a92e1cea/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoReader.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoReader.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoReader.java
index 02974d4..921c32d 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoReader.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoReader.java
@@ -99,9 +99,9 @@ public class GryoReader implements GraphReader {
public void readGraph(final InputStream inputStream, final Graph graphToWriteTo) throws IOException {
// dual pass - create all vertices and store to cache the ids. then create edges. as long as we don't
// have vertex labels in the output we can't do this single pass
- final Map<Vertex,Vertex> cache = new HashMap<>();
+ final Map<StarGraph.StarVertex,Vertex> cache = new HashMap<>();
IteratorUtils.iterate(new VertexInputIterator(new Input(inputStream), attachable ->
- cache.put(attachable.get(), attachable.attach(Attachable.Method.create(graphToWriteTo)))));
+ cache.put((StarGraph.StarVertex) attachable.get(), attachable.attach(Attachable.Method.create(graphToWriteTo)))));
cache.entrySet().forEach(kv -> kv.getKey().edges(Direction.OUT)
.forEachRemaining(e -> ((StarGraph.StarEdge) e).attach(Attachable.Method.create(kv.getValue()))));
}