@SuppressWarnings({ "WeakerAccess", "SameParameterValue" }) static <T> T retry(final Task<T> f,
      final Predicate<Throwable> shouldRetry,
      final int quietTries,
      final int maxTries) throws Exception {
    return retry(f, shouldRetry, quietTries, maxTries, null, null);
  }
Retry an operation using fuzzy exponentially increasing backoff. The wait time after the nth failed attempt is
min(60000ms, 1000ms * pow(2, n - 1)), fuzzed by a number drawn from a Gaussian distribution with mean 0 and
standard deviation 0.2.

If maxTries is exhausted, or if shouldRetry returns false, the last exception thrown by "f" will be thrown
by this function.

@param f           the operation
@param shouldRetry predicate determining whether we should retry after a particular exception thrown by "f"
@param quietTries  first quietTries attempts will LOG exceptions at DEBUG level rather than WARN
@param maxTries    maximum number of attempts

@return result of the first successful operation

@throws Exception if maxTries is exhausted, or shouldRetry returns false
kafka-handler/src/java/org/apache/hadoop/hive/kafka/RetryUtils.java