hbase-commits mailing list archives

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

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

Modified:
    hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/rest/RootResource.java

Modified: hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/rest/RootResource.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/rest/RootResource.java?rev=1516046&r1=1516045&r2=1516046&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/rest/RootResource.java
(original)
+++ hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/rest/RootResource.java
Wed Aug 21 01:00:18 2013
@@ -35,7 +35,7 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
 import org.apache.hadoop.classification.InterfaceAudience;
-import org.apache.hadoop.hbase.HTableDescriptor;
+import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.rest.model.TableListModel;
 import org.apache.hadoop.hbase.rest.model.TableModel;
 
@@ -61,9 +61,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.getTableName().getNameAsString()));
+    TableName[] tableNames = servlet.getAdmin().listTableNames();
+    for (TableName name: tableNames) {
+      tableList.add(new TableModel(name.getNameAsString()));
     }
     return tableList;
   }



Mime
View raw message