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

Nihal Jain commented on HBASE-20588:
------------------------------------

{quote}have I missed the reason why SpaceQuotaSnapshots are not being reported 
to the SpaceQuotaRefresherChore for tables that still exist?
{quote}
Isn't this because removal of quota from a table would remove entries for that 
table from {{hbase:quota}}.

Now, the {{newSnapshots}} would have no entry for the above-mentioned table, as 
no row in {{hbase:quota}} corresponding to it.
{code:java}
// Read the new snapshots from the quota table
      final Map<TableName, SpaceQuotaSnapshot> newSnapshots = 
fetchSnapshotsFromQuotaTable();
      if (LOG.isTraceEnabled()) {
        LOG.trace(currentSnapshots.size() + " table quota snapshots are 
collected, "
            + "read " + newSnapshots.size() + " from the quota table.");
      }
{code}
Now, since no entry exists in {{newSnapshots.entrySet()}} for the table from 
which we removed quota, we will never refresh the enforcedPolicies for that 
table.
{code:java}
 // Iterate over each new quota snapshot
          for (Entry<TableName, SpaceQuotaSnapshot> entry : 
newSnapshots.entrySet()) {
        final TableName tableName = entry.getKey();
.
.
}
{code}

I am not sure whether this is what you asked. Anyways I explained the issue. :)

> Space quota change after quota violation doesn't seem to take in effect
> -----------------------------------------------------------------------
>
>                 Key: HBASE-20588
>                 URL: https://issues.apache.org/jira/browse/HBASE-20588
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 3.0.0, 2.0.0
>            Reporter: Biju Nair
>            Assignee: Nihal Jain
>            Priority: Major
>             Fix For: 3.0.0
>
>         Attachments: HBASE-20588.master.001.patch, 
> HBASE-20588.master.001.patch, HBASE-20588.master.002.patch
>
>
> Steps followed 
>  - Through {{hbase shell}}
> {noformat}
> set_quota TYPE => SPACE, TABLE => 'TestTable', LIMIT => '2M', POLICY => 
> NO_INSERTS{noformat}
>  - Run {{PE}} until the quota is reached
> {noformat}
> hbase org.apache.hadoop.hbase.PerformanceEvaluation --nomapred 
> --rows=20000000 sequentialWrite 1{noformat}
>  - Through {{HBase}} shell
> {noformat}
> set_quota TYPE => SPACE, TABLE => 'TestTable', LIMIT => NONE{noformat}
> - Through {{HBase}} shell verify the effective Quotas
> {noformat}
> > list_quotas
> OWNER                                               QUOTAS                    
>                                                                               
>                                              
> 0 row(s)
> Took 0.0365 seconds{noformat}
>  - Wait for some time (at least 5 mins) and try to add data to the table
> {noformat}
> > put 'TestTable','r1','info0:0','v1'
> ERROR: org.apache.hadoop.hbase.quotas.SpaceLimitingException: NO_INSERTS Puts 
> are disallowed due to a space quota.
> at 
> org.apache.hadoop.hbase.quotas.policies.NoInsertsViolationPolicyEnforcement.check(NoInsertsViolationPolicyEnforcement.java:47){noformat}
> To resolve the issue, {{RSes}} need to be restarted which points to in memory 
> data not getting reset. 



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

Reply via email to