[
https://issues.apache.org/jira/browse/FLINK-5823?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16219854#comment-16219854
]
ASF GitHub Bot commented on FLINK-5823:
---------------------------------------
Github user bowenli86 commented on a diff in the pull request:
https://github.com/apache/flink/pull/4907#discussion_r147031787
--- Diff: flink-core/src/main/java/org/apache/flink/util/FileUtils.java ---
@@ -243,11 +245,19 @@ else if (directory.exists()) {
* @throws IOException if the delete operation fails
*/
public static boolean deletePathIfEmpty(FileSystem fileSystem, Path
path) throws IOException {
- FileStatus[] fileStatuses = null;
+ final FileStatus[] fileStatuses;
try {
fileStatuses = fileSystem.listStatus(path);
- } catch (Exception ignored) {}
+ }
+ catch (FileNotFoundException e) {
+ // path already deleted
+ return true;
+ }
+ catch (Exception e) {
+ // could not access directory, cannot delete
--- End diff --
should we log a warning here?
> Store Checkpoint Root Metadata in StateBackend (not in HA custom store)
> -----------------------------------------------------------------------
>
> Key: FLINK-5823
> URL: https://issues.apache.org/jira/browse/FLINK-5823
> Project: Flink
> Issue Type: Sub-task
> Components: State Backends, Checkpointing
> Reporter: Stephan Ewen
> Assignee: Stephan Ewen
> Priority: Blocker
> Fix For: 1.4.0
>
>
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)