Return-Path: Delivered-To: apmail-hadoop-hbase-user-archive@minotaur.apache.org Received: (qmail 95898 invoked from network); 17 Aug 2009 07:27:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Aug 2009 07:27:11 -0000 Received: (qmail 3214 invoked by uid 500); 17 Aug 2009 07:27:17 -0000 Delivered-To: apmail-hadoop-hbase-user-archive@hadoop.apache.org Received: (qmail 3143 invoked by uid 500); 17 Aug 2009 07:27:17 -0000 Mailing-List: contact hbase-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hbase-user@hadoop.apache.org Delivered-To: mailing list hbase-user@hadoop.apache.org Received: (qmail 3129 invoked by uid 99); 17 Aug 2009 07:27:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Aug 2009 07:27:17 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Aug 2009 07:27:06 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1Mcwc9-0002Ff-Hn for hbase-user@hadoop.apache.org; Mon, 17 Aug 2009 00:26:45 -0700 Message-ID: <25002264.post@talk.nabble.com> Date: Mon, 17 Aug 2009 00:26:45 -0700 (PDT) From: Peter Rietzler To: hbase-user@hadoop.apache.org Subject: Re: Feed Aggregator Schema In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: peter.rietzler@smarter-ecommerce.com References: X-Virus-Checked: Checked by ClamAV on apache.org Hi In our project we are handling event lists where we have similar requirements. We do ordering by choosing our row keys wisely. We use the following key for our events (they should be ordered by time in ascending order): eventListName/yyyyMMddHHmmssSSS-000[-111] where eventListName is the name of the event list and 000 is a three digit instance id to disambiguate between different running instances of application, and -111 is optional to disambiguate events that occured in the same millisecond on one instance. We additionally insert and artifical row for each day with the id eventListName/yyyyMMddHHmmssSSS This allows us to start scanning at the beginning of each day without searching through the event list. You need to be aware of the fact that if you have a very high load of inserts, then always one hbase region server is busy inserting while the others are idle ... if that's a problem for you, you have to find different keys for your purpose. You could also use an HBase index table but I have no experience with it and I remember an email on the mailing list that this would double all requests because the API would first lookup the index table and then the original table ??? (please correct me if this is not right ...) Kind regards, Peter Andrei Savu wrote: > > Hello, > > I am working on a project involving monitoring a large number of > rss/atom feeds. I want to use hbase for data storage and I have some > problems designing the schema. For the first iteration I want to be > able to generate an aggregated feed (last 100 posts from all feeds in > reverse chronological order). > > Currently I am using two tables: > > Feeds: column families Content and Meta : raw feed stored in Content:raw > Urls: column families Content and Meta : raw post version stored in > Content:raw and the rest of the data found in RSS stored in Meta > > I need some sort of index table for the aggregated feed. How should I > build that? Is hbase a good choice for this kind of application? > > In other words: Is it possible( in hbase) to design a schema that > could efficiently answer to queries like the one listed bellow? > > SELECT data FROM Urls ORDER BY date DESC LIMIT 100 > > Thanks. > > -- > Savu Andrei > > Website: http://www.andreisavu.ro/ > > -- View this message in context: http://www.nabble.com/Feed-Aggregator-Schema-tp24974071p25002264.html Sent from the HBase User mailing list archive at Nabble.com.