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

Ankit Singhal commented on PHOENIX-3495:
----------------------------------------

bq. this is the way we treat HBase metadata typically - if it already exists we 
use it, otherwise we create it. Ankit Singhal - any gotchas here?
Yes [~jamestaylor], we were doing the same , we create it only if it doesn't 
not exists.
{code}
NamespaceDescriptor namespaceDescriptor = null;
            try {
                namespaceDescriptor = admin.getNamespaceDescriptor(schemaName);
            } catch (org.apache.hadoop.hbase.NamespaceNotFoundException e) {

            }
            if (namespaceDescriptor == null) {
                namespaceDescriptor = 
NamespaceDescriptor.create(schemaName).build();
                admin.createNamespace(namespaceDescriptor);
            }
{code}

 [~samarthjain], I have executed the test(in your patch) as well without your 
change and it is still passing. are you are seeing this issue with any 
particular HBase version?

> Ignore NamespaceExistException when namespace mapping enabled
> -------------------------------------------------------------
>
>                 Key: PHOENIX-3495
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3495
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Samarth Jain
>            Assignee: Samarth Jain
>             Fix For: 4.9.0, 4.8.2
>
>         Attachments: PHOENIX-3495.patch
>
>




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

Reply via email to