メインコンテンツまでスキップ

Cancel Spark Job (V2)

This operation submits a cancellation request for a Spark job in a specified project.

POST/v2/projects/{projectId}/jobs/{jobId}/cancel
接続エンドポイント

https://api.cloud.zilliz.com

shell
export BASE_URL="https://api.cloud.zilliz.com"
パラメータ
Authorizationstringheader必要

認証トークンは、適切な権限を持つ API キーである必要があります。

値の例: Bearer {{TOKEN}}
projectIdstringpath必要

プロジェクト ID。

値の例: proj-xxxxxxxxxxxxxxxxxxx
jobIdstringpath必要

Spark ジョブ ID。

値の例: job-xxxxxxxxxxxxxxxxxx
bash
export TOKEN="YOUR_API_KEY"
export projectId="proj-xxxxxxxxxxxxxxxxxxx"
export jobId="job-xxxxxxxxxxxxxxxxxx"

curl --request POST \
--url "${BASE_URL}/v2/projects/${projectId}/jobs/${jobId}/cancel" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json"
レスポンス

キャンセルリクエストが受け付けられました。

codeinteger

レスポンスコード。

dataobject

キャンセルリクエスト後の Spark ジョブを含むレスポンスペイロード。

jobIdstring必要

ジョブ ID。

projectIdstring必要

ジョブが属するプロジェクト ID。

typestring必要

ジョブタイプ。

descriptionstring

ジョブの説明。

statusstring必要

ジョブのステータス。

regionIdstring必要

クラウドリージョン ID。

clusterIdstring

クラスター ID。

artifactobject

ジョブによって生成された出力アーティファクト。

volumeNamestring必要

アーティファクトが保存されているボリューム名。

pathstring必要

ボリューム内のアーティファクトのパス。

detailsobject

バックフィルジョブの詳細。

dbNamestring

データベース名。

collectionNamestring

コレクション名。

inputobject

ジョブの入力または出力データへの参照。

typestring

データ参照タイプ。

volumeNamestring

ボリューム名。

pathstring

ボリューム内のデータパス。

formatstring

データ形式。

fieldsarray

ターゲットフィールド。

[]fieldsstring
(近日追加予定)
columnMappingobject

ソースからターゲットへの列マッピング。

modestring

バックフィルモード。

resourceSizestring

リソースサイズ。

failureReasonobject

ジョブが失敗した理由。

codestring

エラーコード。

messagestring

エラーメッセージ。

retryableboolean

ジョブを再試行できるかどうか。

precheckReportobject

バックフィルジョブの事前チェックレポート。

passedboolean

事前チェックに合格したかどうか。

dbNamestring

データベース名。

collectionNamestring

コレクション名。

inputstring

入力の説明。

fieldsarray

ターゲットフィールド。

[]fieldsstring
(近日追加予定)
columnMappingobject

ソースからターゲットへの列マッピング。

requiredSourceColumnsarray

必須のソース列。

[]requiredSourceColumnsstring
(近日追加予定)
errorsarray

事前チェックエラー。

[]errorsobject

単一の事前チェックエラー。

codestring

エラーコード。

sourceColumnstring

ソース列。

targetFieldstring

ターゲットフィールド。

expectedTypestring

期待される型。

actualTypestring

実際の型。

messagestring

エラーメッセージ。

checkedRowsinteger<int64>

チェックされた行数。

createdAtstring

作成時刻 (ISO 8601)。

submittedAtstring

送信時刻 (ISO 8601)。

startedAtstring

開始時刻 (ISO 8601)。

finishedAtstring

終了時刻 (ISO 8601)。

durationSecondsinteger<int64>

秒単位の所要時間。

エラーメッセージを返します。

codeinteger

レスポンスコード。

messagestring

エラーメッセージ。

Successjson
{
"code": 0,
"data": {
"jobId": "job-xxxxxxxxxxxxxxxxxx",
"sparkInstanceId": "sp-xxxxxxxxxxxxxxxxxx",
"type": "SPARK",
"jobName": "daily-vector-etl",
"status": "CANCELED",
"regionId": "aws-us-west-2",
"clusterId": "in01-xxxxxxxxxxxxxxx",
"mainClass": "com.zilliz.example.Main",
"createdAt": "2026-05-20T10:00:00Z",
"startedAt": "2026-05-20T10:01:00Z",
"finishedAt": "2026-05-20T10:06:00Z",
"durationSeconds": 300,
"sparkApplicationName": "spark-batch-sp-xxxxxxxxxxxxxxxxxx",
"sparkNamespace": "spark-sp-xxxxxxxxxxxxxxxxxx",
"sparkHistoryUrl": "https://spark-history.example.com",
"sparkApplicationId": "spark-batch-sp-xxxxxxxxxxxxxxxxxx-0",
"sparkHistoryAppUrl": "https://spark-history.example.com/history/spark-batch-sp-xxxxxxxxxxxxxxxxxx-0/jobs/",
"artifact": {
"volumeId": "stg-xxxxxxxxxxxxxxxxxxx",
"path": "/jars/example-job.jar",
"artifactUri": "volume://my-volume/jars/example-job.jar"
},
"applicationType": "Java",
"arguments": [
"--collection",
"medium_articles"
],
"resource": {
"driverCores": 2,
"driverMemory": "8g",
"executorCores": 2,
"executorMemory": "8g",
"minExecutors": 1,
"maxExecutors": 10
},
"sparkConf": {
"spark.sql.shuffle.partitions": "200"
},
"error": null,
"submittedAt": "2026-05-20T10:00:30Z"
}
}
Ctrl I