Class HadoopInputFormat<K,​V>

  • Type Parameters:
    K - Type of the key
    V - Type of the value.
    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>>
    Wrapper for using HadoopInputFormats (mapred-variant) with Flink.

    The IF is returning a Tuple2<K,V>.

    See Also:
    Serialized Form
    • Constructor Detail

      • HadoopInputFormat

        public HadoopInputFormat​(org.apache.hadoop.mapred.InputFormat<K,​V> mapredInputFormat,
                                 Class<K> key,
                                 Class<V> value,
                                 org.apache.hadoop.mapred.JobConf job)
      • HadoopInputFormat

        public HadoopInputFormat​(org.apache.hadoop.mapred.InputFormat<K,​V> mapredInputFormat,
                                 Class<K> key,
                                 Class<V> value)
    • 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>