kevinweil/elephant-bird — pull request #360 by Chandler (2013-12-05 09:40:45+00:00)
Title: Allow DeprecatedInputFormatWrapper to manually set key and value on a mapreduce RecordReader

This PR depends on https://github.com/kevinweil/elephant-bird/pull/359

Context
------------------------
RecordReaders written for the deprecated mapred interface must reuse their key and value objects, RecordReaders written for thew new mapreduce interface do not have this restriction.

DeprecatedInputFormatWrapper is a wrapper that allows newer mapreduce InputFormats to be used in the context of the deprecated mapred interface.

In order for new mapreduce RecordReaders to be used with a mapreduce InputFormat that is wrapped by DeprecatedInputFormatWrapper they need to allow DeprecatedInputFormatWrapper to manually set their key and value objects.

This PR introduces a RecordReader interface that defines a method for setting the key and value.

Changes
------------------------
Added RecordReader interface, MapredInputFormatCompatible

Modified DeprecatedInputFormatWrapper to set the key and value on the RecordReader when MapredInputFormatCompatible has been implemented

Modified the following RecordReaders to implement the MapredInputFormatCompatible interface
* LzoBinaryB64LineRecordReader.java
* LzoBinaryBlockRecordReader.java
* LzoGenericProtobufBlockRecordReader.java
* LzoJsonRecordReader.java
* LzoLineRecordReader.java
* LzoW3CLogRecordReader.java