hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1513923 - in /hbase/branches/0.95/hbase-server/src/main: java/org/apache/hadoop/hbase/master/HMaster.java ruby/hbase/admin.rb
Date Wed, 14 Aug 2013 15:04:15 GMT
Author: stack
Date: Wed Aug 14 15:04:14 2013
New Revision: 1513923

URL: http://svn.apache.org/r1513923
Log:
HBASE-9182 Allow non-admin users to list all table names

Modified:
    hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
    hbase/branches/0.95/hbase-server/src/main/ruby/hbase/admin.rb

Modified: hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java?rev=1513923&r1=1513922&r2=1513923&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
(original)
+++ hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
Wed Aug 14 15:04:14 2013
@@ -2627,7 +2627,7 @@ MasterServices, Server {
   }
 
   /**
-   * Get list of table names
+   * Get list of userspace table names
    * @param controller Unused (set to null).
    * @param req GetTableNamesRequest
    * @return GetTableNamesResponse
@@ -2639,6 +2639,9 @@ MasterServices, Server {
       Collection<HTableDescriptor> descriptors = this.tableDescriptors.getAll().values();
       GetTableNamesResponse.Builder builder = GetTableNamesResponse.newBuilder();
       for (HTableDescriptor descriptor: descriptors) {
+        if (descriptor.isMetaTable()) {
+          continue;
+        }
         builder.addTableNames(ProtobufUtil.toProtoTableName(descriptor.getTableName()));
       }
       return builder.build();

Modified: hbase/branches/0.95/hbase-server/src/main/ruby/hbase/admin.rb
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-server/src/main/ruby/hbase/admin.rb?rev=1513923&r1=1513922&r2=1513923&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-server/src/main/ruby/hbase/admin.rb (original)
+++ hbase/branches/0.95/hbase-server/src/main/ruby/hbase/admin.rb Wed Aug 14 15:04:14 2013
@@ -18,6 +18,7 @@
 #
 
 include Java
+java_import java.util.Arrays
 java_import org.apache.hadoop.hbase.util.Pair
 java_import org.apache.hadoop.hbase.util.RegionSplitter
 java_import org.apache.hadoop.hbase.util.Bytes
@@ -42,7 +43,7 @@ module Hbase
     #----------------------------------------------------------------------------------------------
     # Returns a list of tables in hbase
     def list(regex = ".*")
-        @admin.getTableNames(regex)
+      Arrays.asList(@admin.getTableNames(regex))
     end
 
     #----------------------------------------------------------------------------------------------



Mime
View raw message