Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
Reviewed
Description
In the code below, equals(..) compares lastScanTime but hashCode() is computed using block ID. Therefore, it could have two BlockScanInfo objects which are equal but have two different hash codes.
//BlockScanInfo @Override public int hashCode() { return block.hashCode(); } @Override public boolean equals(Object other) { return other instanceof BlockScanInfo && compareTo((BlockScanInfo)other) == 0; }
Attachments
Attachments
Issue Links
- relates to
-
HDFS-5225 datanode keeps logging the same 'is no longer in the dataset' message over and over again
- Resolved