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

James Taylor commented on PHOENIX-3461:
---------------------------------------

We need a variant of this function that takes a Configuration argument instead 
of a ReadOnlyProps argument as it's expensive to go from one to the other:
{code}
    public static boolean isNamespaceMappingEnabled(PTableType type, 
ReadOnlyProps readOnlyProps) {
        return 
readOnlyProps.getBoolean(QueryServices.IS_NAMESPACE_MAPPING_ENABLED,
                QueryServicesOptions.DEFAULT_IS_NAMESPACE_MAPPING_ENABLED)
                && (type == null || !PTableType.SYSTEM.equals(type)
                        || 
readOnlyProps.getBoolean(QueryServices.IS_SYSTEM_TABLE_MAPPED_TO_NAMESPACE,
                                
QueryServicesOptions.DEFAULT_IS_SYSTEM_TABLE_MAPPED_TO_NAMESPACE));
    }
{code}
Then change this to call the new one instead of creating a new ReadOnlyProps 
here:
{code}
    public static TableName getPhysicalTableName(byte[] fullTableName, 
Configuration conf) {
        return getPhysicalTableName(fullTableName, isNamespaceMappingEnabled(
                isSystemTable(fullTableName) ? PTableType.SYSTEM : null, new 
ReadOnlyProps(conf.iterator())));
    }
{code}
Also, can we get a test in place for stats collection when namespaces are 
enabled so we don't regress it again?

> Statistics collection broken if name space mapping enabled for SYSTEM tables
> ----------------------------------------------------------------------------
>
>                 Key: PHOENIX-3461
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3461
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Samarth Jain
>            Assignee: Samarth Jain
>             Fix For: 4.9.0
>
>         Attachments: PHOENIX-3461_master.patch, PHOENIX-3461_v2.patch
>
>




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

Reply via email to