private void checkStagingDir() throws IOException {
    Path p = new Path(this.rootdir, HConstants.BULKLOAD_STAGING_DIR_NAME);
    try {
      if (!this.fs.exists(p)) {
        if (!this.fs.mkdirs(p, HiddenDirPerms)) {
          throw new IOException("Failed to create staging directory " + p.toString());
        }
      }
      this.fs.setPermission(p, HiddenDirPerms);

    } catch (IOException e) {
      LOG.error("Failed to create or set permission on staging directory " + p.toString());
      throw new IOException(
        "Failed to create or set permission on staging directory " + p.toString(), e);
    }
  }
Check permissions for bulk load staging directory. This directory has special hidden
permissions. Create it if necessary.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java