hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "huaxiang sun (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HBASE-17245) Optimize HTableDescriptor#htd.getColumnFamilies().length
Date Fri, 02 Dec 2016 23:07:58 GMT
huaxiang sun created HBASE-17245:

             Summary: Optimize HTableDescriptor#htd.getColumnFamilies().length 
                 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

    if (htd.getColumnFamilies().length == 0) {

HTableDescriptor#htd.getColumnFamilies() does a few memory allocations. The purpose is to
get the family number, it can be replaced with 
+  public int getColumnFamilyCount() {
 +    return families.size();
 +  }
in HTableDescriptor which does not need these memory allocations.

This message was sent by Atlassian JIRA

View raw message