Return-Path: X-Original-To: apmail-hbase-dev-archive@www.apache.org Delivered-To: apmail-hbase-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7CA0FC14B for ; Wed, 2 May 2012 05:12:17 +0000 (UTC) Received: (qmail 32282 invoked by uid 500); 2 May 2012 05:12:16 -0000 Delivered-To: apmail-hbase-dev-archive@hbase.apache.org Received: (qmail 31814 invoked by uid 500); 2 May 2012 05:12:15 -0000 Mailing-List: contact dev-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list dev@hbase.apache.org Received: (qmail 31789 invoked by uid 99); 2 May 2012 05:12:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 May 2012 05:12:14 +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 igals@wix.com designates 209.85.212.179 as permitted sender) Received: from [209.85.212.179] (HELO mail-wi0-f179.google.com) (209.85.212.179) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 May 2012 05:12:07 +0000 Received: by wibhn6 with SMTP id hn6so164455wib.2 for ; Tue, 01 May 2012 22:11:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:x-gm-message-state; bh=MZ99XS/SjtKCh4lH+0larzQjchaoJqfTqBUa+/3+eKc=; b=Ebv1C3U2LYNG8jU8sCkzIbyG3hcFAe7ZfjnxpXos3qhjFSlDdNdmS5RX6dTJMgVzeY wrZHtlRV1Wzc+UDyB3LbusJSzNnWkb27Ueu7rNyQVunVRz/4uOnk4OEqsWN+OIHFGUr7 QVFP2YaN7pJJalB0+10CWqd4qSvPBLP28rrAAKmWkWRb6ed79MDiIHvUxNLEO3byQK/W SKMyTHuYlnVu6upRb/5YCMGQ/uUe39MfqD0mK8qnWGck5ICSrgQ9xbQBcZkxa6ZmCCPJ xURHHTx7ksJlsCD+hOSvf9bpRwgyr3QcDejEhhx13ib8YibQaOl1sDU61hGmJuduYx4j JB4w== MIME-Version: 1.0 Received: by 10.180.97.41 with SMTP id dx9mr3910558wib.9.1335935506264; Tue, 01 May 2012 22:11:46 -0700 (PDT) Received: by 10.216.220.68 with HTTP; Tue, 1 May 2012 22:11:46 -0700 (PDT) Received: by 10.216.220.68 with HTTP; Tue, 1 May 2012 22:11:46 -0700 (PDT) In-Reply-To: References: Date: Wed, 2 May 2012 08:11:46 +0300 Message-ID: Subject: Re: Understanding compacting memstore/HLog before flush From: Igal Shilman To: dev@hbase.apache.org Content-Type: multipart/alternative; boundary=f46d044306744b321204bf06b986 X-Gm-Message-State: ALoCoQkySikha+6sUiKF/N5RTNCu2uf+jlmgICwu2J2GCcKH+63KgD4aDU5leL61cruKZF9J83tw X-Virus-Checked: Checked by ClamAV on apache.org --f46d044306744b321204bf06b986 Content-Type: text/plain; charset=ISO-8859-1 Hi Alex, Have you seen: https://issues.apache.org/jira/browse/HBASE-4241 ? Igal. On May 2, 2012 7:01 AM, "Alex Baranau" wrote: > Hello, > > Could you please tell me if I correctly understand this problem... > > Example behavior 1: > * create table > * do 10 operations: insert cell, override (given that versions # configured > to 1) it, override, ... override. > * after flushing memstore with these edits, all of them getting written to > hfiles > > Ideally, in this situation one edit should be performed (resulting value of > cell). I.e. only "current visible state" of memstore should be flushed as > opposed to flushing all the edits from HLog. This will have a lot of > benefits (e.g. reducing data amount to flush -> may be less frequent > flushing needing -> less freq compactions, etc. operations), esp in > particular use-cases (like using counters, or updating some "aggregated > values"). > > The problem, as I understand (correct me here, please if I'm wrong) is that > it is not an easy thing to do, mainly because > 1) additional resource management burden (flushing large memstore isn't > cheap) > 2) compaction may add a lot of unnecessary overhead (so that in some cases > there will be no actual benefit from it), may make flushing much slower, > which can bring a lot of issues > 3) edits flushed from memstore and HLog edits should be kept in sync, > because we want the flush process to be reliable. I.e. if it fails in the > middle we should be able to restore the state from HLog. Keeping memstore > and HLog in sync during compaction (and we would need partial compaction of > some older data of the memstore) is difficult. > 4) anything else? > > Esp. 3rd point - am I getting it right? > > Thanx, > Alex Baranau > --f46d044306744b321204bf06b986--