Zakelly commented on code in PR #25349:
URL: https://github.com/apache/flink/pull/25349#discussion_r1764567552
##########
flink-runtime/src/main/java/org/apache/flink/streaming/api/operators/StreamTaskStateInitializerImpl.java:
##########
@@ -189,6 +189,16 @@ public StreamOperatorStateContext
streamOperatorStateContext(
// -------------- Keyed State Backend --------------
// TODO: Support KeyedStateBackend for AsyncKeyedStateBackend to
unify the logic
if (stateBackend.supportsAsyncKeyedStateBackend()) {
+ keyedStatedBackend =
+ keyedStatedBackend(
+ keySerializer,
+ operatorIdentifierText,
+ prioritizedOperatorSubtaskStates,
+ streamTaskCloseableRegistry,
+ metricGroup,
+ managedMemoryFraction,
+ statsCollector,
+ StateBackend::createKeyedStateBackend);
Review Comment:
How about extracting the common part outside the `if`.
--
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]