HBASE-9279. Thrift should use listTableNames to list tables

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

View File

@ -591,10 +591,10 @@ public class ThriftServerRunner implements Runnable {
@Override
public List<ByteBuffer> getTableNames() throws IOError {
try {
HTableDescriptor[] tables = this.getHBaseAdmin().listTables();
ArrayList<ByteBuffer> list = new ArrayList<ByteBuffer>(tables.length);
for (int i = 0; i < tables.length; i++) {
list.add(ByteBuffer.wrap(tables[i].getTableName().getName()));
TableName[] tableNames = this.getHBaseAdmin().listTableNames();
ArrayList<ByteBuffer> list = new ArrayList<ByteBuffer>(tableNames.length);
for (int i = 0; i < tableNames.length; i++) {
list.add(ByteBuffer.wrap(tableNames[i].getName()));
}
return list;
} catch (IOException e) {