cloudera/cdk — pull request #10 by tlamerig (2013-08-27 08:42:37+00:00)
Title: Update AvroEventSerializer.java

Add feature to save embedded schema to hdfs. If the client provides both AVRO_SCHEMA_LITERAL_HEADER and AVRO_SCHEMA_URL_HEADER then the schema is written to the hdfs url. Only hdfs is supported as a valid url for saving. The feature is fully backward-compatible with old clients that only ever provide one of the header fields.

The intended use is that the client provides both schema and url when it sends its first message (or when it thinks the schema has changed) and that it provides only the url for all subsequent messages. The benefit is that the client now has one consistent way for delivering both schema and payload, thus reusing all the existing client side logic (e.g. error handling, reconnect behavior) and removing the need for alternate methods of schema delivery (e.g. email, upload to webserver, upload to hdfs).