[ 
https://issues.apache.org/jira/browse/HDFS-16126?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

lei w resolved HDFS-16126.
--------------------------
    Resolution: Invalid

>  VolumePair  should  override hashcode() method
> -----------------------------------------------
>
>                 Key: HDFS-16126
>                 URL: https://issues.apache.org/jira/browse/HDFS-16126
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: diskbalancer
>            Reporter: lei w
>            Priority: Minor
>
> Now  we use a map to check  one plan with more than one line of same 
> VolumePair in createWorkPlan(final VolumePair volumePair, Step step) , code 
> is as flow:
> {code:java}
> private void createWorkPlan(final VolumePair volumePair, Step step)
>       throws DiskBalancerException {
>      // ... 
>     // In case we have a plan with more than
>     // one line of same VolumePair
>     // we compress that into one work order.
>     if (workMap.containsKey(volumePair)) {        //  To check use map
>       bytesToMove += workMap.get(volumePair).getBytesToCopy();
>     }
>    // ...
>   }
> {code}
>  I found the object volumePair is always a new object and without hashcode() 
> method, So use a map to check is invalid. Should we add  hashcode() in 
> VolumePair ?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to