[ 
https://issues.apache.org/jira/browse/HBASE-12783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14262430#comment-14262430
 ] 

Ted Yu commented on HBASE-12783:
--------------------------------

For HRegionLocator.java, package name is normally after the license header.
{code}
[email protected]
[email protected]
{code}
Evolving is not needed for Private class.
{code}
+  public HRegionLocator(TableName tableName, ClusterConnection connection, 
Configuration configuration) {
{code}
Configuration can be obtained from ClusterConnection. Can this parameter be 
omitted ?

>From class javadoc: Get as needed and just close when done.
{code}
+  public void close() throws IOException {
+    // This is a no-op.
+  }
{code}
Is close() is a no-op, why does client need to call it ? Is this subject to 
change in the future ?
{code}
+    final List<byte[]> startKeyList = new ArrayList<byte[]>(regions.size());
+    final List<byte[]> endKeyList = new ArrayList<byte[]>(regions.size());
{code}
Can array of byte[] be allocated since we know the size already ? This would 
save startKeyList.toArray() call.

Putting patch on review board would make future reviews easier.

> Create efficient RegionLocator implementation
> ---------------------------------------------
>
>                 Key: HBASE-12783
>                 URL: https://issues.apache.org/jira/browse/HBASE-12783
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 1.0.0, 2.0.0
>            Reporter: Solomon Duskis
>            Assignee: Solomon Duskis
>         Attachments: HBASE-12783.patch, HBASE-12873B.patch, 
> HBASE-12873C.patch, HBASE-12873D.patch
>
>
> A new HRegionLocator that only implements RegionLocator functionality will be 
> more efficient to instantiate than a full HTable. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to