Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
Avro >> mail # user >> Create Avro from bytes, not by fields


+
Daniel Rodriguez 2014-02-07, 20:07
Copy link to this message
-
Re: Create Avro from bytes, not by fields
You might use DataFileWriter#appendEncoded:

http://avro.apache.org/docs/current/api/java/org/apache/avro/file/DataFileWriter.html#appendEncoded(java.nio.ByteBuffer)

If the body has just single instance of the record then you'd call this
once.  If you have multiple instances then you might change the body to
have the schema {"type":"array", "items", "bytes"}.

Doug
On Fri, Feb 7, 2014 at 12:06 PM, Daniel Rodriguez <[EMAIL PROTECTED]
 
+
Daniel Rodriguez 2014-02-08, 01:30
+
Milind Vaidya 2014-02-11, 22:29
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB