xuyangzhong commented on code in PR #25815:
URL: https://github.com/apache/flink/pull/25815#discussion_r1906571795


##########
flink-runtime/src/test/java/org/apache/flink/streaming/util/KeyedTwoInputStreamOperatorTestHarness.java:
##########
@@ -64,8 +67,24 @@ public KeyedTwoInputStreamOperatorTestHarness(
     }
 
     public int numKeyedStateEntries() {
-        AbstractStreamOperator<?> abstractStreamOperator = 
(AbstractStreamOperator<?>) operator;
-        KeyedStateBackend<Object> keyedStateBackend = 
abstractStreamOperator.getKeyedStateBackend();
+        KeyedStateBackend<?> keyedStateBackend;
+        if (operator instanceof AbstractAsyncStateStreamOperator) {

Review Comment:
   The number of calls is actually relatively small, and it will only be called 
when `numKeyedStateEntries` needs to be verified.



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