protected void beforeRun() {
    ShimLoader.getHadoopShims()
        .setHadoopQueryContext(String.format(USER_ID, queryState.getQueryId(), parentSession.getUserName()));
    if (!embedded) {
      createOperationLog();
      LogUtils.registerLoggingContext(queryState.getConf());
    }

    log.info(
        "[opType={}, queryId={}, startTime={}, sessionId={}, createTime={}, userName={}, ipAddress={}]",
        opHandle.getOperationType(),
        queryState.getQueryId(),
        beginTime,
        parentSession.getSessionState().getSessionId(),
        parentSession.getCreationTime(),
        parentSession.getUserName(),
        parentSession.getIpAddress());
  }
Invoked before runInternal().
Set up some preconditions, or configurations.
service/src/java/org/apache/hive/service/cli/operation/Operation.java