diff --git itests/hive-unit/src/test/java/org/apache/hive/service/cli/operation/TestOperationLoggingAPIWithMr.java itests/hive-unit/src/test/java/org/apache/hive/service/cli/operation/TestOperationLoggingAPIWithMr.java index 0155b75216430dfd11c7596560dca2af1e55eeb7..d21571e98ace182a930605cd371f57334056f78a 100644 --- itests/hive-unit/src/test/java/org/apache/hive/service/cli/operation/TestOperationLoggingAPIWithMr.java +++ itests/hive-unit/src/test/java/org/apache/hive/service/cli/operation/TestOperationLoggingAPIWithMr.java @@ -36,7 +36,7 @@ * TestOperationLoggingAPIWithMr * Test the FetchResults of TFetchType.LOG in thrift level in MR mode. */ -public class TestOperationLoggingAPIWithMr extends OperationLoggingAPITestBase{ +public class TestOperationLoggingAPIWithMr extends OperationLoggingAPITestBase { @BeforeClass public static void setUpBeforeClass() throws Exception { @@ -45,10 +45,11 @@ public static void setUpBeforeClass() throws Exception { "Parsing command", "Parse Completed", "Starting Semantic Analysis", - "Semantic Analysis Completed", - "Starting command" }; expectedLogsExecution = new String[]{ + "Total jobs", + "Starting command", + "Semantic Analysis Completed", "Number of reduce tasks determined at compile time", "number of splits", "Submitting tokens for job", diff --git itests/hive-unit/src/test/java/org/apache/hive/service/cli/operation/TestOperationLoggingAPIWithTez.java itests/hive-unit/src/test/java/org/apache/hive/service/cli/operation/TestOperationLoggingAPIWithTez.java index ab29861e10244197b922406233c14e6e8573ae13..3ffc3a44ef643aee64dfbbd317b1fc6a05fd2054 100644 --- itests/hive-unit/src/test/java/org/apache/hive/service/cli/operation/TestOperationLoggingAPIWithTez.java +++ itests/hive-unit/src/test/java/org/apache/hive/service/cli/operation/TestOperationLoggingAPIWithTez.java @@ -20,11 +20,11 @@ public static void setUpBeforeClass() throws Exception { expectedLogsVerbose = new String[]{ "Parsing command", "Parse Completed", - "Starting Semantic Analysis", - "Semantic Analysis Completed", - "Starting command" + "Starting Semantic Analysis" }; expectedLogsExecution = new String[]{ + "Starting command", + "Semantic Analysis Completed", "Executing on YARN cluster with App id", "Setting Tez DAG access" }; diff --git service/src/java/org/apache/hive/service/cli/operation/LogDivertAppender.java service/src/java/org/apache/hive/service/cli/operation/LogDivertAppender.java index 9cb6439602847def7e4f2e3fbfb122b2c01c8eb4..7531778275ada61410c3466dc3a8fae7631fe2cc 100644 --- service/src/java/org/apache/hive/service/cli/operation/LogDivertAppender.java +++ service/src/java/org/apache/hive/service/cli/operation/LogDivertAppender.java @@ -23,6 +23,7 @@ import java.io.Serializable; import java.util.regex.Pattern; +import org.apache.hadoop.hive.ql.Driver; import org.apache.hadoop.hive.ql.exec.Task; import org.apache.hadoop.hive.ql.log.PerfLogger; import org.apache.hadoop.hive.ql.session.OperationLog; @@ -121,7 +122,7 @@ protected LogDivertAppender(String name, Filter filter, private static final Pattern executionIncludeNamePattern = Pattern.compile(Joiner.on("|"). join(new String[]{"org.apache.hadoop.mapreduce.JobSubmitter", "org.apache.hadoop.mapreduce.Job", "SessionState", Task.class.getName(), - "org.apache.hadoop.hive.ql.exec.spark.status.SparkJobMonitor"})); + Driver.class.getName(), "org.apache.hadoop.hive.ql.exec.spark.status.SparkJobMonitor"})); /* Patterns that are included in performance logging level. * In performance mode, show execution and performance logger messages.