Return-Path: Delivered-To: apmail-hbase-dev-archive@www.apache.org Received: (qmail 25107 invoked from network); 30 Nov 2010 17:52:39 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 30 Nov 2010 17:52:39 -0000 Received: (qmail 43568 invoked by uid 500); 30 Nov 2010 17:52:39 -0000 Delivered-To: apmail-hbase-dev-archive@hbase.apache.org Received: (qmail 43500 invoked by uid 500); 30 Nov 2010 17:52:38 -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 43492 invoked by uid 99); 30 Nov 2010 17:52:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Nov 2010 17:52:38 +0000 X-ASF-Spam-Status: No, hits=1.8 required=10.0 tests=FH_HELO_EQ_D_D_D_D,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: 184.73.217.71 is neither permitted nor denied by domain of stack@duboce.net) Received: from [184.73.217.71] (HELO ip-10-202-7-187.ec2.internal) (184.73.217.71) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Nov 2010 17:52:32 +0000 Received: from ip-10-202-7-187.ec2.internal (localhost [127.0.0.1]) by ip-10-202-7-187.ec2.internal (Postfix) with ESMTP id 4DF468A20F; Tue, 30 Nov 2010 17:52:03 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: Re: Review Request: Add option to cache blocks on hfile write and evict blocks on hfile close From: stack@duboce.net To: thekhemani@facebook.com, stack@duboce.net Date: Tue, 30 Nov 2010 17:52:03 -0000 Message-ID: <20101130175203.6100.73962@ip-10-202-7-187.ec2.internal> Cc: "Jonathan Gray" , jiraposter@review.hbase.org, dev@hbase.apache.org In-Reply-To: <20101130072238.6101.29459@ip-10-202-7-187.ec2.internal> References: <20101130072238.6101.29459@ip-10-202-7-187.ec2.internal> ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://review.cloudera.org/r/1261/#review2009 ----------------------------------------------------------- Ship it! Looks good to me. Some comments below. branches/0.90/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCache.java This looks like useful addition. branches/0.90/src/main/java/org/apache/hadoop/hbase/io/hfile/HFile.java Why the flush? branches/0.90/src/main/java/org/apache/hadoop/hbase/io/hfile/HFile.java Does this create new byte array? branches/0.90/src/main/java/org/apache/hadoop/hbase/io/hfile/HFile.java I wonder if we have to have full path here? Anything less could cause = clashes? But small optimization would strip the hbase.root at least? branches/0.90/src/main/java/org/apache/hadoop/hbase/io/hfile/HFile.java Can you presize the BAOS? Whats the default? 4k? If so, and our defa= ult block size is 64k, that'd be a bit of expensive array resizing going on= ? Just guessing. branches/0.90/src/main/java/org/apache/hadoop/hbase/io/hfile/HFile.java Surround with if debug? - stack On 2010-11-29 23:22:38, Jonathan Gray wrote: > = > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://review.cloudera.org/r/1261/ > ----------------------------------------------------------- > = > (Updated 2010-11-29 23:22:38) > = > = > Review request for hbase, stack and khemani. > = > = > Summary > ------- > = > This issue is about adding configuration options to add/remove from the b= lock cache when creating/closing files. For use cases with lots of flushing= and compacting, this might be desirable to prevent cache misses and maximi= ze the effective utilization of total block cache capacity. > = > The first option, hbase.rs.cacheblocksonwrite, will make it so we pre-cac= he blocks as we are writing out new files. > = > The second option, hbase.rs.evictblocksonclose, will make it so we evict = blocks when files are closed. > = > = > This addresses bug HBASE-3287. > http://issues.apache.org/jira/browse/HBASE-3287 > = > = > Diffs > ----- > = > branches/0.90/src/main/java/org/apache/hadoop/hbase/io/HalfStoreFileRea= der.java 1040422 = > branches/0.90/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCache= .java 1040422 = > branches/0.90/src/main/java/org/apache/hadoop/hbase/io/hfile/HFile.java= 1040422 = > branches/0.90/src/main/java/org/apache/hadoop/hbase/io/hfile/LruBlockCa= che.java 1040422 = > branches/0.90/src/main/java/org/apache/hadoop/hbase/io/hfile/SimpleBloc= kCache.java 1040422 = > branches/0.90/src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncre= mentalHFiles.java 1040422 = > branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/Store.= java 1040422 = > branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/StoreF= ile.java 1040422 = > branches/0.90/src/main/java/org/apache/hadoop/hbase/util/CompressionTes= t.java 1040422 = > branches/0.90/src/test/java/org/apache/hadoop/hbase/HFilePerformanceEva= luation.java 1040422 = > branches/0.90/src/test/java/org/apache/hadoop/hbase/io/TestHalfStoreFil= eReader.java 1040422 = > branches/0.90/src/test/java/org/apache/hadoop/hbase/io/hfile/RandomSeek= .java 1040422 = > branches/0.90/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFile.= java 1040422 = > branches/0.90/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileP= erformance.java 1040422 = > branches/0.90/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileS= eek.java 1040422 = > branches/0.90/src/test/java/org/apache/hadoop/hbase/io/hfile/TestReseek= To.java 1040422 = > branches/0.90/src/test/java/org/apache/hadoop/hbase/io/hfile/TestSeekTo= .java 1040422 = > branches/0.90/src/test/java/org/apache/hadoop/hbase/mapreduce/TestLoadI= ncrementalHFiles.java 1040422 = > branches/0.90/src/test/java/org/apache/hadoop/hbase/regionserver/TestSt= oreFile.java 1040422 = > = > Diff: http://review.cloudera.org/r/1261/diff > = > = > Testing > ------- > = > Added a unit test to TestStoreFile. That passes. > = > Need to do perf testing on a cluster. > = > = > Thanks, > = > Jonathan > = >