Skip to content

Commit

Permalink
HBASE-25166 MobFileCompactionChore is closing the master's shared clu…
Browse files Browse the repository at this point in the history
…ster connection (apache#2514) (apache#4826)

Co-authored-by: Ankit Singhal <ankit@apache.org>
Signed-off-by: Xiaolin Ha <haxiaolin@apache.org>
  • Loading branch information
binlijin and ankitsinghal authored Oct 13, 2022
1 parent 9ee7402 commit 66873ca
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
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;
Expand Down Expand Up @@ -81,8 +80,7 @@ protected void chore() {

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()) {
Expand Down

0 comments on commit 66873ca

Please sign in to comment.