public void run(HookContext hookContext) {
    LogHelper console = SessionState.getConsole();
    SessionState ss = SessionState.get();

    if (console == null || ss == null) {
      return;
    }

    for (Entry<String, String> entry : ss.getOverriddenConfigurations().entrySet()) {
      if (keysList.contains(entry.getKey())) {
        console.printError("Key: " + entry.getKey() + ", Value: " + entry.getValue());
      }
    }
  }
VerifyOverriddenConfigsHook.

This hook is meant to be used for testing.  It prints the keys and values of config variables
which have been noted by the session state as changed by the user.  It only prints specific
variables as others may change and that should not affect this test.
itests/util/src/main/java/org/apache/hadoop/hive/ql/hooks/VerifyOverriddenConfigsHook.java