HBASE-14100 Fix high priority findbugs warnings
This commit is contained in:
parent
46e5a8f3e5
commit
12f6470bf3
@ -27,6 +27,7 @@ import static org.apache.hadoop.hbase.master.SplitLogManager.TerminationStatus.S
|
||||
import java.io.IOException;
|
||||
import java.io.InterruptedIOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
@ -299,7 +300,8 @@ public class SplitLogManager {
|
||||
FileStatus[] files = fs.listStatus(logDir);
|
||||
if (files != null && files.length > 0) {
|
||||
LOG.warn("Returning success without actually splitting and "
|
||||
+ "deleting all the log files in path " + logDir + ": " + files, ioe);
|
||||
+ "deleting all the log files in path " + logDir + ": "
|
||||
+ Arrays.toString(files), ioe);
|
||||
} else {
|
||||
LOG.warn("Unable to delete log src dir. Ignoring. " + logDir, ioe);
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ public class SimpleRegionNormalizer implements RegionNormalizer {
|
||||
// is more high priority normalization action than merge.
|
||||
if (largestRegion.getSecond() > 2 * avgRegionSize) {
|
||||
LOG.debug("Table " + table + ", largest region "
|
||||
+ largestRegion.getFirst().getRegionName() + " has size "
|
||||
+ largestRegion.getFirst().getRegionNameAsString() + " has size "
|
||||
+ largestRegion.getSecond() + ", more than 2 times than avg size, splitting");
|
||||
return new SplitNormalizationPlan(largestRegion.getFirst(), null);
|
||||
} else {
|
||||
|
@ -53,11 +53,13 @@ public class AverageIntervalRateLimiter extends RateLimiter {
|
||||
|
||||
// This method is for strictly testing purpose only
|
||||
@VisibleForTesting
|
||||
@Override
|
||||
public void setNextRefillTime(long nextRefillTime) {
|
||||
this.nextRefillTime = nextRefillTime;
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
@Override
|
||||
public long getNextRefillTime() {
|
||||
return this.nextRefillTime;
|
||||
}
|
||||
|
@ -45,11 +45,13 @@ public class FixedIntervalRateLimiter extends RateLimiter {
|
||||
|
||||
// This method is for strictly testing purpose only
|
||||
@VisibleForTesting
|
||||
@Override
|
||||
public void setNextRefillTime(long nextRefillTime) {
|
||||
this.nextRefillTime = nextRefillTime;
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
@Override
|
||||
public long getNextRefillTime() {
|
||||
return this.nextRefillTime;
|
||||
}
|
||||
|
@ -191,13 +191,10 @@ public abstract class RateLimiter {
|
||||
return (amount <= avail) ? 0 : getWaitInterval(limit, avail, amount);
|
||||
}
|
||||
|
||||
// This method is for strictly testing purpose only
|
||||
// These two method are for strictly testing purpose only
|
||||
@VisibleForTesting
|
||||
public void setNextRefillTime(long nextRefillTime) {
|
||||
this.setNextRefillTime(nextRefillTime);
|
||||
}
|
||||
public abstract void setNextRefillTime(long nextRefillTime);
|
||||
|
||||
public long getNextRefillTime() {
|
||||
return this.getNextRefillTime();
|
||||
}
|
||||
@VisibleForTesting
|
||||
public abstract long getNextRefillTime();
|
||||
}
|
||||
|
@ -1235,8 +1235,7 @@ public class WALSplitter {
|
||||
}
|
||||
}
|
||||
controller.checkForErrors();
|
||||
LOG.info((this.writerThreads == null? 0: this.writerThreads.size()) +
|
||||
" split writers finished; closing...");
|
||||
LOG.info(this.writerThreads.size() + " split writers finished; closing...");
|
||||
return (!progress_failed);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user