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:
parent
d6e787665c
commit
861938fe26
|
@ -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()) {
|
||||
|
|
Loading…
Reference in New Issue