public static Path getTempTableSpace(Configuration conf) {
    SessionState ss = SessionState.get();
    if (ss == null) {
      String tempTablePathString = conf.get(TMP_TABLE_SPACE_KEY);
      Preconditions.checkNotNull(tempTablePathString,
          "Conf temp table path expected to be non-null");
      return new Path(tempTablePathString);
    }
    return ss.getTempTableSpace();
  }
Create a given path if it doesn't exist.

@param conf
@param path
@param permission
@param isLocal
@param isCleanUp
@return
@throws IOException
ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java