Return-Path: Delivered-To: apmail-hadoop-hbase-user-archive@minotaur.apache.org Received: (qmail 28215 invoked from network); 2 Sep 2009 21:10:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Sep 2009 21:10:14 -0000 Received: (qmail 75816 invoked by uid 500); 2 Sep 2009 21:10:13 -0000 Delivered-To: apmail-hadoop-hbase-user-archive@hadoop.apache.org Received: (qmail 75773 invoked by uid 500); 2 Sep 2009 21:10:13 -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 75763 invoked by uid 99); 2 Sep 2009 21:10:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Sep 2009 21:10:13 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of bradfordstephens@gmail.com designates 209.85.210.185 as permitted sender) Received: from [209.85.210.185] (HELO mail-yx0-f185.google.com) (209.85.210.185) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Sep 2009 21:10:04 +0000 Received: by yxe15 with SMTP id 15so325031yxe.30 for ; Wed, 02 Sep 2009 14:09:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=A7eTV8Tm/F4UmOGu0xD0FcYnh+m3QfWTl0K+EmZvQpo=; b=SXB/2qWGCe6dORPmrMcQiyj29Ur63IUwhNynG6qKr5lgoMX1tc48ZxusDcCWQaIZ/3 aKnKGD3v+54XqQuWMRVE0kpkyKFNjlM7FwxHSuynqJei2UEj5YfhjRe4iysU7mlLG/g8 e8Qub5Zb1qhGon9FR8tH2pKo5azhl8pkWud34= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=F162hqBODFwR+lzrCO5zgl1cK4owwjUG/w71M/vNB1cOxvIfyRWHa0uWIcGO2G0dJ0 kLEOFCfAQWtXPWswVT6IV2Cdos6wgJefd8gxdIGxHCtZ05mQGmlB3tqkmrSBiOOV7KrZ BFLLbewBGxrPQXMVNm8rSXSrduYwmg1yKwRAk= MIME-Version: 1.0 Received: by 10.91.192.14 with SMTP id u14mr6489553agp.2.1251925783301; Wed, 02 Sep 2009 14:09:43 -0700 (PDT) In-Reply-To: <7c962aed0909021147x2bfb6aa6jf2db976ef04ce0d6@mail.gmail.com> References: <127484.98071.qm@web65513.mail.ac4.yahoo.com> <7c962aed0909021147x2bfb6aa6jf2db976ef04ce0d6@mail.gmail.com> Date: Wed, 2 Sep 2009 14:09:42 -0700 Message-ID: <860544ed0909021409u24a9c7f1ne97e5b79822a01d5@mail.gmail.com> Subject: Re: Cassandra vs HBase From: Bradford Stephens To: hbase-user@hadoop.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Hey there, Expect a post on my blog in a few days on this subject, with performance and feature comparisons :) Cheers, Bradford On Wed, Sep 2, 2009 at 11:47 AM, stack wrote: > On Wed, Sep 2, 2009 at 9:53 AM, Schubert Zhang wrote: > >> Regardless Cassandra, I want to discuss some questions about >> HBase/Bigtable. =A0Any advices are expected. >> >> Regards runing MapReduce to scan/analyze big data in HBase. >> >> Compared to sequentially reading data from HDFS files directly, >> scan/sequential-reading data from HBase is slower. (As my test, at least >> 3:1 >> or 4:1). >> >> > Is it really 3 to 4 times slower? =A0My guess is that it varies with data > sizes but, a while back I compared hbase reading and raw reading from > mapfiles with no hbase in between. =A0True, I was seeing that mapfiles we= re > almost 3x faster when scanning but for other dimensions, hbase was close = to > raw mapfile speeds. > > We have some ideas for improving on our current speeds (e.g. we use dfs > pread getting blocks from hdfs always -- should switch from pread when we > figure access is scan). =A0These are in the works. > > > >> For the data in HBase, it is diffcult to only analyze specified part of >> data. For example, it is diffcult to only analyze the recent one day of >> data. In my application, I am considering partition data into different >> HBase tables (e.g. one day - one table), then, I can only touch one tabl= e >> for analyze via MapReduce. >> In Google's Bigtable paper, in the "8.1 Google Analytics", they also >> discribe this usage, but I don't know how. >> > > Time-keyed row keys are a bit tough. =A0What about adding to the tail of = a > continuing table or does the data come in to fast? =A0If you could add to= the > end of your table, =A0you MR against the tail only? =A0Can you use the ve= rsion > dimension of hbase? =A0Would be full table-scan but would be all server-s= ide > so should be fast. > > > >> >> It is also slower to put flooding data into HBase table than writing to >> files. (As my test, at least 3:1 or 4:1 too). So, maybe in the future, >> HBase >> can provide a bulk-load feature, like PNUTS? >> >> > In my tests -- see up in the wiki -- for sequential write, was less than = 2x > (can't random write into mapfile). > > A first cut exists in hbase-48. =A0There is a reducer which sorts all key= s on > a row and an hfile output format that writes a single file into a region. > Absent is the necessary partitioner to ensure global sort order. =A0A gen= eric > sorter is not possible since the partitioner needs to have knowledge of y= our > key space. =A0Try it and let us know. =A0Currently it works populating a = new > table only. =A0Shouldn't be hard to rig it to populate an extant table bu= t I'm > not going to work on it unless there is interest by others. > > > Many a time, I am thinking, maybe we need a data storage engine, which ne= ed >> not so strong consistency, and it can provide better writing and >> reading throughput like HDFS. Maybe, we can design another system like a >> simpler HBase ? >> >> You think its the consistency that costs? =A0HBase is a pretty > straightforward system as is. =A0How would you simplify Schubert? =A0We c= an work > on improving the performance to cut down on those 4X and 3Xs that you are > seeing. =A0A schema for time-series is a bit tough though if you want to = key > it by timestamp. =A0You could try Cassandra and let it hash your keys so = they > got distributed around the cluster but my guess is that the scan would be > slow if you needed to access the content ordered? > > Thanks, > St.Ack > --=20 http://www.roadtofailure.com -- The Fringes of Scalability, Social Media, and Computer Science