mirror of
https://github.com/apache/impala.git
synced 2026-02-01 12:00:22 -05:00
This introduces the max-mt-dop setting for admission control. If a statement runs with an MT_DOP setting that exceeds the max-mt-dop, then the MT_DOP setting is downgraded to the max-mt-dop value. If max-mt-dop is set to a negative value, no limit is applied. max-mt-dop is set via the llama-site.xml and can be set at the daemon level or at the resource pool level. When there is no max-mt-dop setting, it defaults to -1, so no limit is applied. The max-mt-dop is evaluated once prior to query planning. The MT_DOP settings for queries past planning are not reevaluated if the policy changes. If a statement is downgraded, it's runtime profile contains a message explaining the downgrade: MT_DOP limited by admission control: Requested MT_DOP=9 reduced to MT_DOP=4. Testing: - Added custom cluster test with various max-mt-dop settings - Ran core tests Change-Id: I3affb127a5dca517591323f2b1c880aa4b38badd Reviewed-on: http://gerrit.cloudera.org:8080/16020 Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
48 lines
1.5 KiB
Plaintext
48 lines
1.5 KiB
Plaintext
====
|
|
---- QUERY
|
|
# The 'nosetting' resource pool does not have a max-mt-dop setting, so it uses
|
|
# the top-level max-mt-dop setting (which is 8).
|
|
set request_pool=nosetting;
|
|
set mt_dop=9;
|
|
select 1;
|
|
---- RUNTIME_PROFILE
|
|
row_regex: .*Query Options \(set by configuration\): .*MT_DOP=8.*
|
|
row_regex: .*MT_DOP limited by admission control: Requested MT_DOP=9 reduced to MT_DOP=8.*
|
|
====
|
|
---- QUERY
|
|
# The 'limited' resource pool has max-mt-dop set to 4, so the query is downgraded.
|
|
set request_pool=limited;
|
|
set mt_dop=9;
|
|
select 1;
|
|
---- RUNTIME_PROFILE
|
|
row_regex: .*Query Options \(set by configuration\): .*MT_DOP=4.*
|
|
row_regex: .*MT_DOP limited by admission control: Requested MT_DOP=9 reduced to MT_DOP=4.*
|
|
====
|
|
---- QUERY
|
|
# The 'negative' resource pool has max-mt-dop set to -1, which means the limit is
|
|
# disabled.
|
|
set request_pool=negative;
|
|
set mt_dop=9;
|
|
select 1;
|
|
---- RUNTIME_PROFILE
|
|
row_regex: .*Query Options \(set by configuration\): .*MT_DOP=9.*
|
|
====
|
|
---- QUERY
|
|
# The 'largeint' resource pool has max-mt-dop set to a value that doesn't fit in 4 bytes.
|
|
# The query is not downgraded.
|
|
set request_pool=largeint;
|
|
set mt_dop=9;
|
|
select 1;
|
|
---- RUNTIME_PROFILE
|
|
row_regex: .*Query Options \(set by configuration\): .*MT_DOP=9.*
|
|
====
|
|
---- QUERY
|
|
# The 'zero' resource pool has max-mt-dop set to 0, so the query is downgraded to 0.
|
|
set request_pool=zero;
|
|
set mt_dop=9;
|
|
select 1;
|
|
---- RUNTIME_PROFILE
|
|
row_regex: .*Query Options \(set by configuration\): .*MT_DOP=0.*
|
|
row_regex: .*MT_DOP limited by admission control: Requested MT_DOP=9 reduced to MT_DOP=0.*
|
|
====
|