hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jilal Oussama <jilal.ouss...@gmail.com>
Subject Re: Rowkey design and presplit table
Date Mon, 04 Mar 2013 11:01:23 GMT
You can split in your application using a regular expression on the
underscore char if the langage supports them (like spliting data of a csv

2013/3/4 Lukáš Drbal <lukas.drbal@gmail.com>

> Hi,
> i have one question about rowkey design and presplit table.
> My usecase:
> I need store a lot of comments where each comment are for one article and
> this article has one category.
> What i need:
> 1) read one comment by id (where i know commentId, articleId and
> categoryId)
> 2) read all coments for article (i know categoryId and articleId)
> 3) read all comments for category (i know categoryId)
> From this read pattern i see one good rowkey:
> <categoryId>_<articleId>_<commentId>
> But here i don't have fixed size of rowkey, so i don't know how to define
> split pattern. How can be this solved?
> This id's come from external system and grow very fast, so add some like
> "padding" for each part are hard.
> Maybe i can use hash function for each part
> md5(<categoryId>_md5(<articleId>)_md5(<commentId>), but this rowkey
is very
> long (3*32+2 bytes), i don't have experience with this long rowkeys.
> Can someone give me a suggestions please?
> Regards
> Lukas Drbal

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