简体   繁体   English

如何使用 dataproc 客户端通过 google dataproc 集群作业为 spark 传递自定义作业 ID

[英]how to pass custom job id via google dataproc cluster job for spark using dataproc client

i am using the following code snippet but would not found any luck.我正在使用以下代码片段,但没有找到任何运气。 can anyone help me to pass custom job ID谁能帮我传递自定义工作 ID

job = {
    
    "placement": {"cluster_name": cluster_name},
    "spark_job": {
        "main_class": "org.example.App",
        "jar_file_uris": [
          "gs://location.jar",
        ],
        "args": [],
    },
}


operation = job_client.submit_job_as_operation(
     request={"project_id": project_id, "region": region, "job": job}
)

Thanks in Advance:)提前致谢:)

The following problem can be solved by adding reference attribute in the json like this.像这样在json中添加reference属性可以解决下面的问题。

"reference": {
  "job_id": "test101",
  "project_id": "1553sas207"
   }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我想在 dataproc 集群上提交一个带有自定义作业 ID 的 spark 作业 - I want to submit a spark job on the dataproc cluster, with custom job id 如何从 Spark 作业中检索通过 Dataproc 提交的作业的 jobId - How to retrieve the jobId of job submitted via Dataproc from within the Spark job 如何在 google dataproc 上运行 spark 3.2.0? - How to run spark 3.2.0 on google dataproc? 使用属性文件向 Google Dataproc 提交 Pig 作业时出错 - Error in submitting a pig job to Google Dataproc with properties file 使用 rest api 从 dataproc 获取控制台作业 output 文本 - Get console job output text from dataproc using rest api 在云 Dataproc 中的 Pyspark 作业上使用 DeltaTable.forPath 时出错 - Error Using DeltaTable.forPath on Pyspark Job in cloud Dataproc Dataproc 作业日志无法从 dataproc.googleapis.com 获得 - Dataproc job logs not available from dataproc.googleapis.com function云中dataproc作业状态如何触发事件监控? - How to trigger an event to monitor dataproc job status in cloud function? 通过 rest API 使用 --files 启动数据处理作业 - Launch a dataproc job with --files through the rest API 如何使用 Python 创建具有生存时间的 Dataproc 集群 SDK - How to create a Dataproc cluster with time to live using Python SDK
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM