Writable getHiveWritable(MetadataColumn metadataColumn) {
    switch (metadataColumn) {
    case OFFSET:
      return new LongWritable(getOffset());
    case PARTITION:
      return new IntWritable(getPartition());
    case TIMESTAMP:
      return new LongWritable(getTimestamp());
    case KEY:
      return getRecordKey() == null ? null : new BytesWritable(getRecordKey());
    default:
      throw new IllegalArgumentException("Unknown metadata column [" + metadataColumn.getName() + "]");
    }
  }
Writable implementation of Kafka ConsumerRecord.
Serialized in the form:
{@code timestamp} long| {@code partition} (int) | {@code offset} (long) | {@code value.size()} (int) |
{@code value} (byte []) | {@code recordKey.size()}| {@code recordKey (byte [])}
kafka-handler/src/java/org/apache/hadoop/hive/kafka/KafkaWritable.java