banmoy commented on a change in pull request #8611: [FLINK-12693][state] Store 
state per key-group in CopyOnWriteStateTable
URL: https://github.com/apache/flink/pull/8611#discussion_r300222482
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/state/heap/StateTable.java
 ##########
 @@ -39,7 +47,8 @@
  * @param <N> type of namespace
  * @param <S> type of state
  */
-public abstract class StateTable<K, N, S> implements StateSnapshotRestore {
+public abstract class StateTable<K, N, S>
 
 Review comment:
   I prefer to use the inheritance for the following reasons:
   1. in the followup spill implementation, we need some memory statistics 
about the `StateTable` to decide whether to build a on-heap map or a on-disk 
map. I think it's not convenient for `MapAndSnapshotFactory ` to communicate 
with `StateTable`
   2. implementation of `StateTable` may need it's own method, such as 
`getStateMapSnapshotArray` in `CopyOnWriteStateTable` and more custom methods 
in the spill implementation
   3. if we introduce `MapAndSnapshotFactory`, we should also change the way to 
create `StateTable` using `SnapshotStrategySynchronicityBehavior` currently, 
but I think this is not in the scope of this refactor

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