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 ac9db75c022..b51e8010513 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 " + Bytes.toString(columnFamily) - + " is not a mob column family"); + throw new IllegalArgumentException("Column family " + 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 5bded37db92..0de276296a0 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,7 +3013,9 @@ 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) { + if (firstByte == -1) { + // bail out. (was return false;) + } else { 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 72ac7922fe6..8c9bc2bd518 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,8 +35,6 @@ 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. @@ -83,12 +81,8 @@ 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" - + " 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) { + + " MobFileCompactor is running", e); + } catch (Exception 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 b0c39566b07..3a06ad8c07c 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 final long ONE_DAY = 24 * 60 * 60 * 1000; + protected static 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 static class IndexedResult implements Comparable { + private 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 static class MergeSortReader { + private 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 faf6d813b09..ad0c4d79854 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,7 +543,6 @@ public class HMobStore extends HStore { return cellsSizeCompactedFromMob; } - @edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "VO_VOLATILE_INCREMENT") public void updateMobFlushCount() { mobFlushCount++; }