[
https://issues.apache.org/jira/browse/FLINK-1268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14220810#comment-14220810
]
Fabian Hueske commented on FLINK-1268:
--------------------------------------
The problem here is that, directories cannot be deleted by the JobManager in
initializeOnMaster, because the JM does not have access to the local FS of all
TMs.
Instead, only the first OutputFormat running on each TM is allowed to clear the
output directory. Otherwise, files which are currently written might be deleted.
Hence, there is need for coordination among the OutputFormats running on each
TM.
> FileOutputFormat with overwrite does not clear local output directories
> -----------------------------------------------------------------------
>
> Key: FLINK-1268
> URL: https://issues.apache.org/jira/browse/FLINK-1268
> Project: Flink
> Issue Type: Bug
> Reporter: Till Rohrmann
>
> I noticed that the FileOutputFormat does not clear the output directories if
> it writes to local disk. This has the consequence that previous partitions
> are still contained in the directory if one decreases the DOP between
> subsequent runs. If one reads the data from this directory, then more
> partitions will be read in than were actually written. This can lead to a
> wrong user code behaviour which is hard to debug. I'm aware that in case of a
> distributed execution the TaskManagers or the Tasks have to be responsible
> for the cleanup and if multiple Tasks are running on a TaskManager, then the
> cleanup has to be coordinated.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)