public static Path getHDFSSessionPath(Configuration conf) {
    SessionState ss = SessionState.get();
    if (ss == null) {
      String sessionPathString = conf.get(HDFS_SESSION_PATH_KEY);
      Preconditions.checkNotNull(sessionPathString,
          "Conf non-local session path expected to be non-null");
      return new Path(sessionPathString);
    }
    Preconditions.checkNotNull(ss.hdfsSessionPath,
       "Non-local session path expected to be non-null");
    return ss.hdfsSessionPath;
  }
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