public static SessionState setUpAndStartSessionState(HiveConf conf) {
    return setUpAndStartSessionState(conf, null);
  }
For Query Based compaction to run the query to generate the compacted data.
ql/src/java/org/apache/hadoop/hive/ql/DriverUtils.java