hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Daniel Cryans <jdcry...@apache.org>
Subject Re: key type and naming help
Date Wed, 14 Jul 2010 04:37:30 GMT
HBase only speaks byte arrays, so your keys can be anything (binaries,
strings, integers, anything).

J-D

On Tue, Jul 13, 2010 at 9:34 PM, S Ahmed <sahmed1020@gmail.com> wrote:
> Can' seem to find a page in the wiki that goes over the various data types a
> 'key' can be?  Or does it always have to be a byte array?
>
> On Tue, Jul 13, 2010 at 11:47 PM, S Ahmed <sahmed1020@gmail.com> wrote:
>
>> Great that clears things up, so its about converting things to a bytes.
>>
>>
>> On Tue, Jul 13, 2010 at 11:22 PM, Sarah Sproehnle <sarah@cloudera.com>wrote:
>>
>>> It sounds like you would probably want a composite key that includes a
>>> unique identifier for each site plus a timestamp (possibly reversed)
>>> which is discussed in Tom White's book and Jonathan Gray's blog post:
>>>
>>> http://devblog.streamy.com/2009/04/23/hbase-row-key-design-for-paging-limit-offset-queries/
>>>
>>> Cheers,
>>> Sarah
>>>
>>> On Tue, Jul 13, 2010 at 11:17 PM, S Ahmed <sahmed1020@gmail.com> wrote:
>>> > If my application supports multiple websites (multi-tenancy), what is
>>> the
>>> > best way of naming my keys for each column family?
>>> >
>>> > example, say I have a column family "articles".
>>> >
>>> > Now these articles could be for 100's of websites, how would I go about
>>> > naming my keys for this table?
>>> >
>>> > Retrieving a single article by key is fairly straight forward, but what
>>> if I
>>> > want to get the last 10 articles, it would make sense to have a key that
>>> > grouped these together somehow correct?
>>> >
>>>
>>>
>>>
>>> --
>>> Sarah Sproehnle
>>> Educational Services
>>> Cloudera, Inc
>>> http://www.cloudera.com/training
>>>
>>
>>
>

Mime
View raw message