public RecordWriter<K, V> getRecordWriter(TaskAttemptContext context) throws IOException {
Configuration conf = context.getConfiguration();
AvroDatumConverterFactory converterFactory = new AvroDatumConverterFactory(conf);
AvroDatumConverter<K, ?> keyConverter = converterFactory.create(
(Class<K>) context.getOutputKeyClass());
AvroDatumConverter<V, ?> valueConverter = converterFactory.create(
(Class<V>) context.getOutputValueClass());
GenericData dataModel = AvroSerialization.createDataModel(conf);