You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Anoop Sam John (JIRA)" <ji...@apache.org> on 2016/12/03 08:03:59 UTC

[jira] [Commented] (HBASE-17245) replace HTableDescriptor#htd.getColumnFamilies().length with a low-cost implementation

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

Anoop Sam John commented on HBASE-17245:
----------------------------------------

Good one...

> 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
>
> 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)