set_quota
Definition
Sets a new quota for the defined user, table, or namespace. Provides two forms of quotas:
-
SPACE
— can be applied either to tables or to namespaces. Each quota limits the target’s size in the file system and defines the actions that should be performed when the target exceeds that limit. Different quotas can be applied to one table at the table and namespace levels. Table level quotas take priority over namespace level ones. -
THROTTLE
— can be applied to users, tables, or namespaces. Each quota limits the number of requests or the amount of data that can be read, written, or both read and written per the defined time range.
Usage
-
Setting a
SPACE
quota:set_quota TYPE => SPACE[, TABLE => '[<namespace_name>:]<table_name>'] | [, NAMESPACE => '<namespace_name>'], LIMIT => '<space_limit_value>', POLICY => <space_policy_value>
-
Removing a
SPACE
quota:set_quota TYPE => SPACE[, TABLE => '[<namespace_name>:]<table_name>'] | [, NAMESPACE => '<namespace_name>'], LIMIT => NONE
-
Setting a
THROTTLE
quota:set_quota TYPE => THROTTLE[, THROTTLE_TYPE => READ | WRITE][, USER => '<user_name>'][, TABLE => '[<namespace_name>:]<table_name>'] | [, NAMESPACE => '<namespace_name>'], LIMIT => '<throttle_limit_value>'
-
Removing a
THROTTLE
quota:set_quota TYPE => THROTTLE[, THROTTLE_TYPE => READ | WRITE][, USER => '<user_name>'][, TABLE => '[<namespace_name>:]<table_name>'] | [, NAMESPACE => '<namespace_name>'], LIMIT => NONE
CAUTION
SPACE quotas require a table name or a namespace name, not both of them. THROTTLE quotas require a user name, or a table name, or a namespace name, or a combination user/namespace, or a combination user/table. Other variants are disallowed.
|
Parameter | Description |
---|---|
namespace_name |
A namespace name |
table_name |
A table name |
space_limit_value |
A space limit defined for the table or the namespace. Can use standard metric suffixes: |
space_policy_value |
A policy that should be taken when the space quota violation is fixed. Possible values: |
user_name |
A user name |
throttle_limit_value |
A limit that restricts the number of requests or data amount for read/write operations. Provides two forms of syntax:
|
Examples
Applying the SPACE quota to the table
hbase(main):002:0> set_quota TYPE => SPACE, TABLE => 'temp1', LIMIT => '1G', POLICY => NO_INSERTS Took 0.4164 seconds