Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 60D5D200C7D for ; Tue, 16 May 2017 16:10:16 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 5F625160BAC; Tue, 16 May 2017 14:10:16 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A6809160B9D for ; Tue, 16 May 2017 16:10:15 +0200 (CEST) Received: (qmail 89080 invoked by uid 500); 16 May 2017 14:10:14 -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 89069 invoked by uid 99); 16 May 2017 14:10:14 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 May 2017 14:10:14 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id C9172C019A for ; Tue, 16 May 2017 14:10:13 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id vRJDrNHnqjt7 for ; Tue, 16 May 2017 14:10:11 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 9047D60D06 for ; Tue, 16 May 2017 14:10:11 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 7281DE0D8D for ; Tue, 16 May 2017 14:10:05 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id CAEC12437C for ; Tue, 16 May 2017 14:10:04 +0000 (UTC) Date: Tue, 16 May 2017 14:10:04 +0000 (UTC) From: "Duo Zhang (JIRA)" To: dev@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (HBASE-17910) Use separated StoreFileReader for streaming read MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 16 May 2017 14:10:16 -0000 [ https://issues.apache.org/jira/browse/HBASE-17910?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Duo Zhang resolved HBASE-17910. ------------------------------- Resolution: Fixed All sub tasks have been resolved. > Use separated StoreFileReader for streaming read > ------------------------------------------------ > > Key: HBASE-17910 > URL: https://issues.apache.org/jira/browse/HBASE-17910 > Project: HBase > Issue Type: Improvement > Components: regionserver, scan, Scanners > Affects Versions: 2.0.0 > Reporter: Duo Zhang > Assignee: Duo Zhang > > For now we have already supportted using private readers for compaction, by creating a new StoreFile copy. I think a better way is to allow creating multiple readers from a single StoreFile instance, thus we can avoid the ugly cloning, and the reader can also be used for streaming scan, not only for compaction. > The reason we want to do this is that, we found a read amplification when using short circult read. {{BlockReaderLocal}} will use an internal buffer to read data first, the buffer size is based on the configured buffer size and the readahead option in CachingStrategy. For normal pread request, we should just bypass the buffer, this can be achieved by setting readahead to 0. But for streaming read I think the buffer is somehow still useful? So we need to use different FSDataInputStream for pread and streaming read. > And one more thing is that, we can also remove the streamLock if streaming read always use its own reader. -- This message was sent by Atlassian JIRA (v6.3.15#6346)