Version:

/get/job

URL: http://GPUDB_IP_ADDRESS:GPUDB_PORT/get/job

Get the status and result of asynchronously running job. See the /create/job for starting an asynchronous job. Some fields of the response are filled only after the submitted job has finished execution.

Input Parameter Description

Name Type Description
job_id long A unique identifier for the job whose status and result is to be fetched.
options map of string to strings Optional parameters. The default value is an empty map ( {} ).

Output Parameter Description

The GPUdb server embeds the endpoint response inside a standard response structure which contains status information and the actual response to the query. Here is a description of the various fields of the wrapper:

Name Type Description
status String 'OK' or 'ERROR'
message String Empty if success or an error message
data_type String 'get_job_request' or 'none' in case of an error
data String Empty string
data_str JSON or String

This embedded JSON represents the result of the /get/job endpoint:

Name Type Description
endpoint string The endpoint which is being executed asynchronously. E.g. '/alter/table'.
job_status string

Status of the submitted job.

Possible Values Description
RUNNING The job is currently executing.
DONE The job execution has successfully completed and the response is included in the output parameter job_response or output parameter job_response_str field
ERROR The job was attempted, but an error was encountered. The output parameter status_map contains the details of the error in error_message
CANCELLED Job cancellation was requested while the execution was in progress.
running boolean True if the end point is still executing.
progress int Approximate percentage of the job completed.
successful boolean True if the job execution completed and no errors were encountered.
response_encoding string

The encoding of the job result (contained in output parameter job_response or output parameter job_response_str.

Possible Values Description
binary The job result is binary-encoded. It is contained in output parameter job_response.
json The job result is json-encoded. It is contained in output parameter job_response_str.
job_response bytes The binary-encoded response of the job. This field is populated only when the job has completed and output parameter response_encoding is binary
job_response_str string The json-encoded response of the job. This field is populated only when the job has completed and output parameter response_encoding is json
status_map map of string to strings

Map of various status strings for the executed job.

Possible Parameters (keys) Parameter Description
error_message Explains what error occurred while running the job asynchronously. This entry only exists when the job status is ERROR.
info map of string to strings Additional information.

Empty string in case of an error.