@Override public void write(Writable w) throws IOException {
    checkExceptions();
    try {
      sentRecords++;
      producer.send(KafkaUtils.toProducerRecord(topic, (KafkaWritable) w), callback);
    } catch (KafkaException kafkaException) {
      handleKafkaException(kafkaException);
      checkExceptions();
    }
  }
@param topic Kafka Topic.
@param writerId Writer Id use for logging.
@param properties Kafka Producer properties.
kafka-handler/src/java/org/apache/hadoop/hive/kafka/SimpleKafkaWriter.java