@BeforeClass
  public static void setUpBeforeClass() throws Exception {
    tableName  = "testOperationLoggingAPIWithMr_table";
    expectedLogsVerbose = new String[]{
      "Starting Semantic Analysis"
    };
    expectedLogsExecution = new String[]{
      "Compiling command",
      "Completed compiling command",
      "Total jobs",
      "Executing command",
      "Completed executing command",
      "Semantic Analysis Completed",
      "Number of reduce tasks determined at compile time",
      "number of splits",
      "Submitting tokens for job",
      "Ended Job"
    };
    expectedLogsPerformance = new String[]{
      "<PERFLOG method=compile from=org.apache.hadoop.hive.ql.Driver>",
      "<PERFLOG method=parse from=org.apache.hadoop.hive.ql.Driver>",
      "<PERFLOG method=runTasks from=org.apache.hadoop.hive.ql.Driver>"
    };
    hiveConf = new HiveConf();
    hiveConf.set(ConfVars.HIVE_SERVER2_LOGGING_OPERATION_LEVEL.varname, "verbose");
    // this test is mr specific
    hiveConf.set(ConfVars.HIVE_EXECUTION_ENGINE.varname, "mr");
    miniHS2 = new MiniHS2(hiveConf);
    confOverlay = new HashMap<String, String>();
    confOverlay.put(ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false");
    miniHS2.start(confOverlay);
  }
TestOperationLoggingAPIWithMr
Test the FetchResults of TFetchType.LOG in thrift level in MR mode.
itests/hive-unit/src/test/java/org/apache/hive/service/cli/operation/TestOperationLoggingAPIWithMr.java