lei w created HDFS-16126:
----------------------------
Summary: 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
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: [email protected]
For additional commands, e-mail: [email protected]