@Override
  public void run(HookContext hookContext) throws Exception {
    assert (hookContext.getHookType() == HookContext.HookType.POST_EXEC_HOOK);
    HiveConf conf = hookContext.getConf();
    if (!"tez".equals(HiveConf.getVar(conf, HiveConf.ConfVars.HIVE_EXECUTION_ENGINE))) {
      return;
    }

    LOG.info("Executing post execution hook to print ORC row groups read counter..");
    SessionState ss = SessionState.get();
    SessionState.LogHelper console = ss.getConsole();
    QueryPlan plan = hookContext.getQueryPlan();
    if (plan == null) {
      return;
    }

    List<TezTask> rootTasks = Utilities.getTezTasks(plan.getRootTasks());
    for (TezTask tezTask : rootTasks) {
      LOG.info("Printing ORC row group counter for tez task: " + tezTask.getName());
      TezCounters counters = tezTask.getTezCounters();
      if (counters != null) {
        for (CounterGroup group : counters) {
          if (group.getName().equals(LlapIOCounters.class.getName())) {
            console.printInfo(tezTask.getId() + " LLAP IO COUNTERS:", false);
            for (TezCounter counter : group) {
              if (counter.getDisplayName().equals(LlapIOCounters.SELECTED_ROWGROUPS.name())) {
                console.printInfo("   " + counter.getDisplayName() + ": " + counter.getValue(), false);
              }
            }
          }
        }
      }
    }
  }
Post execution hook to print number of ORC row groups read from the counter. Used for Predicate Pushdown testing.
ql/src/java/org/apache/hadoop/hive/ql/hooks/PostExecOrcRowGroupCountPrinter.java