You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2018/02/27 16:44:34 UTC
hbase git commit: Revert "HBASE-20069 fix existing findbugs errors in
hbase-server; ADDENDUM Address review"
Repository: hbase
Updated Branches:
refs/heads/branch-2 367d31678 -> 07eae00ec
Revert "HBASE-20069 fix existing findbugs errors in hbase-server; ADDENDUM Address review"
This reverts commit 43d661b008cda46604ddde2187945bb0caa5bc5f.
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/07eae00e
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/07eae00e
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/07eae00e
Branch: refs/heads/branch-2
Commit: 07eae00ec14a419e4aa29968a3cdc92463625809
Parents: 367d316
Author: Michael Stack <st...@apache.org>
Authored: Tue Feb 27 08:44:22 2018 -0800
Committer: Michael Stack <st...@apache.org>
Committed: Tue Feb 27 08:44:22 2018 -0800
----------------------------------------------------------------------
.../hadoop/hbase/master/ClusterStatusPublisher.java | 6 +-----
.../hadoop/hbase/regionserver/MemStoreFlusher.java | 14 +++++++++++---
.../hbase/regionserver/RegionCoprocessorHost.java | 4 +---
3 files changed, 13 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/07eae00e/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ClusterStatusPublisher.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ClusterStatusPublisher.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ClusterStatusPublisher.java
index 21fa263..5e97204 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ClusterStatusPublisher.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ClusterStatusPublisher.java
@@ -134,7 +134,7 @@ public class ClusterStatusPublisher extends ScheduledChore {
@Override
protected void chore() {
- if (!isConnected()) {
+ if (!connected) {
return;
}
@@ -170,10 +170,6 @@ public class ClusterStatusPublisher extends ScheduledChore {
publisher.close();
}
- private synchronized boolean isConnected() {
- return this.connected;
- }
-
/**
* Create the dead server to send. A dead server is sent NB_SEND times. We send at max
* MAX_SERVER_PER_MESSAGE at a time. if there are too many dead servers, we send the newly
http://git-wip-us.apache.org/repos/asf/hbase/blob/07eae00e/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreFlusher.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreFlusher.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreFlusher.java
index 23321e8..a0e65ec 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreFlusher.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreFlusher.java
@@ -90,9 +90,17 @@ class MemStoreFlusher implements FlushRequester {
private FlushType flushType;
/**
- * Singleton instance inserted into flush queue used for signaling.
+ * Singleton instance of this class inserted into flush queue.
*/
- private static final FlushQueueEntry WAKEUPFLUSH_INSTANCE = new FlushQueueEntry() {
+ private static final WakeupFlushThread WAKEUPFLUSH_INSTANCE = new WakeupFlushThread();
+
+ /**
+ * Marker class used as a token inserted into flush queue that ensures the flusher does not sleep.
+ * Create a single instance only.
+ */
+ private static final class WakeupFlushThread implements FlushQueueEntry {
+ private WakeupFlushThread() {}
+
@Override
public long getDelay(TimeUnit unit) {
return 0;
@@ -112,7 +120,7 @@ class MemStoreFlusher implements FlushRequester {
public int hashCode() {
return 42;
}
- };
+ }
/**
http://git-wip-us.apache.org/repos/asf/hbase/blob/07eae00e/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
index 47b389a..f3c93dc 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
@@ -1119,8 +1119,6 @@ public class RegionCoprocessorHost
* @return true or false to return to client if default processing should be bypassed, or null
* otherwise
*/
- @edu.umd.cs.findbugs.annotations.SuppressWarnings(value="NP_BOOLEAN_RETURN_NULL",
- justification="Null is legit")
public Boolean preCheckAndPutAfterRowLock(
final byte[] row, final byte[] family, final byte[] qualifier, final CompareOperator op,
final ByteArrayComparable comparator, final Put put) throws IOException {
@@ -1209,7 +1207,7 @@ public class RegionCoprocessorHost
* or null otherwise
*/
@edu.umd.cs.findbugs.annotations.SuppressWarnings(value="NP_BOOLEAN_RETURN_NULL",
- justification="Null is legit")
+ justification="TODO: Fix")
public Boolean preCheckAndDeleteAfterRowLock(final byte[] row, final byte[] family,
final byte[] qualifier, final CompareOperator op, final ByteArrayComparable comparator,
final Delete delete) throws IOException {