public synchronized Builder withRetryOnException(final Class<? extends Exception> exceptionClass) {
      if (exceptionClass != null) {
        runnable.retryOn.add(exceptionClass);
      }
      return this;
    }
Class to implement any retry logic in case of exceptions.
ql/src/java/org/apache/hadoop/hive/ql/exec/util/Retryable.java