Zakelly commented on code in PR #25925:
URL: https://github.com/apache/flink/pull/25925#discussion_r1912645087


##########
flink-runtime/src/main/java/org/apache/flink/runtime/state/DefaultKeyedStateStore.java:
##########
@@ -35,21 +35,50 @@
 import org.apache.flink.api.common.state.ValueStateDescriptor;
 import org.apache.flink.util.Preconditions;
 
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
 import static java.util.Objects.requireNonNull;
+import static org.apache.flink.util.Preconditions.checkState;
 
 /**
  * Default implementation of KeyedStateStore that currently forwards state 
registration to a {@link
  * RuntimeContext}.
  */
 public class DefaultKeyedStateStore implements KeyedStateStore {
 
-    protected final KeyedStateBackend<?> keyedStateBackend;
+    @Nullable protected final KeyedStateBackend<?> keyedStateBackend;
+
+    @Nullable protected final AsyncKeyedStateBackend<?> asyncKeyedStateBackend;
     protected final SerializerFactory serializerFactory;
 
+    protected SupportKeyedStateApiSet supportKeyedStateApiSet;
+
     public DefaultKeyedStateStore(
             KeyedStateBackend<?> keyedStateBackend, SerializerFactory 
serializerFactory) {
-        this.keyedStateBackend = Preconditions.checkNotNull(keyedStateBackend);
+        this(keyedStateBackend, null, serializerFactory);
+    }
+
+    public DefaultKeyedStateStore(
+            AsyncKeyedStateBackend<?> asyncKeyedStateBackend, 
SerializerFactory serializerFactory) {
+        this(null, asyncKeyedStateBackend, serializerFactory);
+    }
+
+    public DefaultKeyedStateStore(
+            @Nullable KeyedStateBackend<?> keyedStateBackend,
+            @Nullable AsyncKeyedStateBackend<?> asyncKeyedStateBackend,
+            SerializerFactory serializerFactory) {
+        this.keyedStateBackend = keyedStateBackend;
+        this.asyncKeyedStateBackend = asyncKeyedStateBackend;
         this.serializerFactory = Preconditions.checkNotNull(serializerFactory);
+        if (keyedStateBackend != null) {
+            // By default, we support state v1

Review Comment:
   No they can't coexist. We will introduce this in a complete document later.



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