StefanRRichter commented on a change in pull request #7674: [FLINK-10043] 
[State Backends] Refactor RocksDBKeyedStateBackend object 
construction/initialization/restore code
URL: https://github.com/apache/flink/pull/7674#discussion_r257629342
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/state/AbstractKeyedStateBackend.java
 ##########
 @@ -115,14 +116,40 @@ public AbstractKeyedStateBackend(
                this.numberOfKeyGroups = numberOfKeyGroups;
                this.userCodeClassLoader = 
Preconditions.checkNotNull(userCodeClassLoader);
                this.keyGroupRange = Preconditions.checkNotNull(keyGroupRange);
-               this.cancelStreamRegistry = new CloseableRegistry();
+               this.cancelStreamRegistry = cancelStreamRegistry;
                this.keyValueStatesByName = new HashMap<>();
                this.executionConfig = executionConfig;
                this.keyGroupCompressionDecorator = 
determineStreamCompression(executionConfig);
                this.ttlTimeProvider = 
Preconditions.checkNotNull(ttlTimeProvider);
                this.keySelectionListeners = new HashSet<>();
        }
 
+       public AbstractKeyedStateBackend(
 
 Review comment:
   This new constructor assigns a lot of fields that are also assigned by the 
previously existing constructor. This is code duplication and constructors 
could call each other instead with `this(....)`.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to