Question : If the output key of the Mapper is Text than Input key of the reducer must be Text 1. True 2. False
Correct Answer : Get Lastest Questions and Answer : Explanation: When only a map and reducer class are defined for a job, the key/value pairs emitted by the mapper are consumed by the by the reducer. So, the output types for the mapper should be the same as the reducer.
(input) -> map -> -> reduce -> (output)
When a combiner class is defined for a job, the intermediate key value pairs are combined on the same node as the map task before sending to the reducer. Combiner reduces the network traffic between the mappers and the reducers.
Note that the combiner functionality is same as the reducer (to combine keys), but the combiner input/output key/value types should be of the same type, while for the reducer this is not a requirement.
In the scenario where the reducer class is also defined as a combiner class, the combiner/reducer input/ouput key/value types should be of the same type (k2/v2) as below. If not, due to type erasure the program compiles properly but gives a run time error.
Correct Answer : Get Lastest Questions and Answer : Explanation: There are 2 ways to launch the job " synchronously and asynchronously. The job.waitForCompletion() launches the job synchronously. The driver code will block wai3ng for the job to complete at this line. The true argument informs the framework to write verbose output to the controlling terminal of the job.
Question : When you write a Java MapReduce application, which method will be the entry point for application 1. main()