From 77b4490c7534d4572c5e4995385e46a1794b0e2e Mon Sep 17 00:00:00 2001 From: Peter Somogyi Date: Tue, 30 Jan 2018 10:14:08 +0100 Subject: [PATCH] HBASE-19884 BucketEntryGroup's equals, hashCode and compareTo methods are not consistent Move back to default equals and hashCode --- .../hadoop/hbase/io/hfile/bucket/BucketCache.java | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java index bd2b9c8797..9dac7a2b10 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java @@ -36,7 +36,6 @@ import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.NavigableSet; -import java.util.Objects; import java.util.PriorityQueue; import java.util.Set; import java.util.concurrent.ArrayBlockingQueue; @@ -1396,23 +1395,6 @@ public class BucketCache implements BlockCache, HeapSize { return Long.compare(this.overflow(), that.overflow()); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BucketEntryGroup that = (BucketEntryGroup) o; - return totalSize == that.totalSize && bucketSize == that.bucketSize - && Objects.equals(queue, that.queue); - } - - @Override - public int hashCode() { - return Objects.hash(queue, totalSize, bucketSize); - } } /** -- 2.16.1