gaoyunhaii commented on a change in pull request #18157:
URL: https://github.com/apache/flink/pull/18157#discussion_r790153063
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/FsCheckpointMetadataOutputStream.java
##########
@@ -162,4 +161,18 @@ public FsCompletedCheckpointStorageLocation
closeAndFinalizeCheckpoint() throws
}
}
}
+
+ static MetadataOutputStreamWrapper getOutputStreamWrapper(
+ final FileSystem fileSystem, final Path metadataFilePath) throws
IOException {
+ try {
+ RecoverableWriter recoverableWriter =
fileSystem.createRecoverableWriter();
+ if (fileSystem.exists(metadataFilePath)) {
+ throw new IOException("Target file " + metadataFilePath + " is
already exists.");
+ }
+ return new
RecoverableStreamWrapper(recoverableWriter.open(metadataFilePath));
+ } catch (Throwable throwable) {
+ LOG.warn("Errors on creating recoverable writer.", throwable);
Review comment:
Perhaps not output the stack here to avoid cause confusion since the
exception won't make the process fail.
Might change to
`LOG.warn("Errors on creating recoverable writer due to {}, will use the
ordinary writer.", throwable.getMessage());`
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]