Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 57FC17628 for ; Mon, 3 Oct 2011 00:16:56 +0000 (UTC) Received: (qmail 28381 invoked by uid 500); 3 Oct 2011 00:16:56 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 28351 invoked by uid 500); 3 Oct 2011 00:16:56 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 28343 invoked by uid 99); 3 Oct 2011 00:16:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Oct 2011 00:16:56 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Oct 2011 00:16:55 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 770B42A5575 for ; Mon, 3 Oct 2011 00:16:34 +0000 (UTC) Date: Mon, 3 Oct 2011 00:16:34 +0000 (UTC) From: "Hudson (Commented) (JIRA)" To: issues@hbase.apache.org Message-ID: <1475837759.1795.1317600994489.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1526409822.1977.1317108192833.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HBASE-4496) HFile V2 does not honor setCacheBlocks when scanning. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-4496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13119108#comment-13119108 ] Hudson commented on HBASE-4496: ------------------------------- Integrated in HBase-0.92 #38 (See [https://builds.apache.org/job/HBase-0.92/38/]) HBASE-4496 Addendum for TestBlocksRead tedyu : Files : * /hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/regionserver/TestBlocksRead.java > HFile V2 does not honor setCacheBlocks when scanning. > ----------------------------------------------------- > > Key: HBASE-4496 > URL: https://issues.apache.org/jira/browse/HBASE-4496 > Project: HBase > Issue Type: Bug > Components: regionserver > Affects Versions: 0.92.0, 0.94.0 > Reporter: Lars Hofhansl > Assignee: Mikhail Bautin > Fix For: 0.92.0, 0.94.0 > > Attachments: 4496.addendum, 4496.final, 4496.txt > > > While testing the LRU cache during the scanning I noticed quite some churn in the cache even when Scan.cacheBlocks is set to false. After debugging this, I found that HFile V2 always caches blocks in the LRU cache regardless of the cacheBlocks setting. > Here's a trace (from Eclipse) showing the problem: > HFileReaderV2.readBlock(long, int, boolean, boolean, boolean) line: 279 > HFileReaderV2.readBlockData(long, long, int, boolean) line: 219 > HFileBlockIndex$BlockIndexReader.seekToDataBlock(byte[], int, int, HFileBlock) line: 191 > HFileReaderV2$ScannerV2.seekTo(byte[], int, int, boolean) line: 502 > HFileReaderV2$ScannerV2.reseekTo(byte[], int, int) line: 539 > StoreFileScanner.reseekAtOrAfter(HFileScanner, KeyValue) line: 151 > StoreFileScanner.reseek(KeyValue) line: 110 > KeyValueHeap.reseek(KeyValue) line: 255 > StoreScanner.reseek(KeyValue) line: 409 > StoreScanner.next(List, int) line: 304 > KeyValueHeap.next(List, int) line: 114 > KeyValueHeap.next(List) line: 143 > HRegion$RegionScannerImpl.nextRow(byte[]) line: 2774 > HRegion$RegionScannerImpl.nextInternal(int) line: 2722 > HRegion$RegionScannerImpl.next(List, int) line: 2682 > HRegion$RegionScannerImpl.next(List) line: 2699 > HRegionServer.next(long, int) line: 2092 > Every scanner.next causes a reseek, which eventually causes a call to HFileBlockIndex$BlockIndexReader.seekToDataBlock(...) at which point the cacheBlocks information is lost. HFileReaderV2.readBlockData calls HFileReaderV2.readBlock with cacheBlocks set unconditionally to true. > The fix is not immediately clear, unless we want to pass cacheBlocks to HFileBlockIndex$BlockIndexReader.seekToDataBlock and then on to HFileBlock.BasicReader.readBlockData and all its implementers, which is ugly as readBlockData should not care about caching. > Avoiding caching during scans is somewhat important for us. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira