0
0
Apache Airflowdevops~10 mins

Celery executor for distributed execution in Apache Airflow - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set the executor to Celery in airflow.cfg.

Apache Airflow
[core]
executor = [1]
Drag options to blanks, or click blank then click option'
ACeleryExecutor
BLocalExecutor
CSequentialExecutor
DKubernetesExecutor
Attempts:
3 left
💡 Hint
Common Mistakes
Using LocalExecutor instead of CeleryExecutor disables distributed execution.
Misspelling the executor name causes Airflow to fail starting.
2fill in blank
medium

Complete the Celery broker URL to use Redis as the message broker.

Apache Airflow
broker_url = [1]
Drag options to blanks, or click blank then click option'
Amemory://
Bredis://localhost:6379/0
Csqla+sqlite:///celerydb.sqlite
Damqp://guest:guest@localhost:5672//
Attempts:
3 left
💡 Hint
Common Mistakes
Using AMQP URL when Redis is intended.
Using memory broker disables distributed messaging.
3fill in blank
hard

Fix the error in the Celery result backend URL to use Redis correctly.

Apache Airflow
result_backend = [1]
Drag options to blanks, or click blank then click option'
Adb+sqlite:///results.sqlite
Bredis://localhost:6379
Camqp://guest:guest@localhost:5672//
Dredis://localhost:6379/0
Attempts:
3 left
💡 Hint
Common Mistakes
Leaving out the database number in Redis URL.
Using AMQP URL for result backend instead of Redis.
4fill in blank
hard

Fill both blanks to configure Celery worker concurrency and log level.

Apache Airflow
[celery]
worker_concurrency = [1]
worker_log_level = [2]
Drag options to blanks, or click blank then click option'
A4
BINFO
CDEBUG
D8
Attempts:
3 left
💡 Hint
Common Mistakes
Setting concurrency too low limits parallelism.
Using DEBUG log level can produce too much output.
5fill in blank
hard

Fill all three blanks to complete the Celery task routing configuration.

Apache Airflow
[celery]
task_routes = {"my_task": {"queue": [1], "routing_key": [2], "exchange": [3]
Drag options to blanks, or click blank then click option'
A"high_priority"
B"high.key"
C"high_exchange"
D"default"
Attempts:
3 left
💡 Hint
Common Mistakes
Using default queue when a specific queue is needed.
Mismatching routing key and exchange names.