hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Heng Chen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-14203) remove duplicate code getTableDescriptor in HTable
Date Tue, 11 Aug 2015 14:46:46 GMT

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

Heng Chen commented on HBASE-14203:

Creating an Admin is a costly operation. Maybe we can extract the method to be a static one.

Thanks for your reply!

I check the code, it has some difficulty to extract {{getTableDescriptor}} to be a static
one. Because in this function it calls non-static function. To avoid create {{Admin}} every
time when call {{Connection.getAdmin()}}, we can use Singleton instance.

I update the patch. 

> remove duplicate code getTableDescriptor in HTable
> --------------------------------------------------
>                 Key: HBASE-14203
>                 URL: https://issues.apache.org/jira/browse/HBASE-14203
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Heng Chen
>            Priority: Trivial
>         Attachments: HBASE-14203.patch, HBASE-14203_v2.patch
> As TODO in comment said, 
> {{HTable.getTableDescriptor}} is same as {{HAdmin.getTableDescriptor}}. remove the duplicate

This message was sent by Atlassian JIRA

View raw message