giraph-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claudio Martella (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GIRAPH-678) Disorder of vertex de-serialization and 'initialize' method
Date Fri, 07 Jun 2013 13:44:20 GMT

    [ https://issues.apache.org/jira/browse/GIRAPH-678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13678035#comment-13678035
] 

Claudio Martella commented on GIRAPH-678:
-----------------------------------------

i'm not sure where this code is. Is this trunk?
                
> Disorder of vertex de-serialization and 'initialize' method
> -----------------------------------------------------------
>
>                 Key: GIRAPH-678
>                 URL: https://issues.apache.org/jira/browse/GIRAPH-678
>             Project: Giraph
>          Issue Type: Bug
>          Components: graph
>    Affects Versions: 1.0.0, 1.1.0
>         Environment: Giraph 1.0, hadoop 0.20.2
>            Reporter: David Zhang
>            Assignee: Claudio Martella
>
> In org.apache.giraph.utils.Writable.readVertexFromDataInput method.
> 'initialize' method is ahead of vertex de-serialization.
> Change the order is ok:
>   public static <I extends WritableComparable, V extends Writable,
>   E extends Writable, M extends Writable> Vertex<I, V, E, M>
>   readVertexFromDataInput(
>       DataInput input,
>       ImmutableClassesGiraphConfiguration<I, V, E, M> conf)
>     throws IOException {
>     Vertex<I, V, E, M> vertex = conf.createVertex();
>     I id = conf.createVertexId();
>     V value = conf.createVertexValue();
>     OutEdges<I, E> edges = conf.createOutEdges();
>     id.readFields(input);
>     value.readFields(input);
>     edges.readFields(input);
>     if (input.readBoolean()) {
>       vertex.voteToHalt();
>     } else {
>       vertex.wakeUp();
>     }
>     vertex.initialize(id, value, edges);
>     return vertex;
>   }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message