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

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


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

commit 556aac82489a792d54ac8cd29aa88607b21d9269
Author: Richard Antal <[email protected]>
AuthorDate: Thu Sep 24 14:49:58 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 a0a37eb..526382b 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
@@ -3165,8 +3165,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 (Admin hBaseAdmin = getAdmin();
-                                 PhoenixConnection metaConnection = new 
PhoenixConnection(ConnectionQueryServicesImpl.this, globalUrl,
+                            try (PhoenixConnection metaConnection = new 
PhoenixConnection(ConnectionQueryServicesImpl.this, globalUrl,
                                          scnProps, newEmptyMetaData())) {
                                 try {
                                     metaConnection.setRunningUpgrade(true);
@@ -3213,7 +3212,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
@@ -3367,7 +3366,7 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
         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(

Reply via email to