StephanEwen commented on a change in pull request #11095: 
[FLINK-10918][rocks-db-backend] Fix incremental checkpoints on Windows.
URL: https://github.com/apache/flink/pull/11095#discussion_r379511980
 
 

 ##########
 File path: 
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/restore/RocksDBIncrementalRestoreOperation.java
 ##########
 @@ -461,26 +457,18 @@ private RestoredDBInstance 
restoreDBInstanceFromStateHandle(
         * a local state.
         */
        private void restoreInstanceDirectoryFromPath(Path source, String 
instanceRocksDBPath) throws IOException {
+               final Path instanceRocksDBDirectory = 
Paths.get(instanceRocksDBPath);
+               final Path[] files = Files.list(source).toArray(Path[]::new);
 
 Review comment:
   The problem with `.map(lambda)` is that some methods in there throw checked 
exceptions.
   I think array/iteration is simpler in the end than exception wrapping / 
unwrapping.
   It is also a rather rare operation, so the occasional array allocation 
should be fine.

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