hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-8410) Basic quota support for namespaces
Date Thu, 27 Jun 2013 01:26:20 GMT

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

Ted Yu commented on HBASE-8410:
-------------------------------

For NamespaceController, please add class javadoc and audience annotation.
{code}
+    zkManager = new ZKNamespaceManager(zk);
+    zkManager.start();
{code}
I saw the following in TableNamespaceManager:
{code}
+    zkNamespaceManager = new ZKNamespaceManager(masterServices.getZooKeeper());
+    zkNamespaceManager.start();
{code}
So we may have more than one ZKNamespaceManager running in the same JVM ?

The spacing is slightly off: two spaces should be used per indentation.
{code}
+        maxRegions = Long.parseLong(value);
+      } catch (NumberFormatException exp) {
+        throw new ConstraintException("NumberFormatException while getting max regions.",
exp);
{code}
Please include value in exception message.
{code}
+        currentStatus = getNamespaceQuota(ctx.getEnvironment().getConfiguration(),
+          nspdesc.getName());
{code}
I think there should be a better name for getNamespaceQuota because quota should be the setting
governing the namespace which is different from the current status for the underlying namespace.

I wonder if using table and region count is a good way for enforcing quota because the underlying
region size can vary.
{code}
+            + " is not allowed to have " + regions.length
+            + " number of regions. The total number of regions permitted are only "
{code}
Remove 'number of '. 'permitted are only' -> 'permitted is only'.

For class NamespaceQuota, please add javadoc and audience annotation. I think the class should
be renamed because it reflects the status of a namespace, not its quota.
                
> 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.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

Mime
View raw message