[ 
https://issues.apache.org/jira/browse/FLINK-15533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17012781#comment-17012781
 ] 

Rui Li commented on FLINK-15533:
--------------------------------

Hi [~kkl0u], just confirmed the job succeeds if I write the program as you did. 
But the problem persists if I create the stream env as in the description:
{code}
    Configuration configuration = GlobalConfiguration.loadConfiguration();
    configuration.set(DeploymentOptions.TARGET, RemoteExecutor.NAME);
    StreamExecutionEnvironment streamEnv = new 
StreamExecutionEnvironment(configuration);
{code}
Debugged and found that in your program, the execution env is created with 
default parallelism == 1: 
https://github.com/apache/flink/blob/master/flink-clients/src/main/java/org/apache/flink/client/program/ContextEnvironment.java#L51
But my program doesn't go through that code path. Do you think this is an issue 
or I shouldn't create the env like that in the first place?

> Writing DataStream as text file fails due to output path already exists
> -----------------------------------------------------------------------
>
>                 Key: FLINK-15533
>                 URL: https://issues.apache.org/jira/browse/FLINK-15533
>             Project: Flink
>          Issue Type: Bug
>          Components: Client / Job Submission
>    Affects Versions: 1.10.0
>            Reporter: Rui Li
>            Assignee: Kostas Kloudas
>            Priority: Blocker
>             Fix For: 1.10.0
>
>
> The following program reproduces the issue.
> {code}
>     Configuration configuration = GlobalConfiguration.loadConfiguration();
>     configuration.set(DeploymentOptions.TARGET, RemoteExecutor.NAME);
>     StreamExecutionEnvironment streamEnv = new 
> StreamExecutionEnvironment(configuration);
>     DataStream dataStream = streamEnv.fromCollection(Arrays.asList(1,2,3));
>     dataStream.writeAsText("hdfs://localhost:8020/tmp/output");
>     streamEnv.execute();
> {code}
> The job will fail with the follow error, even though the output path doesn't 
> exist before job submission:
> {noformat}
> org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.fs.FileAlreadyExistsException):
>  /tmp/output already exists as a directory
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to