HBASE-9251. list_namespace_tables seems to fail

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1515185 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andrew Kyle Purtell 2013-08-18 17:55:07 +00:00
parent b9e92fdf6f
commit dec9876d5f
2 changed files with 9 additions and 1 deletions

View File

@ -3133,7 +3133,7 @@ MasterServices, Server {
public List<TableName> listTableNamesByNamespace(String name) throws IOException {
List<TableName> tableNames = Lists.newArrayList();
for (HTableDescriptor descriptor: tableDescriptors.getByNamespace(name).values()) {
tableNames.add(TableName.valueOf(name, descriptor.getNameAsString()));
tableNames.add(descriptor.getTableName());
}
return tableNames;
}

View File

@ -77,6 +77,14 @@ module Hbase
assert(!admin.list.member?('hbase:meta'))
end
define_test "list_namespace_tables for the system namespace should return a list of tables" do
assert(admin.list_namespace_tables('hbase').count > 0)
end
define_test "list_namespace_tables for the default namespace should return a list of tables" do
assert(admin.list_namespace_tables('default').count > 0)
end
#-------------------------------------------------------------------------------
define_test "flush should work" do