Revert "Fix the warnings in Checkstyle and FindBugs brought in by merging"

This reverts commit 89d0409462.
This commit is contained in:
Sean Busbey 2015-07-28 10:13:57 -05:00
parent 89d0409462
commit e36af70835
5 changed files with 10 additions and 15 deletions

View File

@ -4217,8 +4217,8 @@ public class HBaseAdmin implements Admin {
HTableDescriptor htd = getTableDescriptor(tableName); HTableDescriptor htd = getTableDescriptor(tableName);
HColumnDescriptor family = htd.getFamily(columnFamily); HColumnDescriptor family = htd.getFamily(columnFamily);
if (family == null || !family.isMobEnabled()) { if (family == null || !family.isMobEnabled()) {
throw new IllegalArgumentException("Column family " + Bytes.toString(columnFamily) throw new IllegalArgumentException("Column family " + columnFamily
+ " is not a mob column family"); + " is not a mob column family");
} }
} }

View File

@ -3013,7 +3013,9 @@ public final class ProtobufUtil {
// This used to be builder.mergeDelimitedFrom(in); // This used to be builder.mergeDelimitedFrom(in);
// but is replaced to allow us to bump the protobuf size limit. // but is replaced to allow us to bump the protobuf size limit.
final int firstByte = in.read(); 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 int size = CodedInputStream.readRawVarint32(firstByte, in);
final InputStream limitedInput = new LimitInputStream(in, size); final InputStream limitedInput = new LimitInputStream(in, size);
final CodedInputStream codedInput = CodedInputStream.newInstance(limitedInput); final CodedInputStream codedInput = CodedInputStream.newInstance(limitedInput);

View File

@ -35,8 +35,6 @@ import org.apache.hadoop.hbase.mob.ExpiredMobFileCleaner;
import org.apache.hadoop.hbase.mob.MobConstants; import org.apache.hadoop.hbase.mob.MobConstants;
import org.apache.hadoop.hbase.mob.MobUtils; import org.apache.hadoop.hbase.mob.MobUtils;
import com.google.protobuf.ServiceException;
/** /**
* The Class ExpiredMobFileCleanerChore for running cleaner regularly to remove the expired * The Class ExpiredMobFileCleanerChore for running cleaner regularly to remove the expired
* mob files. * mob files.
@ -83,12 +81,8 @@ public class ExpiredMobFileCleanerChore extends ScheduledChore {
cleaner.cleanExpiredMobFiles(htd.getTableName().getNameAsString(), hcd); cleaner.cleanExpiredMobFiles(htd.getTableName().getNameAsString(), hcd);
} catch (LockTimeoutException e) { } catch (LockTimeoutException e) {
LOG.info("Fail to acquire the lock because of timeout, maybe a" LOG.info("Fail to acquire the lock because of timeout, maybe a"
+ " MobCompactor is running", e); + " MobFileCompactor is running", e);
} catch (ServiceException e) { } catch (Exception 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( LOG.error(
"Fail to clean the expired mob files for the column " + hcd.getNameAsString() "Fail to clean the expired mob files for the column " + hcd.getNameAsString()
+ " in the table " + htd.getNameAsString(), e); + " in the table " + htd.getNameAsString(), e);

View File

@ -96,7 +96,7 @@ public class SweepJob {
public static final String WORKING_FILES_DIR_KEY = "mob.sweep.job.files.dir"; 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. //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"; 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(); private long compactionStartTime = EnvironmentEdgeManager.currentTime();
public final static String CREDENTIALS_LOCATION = "credentials_location"; public final static String CREDENTIALS_LOCATION = "credentials_location";
private CacheConfig cacheConfig; private CacheConfig cacheConfig;
@ -461,7 +461,7 @@ public class SweepJob {
/** /**
* A result with index. * A result with index.
*/ */
private static class IndexedResult implements Comparable<IndexedResult> { private class IndexedResult implements Comparable<IndexedResult> {
private int index; private int index;
private String value; private String value;
@ -516,7 +516,7 @@ public class SweepJob {
* It merges and sort the readers in different sequence files as one where * It merges and sort the readers in different sequence files as one where
* the results are read in order. * the results are read in order.
*/ */
private static class MergeSortReader { private class MergeSortReader {
private List<SequenceFile.Reader> readers = new ArrayList<SequenceFile.Reader>(); private List<SequenceFile.Reader> readers = new ArrayList<SequenceFile.Reader>();
private PriorityQueue<IndexedResult> results = new PriorityQueue<IndexedResult>(); private PriorityQueue<IndexedResult> results = new PriorityQueue<IndexedResult>();

View File

@ -543,7 +543,6 @@ public class HMobStore extends HStore {
return cellsSizeCompactedFromMob; return cellsSizeCompactedFromMob;
} }
@edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "VO_VOLATILE_INCREMENT")
public void updateMobFlushCount() { public void updateMobFlushCount() {
mobFlushCount++; mobFlushCount++;
} }