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_r380308235
 
 

 ##########
 File path: 
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBStateDownloader.java
 ##########
 @@ -120,14 +121,14 @@ private void downloadDataForStateHandle(
                CloseableRegistry closeableRegistry) throws IOException {
 
                FSDataInputStream inputStream = null;
-               FSDataOutputStream outputStream = null;
+               OutputStream outputStream = null;
 
                try {
-                       FileSystem restoreFileSystem = 
restoreFilePath.getFileSystem();
                        inputStream = remoteFileHandle.openInputStream();
                        closeableRegistry.registerCloseable(inputStream);
 
-                       outputStream = 
restoreFileSystem.create(restoreFilePath, FileSystem.WriteMode.OVERWRITE);
+                       Files.createDirectories(restoreFilePath.getParent());
+                       outputStream = Files.newOutputStream(restoreFilePath, 
StandardOpenOption.CREATE, StandardOpenOption.WRITE);
 
 Review comment:
   I think you are right. I will follow Yu's suggestion below to not supply any 
option, which implies a `TRUNCATE_EXISTING` option.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to