reswqa commented on code in PR #21527:
URL: https://github.com/apache/flink/pull/21527#discussion_r1211033434


##########
flink-kubernetes/src/main/java/org/apache/flink/kubernetes/utils/Constants.java:
##########
@@ -115,4 +115,9 @@ public class Constants {
     public static final String KUBERNETES_TASK_MANAGER_SCRIPT_PATH = 
"kubernetes-taskmanager.sh";
 
     public static final String ENV_TM_JVM_MEM_OPTS = "FLINK_TM_JVM_MEM_OPTS";
+
+    // "resourceVersion="0" is means "Any".  Return data at any resource 
version.It saves time to

Review Comment:
   ```suggestion
       // "resourceVersion="0" means any resource version. It saves time to
   ```



##########
flink-kubernetes/src/test/java/org/apache/flink/kubernetes/kubeclient/resources/KubernetesPodsWatcherTest.java:
##########
@@ -65,7 +69,13 @@ void testClosingWithException() {
     void testCallbackHandler() {
         FlinkPod pod = new FlinkPod.Builder().build();
         final KubernetesPodsWatcher podsWatcher =
-                new KubernetesPodsWatcher(new TestingCallbackHandler(e -> {}));
+                new KubernetesPodsWatcher(
+                        TestingWatchCallbackHandler.<KubernetesPod>builder()
+                                .setOnAddedConsumer(pods -> 
podAddedList.addAll(pods))
+                                .setOnModifiedConsumer(pods -> 
podModifiedList.addAll(pods))
+                                .setOnDeletedConsumer(pods -> 
podDeletedList.addAll(pods))
+                                .setOnErrorConsumer(pods -> 
podErrorList.addAll(pods))

Review Comment:
   It seems that these 4 list is only used in this test case. I'd suggestion 
moving their declaration to this method.



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to