liangyu-1 commented on code in PR #26681:
URL: https://github.com/apache/flink/pull/26681#discussion_r2156362685


##########
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/channel/ChannelStateWriteRequestExecutorImpl.java:
##########
@@ -132,6 +133,21 @@ class ChannelStateWriteRequestExecutorImpl implements 
ChannelStateWriteRequestEx
     void run() {
         try (MdcUtils.MdcCloseable ignored = 
MdcUtils.withContext(MdcUtils.asContextData(jobID))) {
             try {
+
+                String context = "FLINK";
+                if (System.getenv().get("CONTAINER_ID") != null) {
+                    String[] application = 
System.getenv().get("CONTAINER_ID").split("_");
+                    context = context + "_application_" + application[2] + "_" 
+ application[3];
+                } else if (System.getenv().get("KUBERNETES_SERVICE_HOST") != 
null) {
+                    String podName = System.getenv("HOSTNAME");
+
+                    context = context + "_pod_" + podName;
+
+                } else {
+                    context = context + "_local";
+                }
+                context = context + "JobID_" + jobID;
+                FileSystemContext.initializeContextForThread(context);

Review Comment:
   Yes, currently only hadoopFilesystem use this context.



-- 
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