You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by xu...@apache.org on 2015/12/01 06:40:56 UTC

hive git commit: HIVE-12512: Include driver logs in execution-level Operation logs (Mohit via Xuefu)

Repository: hive
Updated Branches:
  refs/heads/master e9ca6870d -> be410d24f


HIVE-12512: Include driver logs in execution-level Operation logs (Mohit via Xuefu)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/be410d24
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/be410d24
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/be410d24

Branch: refs/heads/master
Commit: be410d24fe7e6598792b672d3fad950ed877a0b4
Parents: e9ca687
Author: Xuefu Zhang <xz...@Cloudera.com>
Authored: Mon Nov 30 21:40:50 2015 -0800
Committer: Xuefu Zhang <xz...@Cloudera.com>
Committed: Mon Nov 30 21:40:50 2015 -0800

----------------------------------------------------------------------
 .../service/cli/operation/TestOperationLoggingAPIWithMr.java  | 7 ++++---
 .../service/cli/operation/TestOperationLoggingAPIWithTez.java | 6 +++---
 .../apache/hive/service/cli/operation/LogDivertAppender.java  | 3 ++-
 3 files changed, 9 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/be410d24/itests/hive-unit/src/test/java/org/apache/hive/service/cli/operation/TestOperationLoggingAPIWithMr.java
----------------------------------------------------------------------
diff --git a/itests/hive-unit/src/test/java/org/apache/hive/service/cli/operation/TestOperationLoggingAPIWithMr.java b/itests/hive-unit/src/test/java/org/apache/hive/service/cli/operation/TestOperationLoggingAPIWithMr.java
index 0155b75..d21571e 100644
--- a/itests/hive-unit/src/test/java/org/apache/hive/service/cli/operation/TestOperationLoggingAPIWithMr.java
+++ b/itests/hive-unit/src/test/java/org/apache/hive/service/cli/operation/TestOperationLoggingAPIWithMr.java
@@ -36,7 +36,7 @@ import org.junit.Test;
  * 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 class TestOperationLoggingAPIWithMr extends OperationLoggingAPITestBase{
       "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",

http://git-wip-us.apache.org/repos/asf/hive/blob/be410d24/itests/hive-unit/src/test/java/org/apache/hive/service/cli/operation/TestOperationLoggingAPIWithTez.java
----------------------------------------------------------------------
diff --git a/itests/hive-unit/src/test/java/org/apache/hive/service/cli/operation/TestOperationLoggingAPIWithTez.java b/itests/hive-unit/src/test/java/org/apache/hive/service/cli/operation/TestOperationLoggingAPIWithTez.java
index ab29861..3ffc3a4 100644
--- a/itests/hive-unit/src/test/java/org/apache/hive/service/cli/operation/TestOperationLoggingAPIWithTez.java
+++ b/itests/hive-unit/src/test/java/org/apache/hive/service/cli/operation/TestOperationLoggingAPIWithTez.java
@@ -20,11 +20,11 @@ public class TestOperationLoggingAPIWithTez extends OperationLoggingAPITestBase
     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"
     };

http://git-wip-us.apache.org/repos/asf/hive/blob/be410d24/service/src/java/org/apache/hive/service/cli/operation/LogDivertAppender.java
----------------------------------------------------------------------
diff --git a/service/src/java/org/apache/hive/service/cli/operation/LogDivertAppender.java b/service/src/java/org/apache/hive/service/cli/operation/LogDivertAppender.java
index 9cb6439..7531778 100644
--- a/service/src/java/org/apache/hive/service/cli/operation/LogDivertAppender.java
+++ b/service/src/java/org/apache/hive/service/cli/operation/LogDivertAppender.java
@@ -23,6 +23,7 @@ import java.io.OutputStreamWriter;
 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 @@ public class LogDivertAppender
     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.