diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/coprocessor/AggregationClient.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/coprocessor/AggregationClient.java index 366d176..3b37238 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/coprocessor/AggregationClient.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/coprocessor/AggregationClient.java @@ -450,7 +450,7 @@ public class AggregationClient { S sum = null; Long rowCount = 0l; - public Pair getAvgArgs() { + public synchronized Pair getAvgArgs() { return new Pair(sum, rowCount); } @@ -547,7 +547,7 @@ public class AggregationClient { long rowCountVal = 0l; S sumVal = null, sumSqVal = null; - public Pair, Long> getStdParams() { + public synchronized Pair, Long> getStdParams() { List l = new ArrayList(); l.add(sumVal); l.add(sumSqVal); @@ -670,7 +670,7 @@ public class AggregationClient { class StdCallback implements Batch.Callback> { S sumVal = null, sumWeights = null; - public Pair>, List> getMedianParams() { + public synchronized Pair>, List> getMedianParams() { List l = new ArrayList(); l.add(sumVal); l.add(sumWeights); diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FilterList.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FilterList.java index 431b289..4c8a6c1 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FilterList.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FilterList.java @@ -235,6 +235,8 @@ final public class FilterList extends Filter { @Override + @edu.umd.cs.findbugs.annotations.SuppressWarnings(value="SF_SWITCH_FALLTHROUGH", + justification="Intentional") public ReturnCode filterKeyValue(Cell v) throws IOException { this.referenceKV = v; @@ -252,7 +254,7 @@ final public class FilterList extends Filter { switch (code) { // Override INCLUDE and continue to evaluate. case INCLUDE_AND_NEXT_COL: - rc = ReturnCode.INCLUDE_AND_NEXT_COL; + rc = ReturnCode.INCLUDE_AND_NEXT_COL; // FindBugs SF_SWITCH_FALLTHROUGH case INCLUDE: transformed = filter.transformCell(transformed); continue; diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/NullComparator.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/NullComparator.java index 6f9ca11..1374a2e 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/NullComparator.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/NullComparator.java @@ -77,8 +77,8 @@ public class NullComparator extends ByteArrayComparable { public static NullComparator parseFrom(final byte [] pbBytes) throws DeserializationException { try { - @SuppressWarnings("unused") - ComparatorProtos.NullComparator proto = ComparatorProtos.NullComparator.parseFrom(pbBytes); + // Just parse. Don't use what we parse since on end we are returning new NullComparator. + ComparatorProtos.NullComparator.parseFrom(pbBytes); } catch (InvalidProtocolBufferException e) { throw new DeserializationException(e); } diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/client/ClientSideRegionScanner.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/client/ClientSideRegionScanner.java index 71c6e49..c19e240 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/client/ClientSideRegionScanner.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/client/ClientSideRegionScanner.java @@ -74,7 +74,7 @@ public class ClientSideRegionScanner extends AbstractClientScanner { values.clear(); scanner.nextRaw(values, -1); // pass -1 as limit so that we see the whole row. - if (values == null || values.isEmpty()) { + if (values.isEmpty()) { //we are done return null; } diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/AbstractHFileReader.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/AbstractHFileReader.java index 0d8f1e3..4d46233 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/AbstractHFileReader.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/AbstractHFileReader.java @@ -37,14 +37,15 @@ import org.apache.hadoop.hbase.io.hfile.HFile.FileInfo; * Common functionality needed by all versions of {@link HFile} readers. */ @InterfaceAudience.Private +@edu.umd.cs.findbugs.annotations.SuppressWarnings(value="URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") public abstract class AbstractHFileReader implements HFile.Reader, Configurable { /** Stream to read from. Does checksum verifications in file system */ - protected FSDataInputStream istream; + protected FSDataInputStream istream; // UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD /** The file system stream of the underlying {@link HFile} that * does not do checksum verification in the file system */ - protected FSDataInputStream istreamNoFsChecksum; + protected FSDataInputStream istreamNoFsChecksum; // UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD /** Data block index reader keeping the root data index in memory */ protected HFileBlockIndex.BlockIndexReader dataBlockIndexReader; @@ -95,6 +96,7 @@ public abstract class AbstractHFileReader protected Configuration conf; + @edu.umd.cs.findbugs.annotations.SuppressWarnings(value="URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") protected AbstractHFileReader(Path path, FixedFileTrailer trailer, final long fileSize, final CacheConfig cacheConf, final HFileSystem hfs, final Configuration conf) { @@ -104,7 +106,7 @@ public abstract class AbstractHFileReader this.fileSize = fileSize; this.path = path; this.name = path.getName(); - this.hfs = hfs; + this.hfs = hfs; // URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD this.conf = conf; } diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java index 552952b..5c21ec1 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java @@ -1165,8 +1165,7 @@ public class RpcServer implements RpcServerInterface { // Fake 'call' for failed authorization response private static final int AUTHROIZATION_FAILED_CALLID = -1; private final Call authFailedCall = - new Call(AUTHROIZATION_FAILED_CALLID, this.service, null, - null, null, null, this, null, 0, null); + new Call(AUTHROIZATION_FAILED_CALLID, null, null, null, null, null, this, null, 0, null); private ByteArrayOutputStream authFailedResponse = new ByteArrayOutputStream(); // Fake 'call' for SASL context setup diff --git a/hbase-server/src/main/javadoc/org/apache/hadoop/hbase/io/hfile/package.html b/hbase-server/src/main/javadoc/org/apache/hadoop/hbase/io/hfile/package.html deleted file mode 100644 index fa9244f..0000000 --- a/hbase-server/src/main/javadoc/org/apache/hadoop/hbase/io/hfile/package.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - -Provides the hbase data+index+metadata file. - -