private void enableTestOnlyCmd(HiveConf conf) {
    StringBuilder securityCMDs = new StringBuilder(conf.getVar(HiveConf.ConfVars.HIVE_SECURITY_COMMAND_WHITELIST));
    for (String c : testOnlyCommands) {
      securityCMDs.append(",");
      securityCMDs.append(c);
    }
    conf.set(HiveConf.ConfVars.HIVE_SECURITY_COMMAND_WHITELIST.toString(), securityCMDs.toString());
  }
This allows a .q file to continue executing after a statement runs into an error which is convenient
if you want to use another hive cmd after the failure to sanity check the state of the system.
itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java