Description
If an exception is thrown while serializing a record in DataFileWriter<D>.append(D) partial contents of that serialization will end up in the file. This corrupts the block.
DataFileWriter should ensure that the buffer is rewound to the state prior to the record write in the case of an exception thrown during serialization to prevent creating a corrupt file.