Javadoc
Initializes output directories on local file systems according to the given write mode.
WriteMode.CREATE & parallel output:
- A directory is created if the output path does not exist.
- An existing directory is reused, files contained in the directory are NOT deleted.
- An existing file raises an exception.
WriteMode.CREATE & NONE parallel output:
- An existing file or directory raises an exception.
WriteMode.OVERWRITE & parallel output:
- A directory is created if the output path does not exist.
- An existing directory is reused, files contained in the directory are NOT deleted.
- An existing file is deleted and replaced by a new directory.
WriteMode.OVERWRITE & NONE parallel output:
- An existing file or directory (and all its content) is deleted
Files contained in an existing directory are not deleted, because multiple instances of a
DataSinkTask might call this function at the same time and hence might perform concurrent
delete operations on the file system (possibly deleting output files of concurrently running tasks).
Since concurrent DataSinkTasks are not aware of each other, coordination of delete and create
operations would be difficult.