Class HadoopOutputCollector<KEY,VALUE>
- java.lang.Object
-
- org.apache.flink.hadoopcompatibility.mapred.wrapper.HadoopOutputCollector<KEY,VALUE>
-
- All Implemented Interfaces:
org.apache.hadoop.mapred.OutputCollector<KEY,VALUE>
public final class HadoopOutputCollector<KEY,VALUE> extends Object implements org.apache.hadoop.mapred.OutputCollector<KEY,VALUE>
A Hadoop OutputCollector that wraps a Flink OutputCollector. On each call of collect() the data is forwarded to the wrapped Flink collector.
-
-
Constructor Summary
Constructors Constructor Description HadoopOutputCollector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
collect(KEY key, VALUE val)
Use the wrapped Flink collector to collect a key-value pair for Flink.void
setFlinkCollector(Collector<Tuple2<KEY,VALUE>> flinkCollector)
Set the wrapped Flink collector.
-
-
-
Method Detail
-
setFlinkCollector
public void setFlinkCollector(Collector<Tuple2<KEY,VALUE>> flinkCollector)
Set the wrapped Flink collector.- Parameters:
flinkCollector
- The wrapped Flink OutputCollector.
-
collect
public void collect(KEY key, VALUE val) throws IOException
Use the wrapped Flink collector to collect a key-value pair for Flink.- Specified by:
collect
in interfaceorg.apache.hadoop.mapred.OutputCollector<KEY,VALUE>
- Parameters:
key
- the key to collectval
- the value to collect- Throws:
IOException
- unexpected of key or value in key-value pair.
-
-