You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by st...@apache.org on 2020/10/02 08:13:40 UTC

[phoenix] branch 4.x updated: PHOENIX-6128 Remove unused getAdmin() call inside CQSI.init()

This is an automated email from the ASF dual-hosted git repository.

stoty pushed a commit to branch 4.x
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/4.x by this push:
     new 636357c  PHOENIX-6128 Remove unused getAdmin() call inside CQSI.init()
636357c is described below

commit 636357c691579f0ff7aea355153333d35203aabf
Author: Richard Antal <an...@gmail.com>
AuthorDate: Thu Sep 24 15:06:01 2020 +0200

    PHOENIX-6128 Remove unused getAdmin() call inside CQSI.init()
---
 .../java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

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 c0fdcb1..da7f3bc 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
@@ -3151,8 +3151,7 @@ public class ConnectionQueryServicesImpl extends DelegateQueryServices implement
                                     Long.toString(getSystemTableVersion()));
                             scnProps.remove(PhoenixRuntime.TENANT_ID_ATTRIB);
                             String globalUrl = JDBCUtil.removeProperty(url, PhoenixRuntime.TENANT_ID_ATTRIB);
-                            try (HBaseAdmin hBaseAdmin = getAdmin();
-                                 PhoenixConnection metaConnection = new PhoenixConnection(ConnectionQueryServicesImpl.this, globalUrl,
+                            try (PhoenixConnection metaConnection = new PhoenixConnection(ConnectionQueryServicesImpl.this, globalUrl,
                                          scnProps, newEmptyMetaData())) {
                                 try {
                                     metaConnection.setRunningUpgrade(true);
@@ -3199,7 +3198,7 @@ public class ConnectionQueryServicesImpl extends DelegateQueryServices implement
                                 }
 
                                 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
@@ -3348,7 +3347,7 @@ public class ConnectionQueryServicesImpl extends DelegateQueryServices implement
         return Lists.newArrayList(admin.listTableNames(QueryConstants.SYSTEM_SCHEMA_NAME + "\\..*"));
     }
 
-    private void createOtherSystemTables(PhoenixConnection metaConnection, HBaseAdmin hbaseAdmin) throws SQLException, IOException {
+    private void createOtherSystemTables(PhoenixConnection metaConnection) throws SQLException, IOException {
         try {
 
             nSequenceSaltBuckets = ConnectionQueryServicesImpl.this.props.getInt(