protected void afterRun() {
    if (!embedded) {
      LogUtils.unregisterLoggingContext();
    }
    // Reset back to session context after the query is done
    ShimLoader.getHadoopShims().setHadoopSessionContext(
        String.format(USER_ID, parentSession.getSessionState().getSessionId(), parentSession.getUserName()));
  }
Invoked after runInternal(), even if an exception is thrown in runInternal().
Clean up resources, which was set up in beforeRun().
service/src/java/org/apache/hive/service/cli/operation/Operation.java