public void write(Writable writable) throws IOException {
if(!(writable instanceof AvroGenericRecordWritable)) {
throw new IOException("Expecting instance of AvroGenericRecordWritable, " +
"but received" + writable.getClass().getCanonicalName());
}
AvroGenericRecordWritable r = (AvroGenericRecordWritable)writable;
dfw.append(r.getRecord());
}