HBASE-6238. Grant on META not taking effect (Laxman)

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1352356 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andrew Kyle Purtell 2012-06-20 22:33:46 +00:00
parent 5487a32813
commit fec5ef0f98
1 changed files with 5 additions and 14 deletions

View File

@ -397,21 +397,12 @@ public class AccessControlLists {
* used for storage.
* </p>
*/
static ListMultimap<String,TablePermission> getTablePermissions(
Configuration conf, byte[] tableName)
throws IOException {
static ListMultimap<String, TablePermission> getTablePermissions(Configuration conf,
byte[] tableName) throws IOException {
if (tableName == null) tableName = ACL_TABLE_NAME;
/* TODO: -ROOT- and .META. cannot easily be handled because they must be
* online before _acl_ table. Can anything be done here?
*/
if (Bytes.equals(tableName, HConstants.ROOT_TABLE_NAME) ||
Bytes.equals(tableName, HConstants.META_TABLE_NAME)) {
return ArrayListMultimap.create(0,0);
}
// for normal user tables, we just read the table row from _acl_
ListMultimap<String,TablePermission> perms = ArrayListMultimap.create();
ListMultimap<String, TablePermission> perms = ArrayListMultimap.create();
HTable acls = null;
try {
acls = new HTable(conf, ACL_TABLE_NAME);
@ -421,8 +412,8 @@ public class AccessControlLists {
if (!row.isEmpty()) {
perms = parseTablePermissions(tableName, row);
} else {
LOG.info("No permissions found in "+ACL_TABLE_NAME_STR+
" for table "+Bytes.toString(tableName));
LOG.info("No permissions found in " + ACL_TABLE_NAME_STR + " for table "
+ Bytes.toString(tableName));
}
} finally {
if (acls != null) acls.close();