concept input in category hadoop

This is an excerpt from Manning's book Hadoop in Practice, Second Edition.
Table 8.5. MRUnit tests and when to use them
Type of test
Works well in these situations
Map You have a map-only job, and you want low-level unit tests where the framework takes care of testing the expected map outputs for your test map inputs. Reduce Your job has a lot of complexity in the reduce function, and you want to isolate your tests to only that function. MapReduce You want to test the combination of the map and reduce functions. These are higher-level unit tests. Pipeline You have a MapReduce pipeline where the input of each MapReduce job is the output from the previous job.
Optimizations in the map side of a MapReduce job are usually related to the input data and how it’s being processed, or to your application code. Your mappers are responsible for reading the job inputs, so variables such as whether your input files are splittable, data locality, and the number of input splits all can have an impact on the performance of your job. Inefficiencies in your mapper code can also lead to longer-than-expected job execution times.

This is an excerpt from Manning's book Hadoop in Action.
In simple terms, the mapper is meant to filter and transform the input into something that the reducer can aggregate over. You may see a striking similarity here with the two phases we had to develop in scaling up word counting. The similarity is not accidental. The MapReduce framework was designed after a lot of experience in writing scalable, distributed programs. This two-phase design pattern was seen in scaling many programs, and became the basis of the framework.
The input data to your MapReduce job does not necessarily have to be some external data. In fact it’s often the case that the input to one MapReduce job is the output of some other MapReduce job. As we’ll see, you can customize your output format too. The default output format writes the output in the same format that KeyValueTextInputFormat can read back in (i.e., each line is a record with key and value separated by a tab character). Hadoop provides a much more efficient binary compressed file format called sequence file. This sequence file is optimized for Hadoop processing and should be the preferred format when chaining multiple MapReduce jobs. The InputFormat class to read sequence files is SequenceFileInputFormat. The object type for key and value in a sequence file are definable by the user. The output and the input type have to match, and your Mapper implementation and map() method have to take in the right input type.
09/05/27 03:34:37 INFO mapred.TaskRunner: Task
attempt_local_0001_r_000000_0' done.
09/05/27 03:34:37 INFO mapred.TaskRunner: Saved output of task
attempt_local_0001_r_000000_0' to
file:/Users/chuck/Projects/Hadoop/hadoop-0.18.1/output/test
09/05/27 03:34:37 INFO mapred.LocalJobRunner: reduce > reduce
09/05/27 03:34:37 INFO mapred.JobClient: Job complete: job_local_0001
09/05/27 03:34:37 INFO mapred.JobClient: Counters: 11
09/05/27 03:34:37 INFO mapred.JobClient: Map-Reduce Framework
09/05/27 03:34:37 INFO mapred.JobClient: Map output records=16522439
09/05/27 03:34:37 INFO mapred.JobClient: Reduce input records=33044878
09/05/27 03:34:37 INFO mapred.JobClient: Map output bytes=264075431
09/05/27 03:34:37 INFO mapred.JobClient: Map input records=16522439
09/05/27 03:34:37 INFO mapred.JobClient: Combine output records=0
09/05/27 03:34:37 INFO mapred.JobClient: Map input bytes=264075431
09/05/27 03:34:37 INFO mapred.JobClient: Combine input records=0
09/05/27 03:34:37 INFO mapred.JobClient: Reduce input groups=6517968
09/05/27 03:34:37 INFO mapred.JobClient: Reduce output records=6517968
09/05/27 03:34:37 INFO mapred.JobClient: File Systems
09/05/27 03:34:37 INFO mapred.JobClient: Local bytes written=4246405780
09/05/27 03:34:37 INFO mapred.JobClient: Local bytes read=4276658154