I am able to run Spark
job using BashOperator
but I want to use SparkSubmitOperator
for it using Spark
standalone mode.
Here's my DAG
for SparkSubmitOperator
and stack-trace
args = {
'owner': 'airflow',
'start_date': datetime(2018, 5, 24)
}
dag = DAG('spark_job', default_args=args, schedule_interval="*/10 * * * *")
operator = SparkSubmitOperator(
task_id='spark_submit_job',
application='/home/ubuntu/test.py',
total_executor_cores='1',
executor_cores='1',
executor_memory='2g',
num_executors='1',
name='airflow-spark',
verbose=False,
driver_memory='1g',
conf={'master':'spark://xx.xx.xx.xx:7077'},
dag=dag,
)
Looking at source for spark_submit_hook
it seems _resolve_connection()
always sets master=yarn
. How can I change master
properties value by Spark
standalone master URL? Which properties I can set to run Spark
job in standalone mode?