HBASE-3728 NPE in HTablePool.closeTablePool

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1088692 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2011-04-04 17:58:15 +00:00
parent 1e6b64f3af
commit 44309ae90d
2 changed files with 7 additions and 4 deletions

View File

@ -60,6 +60,7 @@ Release 0.91.0 - Unreleased
(Ted Yu via Stack)
HBASE-3238 HBase needs to have the CREATE permission on the parent of its
ZooKeeper parent znode (Alex Newman via Stack)
HBASE-3728 NPE in HTablePool.closeTablePool (Ted Yu via Stack)
IMPROVEMENTS
HBASE-3290 Max Compaction Size (Nicolas Spiegelberg via Stack)

View File

@ -137,10 +137,12 @@ public class HTablePool {
*/
public void closeTablePool(final String tableName) {
Queue<HTableInterface> queue = tables.get(tableName);
HTableInterface table = queue.poll();
while (table != null) {
this.tableFactory.releaseHTableInterface(table);
table = queue.poll();
if (queue != null) {
HTableInterface table = queue.poll();
while (table != null) {
this.tableFactory.releaseHTableInterface(table);
table = queue.poll();
}
}
HConnectionManager.deleteConnection(this.config, true);
}