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 7B55711FC7 for ; Mon, 4 Aug 2014 19:56:18 +0000 (UTC) Received: (qmail 14790 invoked by uid 500); 4 Aug 2014 19:56:13 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 14737 invoked by uid 500); 4 Aug 2014 19:56:13 -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 14725 invoked by uid 99); 4 Aug 2014 19:56:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Aug 2014 19:56:13 +0000 Date: Mon, 4 Aug 2014 19:56:13 +0000 (UTC) From: "Carter (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=14085189#comment-14085189 ] Carter commented on HBASE-11657: -------------------------------- Two more questions before I start: # There is an existing RegionLocations class in the client. We're okay with any potential confusion of RegionLocations vs RegionLocation? # Do we want to deprecate #getRegionLocation(String) and point users to getRegionLocation(byte[])? > 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 > > > 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)