code: private boolean rename(String src, String dst) throws IOException {
      IOException te = null;
      FileSystem hdfs = getFs();
      RetryPolicy retryPolicy = new CountingRetry(MAX_TRY);
      while (retryPolicy.attempt()) {
        try {
          return hdfs.rename(new Path(src), new Path(dst));
        } catch (IOException e) {
          LOG.warn("{} try to rename {} to {} : {}", retryPolicy.getAttemptCount(), src, dst,
              e.getMessage());
          te = e;
        }
      }
      throw te;
    }
docs: Rename a file or folder to a file or folder.
  
  @param src path of source file or directory
  @param dst path of destination file or directory
  @return true if rename succeeds