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



##########
File path: 
flink-kubernetes/src/main/java/org/apache/flink/kubernetes/utils/KubernetesUtils.java
##########
@@ -196,6 +224,16 @@ public static String getCommonStartCommand(
                ).collect(Collectors.toList());
        }
 
+       public static Predicate<KubernetesConfigMap> getLeaderChecker() {
+               return configMap -> {
+                       if (configMap.getAnnotations() != null) {
+                               final String leader = 
configMap.getAnnotations().get(LEADER_ANNOTATION_KEY);
+                               return leader != null && 
leader.contains(LOCK_IDENTITY);
+                       }
+                       return false;
+               };
+       }

Review comment:
       I will move this change to the leader elector related commits.




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