PHOENIX-3652 Users who do not have global access to hbase cluster can't connect to phoenix(addendum)
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/d0ea8583 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/d0ea8583 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/d0ea8583 Branch: refs/heads/encodecolumns2 Commit: d0ea85837d6c350b39ab0800bdf4b9eaf255ae25 Parents: 52867eb Author: Ankit Singhal <ankitsingha...@gmail.com> Authored: Mon Feb 6 22:44:07 2017 +0530 Committer: Ankit Singhal <ankitsingha...@gmail.com> Committed: Mon Feb 6 22:44:07 2017 +0530 ---------------------------------------------------------------------- .../apache/phoenix/query/ConnectionQueryServicesImpl.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/d0ea8583/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java index 5008d42..ca784c0 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java @@ -2945,8 +2945,8 @@ public class ConnectionQueryServicesImpl extends DelegateQueryServices implement try (HBaseAdmin admin = getAdmin()) { ensureNamespaceCreated(QueryConstants.SYSTEM_SCHEMA_NAME); - List<TableName> tableNames = Arrays - .asList(admin.listTableNamesByNamespace(QueryConstants.SYSTEM_SCHEMA_NAME)); + List<String> tableNames = Arrays + .asList(admin.getTableNames(QueryConstants.SYSTEM_SCHEMA_NAME + "\\..*")); if (tableNames.size() == 0) { return; } if (tableNames.size() > 4) { throw new IllegalArgumentException( "Expected 4 system table only but found " + tableNames.size() + ":" + tableNames); } @@ -2964,10 +2964,10 @@ public class ConnectionQueryServicesImpl extends DelegateQueryServices implement } tableNames.remove(PhoenixDatabaseMetaData.SYSTEM_CATALOG_NAME); } - for (TableName table : tableNames) { - UpgradeUtil.mapTableToNamespace(admin, metatable, table.getNameAsString(), props, null, PTableType.SYSTEM, + for (String table : tableNames) { + UpgradeUtil.mapTableToNamespace(admin, metatable, table, props, null, PTableType.SYSTEM, null); - ConnectionQueryServicesImpl.this.removeTable(null, table.getNameAsString(), null, + ConnectionQueryServicesImpl.this.removeTable(null, table, null, MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_1_0); } if (!tableNames.isEmpty()) {