public boolean finalCheckForErrors() {
      if (errorCode != 0) {
        return true;
      }
      if (
        treatFailureAsError && (sink.getReadFailureCount() > allowedFailures
          || sink.getWriteFailureCount() > allowedFailures)
      ) {
        LOG.error("Too many failures detected, treating failure as error, failing the Canary.");
        errorCode = FAILURE_EXIT_CODE;
        return true;
      }
      return false;
    }
'Target' dependent on 'mode'. Could be Tables or RegionServers or ZNodes. Passed on the
command-line as arguments.
hbase-server/src/main/java/org/apache/hadoop/hbase/tool/CanaryTool.java