You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "lei w (Jira)" <ji...@apache.org> on 2021/07/13 12:55:00 UTC
[jira] [Created] (HDFS-16126) VolumePair should override
hashcode() method
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: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org