hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject svn commit: r1515185 - in /hbase/trunk/hbase-server/src: main/java/org/apache/hadoop/hbase/master/HMaster.java test/ruby/hbase/admin_test.rb
Date Sun, 18 Aug 2013 17:55:08 GMT
Author: apurtell
Date: Sun Aug 18 17:55:07 2013
New Revision: 1515185

URL: http://svn.apache.org/r1515185
Log:
HBASE-9251. list_namespace_tables seems to fail

Modified:
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
    hbase/trunk/hbase-server/src/test/ruby/hbase/admin_test.rb

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java?rev=1515185&r1=1515184&r2=1515185&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java (original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java Sun
Aug 18 17:55:07 2013
@@ -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;
   }

Modified: hbase/trunk/hbase-server/src/test/ruby/hbase/admin_test.rb
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/test/ruby/hbase/admin_test.rb?rev=1515185&r1=1515184&r2=1515185&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/test/ruby/hbase/admin_test.rb (original)
+++ hbase/trunk/hbase-server/src/test/ruby/hbase/admin_test.rb Sun Aug 18 17:55:07 2013
@@ -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



Mime
View raw message