Class HadoopInputFormat<K,​V>

  • Type Parameters:
    K - Key Type
    V - Value Type
    All Implemented Interfaces:
    Serializable, org.apache.flink.api.common.io.InputFormat<org.apache.flink.api.java.tuple.Tuple2<K,​V>,​HadoopInputSplit>, org.apache.flink.api.java.typeutils.ResultTypeQueryable<org.apache.flink.api.java.tuple.Tuple2<K,​V>>, org.apache.flink.core.io.InputSplitSource<HadoopInputSplit>

    @Public
    public class HadoopInputFormat<K,​V>
    extends HadoopInputFormatBase<K,​V,​org.apache.flink.api.java.tuple.Tuple2<K,​V>>
    implements org.apache.flink.api.java.typeutils.ResultTypeQueryable<org.apache.flink.api.java.tuple.Tuple2<K,​V>>
    InputFormat implementation allowing to use Hadoop (mapreduce) InputFormats with Flink.
    See Also:
    Serialized Form
    • Constructor Detail

      • HadoopInputFormat

        public HadoopInputFormat​(org.apache.hadoop.mapreduce.InputFormat<K,​V> mapreduceInputFormat,
                                 Class<K> key,
                                 Class<V> value,
                                 org.apache.hadoop.mapreduce.Job job)
      • HadoopInputFormat

        public HadoopInputFormat​(org.apache.hadoop.mapreduce.InputFormat<K,​V> mapreduceInputFormat,
                                 Class<K> key,
                                 Class<V> value)
                          throws IOException
        Throws:
        IOException
    • Method Detail

      • nextRecord

        public org.apache.flink.api.java.tuple.Tuple2<K,​V> nextRecord​(org.apache.flink.api.java.tuple.Tuple2<K,​V> record)
                                                                     throws IOException
        Specified by:
        nextRecord in interface org.apache.flink.api.common.io.InputFormat<K,​V>
        Throws:
        IOException
      • getProducedType

        public org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.api.java.tuple.Tuple2<K,​V>> getProducedType()
        Specified by:
        getProducedType in interface org.apache.flink.api.java.typeutils.ResultTypeQueryable<K>