private FSDataOutputStream createFileWithRetries(final FileSystem fs,
      final Path hbckLockFilePath, final FsPermission defaultPerms) throws IOException {
      IOException exception = null;
      do {
        try {
          return CommonFSUtils.create(fs, hbckLockFilePath, defaultPerms, false);
        } catch (IOException ioe) {
          LOG.info("Failed to create lock file " + hbckLockFilePath.getName() + ", try="
            + (retryCounter.getAttemptTimes() + 1) + " of " + retryCounter.getMaxAttempts());
          LOG.debug("Failed to create lock file " + hbckLockFilePath.getName(), ioe);
          try {
            exception = ioe;
            retryCounter.sleepUntilNextRetry();
          } catch (InterruptedException ie) {
            throw (InterruptedIOException) new InterruptedIOException(
              "Can't create lock file " + hbckLockFilePath.getName()).initCause(ie);
          }
        }
      } while (retryCounter.shouldRetry());

      throw exception;
    }
Returns Will be <code>null</code> unless you call {@link #call()}
hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java