hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r906826 - in /hadoop/hbase/trunk: CHANGES.txt src/java/org/apache/hadoop/hbase/client/HConnectionManager.java src/test/org/apache/hadoop/hbase/client/TestAdmin.java
Date Fri, 05 Feb 2010 06:50:22 GMT
Author: stack
Date: Fri Feb  5 06:50:21 2010
New Revision: 906826

URL: http://svn.apache.org/viewvc?rev=906826&view=rev
Log:
HBASE-2184 Calling HTable.getTableDescriptor().* on a full cluster takes a long time

Modified:
    hadoop/hbase/trunk/CHANGES.txt
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java
    hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/TestAdmin.java

Modified: hadoop/hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/CHANGES.txt?rev=906826&r1=906825&r2=906826&view=diff
==============================================================================
--- hadoop/hbase/trunk/CHANGES.txt (original)
+++ hadoop/hbase/trunk/CHANGES.txt Fri Feb  5 06:50:21 2010
@@ -194,6 +194,8 @@
    HBASE-2163  ZK dependencies - explicitly add them until ZK artifacts are
                published to mvn repository (Kay Kay via Stack)
    HBASE-2164  Ivy nit - clean up configs (Kay Kay via Stack)
+   HBASE-2184  Calling HTable.getTableDescriptor().* on a full cluster takes
+               a long time (Cristian Ivascu via Stack)
 
   IMPROVEMENTS
    HBASE-1760  Cleanup TODOs in HTable

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java?rev=906826&r1=906825&r2=906826&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java Fri
Feb  5 06:50:21 2010
@@ -590,7 +590,7 @@
         return HTableDescriptor.META_TABLEDESC;
       }
       HTableDescriptorFinder finder = new HTableDescriptorFinder(tableName);
-      MetaScanner.metaScan(conf, finder);
+      MetaScanner.metaScan(conf, finder, tableName);
       HTableDescriptor result = finder.getResult();
       if (result == null) {
         throw new TableNotFoundException(Bytes.toString(tableName));
@@ -1291,4 +1291,4 @@
       }
     }
   } 
-}
\ No newline at end of file
+}

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/TestAdmin.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/TestAdmin.java?rev=906826&r1=906825&r2=906826&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/TestAdmin.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/TestAdmin.java Fri Feb  5 06:50:21
2010
@@ -415,4 +415,21 @@
       this.admin.deleteTable(tableName);
     }
   }
+
+  @Test
+  public void testGetTableDescriptor() throws IOException {
+    HColumnDescriptor fam1 = new HColumnDescriptor("fam1");
+    HColumnDescriptor fam2 = new HColumnDescriptor("fam2");
+    HColumnDescriptor fam3 = new HColumnDescriptor("fam3");
+    HTableDescriptor htd = new HTableDescriptor("myTestTable");
+    htd.addFamily(fam1);
+    htd.addFamily(fam2);
+    htd.addFamily(fam3);
+    this.admin.createTable(htd);
+    HTable table = new HTable("myTestTable");
+    HTableDescriptor confirmedHtd = table.getTableDescriptor();
+    
+    assertEquals(htd.compareTo(confirmedHtd), 0);  
+  }
 }
+



Mime
View raw message