Skip to content

Commit

Permalink
PHOENIX-6128 Remove unused getAdmin() call inside CQSI.init()
Browse files Browse the repository at this point in the history
  • Loading branch information
richardantal authored and stoty committed Oct 2, 2020
1 parent d5059ee commit 556aac8
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3165,8 +3165,7 @@ public Void call() throws Exception {
Long.toString(getSystemTableVersion()));
scnProps.remove(PhoenixRuntime.TENANT_ID_ATTRIB);
String globalUrl = JDBCUtil.removeProperty(url, PhoenixRuntime.TENANT_ID_ATTRIB);
try (Admin hBaseAdmin = getAdmin();
PhoenixConnection metaConnection = new PhoenixConnection(ConnectionQueryServicesImpl.this, globalUrl,
try (PhoenixConnection metaConnection = new PhoenixConnection(ConnectionQueryServicesImpl.this, globalUrl,
scnProps, newEmptyMetaData())) {
try {
metaConnection.setRunningUpgrade(true);
Expand Down Expand Up @@ -3213,7 +3212,7 @@ Collections.<Class<? extends Exception>> singletonList(
}

if (!ConnectionQueryServicesImpl.this.upgradeRequired.get()) {
createOtherSystemTables(metaConnection, hBaseAdmin);
createOtherSystemTables(metaConnection);
// In case namespace mapping is enabled and system table to system namespace mapping is also enabled,
// create an entry for the SYSTEM namespace in the SYSCAT table, so that GRANT/REVOKE commands can work
// with SYSTEM Namespace
Expand Down Expand Up @@ -3367,7 +3366,7 @@ List<TableName> getSystemTableNamesInDefaultNamespace(Admin admin) throws IOExce
return Lists.newArrayList(admin.listTableNames(Pattern.compile(QueryConstants.SYSTEM_SCHEMA_NAME + "\\..*"))); // TODO: replace to pattern
}

private void createOtherSystemTables(PhoenixConnection metaConnection, Admin hbaseAdmin) throws SQLException, IOException {
private void createOtherSystemTables(PhoenixConnection metaConnection) throws SQLException, IOException {
try {

nSequenceSaltBuckets = ConnectionQueryServicesImpl.this.props.getInt(
Expand Down

0 comments on commit 556aac8

Please sign in to comment.