private long getNextDelay(long currentDelay) {
    if (currentDelay <= 0) { // in case initial delay was set to 0.
      currentDelay = MINIMUM_DELAY_IN_SEC;
    }

    currentDelay *= this.backOff;
    if (this.maxJitterInSeconds > 0) {
      currentDelay += new Random().nextInt(this.maxJitterInSeconds);
    }

    if (currentDelay > this.maxRetryDelayInSeconds) {
      currentDelay = this.maxRetryDelayInSeconds;
    }

    return  currentDelay;
  }
Implement retry logic for service calls.
ql/src/java/org/apache/hadoop/hive/ql/exec/repl/atlas/RetryingClientTimeBased.java