[
https://issues.apache.org/jira/browse/HBASE-13593?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14519928#comment-14519928
]
Ashish Singhi commented on HBASE-13593:
---------------------------------------
Thanks Ted and Matteo for looking into this.
bq. use manifest.getRegionManifestsMap().size() as number of region instead
doing a restore just to have the number of regions
Thanks for the pointer.
We need to check quota here for three cases.
1. **clone snapshot**, here we need to check for table and region count in the
name space quota cache. So I have added checkAndUpdateNamespaceQuota in
SnapshotManager which does this.
2. **restore snapshot when table does not exist**. As table was deleted before
and now user has performed restore snapshot so table entry will not be found in
name space quota cache, this will be handled exactly same as above(case 1).
3. **restore snapshot when table exists**. This means that table entry is
already present in cache and we are not going to create one more new table here
so we just need to validate and update region count for this table in cache. So
I have added another method checkAndUpdateNamespaceRegionQuota in
SnapshotManager to do this.
> Quota support for namespace should take restore and clone snapshot into
> account
> -------------------------------------------------------------------------------
>
> Key: HBASE-13593
> URL: https://issues.apache.org/jira/browse/HBASE-13593
> Project: HBase
> Issue Type: Sub-task
> Affects Versions: 1.1.0
> Reporter: Ashish Singhi
> Assignee: Ashish Singhi
> Fix For: 2.0.0
>
> Attachments: HBASE-13593-v1-.patch, HBASE-13593.patch
>
>
> Quota support for namespace should take restore and clone snapshot into
> account.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)