Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-15533

Writing DataStream as text file fails due to output path already exists

    XMLWordPrintableJSON

Details

    Description

      The following program reproduces the issue.

          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();
      

      The job will fail with the follow error, even though the output path doesn't exist before job submission:

      org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.fs.FileAlreadyExistsException): /tmp/output already exists as a directory
      

      Attachments

        Issue Links

          Activity

            People

              kkl0u Kostas Kloudas
              lirui Rui Li
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m