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


##########
flink-runtime/src/main/java/org/apache/flink/streaming/runtime/tasks/AsyncCheckpointRunnable.java:
##########
@@ -115,6 +116,21 @@ public void run() {
                 checkpointMetaData.getCheckpointId(),
                 asyncStartDelayMillis);
 
+        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_" + taskEnvironment.getJobID() + 
"_TaskName_" + taskName;

Review Comment:
   I disagree with this. Job names may contain special characters such as 
spaces.
   In my case, I want to load this context into a structured table for further 
analysis, so I believe the job ID is sufficient.
   If we need to find the exact job name, we can always look it up in the 
History Server.



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