Understanding input formats
Before you consider writing your MapReduce programs, you first you need to identify the input and output formats of your job. We have seen some formats in our last chapter about HDFS (different file formats). The InputFormat<K,V> interface (found in the org.apache.Hadoop.mapreduce package) and OutputFormat<K,V> interface (found in the org.apache.Hadoop.mapreduce package) describe the specifications for the input and output of your job respectively.
In the case of the InputFormat class, the MapReduce framework verifies the specification with actual input passed to the job, then it splits the input into a set of records for different Map Tasks using the InputSplit class and then uses an implementation of the RecordReader ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access