mirror of
https://github.com/apache/impala.git
synced 2025-12-26 14:02:53 -05:00
Adds "Select Columns", "Where Columns", "Join Columns", "Aggregate Columns", and "OrderBy Columns" to the query profile and the workload management active/completed queries tables. These fields are presented as comma separate strings containing the fully qualified column name in the format database.table_name.column_name. Aggregate columns include all columns in the order by and having clauses. Since new columns are being added, the workload management init process is also being modified to allow for one-way upgrades of the table schemas if necessary. Additionally, workload management can be set up to run under a schema version that is not the latest. This ability will be useful during troubleshooting. To enable these upgrades, the workload management initialization that manages the structure of the tables has been moved to the catalogd. The changes in this patch must be backwards compatible so that Impala clusters running previous workload management code can co-exist with Impala clusters running this workload management code. To enable that backwards compatibility, a new table property named 'wm_schema_version' is now used to track the schema version of the workload management tables. Thus, the old property 'schema_version' will always be set to '1.0.0' since modifying that property value causes Impala running previous workload management code to error at startup. Testing accomplished by * Adding/updating workload and custom cluster tests to assert the new columns and the workload management upgrade process. * JUnit tests added to verify the new workload management columns are being correctly parsed. * GTests added to ensure the workload management columns are correctly defined and in the correct order. Change-Id: I78f3670b067c0c192ee8a212fba95466fbcb51d7 Reviewed-on: http://gerrit.cloudera.org:8080/21142 Reviewed-by: Michael Smith <michael.smith@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com> Reviewed-by: Riza Suminto <riza.suminto@cloudera.com>
57 lines
1.8 KiB
SQL
57 lines
1.8 KiB
SQL
-- Used in test_workload_mgmt_init.py tests:
|
|
-- * test_upgrade_to_1_0_0_from_previous_binary
|
|
-- * test_upgrade_to_latest_from_previous_binary
|
|
CREATE EXTERNAL TABLE sys.impala_query_live (
|
|
cluster_id STRING,
|
|
query_id STRING,
|
|
session_id STRING,
|
|
session_type STRING,
|
|
hiveserver2_protocol_version STRING,
|
|
db_user STRING,
|
|
db_user_connection STRING,
|
|
db_name STRING,
|
|
impala_coordinator STRING,
|
|
query_status STRING,
|
|
query_state STRING,
|
|
impala_query_end_state STRING,
|
|
query_type STRING,
|
|
network_address STRING,
|
|
start_time_utc TIMESTAMP,
|
|
total_time_ms DECIMAL(18,3),
|
|
query_opts_config STRING,
|
|
resource_pool STRING,
|
|
per_host_mem_estimate BIGINT,
|
|
dedicated_coord_mem_estimate BIGINT,
|
|
per_host_fragment_instances STRING,
|
|
backends_count INT,
|
|
admission_result STRING,
|
|
cluster_memory_admitted BIGINT,
|
|
executor_group STRING,
|
|
executor_groups STRING,
|
|
exec_summary STRING,
|
|
num_rows_fetched BIGINT,
|
|
row_materialization_rows_per_sec BIGINT,
|
|
row_materialization_time_ms DECIMAL(18,3),
|
|
compressed_bytes_spilled BIGINT,
|
|
event_planning_finished DECIMAL(18,3),
|
|
event_submit_for_admission DECIMAL(18,3),
|
|
event_completed_admission DECIMAL(18,3),
|
|
event_all_backends_started DECIMAL(18,3),
|
|
event_rows_available DECIMAL(18,3),
|
|
event_first_row_fetched DECIMAL(18,3),
|
|
event_last_row_fetched DECIMAL(18,3),
|
|
event_unregister_query DECIMAL(18,3),
|
|
read_io_wait_total_ms DECIMAL(18,3),
|
|
read_io_wait_mean_ms DECIMAL(18,3),
|
|
bytes_read_cache_total BIGINT,
|
|
bytes_read_total BIGINT,
|
|
pernode_peak_mem_min BIGINT,
|
|
pernode_peak_mem_max BIGINT,
|
|
pernode_peak_mem_mean BIGINT,
|
|
sql STRING,
|
|
plan STRING,
|
|
tables_queried STRING
|
|
)
|
|
|
|
TBLPROPERTIES ('OBJCAPABILITIES'='EXTREAD,EXTWRITE', '__IMPALA_SYSTEM_TABLE'='true', 'format-version'='2', 'schema_version'='1.0.0')
|