private long elapsedTimeInSeconds(long fromTimeMillis) {
    return (System.currentTimeMillis() - fromTimeMillis)/ 1000;
  }
Implement retry logic for service calls.
ql/src/java/org/apache/hadoop/hive/ql/exec/repl/atlas/RetryingClientTimeBased.java