Return-Path: X-Original-To: apmail-hbase-user-archive@www.apache.org Delivered-To: apmail-hbase-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5D90FD865 for ; Mon, 4 Mar 2013 11:01:52 +0000 (UTC) Received: (qmail 4763 invoked by uid 500); 4 Mar 2013 11:01:50 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 4449 invoked by uid 500); 4 Mar 2013 11:01:49 -0000 Mailing-List: contact user-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hbase.apache.org Delivered-To: mailing list user@hbase.apache.org Received: (qmail 4431 invoked by uid 99); 4 Mar 2013 11:01:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Mar 2013 11:01:49 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jilal.oussama@gmail.com designates 209.85.223.170 as permitted sender) Received: from [209.85.223.170] (HELO mail-ie0-f170.google.com) (209.85.223.170) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Mar 2013 11:01:44 +0000 Received: by mail-ie0-f170.google.com with SMTP id c11so5982875ieb.15 for ; Mon, 04 Mar 2013 03:01:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=Ea9g6BavkeIaKkkaoqdOVoH8k8fYx2BjtUSfXMBH/eI=; b=b6CD+tmsfOJSbjGY8tuCR2TPrvvWCVJgqh9cGCuR8cBAFDwe4pOvLzNiNgWib0y4AT MenfogVf66YgHA1kKhv4uYQHwVh+RR4LMjqte73l+0SzuwLQKVl91foOzRO17LMOT8Zt jPXxsLffGt4GvXoap8SP/cFps3rwqZBrUOZ/BKgJapmLX6w/1A3CDNBv8a8UlaBZxsIo 9N6597Y6dI5v0y4DO2t/QLb0xhPfooVbPLE9XSGKMzxGTs+IIkdEdo6yESG8ZQTCwA09 UzWVtrV/o5cgSIddGRAxGSq3Djp0+bNXFQCb9UoyAmvEkwScGeB6CBBGIN+aiYgU2EgL HJjw== MIME-Version: 1.0 X-Received: by 10.50.56.236 with SMTP id d12mr2084861igq.92.1362394883606; Mon, 04 Mar 2013 03:01:23 -0800 (PST) Received: by 10.64.25.234 with HTTP; Mon, 4 Mar 2013 03:01:23 -0800 (PST) In-Reply-To: References: Date: Mon, 4 Mar 2013 11:01:23 +0000 Message-ID: Subject: Re: Rowkey design and presplit table From: Jilal Oussama To: user@hbase.apache.org Content-Type: multipart/alternative; boundary=f46d0402ac4514cf1c04d7174765 X-Virus-Checked: Checked by ClamAV on apache.org --f46d0402ac4514cf1c04d7174765 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 file) 2013/3/4 Luk=C3=A1=C5=A1 Drbal > 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: > __ > > 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(_md5()_md5(), but this rowkey is ve= ry > long (3*32+2 bytes), i don't have experience with this long rowkeys. > > Can someone give me a suggestions please? > > Regards > > Lukas Drbal > --f46d0402ac4514cf1c04d7174765--