You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by mo...@apache.org on 2022/12/02 15:17:26 UTC

[flink-kubernetes-operator] branch main updated: [FLINK-30266] Roll back change to HA metadata check logic

This is an automated email from the ASF dual-hosted git repository.

morhidi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/flink-kubernetes-operator.git


The following commit(s) were added to refs/heads/main by this push:
     new 72ad3639 [FLINK-30266] Roll back change to HA metadata check logic
72ad3639 is described below

commit 72ad3639e60fbf27dd408dabbe69f46d69ff52f9
Author: Gyula Fora <g_...@apple.com>
AuthorDate: Thu Dec 1 18:53:51 2022 +0100

    [FLINK-30266] Roll back change to HA metadata check logic
---
 .../org/apache/flink/kubernetes/operator/utils/FlinkUtils.java    | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/utils/FlinkUtils.java b/flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/utils/FlinkUtils.java
index b438a14d..e9600c08 100644
--- a/flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/utils/FlinkUtils.java
+++ b/flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/utils/FlinkUtils.java
@@ -46,6 +46,7 @@ import java.util.Collections;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
+import java.util.function.Predicate;
 
 /** Flink Utility methods used by the operator. */
 public class FlinkUtils {
@@ -147,12 +148,7 @@ public class FlinkUtils {
                         .list()
                         .getItems();
 
-        return configMaps.stream()
-                .anyMatch(
-                        map ->
-                                !map.isMarkedForDeletion()
-                                        && map.getData() != null
-                                        && !map.getData().isEmpty());
+        return configMaps.stream().anyMatch(Predicate.not(ConfigMap::isMarkedForDeletion));
     }
 
     private static boolean isJobGraphKey(Map.Entry<String, String> entry) {