carp84 commented on a change in pull request #10768: [FLINK-15012][checkpoint] Introduce shutdown to CheckpointStorageCoordinatorView to clean up checkpoint directory. URL: https://github.com/apache/flink/pull/10768#discussion_r386012840
########## File path: flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/FsCheckpointStorage.java ########## @@ -134,6 +149,37 @@ public CheckpointStorageLocation initializeLocationForCheckpoint(long checkpoint writeBufferSize); } + @Override + public void shutDown(JobStatus jobStatus) throws IOException { Review comment: The logic to check whether checkpoint folders should be discarded are the same for Fs and MemoryBackend checkpoint storage, while the difference lies in what folders to discard. So we could extract them out into `AbstractFsCheckpointStorage` and introduce a new `doDiscard` abstract method for implementations to override. ---------------------------------------------------------------- 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