hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matteo Bertozzi <theo.berto...@gmail.com>
Subject Re: HBase aggregation for sum
Date Thu, 19 Dec 2013 18:25:16 GMT
On Thu, Dec 19, 2013 at 9:05 AM, james isaac <jamesisaac21@gmail.com> wrote:

> Could there be a problem with me using a LongColumnInterpreter when the
> 'count' field was an int? What am I missing in here?
>

An "int" is serialized as 4 bytes, a "long" as 8 bytes...

The size of the value is checked and expected to be 8 bytes (a long) by the
LongColumnInterpreter, otherwise null is returned
https://github.com/apache/hbase/blob/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/coprocessor/LongColumnInterpreter.java#L44

(the blog post mentions that only long are supported: "Note that this
version is designed to work on data whose type is Long. If you plan to use
other data types you should provide your own column interpreter")

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message