private boolean isPathLocal(Path path) {
    boolean isLocal = false;
    if (path != null) {
      String scheme = path.toUri().getScheme();
      if (scheme != null) {
        isLocal = scheme.equals(Utilities.HADOOP_LOCAL_FS_SCHEME);
      }
    }
    return isLocal;
  }
Create a temporary directory depending of the path specified.
- If path is an Object store filesystem, then use the default MR scratch directory (HDFS)
- If path is on HDFS, then create a staging directory inside the path

@param path Path used to verify the Filesystem to use for temporary directory
@return A path to the new temporary directory
ql/src/java/org/apache/hadoop/hive/ql/Context.java