hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject svn commit: r1516047 - /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/rest/RootResource.java
Date Wed, 21 Aug 2013 01:00:54 GMT
Author: apurtell
Date: Wed Aug 21 01:00:54 2013
New Revision: 1516047

URL: http://svn.apache.org/r1516047
Log:
HBASE-9277. REST should use getTableNames to list tables

Modified:
    hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/rest/RootResource.java

Modified: hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/rest/RootResource.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/rest/RootResource.java?rev=1516047&r1=1516046&r2=1516047&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/rest/RootResource.java (original)
+++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/rest/RootResource.java Wed Aug
21 01:00:54 2013
@@ -35,7 +35,6 @@ import javax.ws.rs.core.Response.Respons
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
-import org.apache.hadoop.hbase.HTableDescriptor;
 import org.apache.hadoop.hbase.rest.model.TableListModel;
 import org.apache.hadoop.hbase.rest.model.TableModel;
 
@@ -60,9 +59,9 @@ public class RootResource extends Resour
 
   private final TableListModel getTableList() throws IOException {
     TableListModel tableList = new TableListModel();
-    HTableDescriptor[] list = servlet.getAdmin().listTables();
-    for (HTableDescriptor htd: list) {
-      tableList.add(new TableModel(htd.getNameAsString()));
+    String[] tableNames = servlet.getAdmin().getTableNames();
+    for (String name: tableNames) {
+      tableList.add(new TableModel(name));
     }
     return tableList;
   }



Mime
View raw message