11. What Mapper does?
Ans: Maps are the individual tasks that transform input records into intermediate records. The transformed intermediate records do not need to be of the same type as the input records. A given input pair may map to zero or many output pairs.
12. What is the Input Split in map reduce software?
Ans: An Input Split is a logical representation of a unit (A chunk) of input work for a map task; e.g., a filename and a byte range within that file to process or a row set in a text file.
13. What is the Input Format?
Ans: The Input Format is responsible for enumerate (itemize) the Input Split, and producing a Record Reader which will turn those logical work units into actual physical input records.
14. Where do you specify the Mapper Implementation?
Ans: Generally mapper implementation is specified in the Job itself.
15. How Mapper is instantiated in a running job?
Ans: The Mapper itself is instantiated in the running job, and will be passed a Map Context object which it can use to configure itself
16. Which are the methods in the Mapper interface?
Ans: the Mapper contains the run () method, which call its own setup () method only once, it also call a map () method for each input and finally calls it cleanup () method. All above methods you can override in your code.
17. What happens if you don’t override the Mapper methods and keep them as it is?
Ans: If you do not override any methods (leaving even map as-is), it will act as the identity function, emitting each input record as a separate output.
18. What is the use of Context object?
Ans: The Context object allows the mapper to interact with the rest of the Hadoop system. It Includes configuration data for the job, as well as interfaces which allow it to emit output.
19. How can you add the arbitrary key-value pairs in your mapper?
Ans: You can set arbitrary (key, value) pairs of configuration data in your Job, e.g. with Job.getConfiguration ().set (“myKey”, “myVal”), and then retrieve this data in your mapper with context.getConfiguration().get(“myKey”). ThiskindoffunctionalityistypicallydoneintheMapper’s setup () method.
20. How does Mapper’s run () method works?
Ans: The Mapper. Run () method then calls map (KeyInType, ValInType, Context) for each key/value pair in the Input Split for that task