Github user HuangWHWHW commented on the pull request:
https://github.com/apache/flink/pull/1098#issuecomment-139436457
@fhueske
Hi, if I change to the NO_OVERWRITE in the `CsvOutputFormatITCase.java`,
tests will fail with errors following:
`Caused by: java.io.IOException: File already
exists:file:/C:/Users/H00292~1/AppData/Local/Temp/org.apache.flink.streaming.scala.api.CsvOutputFormatITCase-result/1
at
org.apache.flink.core.fs.local.LocalFileSystem.create(LocalFileSystem.java:247)
at
org.apache.flink.core.fs.local.LocalFileSystem.create(LocalFileSystem.java:263)
at
org.apache.flink.api.common.io.FileOutputFormat.open(FileOutputFormat.java:247)
at
org.apache.flink.api.scala.operators.ScalaCsvOutputFormat.open(ScalaCsvOutputFormat.java:161)
at
org.apache.flink.streaming.api.functions.sink.FileSinkFunction.open(FileSinkFunction.java:58)
at
org.apache.flink.api.common.functions.util.FunctionUtils.openFunction(FunctionUtils.java:33)
at
org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator.open(AbstractUdfStreamOperator.java:69)
at
org.apache.flink.streaming.runtime.tasks.StreamTask.openAllOperators(StreamTask.java:232)
at
org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:167)
at org.apache.flink.runtime.taskmanager.Task.run(Task.java:581)
at java.lang.Thread.run(Thread.java:722)`
This is due to the exist file check in `LocalFileSystem.java`.
See the code following:
`if (exists(f) && !overwrite) {
throw new IOException("File already exists:" + f);
}`
---
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 [email protected] or file a JIRA ticket
with INFRA.
---