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

Ankit Singhal commented on PHOENIX-2902:
----------------------------------------

Thanks [~giacomotaylor] for the feedback.

bq. I don't think it's valid to set the IS_NAMESPACE_MAPPING_ENABLED or 
IS_SYSTEM_TABLE_MAPPED_TO_NAMESPACE on the properties passed in at connection 
time. We should just always do a remove for these properties. It doesn't really 
make sense to switch the value at all. It seems to me to be a one way street - 
once you've enabled it, that's it, it should stay enabled. You can just add a 
constant in PhoenixRuntime for properties not allowed to be set at connection 
time and remove those here in PhoenixConnection:

Is setting properties in hbase-site.xml or passing during connection can be 
handled differently.
If we remove these properties , then how we toggle from false to true for first 
time when user enabled it.  Is there any way ,we can know that 
is_namespace_mapping_enabled was enabled before even it is set to false during 
connection.



bq. I don't think this change should be made:
{code}
+        props.put(QueryServices.IS_NAMESPACE_MAPPING_ENABLED, 
Boolean.toString(true));
{code}
I have added this because in the test attached, we are migrating system tables 
also(mapped to SYSTEM namespace) and if we don't set it during deletion then 
phoenix will not know that where are the system tables. 
May be not be required as per the progress on first comment.



> Adjust PhoenixDatabaseMetadata#getSchemas query if namespaces are enabled
> -------------------------------------------------------------------------
>
>                 Key: PHOENIX-2902
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2902
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.8.0
>            Reporter: James Taylor
>            Assignee: Ankit Singhal
>             Fix For: 4.8.0
>
>         Attachments: PHOENIX-2902.patch
>
>
> The call to PhoenixDatabaseMetaData.getSchemas() currently queries the 
> SYSTEM.CATALOG table to find distinct schema names. If namespaces are 
> enabled, we should likely adjust the query accordingly.



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

Reply via email to