HBASE-9277. REST should use listTableNames to list tables

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1516045 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andrew Kyle Purtell 2013-08-21 00:58:31 +00:00
parent 327edc6b1d
commit 82feee0f82
1 changed files with 4 additions and 4 deletions

View File

@ -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 ResourceBase {
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;
}