WebHCat Reference: DELETE jobs/:jobid
WebHCat Reference: DELETE jobs/:jobid
설명 (Description)
주어진 작업 ID(job ID)로 작업을 **중단(kill)**해요. :jobid를 작업 생성 시 받은 작업 ID로 바꿔서 호출하면 됩니다.
버전: Hive 0.12.0 이상
DELETE jobs/:jobid는 Hive 릴리스 0.12.0에서 도입되었어요. 이전 릴리스의 DELETE queue/:jobid와 동일합니다. DELETE queue/:jobid는 이제 폐기되었고(HIVE-4443), Hive 0.14.0(HIVE-6432)에서 제거될 예정이에요.
출처: 문서
본문
URL
http://www.myserver.com/templeton/v1/jobs/:jobid
파라미터 (Parameters)
| Name | Description | Required? | Default |
|---|---|---|---|
| :jobid | The job ID to delete. This is the ID received when the job was created. | Required | None |
표준 파라미터도 지원돼요.
결과 (Results)
| Name | Description |
|---|---|
| status | A JSON object containing the job status information. See the Hadoop documentation (Class JobStatus) for more information. |
| profile | A JSON object containing the job profile information. WebHCat passes along the information in the JobProfile object, which is subject to change from one Hadoop version to another. See the Hadoop documentation (API docs) for org.apache.hadoop.mapred.JobProfile for more information. |
| id | The job ID. |
| parentId | The parent job ID. |
| percentComplete | The job completion percentage, for example "75% complete". |
| exitValue | The job's exit value. |
| user | User name of the job creator. |
| callback | The callback URL, if any. |
| completed | A string representing completed status, for example "done". |
예제 (Example)
Curl 명령 (Curl Command)
% curl -s -X DELETE 'http://localhost:50111/templeton/v1/jobs/job_201111111311_0009?user.name=ctdean'
JSON 출력 (JSON Output)
{
"status": {
"startTime": 1321047216471,
"username": "ctdean",
"jobID": {
"jtIdentifier": "201111111311",
"id": 9
},
"jobACLs": {
},
"schedulingInfo": "NA",
"failureInfo": "NA",
"jobId": "job_201111111311_0009",
"jobPriority": "NORMAL",
"runState": 1,
"jobComplete": false
},
"profile": {
"url": "http://localhost:50030/jobdetails.jsp?jobid=job_201111111311_0009",
"user": "ctdean",
"jobID": {
"jtIdentifier": "201111111311",
"id": 9
},
"queueName": "default",
"jobFile": "hdfs://localhost:9000/tmp/hadoop-ctdean/mapred/staging/ctdean/.staging/job_201111111311_0009/job.xml",
"jobName": "streamjob3322518350676530377.jar",
"jobId": "job_201111111311_0009"
}
"id": "job_201111111311_0009",
"parentId": "job_201111111311_0008",
"percentComplete": "10% complete",
"exitValue": 0,
"user": "ctdean",
"callback": null,
"completed": "false"
}
참고 (Note)
작업이 즉시 삭제되는 것은 아니므로, 반환되는 정보가 위 예시처럼 삭제를 반영하지 못할 수 있어요. 작업을 모니터링하고 최종적으로 삭제되었는지 확인하려면 GET jobs/:jobid를 사용하세요.
폐기된 리소스인 DELETE queue/:jobid를 대체합니다.
더 알아보기 (Learn more)
DELETE jobs/:jobid는 실행 중인 WebHCat 작업을 ID로 중단하는 데 사용해요. 응답은 작업 상태 정보를 포함하며, 삭제가 반영되는 데 시간이 걸릴 수 있으므로 GET jobs/:jobid로 상태를 확인하는 걸 권장합니다.