Parameter description
Parameter |
Type |
Description |
job |
CreateResponse, str |
Job ID |
Response description
The get_job method returns a GetResponse
object, which encapsulates all interfaces and attributes of the Job class.
Job class
Parameter description
Parameter |
Type |
Description |
properties |
dict, str, Job object |
Job running status information |
Attribute description
Attribute |
Type |
Description |
Name |
str |
Job name |
Id |
str |
Job ID |
OwnerId |
int |
Job owner ID |
CreationTime |
str |
Creation time |
State |
str |
Job state, which can be Waiting, Running, Failed, Finished, or Stopped. |
Message |
str |
Error message |
StartTime |
str |
Start time of the job |
|
EndTime |
str |
End time of the job |
TaskMetrics |
str |
Metrics of all tasks in the job |
InstanceMetrics |
str |
Metrics of all instances in the job |
TaskMetrics class
Parameter description
Parameter |
Type |
Description |
properties |
dict, str, TaskMetrics object |
Metrics of all tasks in the job |
Attribute description
Attribute |
Type |
Description |
WaitingCount |
int |
Number of waiting tasks in the job |
RunningCount |
int |
Number of running tasks in the job |
FinishedCount |
int |
Number of finished tasks in the job |
FailedCount |
int |
Number of failed tasks in the job |
StoppedCount |
int |
Number of stopped tasks in a job |
InstanceMetrics class
Parameter description
Parameter |
Type |
Description |
properties |
dict, str, InstanceMetrics object |
Metrics of all instances in the job |
Attribute description
Attribute |
Type |
Description |
WaitingCount |
int |
Number of waiting instances in the job |
RunningCount |
int |
Number of running instances in the job |
FinishedCount |
int |
Number of finished instances in the job |
FailedCount |
int |
Number of failed instances in the job |
StoppedCount |
int |
Number of stopped instances in a job |
Example
try:
# Get a Client object.
client = Client(...
...
# Job ID.
job = "job-xxxx"
# Get job status, a Job object returned.
# You can use job_desc exactly like a Job object.
job_desc = client.get_job(job)
print (job_desc.Name, job_desc.Id, job_desc.State)
except ClientError, e:
print (e)