HBASE-12849 LoadIncrementalHFiles should use unmanaged connection in branch-1
This commit is contained in:
parent
b79dbedad6
commit
908779b887
|
@ -47,6 +47,7 @@ import org.apache.hadoop.hbase.classification.InterfaceAudience;
|
|||
import org.apache.hadoop.hbase.classification.InterfaceStability;
|
||||
import org.apache.hadoop.hbase.client.Admin;
|
||||
import org.apache.hadoop.hbase.client.Connection;
|
||||
import org.apache.hadoop.hbase.client.ConnectionFactory;
|
||||
import org.apache.hadoop.hbase.client.HBaseAdmin;
|
||||
import org.apache.hadoop.hbase.client.HConnection;
|
||||
import org.apache.hadoop.hbase.client.HTable;
|
||||
|
@ -931,9 +932,11 @@ public class LoadIncrementalHFiles extends Configured implements Tool {
|
|||
}
|
||||
|
||||
Path hfofDir = new Path(dirPath);
|
||||
HTable table = new HTable(getConf(), 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