@Override
  public void afterTest(QTestUtil qt) throws Exception {
    enabled = false;
    HiveConf.setBoolVar(qt.getConf(), HiveConf.ConfVars.HIVE_QUERY_HISTORY_ENABLED, false);
  }
QTest Query History Service option
<p>
Enables the query history service for a qtest.
<p>
Example:
--! qt:queryhistory
itests/util/src/main/java/org/apache/hadoop/hive/ql/qoption/QTestQueryHistoryHandler.java