【问题标题】:DataProcPySparkOperator cluster region and zone issueDataProcPySparkOperator 集群区域和区域问题
【发布时间】:2018-10-12 12:46:09
【问题描述】:

关于使用 DataProcPySparkOperator 的问题。以下是我在 DAG 中添加的任务:

run_pyspark_job= DataProcPySparkOperator(
    task_id='pyspark_operator_test',
    main='/root/airflow/dags/basic_eda.py',
    job_name='test_pyspark_job',
    cluster_name='test-cluster-20180502',
    gcp_conn_id='google_cloud_default',
    region='global',
    zone='us-central1-b'
)

出现以下错误:

googleapiclient.errors.HttpError: https://dataproc.googleapis.com/v1/projects/project_id/regions/global/jobs:submit?alt=json 返回“未找到:集群项目/project_id/regions/global/clusters/cluster-1”

它没有指向正确的集群

请建议我缺少什么?

【问题讨论】:

    标签: pyspark airflow


    【解决方案1】:

    Airflow 1.9 中的参数已更改。为指定集群 id,使用了dataproc_cluster 参数,在 1.9 中更改为 cluster_name。

    因此,如果您使用的是 apache-airflowdataproc_cluster 指定 cluster_id ('test-cluster-20180502')。

    检查:https://github.com/apache/incubator-airflow/blob/master/UPDATING.md#deprecated-features

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-12-04
      • 1970-01-01
      • 2021-04-13
      • 2019-06-22
      • 1970-01-01
      • 1970-01-01
      • 2016-11-17
      • 1970-01-01
      相关资源
      最近更新 更多