Yes, it is true that one can restrict the size of a record using mapred.linerecordreader.maxlength.
May 15 2014 12:29 AM
Before jumping into questions, let us understand the data-flow in map-reduce :
1. InputFormat takes care of split generation and calling record reader.
2. Record Reader, then, reads from split, line-by-line and generates key-value pair and calls map for each generated key-value pair.
3. While generating value part, record reader checks this property, which if set to some value, reads the record bytes only upto that length and ignores rest of the record.[Default RecordReader implementation]
Now to answer your questions:
a. If record size is more than the value specified in mapred.linerecordreader.maxlength property, record reader will simply ignore the rest of the record.
b. Default size is: INTEGER.MAX_VALUE
c. Map won't throw any exception as record reader already has handled this by silently ignoring the rest of the record part.
Hope this helps.