code: boolean recoverLease(final DistributedFileSystem dfs, final int nbAttempt, final Path p,
                         final long startWaiting)
      throws FileNotFoundException {
      boolean recovered = false;
      try {
        recovered = dfs.recoverLease(p);
        LOG.info("recoverLease=" + recovered + ", " +
                   getLogMessageDetail(nbAttempt, p, startWaiting));
      } catch (IOException e) {
        if (e instanceof LeaseExpiredException && e.getMessage().contains("File does not exist")) {
          // This exception comes out instead of FNFE, fix it
          throw new FileNotFoundException("The given file wasn't found at " + p);
        } else if (e instanceof FileNotFoundException) {
          throw (FileNotFoundException) e;
        }
        LOG.warn(getLogMessageDetail(nbAttempt, p, startWaiting), e);
      }
      return recovered;
    }
docs: Try to recover the lease.
  @param dfs The filesystem instance.
  @param nbAttempt Count number of this attempt.
  @param p Path of the file to recover.
  @param startWaiting Timestamp of when we started attempting to recover the file lease.
  @return True if dfs#recoverLease came by true.
  @throws java.io.FileNotFoundException