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 >> unsigned integer types


+
Robert Minsk 2012-12-20, 21:25
Copy link to this message
-
Re: unsigned integer types
If your numbers are typically small, you can just use a signed type —
the sign bit's overhead is insignificant.

If your numbers typically use the full range of 0 to 2^64-1 (or 0 to
2^32-1), e.g. because they are hashes or random numbers from that
range, you're best off using the 'fixed' type and specifying the
number of bytes you want. In this case 'fixed' is more efficient than
the variable-length encoding of int/long, because there is no overhead
for indicating the length; it's simply stored as that number of bytes,
and nothing else.

Because those two options cover most use cases, I don't think there
are any plans to add unsigned int support to Avro.

Martin
On 20 December 2012 13:25, Robert Minsk <[EMAIL PROTECTED]>
wrote:
>
> I am currently testing Avro for our network serialization for a mix of C++
> and python programs.  I have noticed that Avro does not offer an unsigned
> 32-bit or unsigned 64-bit integer types.  How are people currently handling
> unsigned integers?  Are there any plans to add unsigned integer types?
>
> --
> Robert Minsk
> Systems and Software Engineer
>
> WWW.METHODSTUDIOS.COM
> 730 Arizona Ave, Santa Monica, CA 90401
> O:+1 310 434 6500 // F:+1 310 434 6501
>
>
+
Robert Minsk 2012-12-21, 19:18
+
Doug Cutting 2012-12-21, 19:42
+
Robert Minsk 2012-12-21, 19:50
+
Doug Cutting 2012-12-21, 20:03
+
Robert Minsk 2012-12-21, 19:59
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