@BeforeClass
  public static void setUpBeforeClass() throws Exception {
    tableName = "testOperationLoggingAPIWithTez_table";
    expectedLogsVerbose = new String[]{
      "Starting Semantic Analysis"
    };
    expectedLogsExecution = new String[]{
      "Compiling command",
      "Completed compiling command",
      "Executing command",
      "Completed executing command",
      "Semantic Analysis Completed",
      "Executing on YARN cluster with App id",
      "Setting Tez DAG access"
    };
    expectedLogsPerformance = new String[]{
      "<PERFLOG method=compile from=org.apache.hadoop.hive.ql.Driver>",
      "<PERFLOG method=parse from=org.apache.hadoop.hive.ql.Driver>",
      "from=org.apache.hadoop.hive.ql.exec.tez.monitoring.TezJobMonitor",
      "org.apache.tez.common.counters.DAGCounter",
      "NUM_SUCCEEDED_TASKS",
      "TOTAL_LAUNCHED_TASKS",
      "CPU_MILLISECONDS"
    };
    hiveConf = UtilsForTest.getHiveOnTezConfFromDir("../../data/conf/tez/");
    hiveConf.set(ConfVars.HIVE_SERVER2_LOGGING_OPERATION_LEVEL.varname, "verbose");
    // Set tez execution summary to false.
    hiveConf.setBoolVar(ConfVars.TEZ_EXEC_SUMMARY, false);
    miniHS2 = new MiniHS2(hiveConf, MiniClusterType.TEZ);
    confOverlay = new HashMap<String, String>();
    confOverlay.put(ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false");
    miniHS2.start(confOverlay);
  }
TestOperationLoggingAPIWithTez
Test the FetchResults of TFetchType.LOG in thrift level in Tez mode.
itests/hive-unit/src/test/java/org/apache/hive/service/cli/operation/TestOperationLoggingAPIWithTez.java