Details
-
Improvement
-
Status: Resolved
-
Not a Priority
-
Resolution: Fixed
-
1.17.0, 1.15.4
Description
The following example shows how to use Hadoop’s TextOutputFormat from the doc: https://nightlies.apache.org/flink/flink-docs-release-1.17/docs/connectors/datastream/formats/hadoop/#using-hadoop-outputformats . But the DataStream has no output().
// Obtain the result we want to emit DataStream<Tuple2<Text, IntWritable>> hadoopResult = [...] // Set up the Hadoop TextOutputFormat. HadoopOutputFormat<Text, IntWritable> hadoopOF = // create the Flink wrapper. new HadoopOutputFormat<Text, IntWritable>( // set the Hadoop OutputFormat and specify the job. new TextOutputFormat<Text, IntWritable>(), job ); hadoopOF.getConfiguration().set("mapreduce.output.textoutputformat.separator", " "); TextOutputFormat.setOutputPath(job, new Path(outputPath)); // Emit data using the Hadoop TextOutputFormat. hadoopResult.output(hadoopOF);