HBASE-14115 Fix resource leak in HMasterCommandLine (Yuhao Bi)

This commit is contained in:
tedyu 2015-07-21 09:18:59 -07:00
parent ccb22bd80d
commit 5ec5552be0
1 changed files with 1 additions and 1 deletions

View File

@ -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;