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

Hudson commented on GIRAPH-112:
-------------------------------

Integrated in Giraph-trunk-Commit #58 (See 
[https://builds.apache.org/job/Giraph-trunk-Commit/58/])
    GIRAPH-112: Use elements() properly in LongDoubleFloatDoubleVertex.
(aching)

aching : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1222071
Files : 
* /incubator/giraph/trunk/CHANGELOG
* 
/incubator/giraph/trunk/src/main/java/org/apache/giraph/graph/LongDoubleFloatDoubleVertex.java

                
> Use elements() properly in LongDoubleFloatDoubleVertex
> ------------------------------------------------------
>
>                 Key: GIRAPH-112
>                 URL: https://issues.apache.org/jira/browse/GIRAPH-112
>             Project: Giraph
>          Issue Type: Bug
>          Components: graph
>    Affects Versions: 0.70.0
>         Environment: Any
>            Reporter: Yuanyuan Tian
>             Fix For: 0.70.0
>
>         Attachments: GIRAPH-112.patch
>
>   Original Estimate: 5m
>  Remaining Estimate: 5m
>
> I found a bug in LongDoubleFloatDoubleVertex.write(DataOutput out) when 
> running a small graph algorithm. The symptom is that a vertex read from a 
> different worker becomes junk after the RPC communication. And the source of 
> the problem is the writing of the messages in 
> LongDoubleFloatDoubleVertex.write(DataOutput out):
> for(double msg : messageList.elements()) {
>    out.writeDouble(msg);
> }
> Here messageList.elements() will returns all the elements currently stored in 
> the mahout DoubleArrayList, even including invalid elements between size and 
> capacity. Therefore, the write() function will write a bunch of invalid 
> messages, which will cause error when reading them back in readfields().
> The following is a simple solution:
> double[] elements=messageList.elements();
> for(int i=0; i<messageList.size(); i++) {
>    out.writeDouble(elements[i]);
> }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to