Github user tillrohrmann commented on a diff in the pull request: https://github.com/apache/flink/pull/4204#discussion_r125164998 --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/zookeeper/filesystem/FileSystemStateStorageHelper.java --- @@ -77,4 +83,18 @@ public FileSystemStateStorageHelper(Path rootPath, String prefix) throws IOExcep private Path getNewFilePath() { return new Path(rootPath, FileUtils.getRandomFilename(prefix)); } + + @Override + public void closeAndCleanupAllData() { + try { + fs.delete(rootPath, true); --- End diff -- We cannot simply delete the rootPath, because it's `HighAvailabilityOptions.HA_STORAGE_PATH`. Thus, we would also delete files from other components in this directory (e.g. the `BlobServer`). I think the `FileSystemStateStorageHelper` has to create a sub directory for the state to store. That directory, we can easily delete.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---