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 #277: PHOENIX-3757 System mutex table not being created...
Date Wed, 25 Oct 2017 20:12:10 GMT
Github user karanmehta93 commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/277#discussion_r146973010
  
    --- Diff: phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
---
    @@ -3086,12 +3103,18 @@ private void restoreFromSnapshot(String tableName, String snapshotName,
             }
         }
     
    -    void ensureSystemTablesUpgraded(ReadOnlyProps props)
    +    void ensureSystemTablesMigratedToSystemNamespace(ReadOnlyProps props)
                 throws SQLException, IOException, IllegalArgumentException, InterruptedException
{
             if (!SchemaUtil.isNamespaceMappingEnabled(PTableType.SYSTEM, props)) { return;
}
    +
    +        boolean acquiredMutexLock = false;
    +        byte[] mutexRowKey = SchemaUtil.getTableKey(null, PhoenixDatabaseMetaData.SYSTEM_CATALOG_SCHEMA,
    +                PhoenixDatabaseMetaData.SYSTEM_CATALOG_TABLE);
    +
             HTableInterface metatable = null;
             try (HBaseAdmin admin = getAdmin()) {
    -            // Namespace-mapping is enabled at this point.
    +             // SYSTEM namespace needs to be created via HBase API's because "CREATE
SCHEMA" statement tries to write its metadata
    +             // in SYSTEM:CATALOG table. Without SYSTEM namespace, SYSTEM:CATALOG table
cannot be created.
    --- End diff --
    
    Thanks!


---

Mime
View raw message