While preparing hadoop exam came across below question for which I could not understand correct answer, not sure about correctness about question.
Given a directory of files with the following structure: line number, tab character, string:
Example:
1. abialkjfjkaoasdfjksdlkjhqweroij
2. kadf jhuwqounahagtnbvaswslmnbfgy
3. kjfteiomndscxeqalkzhtopedkfslkj
You want to send each line as one record to your Mapper. Which InputFormat would you use to complete the line: setInputFormat (________.class);
A. DBInputFormat
B. KeyValueTextInputFormat
C. SequenceFileInputFormat
D. SequenceFileAsTextInputFormat
Answer: C
But in opinion in order to achieve this either of KeyValueTextInputFormat
or SequenceFileAsTextInputFormat
can also be used.