[ 
https://issues.apache.org/jira/browse/HBASE-22054?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16800690#comment-16800690
 ] 

Josh Elser commented on HBASE-22054:
------------------------------------

{code:java}
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/security/Superusers.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/security/Superusers.java
index 
b5566e65be77706b6cf39873ac0ca6fffcec7d0d..8135205110c3da4ae481f3650e0e8eafeac782c2
 100644
--- 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/security/Superusers.java
+++ 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/security/Superusers.java
@@ -91,6 +91,10 @@ public final class Superusers {
       throw new IllegalStateException("Super users/super groups lists"
         + " have not been initialized properly.");
     }
+    if (user == null) {
+      LOG.trace("isSuperUser check received for a null user. Returned false");
+      return false;
+    }{code}
I don't think we should allow callers to provide a null user. Is there a reason 
we have to support this? Should be an IllegalArgumentException.

> Space Quota: Compaction is not working for super user in case of 
> NO_WRITES_COMPACTIONS
> --------------------------------------------------------------------------------------
>
>                 Key: HBASE-22054
>                 URL: https://issues.apache.org/jira/browse/HBASE-22054
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Ajeet Rai
>            Assignee: Sakthi
>            Priority: Minor
>         Attachments: hbase-22054.master.001.patch, 
> hbase-22054.master.002.patch, hbase-22054.master.003.patch
>
>
> Space Quota: Compaction is not working for super user. Compaction command is 
> issued successfully at client but actually compaction is not happening.
> In debug log below message is printed:
> as an active space quota violation policy disallows compaction.
>  Reference: 
>  
> [https://lists.apache.org/thread.html/d09aa7abaacf1f0be9d59fa9260515ddc0c17ac0aba9cc0f2ac569bf@%3Cuser.hbase.apache.org%3E]
> Actually in requestCompactionInternal method of  CompactSplit class ,there is 
> no check for super user and compcations are disallowed
> {noformat}
>   RegionServerSpaceQuotaManager spaceQuotaManager =
>         this.server.getRegionServerSpaceQuotaManager();
>     if (spaceQuotaManager != null &&
>         
> spaceQuotaManager.areCompactionsDisabled(region.getTableDescriptor().getTableName()))
>  {
>       String reason = "Ignoring compaction request for " + region +
>           " as an active space quota violation " + " policy disallows 
> compactions.";
>       tracker.notExecuted(store, reason);
>       completeTracker.completed(store);
>       LOG.debug(reason);
>       return;
>     }
> {noformat}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to