xintongsong commented on a change in pull request #13644:
URL: https://github.com/apache/flink/pull/13644#discussion_r508355344



##########
File path: 
flink-kubernetes/src/main/java/org/apache/flink/kubernetes/utils/Constants.java
##########
@@ -80,4 +84,14 @@
        public static final String RESTART_POLICY_OF_NEVER = "Never";
 
        public static final String NATIVE_KUBERNETES_COMMAND = "native-k8s";
+
+       // Constants for Kubernetes high availability
+       public static final String LEADER_ADDRESS_KEY = "address";
+       public static final String LEADER_SESSION_ID_KEY = "sessionId";
+       public static final String CHECKPOINT_COUNTER_KEY = "counter";
+       public static final String RUNNING_JOBS_REGISTRY_KEY_PREFIX = 
"runningJobsRegistry";
+       public static final String JOB_GRAPH_STORE_KEY_PREFIX = "jobGraph";
+
+       public static final String LOCK_IDENTITY = UUID.randomUUID().toString();

Review comment:
       I'm not sure about sharing the identity across leader election services. 
By making `LOCK_IDENTITY` static, we implicitly introduces a constraint that we 
cannot have multiple contenders in the same process that competing for 
leadership of the same service. This may not be a problem for Flink's current 
implementation, but I would suggest to not making such assumption if it doesn't 
add too much effort.




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

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


Reply via email to