[ https://issues.apache.org/jira/browse/HBASE-11657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14085127#comment-14085127 ]
stack commented on HBASE-11657: ------------------------------- +1 on RegionLocation. A fat Region Interface could implement this RegionLocation. HTableInterface can cleanly implement RegionLocation w/o pulling in other baggage. bq. Once that's done, I open a new JIRA where I move over the obvious region stuff from Admin. +1 on new Issue for this discussion. Need to be careful disrupting API this close to 1.0. bq. Then another one to split the tableNameOrRegionName methods into multiple strongly-typed methods. This would work. Might be case of deprecating the old in favor of the new methods. The old would be retained in hbase 1.0 so folks rolling up from 0.98 or earlier aren't broke. > 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<byte[][],byte[][]> getStartEndKeys() > void clearRegionCache() > {code} > and a default scope method which maybe should be bundled with the others: > {code} > List<RegionLocations> 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)