Github user StephanEwen commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4353#discussion_r133016663
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/OperatorSubtaskState.java
 ---
    @@ -75,31 +103,79 @@
         */
        private final long stateSize;
     
    +   @VisibleForTesting
    +   public OperatorSubtaskState(StreamStateHandle legacyOperatorState) {
    +
    +           this(legacyOperatorState,
    +                   Collections.<OperatorStateHandle>emptyList(),
    +                   Collections.<OperatorStateHandle>emptyList(),
    +                   Collections.<KeyedStateHandle>emptyList(),
    +                   Collections.<KeyedStateHandle>emptyList());
    +   }
    +
    +   /**
    +    * Empty state.
    +    */
    +   public OperatorSubtaskState() {
    --- End diff --
    
    Minor optimization: One could make this constructor `private` and have a 
field `OperatorSubtaskState.EMPTY` as a placeholder for the empty states. I'd 
leave this to you whether you think it worth doing...


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to