You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ap...@apache.org on 2013/08/21 03:09:47 UTC
svn commit: r1516048 -
/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServerRunner.java
Author: apurtell
Date: Wed Aug 21 01:09:46 2013
New Revision: 1516048
URL: http://svn.apache.org/r1516048
Log:
HBASE-9279. Thrift should use listTableNames to list tables
Modified:
hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServerRunner.java
Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServerRunner.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServerRunner.java?rev=1516048&r1=1516047&r2=1516048&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServerRunner.java (original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServerRunner.java Wed Aug 21 01:09:46 2013
@@ -591,10 +591,10 @@ public class ThriftServerRunner implemen
@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) {