Github user samarthjain commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/153#discussion_r57373598
  
    --- Diff: 
phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
 ---
    @@ -958,6 +973,32 @@ private boolean allowOnlineTableSchemaUpdate() {
                     
QueryServicesOptions.DEFAULT_ALLOW_ONLINE_TABLE_SCHEMA_UPDATE);
         }
     
    +    private NamespaceDescriptor ensureNamespaceCreated(String schemaName) 
throws SQLException {
    +        SQLException sqlE = null;
    +        try (HBaseAdmin admin = getAdmin()) {
    +            final String quorum = 
ZKConfig.getZKQuorumServersString(config);
    +            final String znode = 
this.props.get(HConstants.ZOOKEEPER_ZNODE_PARENT);
    +            logger.debug("Found quorum: " + quorum + ":" + znode);
    +            boolean nameSpaceExists = true;
    +            NamespaceDescriptor namespaceDescriptor = null;
    +            try {
    +                namespaceDescriptor = 
admin.getNamespaceDescriptor(schemaName);
    --- End diff --
    
    How about you try creating the name space and catch the expected 
NamespaceExistException?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to