我正在提交一份一次性的、扔掉笔记本的工作:
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。
答案 0 :(得分:1)
您需要将 create request 与 new_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"
}
}
"@
但这将创建一个包含池中机器的集群,而不是附加到已经分配到那里的某个集群。