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 59626182A5 for ; Mon, 4 Jan 2016 19:00:41 +0000 (UTC) Received: (qmail 3522 invoked by uid 500); 4 Jan 2016 19:00:41 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 3465 invoked by uid 500); 4 Jan 2016 19:00:41 -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 3413 invoked by uid 99); 4 Jan 2016 19:00:41 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Jan 2016 19:00:41 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id DEA072C1F5D for ; Mon, 4 Jan 2016 19:00:40 +0000 (UTC) Date: Mon, 4 Jan 2016 19:00:40 +0000 (UTC) From: "Jonathan Hsieh (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-15061) Refactor StoreFileScanner creation to builder pattern 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-15061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15081578#comment-15081578 ] Jonathan Hsieh commented on HBASE-15061: ---------------------------------------- [~anoopsamjohn], so what you are saying is that you want withCacheEnabled(false) in before every build/create invocation? Do you want fields as well? How do we decide get called out and which can fall back to defaults? For read point , read point could have a default of HConstants.LATEST_TIMESTAMP. Since it putting different values changed the results, it made sense to me to have it required. For all the others they always had the same settings except for 1 or 2 exceptions. I'm basically ' -0' for the idea -- if we want to always set a value in every case. then the field should be in the constructor and required. If it is optional, and it is setting the same as the default Before we had to look up the method anyway to map the values with the parameter and this way we have to look up for the defaults only which are set to be "safe" normally. > Refactor StoreFileScanner creation to builder pattern > ----------------------------------------------------- > > Key: HBASE-15061 > URL: https://issues.apache.org/jira/browse/HBASE-15061 > Project: HBase > Issue Type: Improvement > Affects Versions: 2.0.0 > Reporter: Jonathan Hsieh > Assignee: Jonathan Hsieh > Fix For: 2.0.0 > > Attachments: hbase-15061.patch, hbase-15061.v2.patch > > > There are several falvors of calls that creates a list of StoreFileScanners, and new feature have been added to this recently. This patch converts the somewhat difficult to read (need to go to javadoc) call: > {code} > // which args are the most relevant to this? > - List sfScanners = StoreFileScanner.getScannersForStoreFiles(sfs, > - cacheMobBlocks, true, false, false, readPt); > {code} > into one that is more literate: > {code} > // ah, very clearly we are using defaults except for the caching settings > + List sfScanners = new StoreFileScanner.ListBuilder(sfs, readPt) > + .withCacheBlocks(cacheMobBlocks).build(); > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)