mirror of
https://github.com/apache/impala.git
synced 2025-12-25 02:03:09 -05:00
Currently, RELOAD events of partitioned table are processed one after the other. Processing them one by one acquires the table lock multiple times to load individual partitions in sequence. This also keeps the table version changing which impacts performance of coordinators in local-catalog mode - query planning needs retry to handle InconsistentMetadataFetchException due to table version changes. This patch handles the batch processing logic RELOAD events on same table by reusing the exisiting logic of BatchPartitionEvent. This implementation adds four new methods canBeBatched(),addToBatchEvents(), getPartitionForBatching(), getBatchEventType()(pre-requisites to reuse batching logic) to the RELOAD event class. Testing: - Added an end-to-end to verify the batching. Change-Id: Ie3e9a99b666a1c928ac2a136bded1e5420f77dab Reviewed-on: http://gerrit.cloudera.org:8080/23159 Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>