private static boolean attemptMakePathWritable(FileSystem fs, Path path, FsPermission perm) {
    try {
      LOG.info("Attempting to set {} permissions on path {}", perm, path);
      fs.setPermission(path, perm);
      return isWritable(fs.getFileStatus(path).getPermission(), perm);
    } catch (IOException e) {
      return false;
    }
  }
Checks if path passed in exists and has writable permissions.
The path will be created if it does not exist.
@param rootHDFSDirPath
@param conf
ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java