【问题标题】:Submitting a databricks notebook run specifying a cluster pool?提交指定集群池的数据块笔记本运行?
【发布时间】:2021-02-09 23:25:19
【问题描述】:

我正在提交一份一次性的,扔掉的笔记本作业:

azuredatabricks.net/api/2.0/jobs/runs/submit

$json = @"
{
    "run_name": "integration testing notebook task",
    "existing_cluster_id": "$global:clusterID",
    "timeout_seconds": 3600,
    "notebook_task": {
        "notebook_path": "$global:notebookPath"
    }
}
"@

但是,我希望它使用现有池中的集群,而不是指定现有的集群 ID(我最初必须自己创建)。这怎么可能?该架构似乎不接受此请求的 instance_pool_id。

【问题讨论】:

    标签: databricks azure-databricks


    【解决方案1】:

    您需要将create requestnew_cluster 一起使用,并在its definition 中指定instance_pool_id,方法与普通集群相同。像这样的:

    $json = @"
    {
        "run_name": "integration testing notebook task",
        "new_cluster": : {
          "spark_version": "7.3.x-scala2.12",
          "node_type_id": "r3.xlarge",
          "aws_attributes": {
            "availability": "ON_DEMAND"
          },
          "num_workers": 10,
          "instance_pool_id": "$global:poolID"
        },
        "timeout_seconds": 3600,
        "notebook_task": {
            "notebook_path": "$global:notebookPath"
        }
    }
    "@
    

    但这将创建一个包含来自池的机器的集群,而不是附加到已经在那里分配的某个集群。

    【讨论】:

      猜你喜欢
      • 2022-01-22
      • 2018-10-07
      • 1970-01-01
      • 2014-11-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-12-30
      • 1970-01-01
      相关资源
      最近更新 更多