hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmhs...@apache.org
Subject svn commit: r1333693 - in /hbase/branches/0.92: CHANGES.txt src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java
Date Fri, 04 May 2012 00:11:30 GMT
Author: jmhsieh
Date: Fri May  4 00:11:29 2012
New Revision: 1333693

URL: http://svn.apache.org/viewvc?rev=1333693&view=rev
Log:
HBASE-5928 Hbck shouldn't npe when there are no tables (Elliott Clark)

Modified:
    hbase/branches/0.92/CHANGES.txt
    hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
    hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java

Modified: hbase/branches/0.92/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/branches/0.92/CHANGES.txt?rev=1333693&r1=1333692&r2=1333693&view=diff
==============================================================================
--- hbase/branches/0.92/CHANGES.txt (original)
+++ hbase/branches/0.92/CHANGES.txt Fri May  4 00:11:29 2012
@@ -58,6 +58,7 @@ Release 0.92.2 - Unreleased
                the global MemStore size (Jieshan)
    HBASE-5897  prePut coprocessor hook causing substantial CPU usage (Todd)
    HBASE-5883  Backup master is going down due to connection refused exception (Jieshan)
+   HBASE-5928  Hbck shouldn't npe when there are no tables (Elliott Clark)
 
   IMPROVEMENTS
    HBASE-5592  Make it easier to get a table from shell (Ben West)

Modified: hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java?rev=1333693&r1=1333692&r2=1333693&view=diff
==============================================================================
--- hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
(original)
+++ hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
Fri May  4 00:11:29 2012
@@ -1848,6 +1848,7 @@ public class HConnectionManager {
     }
 
     public HTableDescriptor[] getHTableDescriptors(List<String> tableNames) throws
IOException {
+      if (tableNames == null || tableNames.isEmpty()) return new HTableDescriptor[0];
       if (tableNames == null || tableNames.size() == 0) return null;
       if (this.master == null) {
         this.master = getMaster();

Modified: hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java?rev=1333693&r1=1333692&r2=1333693&view=diff
==============================================================================
--- hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java (original)
+++ hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java Fri May
 4 00:11:29 2012
@@ -2085,7 +2085,7 @@ public class HBaseFsck {
   }
 
    HTableDescriptor[] getHTableDescriptors(List<String> tableNames) {
-    HTableDescriptor[] htd = null;
+    HTableDescriptor[] htd = new HTableDescriptor[0];
      try {
        LOG.info("getHTableDescriptors == tableNames => " + tableNames);
        htd = new HBaseAdmin(conf).getTableDescriptors(tableNames);



Mime
View raw message