[
https://issues.apache.org/jira/browse/HAMA-783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13861460#comment-13861460
]
Edward J. Yoon commented on HAMA-783:
-------------------------------------
I change like this:
{code}
public byte[] serialize(Vertex<V, E, M> vertex) throws IOException {
v = GraphJobRunner.<V, E, M> newVertexInstance(GraphJobRunner.VERTEX_CLASS);
v.setEdges(vertex.getEdges());
v.setValue(vertex.getValue());
if(vertex.isHalted()) {
v.voteToHalt();
}
bos = new ByteArrayOutputStream();
dos = new DataOutputStream(bos);
v.write(dos);
return bos.toByteArray();
}
public Vertex<V, E, M> deserialize(V vertexID, byte[] serialized) throws
IOException {
bis = new ByteArrayInputStream(serialized);
dis = new DataInputStream(bis);
v = GraphJobRunner.<V, E, M> newVertexInstance(GraphJobRunner.VERTEX_CLASS);
v.readFields(dis);
v.setRunner(runner);
v.setVertexID(vertexID);
return v;
}
{code}
> Efficient InMemory Storage for Vertices
> ---------------------------------------
>
> Key: HAMA-783
> URL: https://issues.apache.org/jira/browse/HAMA-783
> Project: Hama
> Issue Type: Improvement
> Components: graph
> Reporter: Edward J. Yoon
> Assignee: Edward J. Yoon
> Fix For: 0.7.0
>
> Attachments: patch.txt
>
>
> Currently there are ListVerticesInfo, DiskVerticesInfo and DirectMemory, but
> I personally think we have to do a big re-design of the vertices storage and
> graph job runner.
> Actually, the size of split is not so great. Maybe, 60 ~ 200MB. Hence, I
> don't think DiskVerticesInfo will be really helpful. Instead, we can use the
> Serialization like Spark.
> Update:
> 1) We also need to consider the checkpointing for Fault Tolerance,
> periodically.
> 2) If DiskVerticesInfo shows good performance, we can use just the
> DiskVerticesInfo.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)