HBASE-12849 LoadIncrementalHFiles should use unmanaged connection in branch-1
This commit is contained in:
parent
e5f3dd682f
commit
72a6a670ac
|
@ -933,10 +933,12 @@ public class LoadIncrementalHFiles extends Configured implements Tool {
|
|||
}
|
||||
|
||||
Path hfofDir = new Path(dirPath);
|
||||
Connection connection = ConnectionFactory.createConnection(getConf());
|
||||
HTable table = (HTable) connection.getTable(tableName);
|
||||
|
||||
doBulkLoad(hfofDir, table);
|
||||
try (Connection connection = ConnectionFactory.createConnection(getConf());
|
||||
HTable table = (HTable) connection.getTable(tableName);) {
|
||||
doBulkLoad(hfofDir, table);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue