public void run(QueryState queryState, Set<ReadEntity> inputs,
      Set<WriteEntity> outputs, UserGroupInformation ugi)
    throws Exception {

    LogHelper console = SessionState.getConsole();

    if (console == null) {
      return;
    }

    if (queryState != null) {
      console.printInfo("PREHOOK: query: " + queryState.getQueryString().trim(), false);
      console.printInfo("PREHOOK: type: " + queryState.getCommandType(), false);
    }

    printEntities(console, inputs, "PREHOOK: Input: ");
    printEntities(console, outputs, "PREHOOK: Output: ");
  }
Implementation of a pre execute hook that simply prints out its parameters to
standard output.
ql/src/java/org/apache/hadoop/hive/ql/hooks/PreExecutePrinter.java