hbase git commit: HBASE-21320 [canary] Cleanup of usage and add commentary

2018-10-16 Thread stack
Repository: hbase
Updated Branches:
  refs/heads/master 3b91ae5b2 -> 8cc56bd18


HBASE-21320 [canary] Cleanup of usage and add commentary

Signed-off-by: Peter Somogyi 


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/8cc56bd1
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/8cc56bd1
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/8cc56bd1

Branch: refs/heads/master
Commit: 8cc56bd18c40ba9a7131336e97c74f8d97d8b2be
Parents: 3b91ae5
Author: Michael Stack 
Authored: Mon Oct 15 22:09:17 2018 -0700
Committer: Michael Stack 
Committed: Tue Oct 16 22:20:00 2018 -0700

--
 .../org/apache/hadoop/hbase/HConstants.java |   1 +
 .../org/apache/hadoop/hbase/tool/Canary.java| 557 ++-
 .../hadoop/hbase/tool/TestCanaryTool.java   |  10 +-
 src/main/asciidoc/_chapters/ops_mgt.adoc| 146 ++---
 4 files changed, 383 insertions(+), 331 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/8cc56bd1/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
--
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
index beb65fa..fbfab4b 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
@@ -1325,6 +1325,7 @@ public final class HConstants {
 "hbase.regionserver.region.split.threads.max";
 
   /** Canary config keys */
+  // TODO: Move these defines to Canary Class
   public static final String HBASE_CANARY_WRITE_DATA_TTL_KEY = 
"hbase.canary.write.data.ttl";
 
   public static final String 
HBASE_CANARY_WRITE_PERSERVER_REGIONS_LOWERLIMIT_KEY =

http://git-wip-us.apache.org/repos/asf/hbase/blob/8cc56bd1/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java
index 7a549fc..40f4aa6 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java
@@ -90,6 +90,7 @@ import org.apache.hadoop.hbase.zookeeper.ZKConfig;
 import org.apache.hadoop.util.GenericOptionsParser;
 import org.apache.hadoop.util.Tool;
 import org.apache.hadoop.util.ToolRunner;
+import 
org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting;
 import org.apache.yetus.audience.InterfaceAudience;
 import org.apache.zookeeper.KeeperException;
 import org.apache.zookeeper.ZooKeeper;
@@ -101,39 +102,45 @@ import org.slf4j.LoggerFactory;
 import org.apache.hbase.thirdparty.com.google.common.collect.Lists;
 
 /**
- * HBase Canary Tool, that that can be used to do
- * "canary monitoring" of a running HBase cluster.
+ * HBase Canary Tool for "canary monitoring" of a running HBase cluster.
  *
- * Here are three modes
- * 1. region mode - Foreach region tries to get one row per column family
- * and outputs some information about failure or latency.
+ * There are three modes:
+ * 
+ * region mode (Default): For each region, try to get one row per column 
family outputting
+ * information on failure (ERROR) or else the latency.
+ * 
  *
- * 2. regionserver mode - Foreach regionserver tries to get one row from one 
table
- * selected randomly and outputs some information about failure or latency.
+ * regionserver mode: For each regionserver try to get one row from one 
table selected
+ * randomly outputting information on failure (ERROR) or else the latency.
+ * 
  *
- * 3. zookeeper mode - for each zookeeper instance, selects a zNode and
- * outputs some information about failure or latency.
+ * zookeeper mode: for each zookeeper instance, selects a znode outputting 
information on
+ * failure (ERROR) or else the latency.
+ * 
+ * 
  */
 @InterfaceAudience.Private
 public final class Canary implements Tool {
-  // Sink interface used by the canary to outputs information
+  /**
+   * Sink interface used by the canary to output information
+   */
   public interface Sink {
-public long getReadFailureCount();
-public long incReadFailureCount();
-public Map getReadFailures();
-public void updateReadFailures(String regionName, String serverName);
-public long getWriteFailureCount();
-public long incWriteFailureCount();
-public Map getWriteFailures();
-public void updateWriteFailures(String regionName, String serverName);
+long getReadFailureCount();
+long incReadFailureCount();
+Map getReadFailures();
+void updateReadFailures(String regionName, String 

hbase git commit: HBASE-21320 [canary] Cleanup of usage and add commentary

2018-10-16 Thread stack
Repository: hbase
Updated Branches:
  refs/heads/branch-2.0 a586debe1 -> f3a80a7ed


HBASE-21320 [canary] Cleanup of usage and add commentary

Signed-off-by: Peter Somogyi 


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/f3a80a7e
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/f3a80a7e
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/f3a80a7e

Branch: refs/heads/branch-2.0
Commit: f3a80a7ed35980bce8d667f00b3b7c83b59db8be
Parents: a586deb
Author: Michael Stack 
Authored: Mon Oct 15 22:09:17 2018 -0700
Committer: Michael Stack 
Committed: Tue Oct 16 22:16:38 2018 -0700

--
 .../org/apache/hadoop/hbase/HConstants.java |   1 +
 .../org/apache/hadoop/hbase/tool/Canary.java| 546 ++-
 .../hadoop/hbase/tool/TestCanaryTool.java   |  10 +-
 src/main/asciidoc/_chapters/ops_mgt.adoc| 146 ++---
 4 files changed, 376 insertions(+), 327 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/f3a80a7e/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
--
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
index 3937cd5..6f54d16 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
@@ -1328,6 +1328,7 @@ public final class HConstants {
 "hbase.regionserver.region.split.threads.max";
 
   /** Canary config keys */
+  // TODO: Move these defines to Canary Class
   public static final String HBASE_CANARY_WRITE_DATA_TTL_KEY = 
"hbase.canary.write.data.ttl";
 
   public static final String 
HBASE_CANARY_WRITE_PERSERVER_REGIONS_LOWERLIMIT_KEY =

http://git-wip-us.apache.org/repos/asf/hbase/blob/f3a80a7e/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java
index ae6324f..66cf637 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java
@@ -90,6 +90,7 @@ import org.apache.hadoop.hbase.zookeeper.ZKConfig;
 import org.apache.hadoop.util.GenericOptionsParser;
 import org.apache.hadoop.util.Tool;
 import org.apache.hadoop.util.ToolRunner;
+import 
org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting;
 import org.apache.yetus.audience.InterfaceAudience;
 import org.apache.zookeeper.KeeperException;
 import org.apache.zookeeper.ZooKeeper;
@@ -101,39 +102,45 @@ import org.slf4j.LoggerFactory;
 import org.apache.hbase.thirdparty.com.google.common.collect.Lists;
 
 /**
- * HBase Canary Tool, that that can be used to do
- * "canary monitoring" of a running HBase cluster.
+ * HBase Canary Tool for "canary monitoring" of a running HBase cluster.
  *
- * Here are three modes
- * 1. region mode - Foreach region tries to get one row per column family
- * and outputs some information about failure or latency.
+ * There are three modes:
+ * 
+ * region mode (Default): For each region, try to get one row per column 
family outputting
+ * information on failure (ERROR) or else the latency.
+ * 
  *
- * 2. regionserver mode - Foreach regionserver tries to get one row from one 
table
- * selected randomly and outputs some information about failure or latency.
+ * regionserver mode: For each regionserver try to get one row from one 
table selected
+ * randomly outputting information on failure (ERROR) or else the latency.
+ * 
  *
- * 3. zookeeper mode - for each zookeeper instance, selects a zNode and
- * outputs some information about failure or latency.
+ * zookeeper mode: for each zookeeper instance, selects a znode outputting 
information on
+ * failure (ERROR) or else the latency.
+ * 
+ * 
  */
 @InterfaceAudience.Private
 public final class Canary implements Tool {
-  // Sink interface used by the canary to outputs information
+  /**
+   * Sink interface used by the canary to output information
+   */
   public interface Sink {
-public long getReadFailureCount();
-public long incReadFailureCount();
-public Map getReadFailures();
-public void updateReadFailures(String regionName, String serverName);
-public long getWriteFailureCount();
-public long incWriteFailureCount();
-public Map getWriteFailures();
-public void updateWriteFailures(String regionName, String serverName);
+long getReadFailureCount();
+long incReadFailureCount();
+Map getReadFailures();
+void updateReadFailures(String regionName, 

hbase git commit: HBASE-21320 [canary] Cleanup of usage and add commentary

2018-10-16 Thread stack
Repository: hbase
Updated Branches:
  refs/heads/branch-2 1a0e1039a -> c67f7f14e


HBASE-21320 [canary] Cleanup of usage and add commentary

Signed-off-by: Peter Somogyi 


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/c67f7f14
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/c67f7f14
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/c67f7f14

Branch: refs/heads/branch-2
Commit: c67f7f14e26f027c3c85e50995cc74e73bc08b43
Parents: 1a0e103
Author: Michael Stack 
Authored: Mon Oct 15 22:09:17 2018 -0700
Committer: Michael Stack 
Committed: Tue Oct 16 22:19:34 2018 -0700

--
 .../org/apache/hadoop/hbase/HConstants.java |   1 +
 .../org/apache/hadoop/hbase/tool/Canary.java| 557 ++-
 .../hadoop/hbase/tool/TestCanaryTool.java   |  10 +-
 src/main/asciidoc/_chapters/ops_mgt.adoc| 146 ++---
 4 files changed, 383 insertions(+), 331 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/c67f7f14/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
--
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
index 1231ec4..7aa1494 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
@@ -1367,6 +1367,7 @@ public final class HConstants {
 "hbase.regionserver.region.split.threads.max";
 
   /** Canary config keys */
+  // TODO: Move these defines to Canary Class
   public static final String HBASE_CANARY_WRITE_DATA_TTL_KEY = 
"hbase.canary.write.data.ttl";
 
   public static final String 
HBASE_CANARY_WRITE_PERSERVER_REGIONS_LOWERLIMIT_KEY =

http://git-wip-us.apache.org/repos/asf/hbase/blob/c67f7f14/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java
index 7a549fc..40f4aa6 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java
@@ -90,6 +90,7 @@ import org.apache.hadoop.hbase.zookeeper.ZKConfig;
 import org.apache.hadoop.util.GenericOptionsParser;
 import org.apache.hadoop.util.Tool;
 import org.apache.hadoop.util.ToolRunner;
+import 
org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting;
 import org.apache.yetus.audience.InterfaceAudience;
 import org.apache.zookeeper.KeeperException;
 import org.apache.zookeeper.ZooKeeper;
@@ -101,39 +102,45 @@ import org.slf4j.LoggerFactory;
 import org.apache.hbase.thirdparty.com.google.common.collect.Lists;
 
 /**
- * HBase Canary Tool, that that can be used to do
- * "canary monitoring" of a running HBase cluster.
+ * HBase Canary Tool for "canary monitoring" of a running HBase cluster.
  *
- * Here are three modes
- * 1. region mode - Foreach region tries to get one row per column family
- * and outputs some information about failure or latency.
+ * There are three modes:
+ * 
+ * region mode (Default): For each region, try to get one row per column 
family outputting
+ * information on failure (ERROR) or else the latency.
+ * 
  *
- * 2. regionserver mode - Foreach regionserver tries to get one row from one 
table
- * selected randomly and outputs some information about failure or latency.
+ * regionserver mode: For each regionserver try to get one row from one 
table selected
+ * randomly outputting information on failure (ERROR) or else the latency.
+ * 
  *
- * 3. zookeeper mode - for each zookeeper instance, selects a zNode and
- * outputs some information about failure or latency.
+ * zookeeper mode: for each zookeeper instance, selects a znode outputting 
information on
+ * failure (ERROR) or else the latency.
+ * 
+ * 
  */
 @InterfaceAudience.Private
 public final class Canary implements Tool {
-  // Sink interface used by the canary to outputs information
+  /**
+   * Sink interface used by the canary to output information
+   */
   public interface Sink {
-public long getReadFailureCount();
-public long incReadFailureCount();
-public Map getReadFailures();
-public void updateReadFailures(String regionName, String serverName);
-public long getWriteFailureCount();
-public long incWriteFailureCount();
-public Map getWriteFailures();
-public void updateWriteFailures(String regionName, String serverName);
+long getReadFailureCount();
+long incReadFailureCount();
+Map getReadFailures();
+void updateReadFailures(String regionName, String 

hbase git commit: HBASE-21320 [canary] Cleanup of usage and add commentary

2018-10-16 Thread stack
Repository: hbase
Updated Branches:
  refs/heads/branch-2.1 b0846fb76 -> 999a3c67d


HBASE-21320 [canary] Cleanup of usage and add commentary

Signed-off-by: Peter Somogyi 


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/999a3c67
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/999a3c67
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/999a3c67

Branch: refs/heads/branch-2.1
Commit: 999a3c67d420d51fad53b08dace5bbce1af43e9b
Parents: b0846fb
Author: Michael Stack 
Authored: Mon Oct 15 22:09:17 2018 -0700
Committer: Michael Stack 
Committed: Tue Oct 16 22:12:13 2018 -0700

--
 .../org/apache/hadoop/hbase/HConstants.java |   1 +
 .../org/apache/hadoop/hbase/tool/Canary.java| 557 ++-
 .../hadoop/hbase/tool/TestCanaryTool.java   |  10 +-
 src/main/asciidoc/_chapters/ops_mgt.adoc| 146 ++---
 4 files changed, 383 insertions(+), 331 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/999a3c67/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
--
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
index 284e925..42288c5 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
@@ -1362,6 +1362,7 @@ public final class HConstants {
 "hbase.regionserver.region.split.threads.max";
 
   /** Canary config keys */
+  // TODO: Move these defines to Canary Class
   public static final String HBASE_CANARY_WRITE_DATA_TTL_KEY = 
"hbase.canary.write.data.ttl";
 
   public static final String 
HBASE_CANARY_WRITE_PERSERVER_REGIONS_LOWERLIMIT_KEY =

http://git-wip-us.apache.org/repos/asf/hbase/blob/999a3c67/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java
index 7a549fc..40f4aa6 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java
@@ -90,6 +90,7 @@ import org.apache.hadoop.hbase.zookeeper.ZKConfig;
 import org.apache.hadoop.util.GenericOptionsParser;
 import org.apache.hadoop.util.Tool;
 import org.apache.hadoop.util.ToolRunner;
+import 
org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting;
 import org.apache.yetus.audience.InterfaceAudience;
 import org.apache.zookeeper.KeeperException;
 import org.apache.zookeeper.ZooKeeper;
@@ -101,39 +102,45 @@ import org.slf4j.LoggerFactory;
 import org.apache.hbase.thirdparty.com.google.common.collect.Lists;
 
 /**
- * HBase Canary Tool, that that can be used to do
- * "canary monitoring" of a running HBase cluster.
+ * HBase Canary Tool for "canary monitoring" of a running HBase cluster.
  *
- * Here are three modes
- * 1. region mode - Foreach region tries to get one row per column family
- * and outputs some information about failure or latency.
+ * There are three modes:
+ * 
+ * region mode (Default): For each region, try to get one row per column 
family outputting
+ * information on failure (ERROR) or else the latency.
+ * 
  *
- * 2. regionserver mode - Foreach regionserver tries to get one row from one 
table
- * selected randomly and outputs some information about failure or latency.
+ * regionserver mode: For each regionserver try to get one row from one 
table selected
+ * randomly outputting information on failure (ERROR) or else the latency.
+ * 
  *
- * 3. zookeeper mode - for each zookeeper instance, selects a zNode and
- * outputs some information about failure or latency.
+ * zookeeper mode: for each zookeeper instance, selects a znode outputting 
information on
+ * failure (ERROR) or else the latency.
+ * 
+ * 
  */
 @InterfaceAudience.Private
 public final class Canary implements Tool {
-  // Sink interface used by the canary to outputs information
+  /**
+   * Sink interface used by the canary to output information
+   */
   public interface Sink {
-public long getReadFailureCount();
-public long incReadFailureCount();
-public Map getReadFailures();
-public void updateReadFailures(String regionName, String serverName);
-public long getWriteFailureCount();
-public long incWriteFailureCount();
-public Map getWriteFailures();
-public void updateWriteFailures(String regionName, String serverName);
+long getReadFailureCount();
+long incReadFailureCount();
+Map getReadFailures();
+void updateReadFailures(String regionName,