hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anoop Sam John (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HBASE-17245) Replace HTableDescriptor#htd.getColumnFamilies().length with a low-cost implementation
Date Mon, 05 Dec 2016 07:59:58 GMT

     [ https://issues.apache.org/jira/browse/HBASE-17245?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Anoop Sam John updated HBASE-17245:
-----------------------------------
       Resolution: Fixed
     Hadoop Flags: Reviewed
    Fix Version/s: 2.0.0
           Status: Resolved  (was: Patch Available)

Pushed to master.  Thanks for the nice addition.

> Replace HTableDescriptor#htd.getColumnFamilies().length with a low-cost implementation
> --------------------------------------------------------------------------------------
>
>                 Key: HBASE-17245
>                 URL: https://issues.apache.org/jira/browse/HBASE-17245
>             Project: HBase
>          Issue Type: Improvement
>    Affects Versions: 2.0.0
>            Reporter: huaxiang sun
>            Assignee: huaxiang sun
>            Priority: Minor
>             Fix For: 2.0.0
>
>         Attachments: HBASE-17245-master-001.patch
>
>
> Found quite a few places doing something like
> {code}
>     if (htd.getColumnFamilies().length == 0) {
> {code}
> HTableDescriptor#htd.getColumnFamilies() does a few memory allocations. The purpose is
to get the family number, it can be replaced with 
> {code}
> +  public int getColumnFamilyCount() {
>  +    return families.size();
>  +  }
> {code}
> in HTableDescriptor which does not need these memory allocations.



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

Mime
View raw message