kite-sdk/kite — pull request #35 by rdblue (2014-03-08 03:49:21+00:00)
Title: CDK-323: Consolidate FS writer code in FileSystemWriter.

This fixes CDK-323 by tracking how many events are written and
discarding 0-event files. Test added in TestFileSystemWriters.

This introduces FileSystemWriter, which consolidates the boilerplate
code from the parquet and avro writers by wrapping an internal
FileAppender API. This is mirrors the DatasetWriter API, but allows
implementations to throw IOExceptions and assume that the read or write
state is correctly enforced in the FileSystemWriter. The new writer
handles state, logging, and IOExceptions. It also removes the need for
FileSystemWriters by handling format-appender resolution internally.

The old writers have been renamed to AvroAppender and ParquetAppender
and are now focused on only the format code.