HBASE-25166 MobFileCompactionChore is closing the master's shared cluster connection (#2514) (#4825)

Co-authored-by: Ankit Singhal <ankit@apache.org>
Signed-off-by: Xiaolin Ha <haxiaolin@apache.org>
This commit is contained in:
binlijin 2022-10-13 22:06:35 +08:00 committed by GitHub
parent d6e787665c
commit 861938fe26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -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<String, TableDescriptor> map = htds.getAll();
for (TableDescriptor htd : map.values()) {