[
https://issues.apache.org/jira/browse/HBASE-22054?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16800703#comment-16800703
]
Josh Elser commented on HBASE-22054:
------------------------------------
Sorry, early post:
{code:java}
this.compactionThroughputController =
CompactionThroughputControllerFactory.create(server, newConf);
// We change this atomically here instead of reloading the config in order
that upstream
// would be the only one with the flexibility to reload the config.
this.conf.reloadConfiguration();{code}
In CompactSplit.java in master, we have this. Reinitializing the Superusers
after reloading the configuration would make sense, but not so much down here
in CompactSplit. We should be doing that in the RegionServer (for all
RS-internal services).
{quote}+ // if regionserver's constructor wasn't called for some reason, then
Superusers{quote}
What are the circumstances which create this? Seems like we should fix the
situations where the superuser code is not initialized, not work around it like
this.
{code:java}
- if (spaceQuotaManager != null &&
-
spaceQuotaManager.areCompactionsDisabled(region.getTableDescriptor().getTableName()))
{
+ if (!Superusers.isSuperUser(RpcServer.getRequestUser().orElse(null))
+ && spaceQuotaManager != null && spaceQuotaManager
+ .areCompactionsDisabled(region.getTableDescriptor().getTableName()))
{{code}
I'd like to see a DEBUG message here explaining that we are still running a
compaction because a superuser requested it.
On that line of thinking, I'm not sure if we've fully thought through what
"NO_WRITES_COMPACTIONS" should mean. Do we want to disallow the system from
running compactions over this data or are we just preventing users from
submitting compactions? Looking back at HBASE-17978, I think the original
intent was for this policy was to prevent user-submitted compactions. We should
clarify the hbase book to make that more clear.
> 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)