Revert "Backport "HBASE-21126 Add ability for HBase Canary to ignore a configurable number of ZooKeeper down nodes" to branch-2.0"

This reverts commit f60617ca0f7d142f22aced96f1e7865ae107a291.

Misapplied. Revert to fix.
This commit is contained in:
stack 2018-12-05 22:24:09 -08:00
parent f60617ca0f
commit ec39dc8c14

View File

@ -599,6 +599,7 @@ public final class Canary implements Tool {
* True if we are to run in zookeeper 'mode'. * True if we are to run in zookeeper 'mode'.
*/ */
private boolean zookeeperMode = false; private boolean zookeeperMode = false;
private long permittedFailures = 0; private long permittedFailures = 0;
private boolean regionServerAllRegions = false; private boolean regionServerAllRegions = false;
private boolean writeSniffing = false; private boolean writeSniffing = false;
@ -891,8 +892,6 @@ public final class Canary implements Tool {
"random one."); "random one.");
System.err.println(" -zookeeper set 'zookeeper mode'; grab zookeeper.znode.parent on " + System.err.println(" -zookeeper set 'zookeeper mode'; grab zookeeper.znode.parent on " +
"each ensemble member"); "each ensemble member");
System.err.println(" -permittedZookeeperFailures <N> Ignore first N failures when attempting to " +
"connect to individual zookeeper nodes in the ensemble");
System.err.println(" -daemon continuous check at defined intervals."); System.err.println(" -daemon continuous check at defined intervals.");
System.err.println(" -interval <N> interval between checks in seconds"); System.err.println(" -interval <N> interval between checks in seconds");
System.err.println(" -e consider table/regionserver argument as regular " + System.err.println(" -e consider table/regionserver argument as regular " +
@ -958,7 +957,8 @@ public final class Canary implements Tool {
monitor = monitor =
new ZookeeperMonitor(connection, monitorTargets, this.useRegExp, new ZookeeperMonitor(connection, monitorTargets, this.useRegExp,
getSink(connection.getConfiguration(), ZookeeperStdOutSink.class), getSink(connection.getConfiguration(), ZookeeperStdOutSink.class),
this.executor, this.treatFailureAsError, this.permittedFailures); this.executor, this.treatFailureAsError,
this.permittedFailures);
} else { } else {
monitor = monitor =
new RegionMonitor(connection, monitorTargets, this.useRegExp, new RegionMonitor(connection, monitorTargets, this.useRegExp,
@ -1078,9 +1078,10 @@ public final class Canary implements Tool {
public RegionMonitor(Connection connection, String[] monitorTargets, boolean useRegExp, public RegionMonitor(Connection connection, String[] monitorTargets, boolean useRegExp,
Sink sink, ExecutorService executor, boolean writeSniffing, TableName writeTableName, Sink sink, ExecutorService executor, boolean writeSniffing, TableName writeTableName,
boolean treatFailureAsError, HashMap<String, Long> configuredReadTableTimeouts, boolean treatFailureAsError, HashMap<String, Long> configuredReadTableTimeouts,
long configuredWriteTableTimeout, long allowedFailures) { long configuredWriteTableTimeout,
long allowedFailures) {
super(connection, monitorTargets, useRegExp, sink, executor, treatFailureAsError, super(connection, monitorTargets, useRegExp, sink, executor, treatFailureAsError,
allowedFailures); allowedFailures);
Configuration conf = connection.getConfiguration(); Configuration conf = connection.getConfiguration();
this.writeSniffing = writeSniffing; this.writeSniffing = writeSniffing;
this.writeTableName = writeTableName; this.writeTableName = writeTableName;