hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1088692 - in /hbase/trunk: CHANGES.txt src/main/java/org/apache/hadoop/hbase/client/HTablePool.java
Date Mon, 04 Apr 2011 17:58:15 GMT
Author: stack
Date: Mon Apr  4 17:58:15 2011
New Revision: 1088692

URL: http://svn.apache.org/viewvc?rev=1088692&view=rev
Log:
HBASE-3728 NPE in HTablePool.closeTablePool

Modified:
    hbase/trunk/CHANGES.txt
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTablePool.java

Modified: hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1088692&r1=1088691&r2=1088692&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Mon Apr  4 17:58:15 2011
@@ -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)  

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTablePool.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTablePool.java?rev=1088692&r1=1088691&r2=1088692&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTablePool.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTablePool.java Mon Apr  4 17:58:15
2011
@@ -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);
   }



Mime
View raw message