azagrebin commented on a change in pull request #6777: [FLINK-10461] [State 
Backends, Checkpointing] Speed up download files when restore from DFS
URL: https://github.com/apache/flink/pull/6777#discussion_r228964472
 
 

 ##########
 File path: 
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBStateBackend.java
 ##########
 @@ -235,9 +238,10 @@ public RocksDBStateBackend(StateBackend 
checkpointStreamBackend) {
         * @param checkpointStreamBackend The backend write the checkpoint 
streams to.
         * @param enableIncrementalCheckpointing True if incremental 
checkpointing is enabled.
         */
-       public RocksDBStateBackend(StateBackend checkpointStreamBackend, 
TernaryBoolean enableIncrementalCheckpointing) {
+       public RocksDBStateBackend(StateBackend checkpointStreamBackend, 
TernaryBoolean enableIncrementalCheckpointing, int restoreThreadNum) {
 
 Review comment:
   I would also leave the previous method without restoreThreadNum:
   ```
   public RocksDBStateBackend(StateBackend checkpointStreamBackend, 
TernaryBoolean enableIncrementalCheckpointing) {
       this(checkpointStreamBackend, enableIncrementalCheckpointing, -1);
   }
   ```
   this way we do not break existing code, including other methods here, like 
this modification which is not needed then and other similar ones:
   ```
   public RocksDBStateBackend(StateBackend checkpointStreamBackend) {
                this(checkpointStreamBackend, TernaryBoolean.UNDEFINED, 1);
        }
   ```
   
   and I would rather keep it undefined here, e.g. `-1`, similar to 
`TernaryBoolean.UNDEFINED` for `enableIncrementalCheckpointing`. It can be 
resolved then in `private RocksDBStateBackend(RocksDBStateBackend original, 
Configuration config)` and `getRestoreThreadNum`.

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