/** * Get a reference to the specified table from the pool. * * @param tableName * table name * @return a reference to the specified table * @throws RuntimeException * if there is a problem instantiating the HTable */ public HTableInterface getTable(String tableName) { // call the old getTable implementation renamed to findOrCreateTable 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); }
/** * Get a reference to the specified table from the pool. * <p> * <p/> * * @param tableName * table name * @return a reference to the specified table * @throws RuntimeException * if there is a problem instantiating the HTable */ public HTableInterface getTable(String tableName) { // call the old getTable implementation renamed to findOrCreateTable 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); }