HBASE-26218 Add logs in Canary tool (#4501)

Co-authored-by: Ishika Soni <isoni@isoni-ltmag9r.internal.salesforce.com>
Signed-off-by: Duo Zhang <zhangduo@apache.org>
(cherry picked from commit acfbc3ff7d)
This commit is contained in:
Ishika 2022-06-30 19:23:20 +05:30 committed by Duo Zhang
parent cdc4e892ee
commit a9e346fba7
1 changed files with 3 additions and 0 deletions

View File

@ -146,6 +146,7 @@ public class CanaryTool implements Tool, Canary {
public int checkRegions(String[] targets) throws Exception { public int checkRegions(String[] targets) throws Exception {
String configuredReadTableTimeoutsStr = conf.get(HBASE_CANARY_REGION_READ_TABLE_TIMEOUT); String configuredReadTableTimeoutsStr = conf.get(HBASE_CANARY_REGION_READ_TABLE_TIMEOUT);
try { try {
LOG.info("Canary tool is running in Region mode");
if (configuredReadTableTimeoutsStr != null) { if (configuredReadTableTimeoutsStr != null) {
populateReadTableTimeoutsMap(configuredReadTableTimeoutsStr); populateReadTableTimeoutsMap(configuredReadTableTimeoutsStr);
} }
@ -159,12 +160,14 @@ public class CanaryTool implements Tool, Canary {
@Override @Override
public int checkRegionServers(String[] targets) throws Exception { public int checkRegionServers(String[] targets) throws Exception {
regionServerMode = true; regionServerMode = true;
LOG.info("Canary tool is running in RegionServer mode");
return runMonitor(targets); return runMonitor(targets);
} }
@Override @Override
public int checkZooKeeper() throws Exception { public int checkZooKeeper() throws Exception {
zookeeperMode = true; zookeeperMode = true;
LOG.info("Canary tool is running in ZooKeeper mode");
return runMonitor(null); return runMonitor(null);
} }