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.
BDBInputFormat
B.
KeyValueTextInputFormat
C.
SequenceFileInputFormat
D.
SequenceFileAsTextInputFormat
Explanation:
Note:
The output format for your first MR job should be SequenceFileOutputFormat – this will store the
Key/Values output from the reducer in a binary format, that can then be read back in, in your
second MR job using SequenceFileInputFormat.
Reference:http://stackoverflow.com/questions/9721754/how-to-parse-customwritable-from-text-inhadoop(see answer 1 and then see the comment #1 for it)
KeyValueTextInputFormat is the answer, Question is not about passing value from MR1 to MR2. It is about how the record is passed to MR1.
0
0
KeyValueTextInputFormat sounds right to me.
Nothing is mentioned in question about the input data being in binary format. Hence option B sounds right.
0
0
Ans : B
0
0
Sequence files are binary format so might not work
0
0
B.
KeyValueTextInputFormat
0
0
Ans is B)KeyValueTextInputFormat
0
0
Correct answer is C
0
0