liangyu-1 commented on code in PR #394:
URL: https://github.com/apache/tez/pull/394#discussion_r1965524355


##########
tez-dag/src/main/java/org/apache/tez/dag/app/DAGAppMaster.java:
##########
@@ -2390,7 +2390,9 @@ public static void main(String[] args) {
       ContainerId containerId = ConverterUtils.toContainerId(containerIdStr);
       ApplicationAttemptId applicationAttemptId =
           containerId.getApplicationAttemptId();
-
+      org.apache.hadoop.ipc.CallerContext.setCurrent(new 
org.apache.hadoop.ipc.CallerContext
+              .Builder("tez_appmaster_" + containerId.getApplicationAttemptId()
+      ).build());

Review Comment:
   I tried to implement some unit tests, but the ThreadLocal variable could not 
be accessed. In Hadoop, this ThreadLocal variable is tested by checking the 
audit log, but I am unable to start a Hadoop Mini Cluster and correctly invoke 
DAGAppMaster, so I cannot implement this unit test.
   
   However, the code implementation is simple, and there is a similar 
implementation in this [Hadoop pr](https://github.com/apache/hadoop/pull/6688) 
which is implemented by my coworker,  so it should definitely work.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to