HBASE-13833 LoadIncrementalHFile.doBulkLoad(Path,HTable) doesn't handle unmanaged connections when using SecureBulkLoad

This commit is contained in:
Nick Dimiduk 2015-06-14 13:15:41 -07:00
parent d28f299807
commit 461f5307ba
1 changed files with 4 additions and 1 deletions

View File

@ -287,7 +287,10 @@ public class LoadIncrementalHFiles extends Configured implements Tool {
@SuppressWarnings("deprecation")
public void doBulkLoad(Path hfofDir, final HTable table)
throws TableNotFoundException, IOException {
doBulkLoad(hfofDir, table.getConnection().getAdmin(), table, table.getRegionLocator());
try (Admin admin = table.getConnection().getAdmin();
RegionLocator rl = table.getRegionLocator()) {
doBulkLoad(hfofDir, admin, table, rl);
}
}
/**