blob: 1dadf0e5f65ff7e8d2855d50c79675b2cfa6ba9e [file]
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# Docker Compose override for java_sdk E2E test mode.
#
# Replaces the stock airflow-worker image with one that has a JRE installed
# (built by conftest._setup_java_sdk_integration via Dockerfile.java), mounts
# the pre-built bundle JARs (the Java example under /opt/airflow/java-jars, the
# Scala Spark example under /opt/airflow/scala-jars, and the runner-behaviour
# test fixtures under /opt/airflow/java-test-jars), and configures the worker to
# consume the "java", "scala", "java-test", and "java-native" Celery queues where
# Java tasks are routed. The native-Dag JAR is in the Dags folder, so the Dag
# processor runs on the same image to parse it.
---
services:
airflow-dag-processor:
image: airflow-java-worker
environment:
# The dynamic Dag test swaps a YAML file and waits for the Dag IDs to change. Re-parse the
# bundle every few seconds, and mark a Dag stale soon after it leaves the YAML.
AIRFLOW__DAG_PROCESSOR__MIN_FILE_PROCESS_INTERVAL: '5'
AIRFLOW__DAG_PROCESSOR__STALE_DAG_THRESHOLD: '10'
AIRFLOW__SCHEDULER__PARSING_CLEANUP_INTERVAL: '5'
airflow-worker:
image: airflow-java-worker
volumes:
- ./java-jars:/opt/airflow/java-jars:ro
- ./scala-jars:/opt/airflow/scala-jars:ro
- ./java-test-jars:/opt/airflow/java-test-jars:ro
command: celery worker -q java,scala,java-test,java-native,default