Examples of overlapping quota policies
With the ability to define a quota policy on namespaces and tables, you have to define how the policies are applied. A table quota should take precedence over a namespace quota.
Scenario 1
For example, consider Scenario 1, which is outlined in the following table. Namespace n has the following collection of tables: n1.t1, n1.t2, and n1.t3. The namespace quota is 100 GB. Because the total storage required for all tables is less than 100 GB, each table can accept new WRITEs.
Object | Quota | Storage Utilization |
---|---|---|
Namespace n1 | 100 GB | 80 GB |
Table n1.t1 | 10 GB | 5 GB |
Table n1.t2 | (not set) | 50 GB |
Table n1.t3 | (not set) | 25 GB |
Scenario 2
In Scenario 2, as shown in the following table, WRITEs to table n1.t1 are denied because the table quota is violated, but WRITEs to tablen1.t2 and table n1.t3 are still allowed because they are within the namespace quota. The violation policy for the table quota on table n1.t1 is enacted.
Object | Quota | Storage Utilization |
---|---|---|
Namespace n1 | 100 GB | 60 GB |
Table n1.t1 | 10 GB | 15 GB |
Table n1.t2 | (not set) | 30 GB |
Table n1.t3 | (not set) | 15 GB |
Scenario 3
In the Scenario 3 table below, WRITEs to all tables are not allowed because the storage utilization of all tables exceeds the namespace quota limit. The namespace quota violation policy is applied to all tables in the namespace.
Object | Quota | Storage Utilization |
---|---|---|
Namespace n1 | 100 GB | 108 GB |
Table n1.t1 | 10 GB | 8 GB |
Table n1.t2 | (not set) | 50 GB |
Table n1.t3 | (not set) | 50 GB |
Scenario 4
In the Scenario 4 table below, table n1.t1 violates the quota set at the table level. The table quota violation policy is enforced. In addition, the disk utilization of table n1t1 plus the sum of disk utilization for table n1t2 and table n1t3exceeds the 100 GB namespace quota. Therefore, the namespace quota violation policy is also applied.
Object | Quota | Storage Utilization |
---|---|---|
Namespace n1 | 100 GB | 115 GB |
Table n1.t1 | 10 GB | 15 GB |
Table n1.t2 | (not set) | 50 GB |
Table n1.t3 | (not set) | 50 GB |