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 >> Avro Byte Blob Ser De


+
Milind Vaidya 2014-02-11, 18:15
+
Robert Turner 2014-02-11, 22:33
Copy link to this message
-
Re: Avro Byte Blob Ser De
I can't thank you enough for this answer.
I did almost the same thing.

In my case I was using appendEncoded(ByteBuffer) instead of append(Datum).

The string I was using was "This is a test string" and calling it twice.

With appendEncoded(ByteBuffer) :

I was able to get the data in the "result" byte array, in turn string but
still it was throwing
java.io.EOFException
                      at
org.apache.avro.io.BinaryDecoder$ByteArrayByteSource.readRaw(BinaryDecoder.java:940)

Output: his is a test string.This is a test string

(Yes the first T was missing even after I added b.rewind())

with append(Datum) :

Perfect.

Output:
This is a test string
This is a test string
Thank you very much Rob.

- Milind
On Tue, Feb 11, 2014 at 4:32 PM, Robert Turner <[EMAIL PROTECTED]> wrote:
 
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