tillrohrmann commented on a change in pull request #17485:
URL: https://github.com/apache/flink/pull/17485#discussion_r791708481



##########
File path: 
flink-kubernetes/src/main/java/org/apache/flink/kubernetes/utils/KubernetesUtils.java
##########
@@ -500,5 +502,49 @@ public static String 
tryToGetPrettyPrintYaml(KubernetesResource kubernetesResour
         TASK_MANAGER
     }
 
+    private static final String LEADER_PREFIX = "org.apache.flink.k8s.leader.";
+    public static final char LEADER_INFORMATION_SEPARATOR = ',';
+
+    public static String encodeLeaderInformation(LeaderInformation 
leaderInformation) {
+        Preconditions.checkState(!leaderInformation.isEmpty());
+        return leaderInformation.getLeaderSessionID().toString()
+                + LEADER_INFORMATION_SEPARATOR
+                + leaderInformation.getLeaderAddress();
+    }
+
+    public static LeaderInformation parseLeaderInformationSafely(String value) 
{

Review comment:
       I think this does not make a huge difference. But can do.




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