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 21C00110F2 for ; Tue, 5 Aug 2014 18:58:12 +0000 (UTC) Received: (qmail 63656 invoked by uid 500); 5 Aug 2014 18:58:12 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 63607 invoked by uid 500); 5 Aug 2014 18:58:11 -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 63595 invoked by uid 99); 5 Aug 2014 18:58:11 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Aug 2014 18:58:11 +0000 Date: Tue, 5 Aug 2014 18:58:11 +0000 (UTC) From: "Mikhail Antonov (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-11657) Put HTable region methods in an interface 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-11657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14086617#comment-14086617 ] Mikhail Antonov commented on HBASE-11657: ----------------------------------------- Thanks [~carterpage] - few comments: - copyright notice to RegionLocator doesn't look right, also missing class javadoc and audience annotation (private?) - instead having 2 getRegionLocation methods, one of which always use cached info, and the other one - optionally, seems like we can just have 1 method, which take row key and boolean - reloadCache or not? > Put HTable region methods in an interface > ----------------------------------------- > > Key: HBASE-11657 > URL: https://issues.apache.org/jira/browse/HBASE-11657 > Project: HBase > Issue Type: Improvement > Affects Versions: 0.99.0 > Reporter: Carter > Assignee: Carter > Fix For: 0.99.0 > > Attachments: HBASE_11657.patch > > > Most of the HTable methods are now abstracted by HTableInterface, with the notable exception of the following methods that pertain to region metadata: > {code} > HRegionLocation getRegionLocation(final String row) > HRegionLocation getRegionLocation(final byte [] row) > HRegionLocation getRegionLocation(final byte [] row, boolean reload) > byte [][] getStartKeys() > byte[][] getEndKeys() > Pair getStartEndKeys() > void clearRegionCache() > {code} > and a default scope method which maybe should be bundled with the others: > {code} > List listRegionLocations() > {code} > Since the consensus seems to be that these would muddy HTableInterface with non-core functionality, where should it go? MapReduce looks up the region boundaries, so it needs to be exposed somewhere. > Let me throw out a straw man to start the conversation. I propose: > {code} > org.apache.hadoop.hbase.client.HRegionInterface > {code} > Have HTable implement this interface. Also add these methods to HConnection: > {code} > HRegionInterface getTableRegion(TableName tableName) > HRegionInterface getTableRegion(TableName tableName, ExecutorService pool) > {code} > [~stack], [~ndimiduk], [~enis], thoughts? -- This message was sent by Atlassian JIRA (v6.2#6252)