CONSUMER_RESOURCE_ALLOCATION
The CONSUMER_RESOURCE_ALLOCATION table contains the periodically sampled resource allocation status of each consumer and resource group combination and the planned resource allocation.
| Column name | Data type | Null (Y or N) | Key (PK or FK) | Comment |
|---|---|---|---|---|
| CLUSTER_NAME | VARCHAR(128) | N | Not applicable | The name of the cluster. |
| CONSUMER_NAME | VARCHAR(4000) | N | PK | The name of the consumer. This is the fully-qualified consumer name. |
| RESOURCE_GROUP | VARCHAR(256) | N | PK | The allocated resource group. Note that all is a reserved
value signifying all resource groups that are associated with the consumer." |
| TIME_STAMP_GMT | NUMERIC(13) | N | Not applicable | The record sample time in the GMT time zone. This is the number of milliseconds from midnight, 1 January, 1970. |
| TIME_STAMP | DATETIME | N | PK | The record sample time in the local cluster time zone. |
| ALLOCATED_BORROW | NUMERIC(10) | Y | Not applicable | The allocated number of slots borrowed from the other consumer and resource group. If this is null, the value is 0. This is the real-time allocation at the time of this record. This value only applies to ownership policy. |
| ALLOCATED_LEND | NUMERIC(10) | Y | Not applicable | The allocated number of slots lent to other consumer and resource group. If this is null, the value is 0. This is the real-time allocation at the time of this record. This value only applies to ownership policy. |
| ALLOCATED_OWN | NUMERIC(10) | Y | Not applicable | The allocated slot value owned by this consumer and resource group at the time of this record. If this is null, the value is 0. This is the real-time allocation at the time of this record. This value only applies to ownership policy, which means how many slots are allocated from ownership-owned slots. |
| ALLOCATED_SHARE | NUMERIC(10) | Y | Not applicable | The allocated number of slots shared with the other consumer and resource group. If this is null, the value is 0. This is the real-time allocation at the time of this record. This value applies to both share policy and hybrid policy. This is the number of slots that this consumer was allocated from the share pool. The hybrid policy is considered an enhanced share policy, so the slots in hybrid policy are all in the share pool. |
| BORROW_FROM | CLOB | Y | Not applicable | The consumer from which this resource is borrowed. This data is collected in real time. |
| BORROW_LIMIT | NUMERIC(10) | Y | Not applicable | The borrowing limit for this consumer and resource group. If this is null, the value is infinite. This is from the cluster configuration. |
| INSERT_SEQ | BIGINT | N | Not applicable | The order of sequence in which this record is inserted into the table. This field is auto-incremented whenever a new record is inserted into the table. |
| LENDING_LIMIT | NUMERIC(10) | Y | Not applicable | The lending limit for this consumer and resource group. If this is null, the value is infinite. This is from the cluster configuration. |
| LEND_TO | CLOB | Y | Not applicable | The consumer to which this resource is lent. This data is collected in real time. |
| PLANNED_HOWN | NUMERIC(10) | Y | Not applicable | The hybrid own value from the distribution tree of this consumer resource group. If this is null, the value is 0. This is from the plan configuration. This value is static within the time window of the plan. |
| PLANNED_HRESERVE | NUMERIC(10) | Y | Not applicable | The hybrid reserve value from the distribution tree of this consumer resource group. If this is null, the value is 0. This is from the plan configuration. This value is static within the time window of he plan. |
| PLANNED_OWN | NUMERIC(10) | Y | Not applicable | The own value from the distribution tree of this consumer resource group. If this is null, the value is 0. This is from the plan configuration. This value represents configured owned slots and only applies to ownership policy. |
| PLANNED_QUOTA | NUMERIC(10) | Y | Not applicable | The number of slots a consumer is entitled to have. This value is static within the time window of the plan. It is calculated from the static plan, assuming all consumers have unlimited demand. For shared policy, it is calculated as the planned_own value, plus what this consumer deserves in the share pool (which is the parent consumer share pool slots * (this consumer share ratio / ( sum of all sibling consumer share ratio)). For hybrid policy, this is calculated as the planned_own value, plus planned_hreserve value, plus what this consumer deserves in the share pool (which is the parent consumer share pool slots * (planned_hown / (sum of all sibling consumer planned_hown)). |
| POTENTIAL_DEMAND | NUMERIC(10) | Y | Not applicable | Reserved for future use. |
| SHARE_LIMIT | NUMERIC(10) | Y | Not applicable | The maximum number of slots that this consumer can obtain from the resource group share pool. This data is from the cluster configuration. |
| SHARE_QUOTA | NUMERIC(10) | Y | Not applicable | The maximum number of slots that this consumer can obtain from the share pool
for this consumer and resource group combination. This data is collected in real time. So this is
what the consumer can obtain from the share pool at a specific time, which depends on this
consumer's workload and the workload of all other consumers. This value will be balanced over time.
For the share policy, the share quota is calculated as: demand - planned_owned; if the result <= 0, then this is 0; if the result > 0 and < share ratio / (sum of all sibling share ratios), then the value is the quota; if the result > share ratio / (sum of all sibling share ratios), the current workload of sibling consumers and number of slots this consumer can get is calculated. The result will be the quota for this consumer. For the hybrid policy, if demand - planned_own <= planned_hown, there are two cases: if the result is also < planned_hreserve, the share_quota will be planned_hreserved; if the result is > planned_hreserved, then share_quota will be demand - planned_own. If demand - planned_own > planned_hown, then share_quota is planned_hown + ratio of the share pool (the calculation is the same as for the share policy, except planned_hown is used in the calculation.) |
| SHARE_RATIO | NUMERIC(15,10) | Y | Not applicable | The share ratio of share pool slots for this consumer and resource group. This data is from the cluster configuration. |
| TOTAL_DEMAND | NUMERIC(10) | Y | Not applicable | Reserved for future use. |
| UNSATISFIED_DEMAND | NUMERIC(10) | Y | Not applicable | Reserved for future use. |
| USED | NUMERIC(10) | Y | Not applicable | The actual number of allocated resources. This data is collected in real time.
If the allocation does not specify any resource group, the value is NULL. This only has a value when the allocation specifies a resource group. It represents the number of hosts for the same consumer, from the same resource group, with the same allocation ID. |