Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase, mail # user - querying questions


Copy link to this message
-
Re: querying questions
Rita 2011-10-29, 12:36
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 <[EMAIL PROTECTED]> wrote:

> On Fri, Oct 28, 2011 at 3:53 PM, Sam Seigal <[EMAIL PROTECTED]> 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.--