igalshilman commented on a change in pull request #16: [FLINK-15945] Remove 
MULTIPLEX_FLINK_STATE config
URL: https://github.com/apache/flink-statefun/pull/16#discussion_r376418865
 
 

 ##########
 File path: 
statefun-flink/statefun-flink-core/src/main/java/org/apache/flink/statefun/flink/core/functions/Reductions.java
 ##########
 @@ -145,4 +142,21 @@ void processEnvelopes() {
       // TODO: consider preemption if too many local messages.
     }
   }
+
+  private static boolean useMultiplexedState(KeyedStateBackend<?> 
keyedStateBackend) {
+    final String backendClassName = keyedStateBackend.getClass().getName();
+
+    // TODO this is fragile and error-prone to classname changes, but we're 
doing this
+    // TODO to avoid additional dependencies on the Flink state backends
+    // TODO ideally, we should revisit how configuration is being passed to the
+    // TODO operators to be available at runtime
+    if 
(backendClassName.equals("org.apache.flink.runtime.state.heap.HeapKeyedStateBackend"))
 {
+      return false;
+    }
+    if (backendClassName.equals(
+        "org.apache.flink.contrib.streaming.state.RocksDBKeyedStateBackend")) {
 
 Review comment:
   @tzulitai I think that we only need this branch, 
   and this method can be simplified to simply:
   `return backendClassName.equals(
            
"org.apache.flink.contrib.streaming.state.RocksDBKeyedStateBackend")`
   
   I think that we shouldn't care about any other state backends.
   
   In addition, can a state backend be NULL, or is there a default toy state 
backend that is used for the mini cluster or something a long these lines?
   
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to