hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mberto...@apache.org
Subject svn commit: r1434532 - /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
Date Thu, 17 Jan 2013 01:41:48 GMT
Author: mbertozzi
Date: Thu Jan 17 01:41:47 2013
New Revision: 1434532

URL: http://svn.apache.org/viewvc?rev=1434532&view=rev
Log:
HBASE-7592 HConnectionManager.getHTableDescriptor() compares too much

Modified:
    hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java

Modified: hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java?rev=1434532&r1=1434531&r2=1434532&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
(original)
+++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
Thu Jan 17 01:41:47 2013
@@ -1839,20 +1839,16 @@ public class HConnectionManager {
       if (this.master == null) {
         this.master = getMaster();
       }
-      HTableDescriptor hTableDescriptor = null;
+
       HTableDescriptor[] htds = master.getHTableDescriptors();
       if (htds != null && htds.length > 0) {
         for (HTableDescriptor htd: htds) {
           if (Bytes.equals(tableName, htd.getName())) {
-            hTableDescriptor = htd;
+            return htd;
           }
         }
       }
-      //HTableDescriptor htd = master.getHTableDescriptor(tableName);
-      if (hTableDescriptor == null) {
-        throw new TableNotFoundException(Bytes.toString(tableName));
-      }
-      return hTableDescriptor;
+      throw new TableNotFoundException(Bytes.toString(tableName));
     }
   }
 



Mime
View raw message