mirror of https://github.com/apache/druid.git
197c54f673
Description: Compaction operations issued by the Coordinator currently run using the native query engine. As majority of the advancements that we are making in batch ingestion are in MSQ, it is imperative that we support compaction on MSQ to make Compaction more robust and possibly faster. For instance, we have seen OOM errors in native compaction that MSQ could have handled by its auto-calculation of tuning parameters. This commit enables compaction on MSQ to remove the dependency on native engine. Main changes: * `DataSourceCompactionConfig` now has an additional field `engine` that can be one of `[native, msq]` with `native` being the default. * if engine is MSQ, `CompactSegments` duty assigns all available compaction task slots to the launched `CompactionTask` to ensure full capacity is available to MSQ. This is to avoid stalling which could happen in case a fraction of the tasks were allotted and they eventually fell short of the number of tasks required by the MSQ engine to run the compaction. * `ClientCompactionTaskQuery` has a new field `compactionRunner` with just one `engine` field. * `CompactionTask` now has `CompactionRunner` interface instance with its implementations `NativeCompactinRunner` and `MSQCompactionRunner` in the `druid-multi-stage-query` extension. The objectmapper deserializes `ClientCompactionRunnerInfo` in `ClientCompactionTaskQuery` to the `CompactionRunner` instance that is mapped to the specified type [`native`, `msq`]. * `CompactTask` uses the `CompactionRunner` instance it receives to create the indexing tasks. * `CompactionTask` to `MSQControllerTask` conversion logic checks whether metrics are present in the segment schema. If present, the task is created with a native group-by query; if not, the task is issued with a scan query. The `storeCompactionState` flag is set in the context. * Each created `MSQControllerTask` is launched in-place and its `TaskStatus` tracked to determine the final status of the `CompactionTask`. The id of each of these tasks is the same as that of `CompactionTask` since otherwise, the workers will be unable to determine the controller task's location for communication (as they haven't been launched via the overlord). |
||
---|---|---|
.. | ||
environment-configs | ||
ldap-configs | ||
schema-registry | ||
service-supervisords | ||
test-data | ||
tls | ||
Dockerfile | ||
base-setup.sh | ||
docker-compose.base.yml | ||
docker-compose.cds-coordinator-metadata-query-disabled.yml | ||
docker-compose.cds-task-schema-publish-disabled.yml | ||
docker-compose.centralized-datasource-schema.yml | ||
docker-compose.cli-indexer.yml | ||
docker-compose.druid-hadoop.yml | ||
docker-compose.high-availability.yml | ||
docker-compose.ldap-security.yml | ||
docker-compose.query-error-test.yml | ||
docker-compose.query-retry-test.yml | ||
docker-compose.schema-registry-indexer.yml | ||
docker-compose.schema-registry.yml | ||
docker-compose.security.yml | ||
docker-compose.yml | ||
druid.sh | ||
run-mysql.sh | ||
supervisord.conf | ||
wiki-simple-lookup.json |