簡體   English   中英

如何在 airflow DAG 中的 secondary_worker_config 中創建 SPOT VM 以使用谷歌雲數據處理運營商?

[英]How to create SPOT VM's in my secondary_worker_config in airflow DAG for using google cloud dataproc operators?

在 UI 中,您可以 select Preemptibility as Spot in the Secondary worker nodes 來創建類似的東西:

在此處輸入圖像描述

以下是我的 JSON:

    "secondary_worker_config": {
        "num_instances": 5,
        "machine_type_uri": SOME_MACHINE_TYPE,
        "disk_config": {"boot_disk_type": "pd-standard", "boot_disk_size_gb": 1024},
        "image_uri" : SOME_IMAGE_URI
    }

SPOT VM 的鍵值對是什么?

我試圖查看以下文件,但沒有找到任何內容:

https://airflow.apache.org/docs/apache-airflow-providers-google/stable/operators/cloud/dataproc.html

https://cloud.google.com/compute/docs/instances/create-use-spot#gcloud

你可以試試這個:

"secondaryWorkerConfig": {
      "numInstances": 5,
      "preemptibility": "SPOT" // the default is standard preemptible, and you can provide "NON_PREEMPTIBLE" to create non-preemptible secondry workers
    }

是文檔。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM