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 Threaded View
Avro >> mail # dev >> Tracking the current position of stream decoded BinaryDecoder


Copy link to this message
-
Tracking the current position of stream decoded BinaryDecoder
Hi,

BinaryDecoder offers getPos() to get the current position which I assume should correspond to the progress the BinaryDecoder has made decoding the passed stream.

However it is inconsistent (perhaps it is a bug, but I suspect so); Calling BinaryDecoder.getPos() after first deserialization gives 0.

I would like to track the exact position of which the BinaryDecoder has reached.

For example if the stream contains a long that is 4 bytes, int that is 3 bytes, and fixed bytes array that is 10 bytes then I would like to get the following information:

Start: pos`=0
After deserializing long => pos`=4
After deserializing int => pos`=6
After deserializing fixed => pos`=15

Is it possible to get this information? Thanks in advance.

Best regards,
Youssef
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