@Override public AvroGenericRecordWritable getWritable(byte[] value) {
      GenericRecord avroRecord = null;
      try {
        avroRecord = dataReader.read(null, getDecoder(value));
      } catch (IOException e) {
        Throwables.propagate(new SerDeException(e));
      } catch (SerDeException e) {
        Throwables.propagate(e);
      }

      avroGenericRecordWritable.setRecord(avroRecord);
      avroGenericRecordWritable.setRecordReaderID(uid);
      avroGenericRecordWritable.setFileSchema(avroRecord.getSchema());
      return avroGenericRecordWritable;
    }
Class that encapsulate the logic of serialize and deserialize bytes array to/from the delegate writable format.

@param <K> delegate writable class.
kafka-handler/src/java/org/apache/hadoop/hive/kafka/KafkaSerDe.java