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

Vandana Ayyalasomayajula commented on HBASE-8410:
-------------------------------------------------

bq. The method is used while tables are creates and when a region is split, to 
check then number of tables and regions in a given namespace.
Everytime a new table is created and each time we split, we scan the .META. 
table? Am I reading this right?

That is right.

bq. getNamespaceDescRetriever is the wrong name for a method that returns a 
NamespaceDescriptors

I will fix it. My bad, this should have been corrected. 

bq. I am still unclear why we need auditing facility in the regionserver?I do 
not understand how you expect auditing to work going by the patch. I see that 
there is NamespaceAuditor which implements MasterObserver and so intercepts 
master ops to check counts. I do not see why I need the manager running in a 
RS? 

The auditing facility is required only on the regions and master, to check if a 
given namespace never exceeds a given number of tables and regions ( quota set 
while creating namespace). The information about the exact number of regions 
and tables allowed is stored in the namespace descriptor. So for auditing 
purposes, namespace descriptor is needed. The namespace descriptor can be 
retrieved from the Zk namespace manager. So, either I get zk instance from 
region server and start one zk namespace manager for every region or I could 
create one in region server and share it among all the regions. I have taken 
the second approach. That is the reason I am starting a ZKNamespaceManager in 
region server. Also, that is the reason I added an API in the region server 
services, so that I can retrieve ZKNamespaceManager from 
RegionCoprocessorEnvironment. 
{code}
RegionCoprocessorEnvironment regionEnv = (RegionCoprocessorEnvironment) e;
      rsServices = regionEnv.getRegionServerServices();
{code}

bq. Why the RS need to be able to list namespaces?

Correct, I do not need the RS to be able to list namespaces. I added that API 
in NamespaceDescriptors to make it generic, for any further use. I can remove 
it if you want.

I will upload a new patch, once we agree on all your questions. 

Thanks for your time. 


                
> Basic quota support for namespaces
> ----------------------------------
>
>                 Key: HBASE-8410
>                 URL: https://issues.apache.org/jira/browse/HBASE-8410
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Francis Liu
>            Assignee: Vandana Ayyalasomayajula
>         Attachments: HBASE_8410_1_trunk.patch, HBASE_8410.patch, 
> HBASE-8410_trunk_2.patch, HBASE-8410_trunk_3.patch, HBASE-8410_trunk_4.patch, 
> HBASE-8410_trunk_4.patch, HBASE-8410_trunk_5.patch, HBASE-8410_trunk_6.patch, 
> HBASE-8410_trunk_7.patch, HBASE-8410_trunk_8.patch, HBASE-8410_trunk_9.patch
>
>
> This task involves creating an observer which provides basic quota support to 
> namespaces in terms of (1) number of tables and (2) number of regions. The 
> quota support can be enabled by setting:
> <property>
>     <name>hbase.coprocessor.region.classes</name>
>     <value>org.apache.hadoop.hbase.namespace.NamespaceController</value>
> </property>
> <property>
>     <name>hbase.coprocessor.master.classes</name>
>     <value>org.apache.hadoop.hbase.namespace.NamespaceController</value>
> </property>
> in the hbase-site.xml.
> To add quotas to namespace, while creating namespace properties need to be 
> added.
> Examples:
> 1. namespace_create 'ns1', {'hbase.namespace.quota.maxregion'=>'10'}
> 2. 1. namespace_create 'ns2', {'hbase.namespace.quota.maxtables'=>'2'}, 
> {'hbase.namespace.quota.maxregion'=>'5'}
> The quotas can be modified/added to namespace at any point of time. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to