diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java index b51e8010513..ac9db75c022 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java @@ -4217,8 +4217,8 @@ public class HBaseAdmin implements Admin { HTableDescriptor htd = getTableDescriptor(tableName); HColumnDescriptor family = htd.getFamily(columnFamily); if (family == null || !family.isMobEnabled()) { - throw new IllegalArgumentException("Column family " + columnFamily - + " is not a mob column family"); + throw new IllegalArgumentException("Column family " + Bytes.toString(columnFamily) + + " is not a mob column family"); } } diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java index 0de276296a0..5bded37db92 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java @@ -3013,9 +3013,7 @@ public final class ProtobufUtil { // This used to be builder.mergeDelimitedFrom(in); // but is replaced to allow us to bump the protobuf size limit. final int firstByte = in.read(); - if (firstByte == -1) { - // bail out. (was return false;) - } else { + if (firstByte != -1) { final int size = CodedInputStream.readRawVarint32(firstByte, in); final InputStream limitedInput = new LimitInputStream(in, size); final CodedInputStream codedInput = CodedInputStream.newInstance(limitedInput); diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ExpiredMobFileCleanerChore.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ExpiredMobFileCleanerChore.java index 8c9bc2bd518..72ac7922fe6 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ExpiredMobFileCleanerChore.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ExpiredMobFileCleanerChore.java @@ -35,6 +35,8 @@ import org.apache.hadoop.hbase.mob.ExpiredMobFileCleaner; import org.apache.hadoop.hbase.mob.MobConstants; import org.apache.hadoop.hbase.mob.MobUtils; +import com.google.protobuf.ServiceException; + /** * The Class ExpiredMobFileCleanerChore for running cleaner regularly to remove the expired * mob files. @@ -81,8 +83,12 @@ public class ExpiredMobFileCleanerChore extends ScheduledChore { cleaner.cleanExpiredMobFiles(htd.getTableName().getNameAsString(), hcd); } catch (LockTimeoutException e) { LOG.info("Fail to acquire the lock because of timeout, maybe a" - + " MobFileCompactor is running", e); - } catch (Exception e) { + + " MobCompactor is running", e); + } catch (ServiceException e) { + LOG.error( + "Fail to clean the expired mob files for the column " + hcd.getNameAsString() + + " in the table " + htd.getNameAsString(), e); + } catch (IOException e) { LOG.error( "Fail to clean the expired mob files for the column " + hcd.getNameAsString() + " in the table " + htd.getNameAsString(), e); diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/mapreduce/SweepJob.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/mapreduce/SweepJob.java index 3a06ad8c07c..b0c39566b07 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/mapreduce/SweepJob.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/mapreduce/SweepJob.java @@ -96,7 +96,7 @@ public class SweepJob { public static final String WORKING_FILES_DIR_KEY = "mob.sweep.job.files.dir"; //the MOB_SWEEP_JOB_DELAY is ONE_DAY by default. Its value is only changed when testing. public static final String MOB_SWEEP_JOB_DELAY = "hbase.mob.sweep.job.delay"; - protected static long ONE_DAY = 24 * 60 * 60 * 1000; + protected static final long ONE_DAY = 24 * 60 * 60 * 1000; private long compactionStartTime = EnvironmentEdgeManager.currentTime(); public final static String CREDENTIALS_LOCATION = "credentials_location"; private CacheConfig cacheConfig; @@ -461,7 +461,7 @@ public class SweepJob { /** * A result with index. */ - private class IndexedResult implements Comparable { + private static class IndexedResult implements Comparable { private int index; private String value; @@ -516,7 +516,7 @@ public class SweepJob { * It merges and sort the readers in different sequence files as one where * the results are read in order. */ - private class MergeSortReader { + private static class MergeSortReader { private List readers = new ArrayList(); private PriorityQueue results = new PriorityQueue(); diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HMobStore.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HMobStore.java index ad0c4d79854..faf6d813b09 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HMobStore.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HMobStore.java @@ -543,6 +543,7 @@ public class HMobStore extends HStore { return cellsSizeCompactedFromMob; } + @edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "VO_VOLATILE_INCREMENT") public void updateMobFlushCount() { mobFlushCount++; }