HBASE-4054 extending HTable because HTableInterface does not include
getRegionInfos and setAutoFlush git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1144162 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
24c84bd22c
commit
c08fe0f40e
|
@ -175,8 +175,11 @@ public class HTablePool implements Closeable {
|
|||
HTableInterface table = findOrCreateTable(tableName);
|
||||
// return a proxy table so when user closes the proxy, the actual table
|
||||
// will be returned to the pool
|
||||
return new PooledHTable(table);
|
||||
|
||||
try {
|
||||
return new PooledHTable(table);
|
||||
} catch (IOException ioe) {
|
||||
throw new RuntimeException(ioe);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -317,11 +320,12 @@ public class HTablePool implements Closeable {
|
|||
* wrapped table back to the table pool
|
||||
*
|
||||
*/
|
||||
class PooledHTable implements HTableInterface {
|
||||
class PooledHTable extends HTable {
|
||||
|
||||
private HTableInterface table; // actual table implementation
|
||||
|
||||
public PooledHTable(HTableInterface table) {
|
||||
public PooledHTable(HTableInterface table) throws IOException {
|
||||
super(table.getConfiguration(), table.getTableName());
|
||||
this.table = table;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue