phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From karanmehta93 <...@git.apache.org>
Subject [GitHub] phoenix pull request #288: PHOENIX-4523 phoenix.schema.isNamespaceMappingEna...
Date Thu, 11 Jan 2018 17:34:57 GMT
Github user karanmehta93 commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/288#discussion_r161023714
  
    --- Diff: phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
---
    @@ -2543,16 +2543,15 @@ public Void call() throws Exception {
             }
         }
     
    -    void createSysMutexTable(HBaseAdmin admin, ReadOnlyProps props) throws IOException,
SQLException {
    +    void createSysMutexTableIfNotExists(HBaseAdmin admin, ReadOnlyProps props) throws
IOException, SQLException {
             try {
    -            final TableName mutexTableName = SchemaUtil.getPhysicalTableName(
    -                PhoenixDatabaseMetaData.SYSTEM_MUTEX_NAME, props);
    -            List<TableName> systemTables = getSystemTableNames(admin);
    -            if (systemTables.contains(mutexTableName) || admin.tableExists( TableName.valueOf(
    -                PhoenixDatabaseMetaData.SYSTEM_SCHEMA_NAME,PhoenixDatabaseMetaData.SYSTEM_MUTEX_TABLE_NAME)))
{
    +            if(admin.tableExists(PhoenixDatabaseMetaData.SYSTEM_MUTEX_NAME) || admin.tableExists(TableName.valueOf(
    --- End diff --
    
    The first one checks for SYSTEM.MUTEX and the other one is for SYSTEM:MUTEX, if either
of them exists, we can return from the method.


---

Mime
View raw message