HBASE-14115 Fix resource leak in HMasterCommandLine (Yuhao Bi)
This commit is contained in:
parent
ccb22bd80d
commit
5ec5552be0
|
@ -255,7 +255,7 @@ public class HMasterCommandLine extends ServerCommandLine {
|
||||||
conf.setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 1);
|
conf.setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 1);
|
||||||
try (Connection connection = ConnectionFactory.createConnection(conf)) {
|
try (Connection connection = ConnectionFactory.createConnection(conf)) {
|
||||||
try (Admin admin = connection.getAdmin()) {
|
try (Admin admin = connection.getAdmin()) {
|
||||||
connection.getAdmin().shutdown();
|
admin.shutdown();
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
LOG.error("Failed to stop master", t);
|
LOG.error("Failed to stop master", t);
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Reference in New Issue