###API Summary
###Properties
Property | Description |
---|---|
Tasks/id | The task id |
Tasks/request_id | The parent request id |
Tasks/cluster_name | The name of the parent cluster |
Tasks/attempt_cnt | The number of attempts at completing this task |
Tasks/command | The task command |
Tasks/exit_code | The exit code |
Tasks/host_name | The name of the host |
Tasks/role | The role |
Tasks/stage_id | The stage id |
Tasks/start_time | The task start time |
Tasks/status | The task status |
Tasks/stderr | The stderr from running the taks |
Tasks/stdout | The stdout from running the task |
###Status
The current status of a task resource can be determined by looking at the Tasks/status property.
GET api/v1/clusters/c1/requests/2/tasks/12?fields=Tasks/status
200 OK
{
"href" : "your.ambari.server/api/v1/clusters/c1/requests/2/tasks/12?fields=Tasks/status",
"Tasks" : {
"cluster_name" : "c1",
"id" : 12,
"request_id" : 2,
"status" : "COMPLETED"
}
The following table lists the possible values of the task resource Tasks/status.