From 861938fe267f2f96b90753ecbb31056cb4fe8eec Mon Sep 17 00:00:00 2001 From: binlijin Date: Thu, 13 Oct 2022 22:06:35 +0800 Subject: [PATCH] HBASE-25166 MobFileCompactionChore is closing the master's shared cluster connection (#2514) (#4825) Co-authored-by: Ankit Singhal Signed-off-by: Xiaolin Ha --- .../org/apache/hadoop/hbase/mob/MobFileCompactionChore.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/MobFileCompactionChore.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/MobFileCompactionChore.java index 852186a6f98..385b77e0107 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/MobFileCompactionChore.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/MobFileCompactionChore.java @@ -31,7 +31,6 @@ import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.client.Admin; import org.apache.hadoop.hbase.client.ColumnFamilyDescriptor; import org.apache.hadoop.hbase.client.CompactionState; -import org.apache.hadoop.hbase.client.Connection; import org.apache.hadoop.hbase.client.RegionInfo; import org.apache.hadoop.hbase.client.TableDescriptor; import org.apache.hadoop.hbase.client.TableState; @@ -81,8 +80,7 @@ public class MobFileCompactionChore extends ScheduledChore { boolean reported = false; - try (Connection conn = master.getConnection(); Admin admin = conn.getAdmin();) { - + try (Admin admin = master.getConnection().getAdmin()) { TableDescriptors htds = master.getTableDescriptors(); Map map = htds.getAll(); for (TableDescriptor htd : map.values()) {