hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jd...@apache.org
Subject hive git commit: HIVE-15447: Log session ID in ATSHook (Jason Dere, reviewed by Sergey Shelukhin)
Date Wed, 21 Dec 2016 18:25:00 GMT
Repository: hive
Updated Branches:
  refs/heads/master 99a951823 -> cdb56ce03


HIVE-15447: Log session ID in ATSHook (Jason Dere, reviewed by Sergey Shelukhin)


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

Branch: refs/heads/master
Commit: cdb56ce033bbd7616e81d8fb1b147fc04d5f2b6d
Parents: 99a9518
Author: Jason Dere <jdere@hortonworks.com>
Authored: Wed Dec 21 10:23:29 2016 -0800
Committer: Jason Dere <jdere@hortonworks.com>
Committed: Wed Dec 21 10:23:29 2016 -0800

----------------------------------------------------------------------
 ql/src/java/org/apache/hadoop/hive/ql/hooks/ATSHook.java | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/cdb56ce0/ql/src/java/org/apache/hadoop/hive/ql/hooks/ATSHook.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/hooks/ATSHook.java b/ql/src/java/org/apache/hadoop/hive/ql/hooks/ATSHook.java
index 0b3c419..3651c9c 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/hooks/ATSHook.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/hooks/ATSHook.java
@@ -67,7 +67,7 @@ public class ATSHook implements ExecuteWithHookContext {
   private enum EventTypes { QUERY_SUBMITTED, QUERY_COMPLETED };
 
   private enum OtherInfoTypes {
-    QUERY, STATUS, TEZ, MAPRED, INVOKER_INFO, THREAD_NAME, VERSION,
+    QUERY, STATUS, TEZ, MAPRED, INVOKER_INFO, SESSION_ID, THREAD_NAME, VERSION,
     CLIENT_IP_ADDRESS, HIVE_ADDRESS, HIVE_INSTANCE_TYPE, CONF, PERF,
   };
   private enum ExecutionMode {
@@ -171,7 +171,7 @@ public class ATSHook implements ExecuteWithHookContext {
                   createPreHookEvent(queryId, query, explainPlan, queryStartTime,
                       user, requestuser, numMrJobs, numTezJobs, opId,
                       hookContext.getIpAddress(), hiveInstanceAddress, hiveInstanceType,
-                      logID, hookContext.getThreadId(), executionMode,
+                      hookContext.getSessionId(), logID, hookContext.getThreadId(), executionMode,
                       tablesRead, tablesWritten, conf));
               break;
             case POST_EXEC_HOOK:
@@ -228,7 +228,7 @@ public class ATSHook implements ExecuteWithHookContext {
   TimelineEntity createPreHookEvent(String queryId, String query, JSONObject explainPlan,
       long startTime, String user, String requestuser, int numMrJobs, int numTezJobs, String
opId,
       String clientIpAddress, String hiveInstanceAddress, String hiveInstanceType,
-      String logID, String threadId, String executionMode,
+      String sessionID, String logID, String threadId, String executionMode,
       List<String> tablesRead, List<String> tablesWritten, HiveConf conf) throws
Exception {
 
     JSONObject queryObj = new JSONObject(new LinkedHashMap<>());
@@ -275,6 +275,7 @@ public class ATSHook implements ExecuteWithHookContext {
     atsEntity.addOtherInfo(OtherInfoTypes.QUERY.name(), queryObj.toString());
     atsEntity.addOtherInfo(OtherInfoTypes.TEZ.name(), numTezJobs > 0);
     atsEntity.addOtherInfo(OtherInfoTypes.MAPRED.name(), numMrJobs > 0);
+    atsEntity.addOtherInfo(OtherInfoTypes.SESSION_ID.name(), sessionID);
     atsEntity.addOtherInfo(OtherInfoTypes.INVOKER_INFO.name(), logID);
     atsEntity.addOtherInfo(OtherInfoTypes.THREAD_NAME.name(), threadId);
     atsEntity.addOtherInfo(OtherInfoTypes.VERSION.name(), VERSION);


Mime
View raw message