HBASE-7588 Fix two findbugs warning in MemStoreFlusher

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1437119 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2013-01-22 19:42:30 +00:00
parent 14a20fceee
commit 3b345cd684
1 changed files with 19 additions and 0 deletions

View File

@ -20,6 +20,7 @@ package org.apache.hadoop.hbase.regionserver;
import java.io.IOException;
import java.lang.management.ManagementFactory;
import java.util.Arrays;
import java.util.ConcurrentModificationException;
import java.util.HashMap;
import java.util.HashSet;
@ -44,6 +45,7 @@ import org.apache.hadoop.hbase.RemoteExceptionHandler;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
import org.apache.hadoop.hbase.util.HasThread;
import org.apache.hadoop.hbase.util.HashedBytes;
import org.apache.hadoop.util.StringUtils;
import org.cliffc.high_scale_lib.Counter;
@ -530,6 +532,12 @@ class MemStoreFlusher extends HasThread implements FlushRequester {
public int compareTo(Delayed o) {
return -1;
}
@Override
public boolean equals(Object obj) {
return (this == obj);
}
}
/**
@ -592,10 +600,21 @@ class MemStoreFlusher extends HasThread implements FlushRequester {
return Long.valueOf(getDelay(TimeUnit.MILLISECONDS) -
other.getDelay(TimeUnit.MILLISECONDS)).intValue();
}
@Override
public String toString() {
return "[flush region " + Bytes.toStringBinary(region.getRegionName()) + "]";
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null || getClass() != obj.getClass())
return false;
Delayed other = (Delayed) obj;
return compareTo(other) == 0;
}
}
}