private Pair<Integer, String> execWithRetries(String hostname, ServiceType service, String... cmd)
    throws IOException {
    RetryCounter retryCounter = retryCounterFactory.create();
    while (true) {
      try {
        return exec(hostname, service, cmd);
      } catch (IOException e) {
        retryOrThrow(retryCounter, e, hostname, cmd);
      }
      try {
        retryCounter.sleepUntilNextRetry();
      } catch (InterruptedException ex) {
        // ignore
        LOG.warn("Sleep Interrupted:", ex);
      }
    }
  }
Execute the given command on the host using SSH
@return pair of exit code and command output
@throws IOException if something goes wrong.
hbase-it/src/test/java/org/apache/hadoop/hbase/HBaseClusterManager.java