fredia commented on code in PR #19907:
URL: https://github.com/apache/flink/pull/19907#discussion_r928369565
##########
flink-runtime/src/main/java/org/apache/flink/runtime/state/TaskLocalStateStoreImpl.java:
##########
@@ -186,20 +187,27 @@ private void persistLocalStateMetadata(long checkpointId,
TaskStateSnapshot loca
@VisibleForTesting
File getTaskStateSnapshotFile(long checkpointId) {
- final File checkpointDirectory =
- localRecoveryConfig
- .getLocalStateDirectoryProvider()
- .orElseThrow(
- () -> new IllegalStateException("Local
recovery must be enabled."))
- .subtaskSpecificCheckpointDirectory(checkpointId);
+ return new File(getCheckpointDirectory(checkpointId),
TASK_STATE_SNAPSHOT_FILENAME);
+ }
+ private File createTaskStateSnapshotFile(long checkpointId) {
Review Comment:
Nice suggestion. I have changed it into(the parameters are a little bit
different ):
- `getTaskStateSnapshotFile(long checkpointId)` // add filename suffix
- `getCheckpointDirectory(checkpointId)` // as is
- `createFolderOrFail(File checkpointDirectory)` // mkdirs
--
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]