hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rita <rmorgan...@gmail.com>
Subject Re: querying questions
Date Sat, 29 Oct 2011 12:36:50 GMT
Stack,

 It seems I have already been using Bytes.toBytes() for my keys. I have
been converting my strings ¨server#timestamp (epoch)#event id#username¨ to
byBytes and placing them as a key.



On Sat, Oct 29, 2011 at 1:49 AM, Stack <stack@duboce.net> wrote:

> On Fri, Oct 28, 2011 at 3:53 PM, Sam Seigal <selekt86@yahoo.com> wrote:
> > Open TDSB does it I believe :
> >
> > http://opentsdb.net/schema.html
> >
> > I am curious to know although the difference between having string as a
> row
> > key, converting them into bytes, and then storing the key , as opposed to
> > having numerical values stored as native bytes as bit masks.
> >
>
> An long is 8 bytes.  You can store an unsigned number up to
> 18,446,744,073,709,551,615 in those eight bytes.   If you stored this
> number as a String -- presuming a byte per character -- you need
> nearly 3x the bytes.
>
> @Rita HBase is sorted internally and when you write rows and columns,
> you specify them using raw bytes; see our APIs over in the client
> package:
> http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/package-summary.html#package_description
> .
>  If you want to play with bytes, there are lots of utilities including
> the native HBase ones over in
> http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/util/Bytes.html
> (Hopefully this helps some).
>
> St.Ack
>



-- 
--- Get your facts first, then you can distort them as you please.--

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