Skip to content

Commit

Permalink
KYLIN-3603 Close the HBase connection after used in UpdateHTableHostCLI
Browse files Browse the repository at this point in the history
  • Loading branch information
matribots authored and shaofengshi committed Sep 29, 2018
1 parent 65ab55e commit 910b79e
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,10 @@ public class UpdateHTableHostCLI {
public UpdateHTableHostCLI(List<String> htables, String oldHostValue) throws IOException {
this.htables = htables;
this.oldHostValue = oldHostValue;
Connection conn = ConnectionFactory.createConnection(HBaseConfiguration.create());
hbaseAdmin = conn.getAdmin();
this.kylinConfig = KylinConfig.getInstanceFromEnv();
try (Connection conn = ConnectionFactory.createConnection(HBaseConfiguration.create());) {
hbaseAdmin = conn.getAdmin();
this.kylinConfig = KylinConfig.getInstanceFromEnv();
}
}

public static void main(String[] args) throws Exception {
Expand Down

0 comments on commit 910b79e

Please sign in to comment.