Querying Job Details
Function
This API is used to query details of a job.
Authorization
Each account has full permissions to call all APIs, but its IAM users need permission assignments to do so. For specific permission requirements, refer to Permissions Policies and Supported Actions.
URI
- URI format
- Parameter description
Table 1 URI parameters Parameter
Mandatory
Type
Description
project_id
Yes
String
Project ID, which is used for resource isolation. For details about how to obtain its value, see Obtaining a Project ID.
job_id
Yes
String
Job ID.
Request Parameters
None
Response Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
is_success |
No |
String |
Whether the request is successfully executed. Value true indicates that the request is successfully executed. |
|
message |
No |
String |
System prompt. If execution succeeds, the parameter setting may be left blank. |
|
job_detail |
No |
Object |
Job details. For details, see Table 3. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
job_id |
No |
Long |
Job ID. |
|
name |
No |
String |
Job name. Length range: 0 to 57 characters. |
|
desc |
No |
String |
Job description. Length range: 0 to 512 characters. |
|
job_type |
No |
String |
Job type.
|
|
status |
No |
String |
Job status. Available job statuses are as follows:
|
|
status_desc |
No |
String |
Description of job status. |
|
create_time |
No |
Long |
Time when a job is created. |
|
start_time |
No |
Long |
Time when a job is started. |
|
user_id |
No |
String |
ID of the user who creates the job. |
|
queue_name |
No |
String |
Queue name. Length range: 1 to 128 characters. |
|
project_id |
No |
String |
ID of the project to which a job belongs. |
|
sql_body |
No |
String |
Stream SQL statement. |
|
savepoint_path |
No |
String |
Path for storing manually generated checkpoints. |
|
run_mode |
No |
String |
Job running mode. The options are as follows:
|
|
job_config |
No |
Object |
Job configurations. Refer to Table 4 for details. |
|
main_class |
No |
String |
Main class of a JAR package, for example, org.apache.spark.examples.streaming.JavaQueueStream. |
|
entrypoint_args |
No |
String |
Running parameter of a JAR package job. Multiple parameters are separated by spaces. |
|
execution_graph |
No |
String |
Job execution plan. |
|
update_time |
No |
Long |
Time when a job is updated. |
|
user_name |
No |
String |
Username. This parameter is valid only when show_detail is set to false. |
|
duration |
No |
Long |
Running duration of a job. Unit: ms. This parameter is valid only when show_detail is set to false. |
|
root_id |
No |
Long |
Parent job ID. This parameter is valid only when show_detail is set to false. |
|
graph_editor_enabled |
No |
Boolean |
Whether the stream graph of a job can be edited. Value true indicates that the flow diagram can be edited, and false indicates that the flow diagram cannot be edited. |
|
has_savepoint |
No |
Boolean |
Whether savepointing is enabled for the job. Value true indicates that the job has a savepoint, and false indicates that the job does not have a savepoint. |
|
edge_group_ids |
No |
Array of Strings |
List of edge computing group IDs. Use commas (,) to separate multiple IDs. |
|
restart_times |
No |
Integer |
Number of restart times |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
checkpoint_enabled |
No |
Boolean |
Whether to enable the automatic job snapshot function. Options:
Default value: false. |
|
checkpoint_interval |
No |
Integer |
Snapshot interval. The unit is second. The default value is 10. |
|
checkpoint_mode |
No |
String |
Snapshot mode. Options:
Default value: exactly_once. |
|
log_enabled |
No |
Boolean |
Whether to enable the log storage function. The default value is false. |
|
obs_bucket |
No |
String |
Name of an OBS bucket. |
|
root_id |
No |
Integer |
Parent job ID. |
|
edge_group_ids |
No |
Array of Strings |
List of edge computing group IDs. Use commas (,) to separate multiple IDs. |
|
manager_cu_number |
No |
Integer |
Number of CUs of the management unit. The default value is 1. |
|
graph_editor_enabled |
No |
Boolean |
Whether to enable flow diagram editing. The default value is false. |
|
graph_editor_data |
No |
String |
Data of flow diagram editing. The default value is null. |
|
executor_number |
No |
Integer |
Number of compute nodes in a job. |
|
executor_cu_number |
No |
Integer |
Number of CUs in a compute node. |
|
cu_number |
No |
Integer |
Number of CUs selected for a job. This parameter is valid only when show_detail is set to true.
The default value is 2. |
|
parallel_number |
No |
Integer |
Number of parallel jobs set by a user. This parameter is valid only when show_detail is set to true.
The default value is 1. |
|
smn_topic |
No |
String |
SMN topic. If a job fails, the system will send a message to users subscribed to this SMN topic. |
|
restart_when_exception |
No |
Boolean |
Whether to enable the function of restart upon exceptions. |
|
resume_checkpoint |
No |
Boolean |
Whether to restore data from the latest checkpoint when the system automatically restarts upon an exception. The default value is false. |
|
resume_max_num |
No |
Integer |
Maximum retry attempts. –1 indicates there is no upper limit. |
|
checkpoint_path |
No |
String |
Path for saving the checkpoint. |
|
idle_state_retention |
No |
Integer |
Expiration time. |
|
config_url |
No |
String |
OBS path of the config package uploaded by the user. |
|
udf_jar_url |
No |
String |
Name of the package that has been uploaded to the DLI resource management system. The UDF Jar file of the SQL job is uploaded through this parameter. |
|
dirty_data_strategy |
No |
String |
Dirty data policy of a job.
|
|
entrypoint |
No |
String |
Name of the package that has been uploaded to the DLI resource management system. This parameter is used to customize the JAR file where the job main class is located. |
|
dependency_jars |
No |
Array of Strings |
Name of the package that has been uploaded to the DLI resource management system. This parameter is used to customize other dependency packages. |
|
dependency_files |
No |
Array of Strings |
Name of the resource package that has been uploaded to the DLI resource management system. This parameter is used to customize dependency files. |
|
tm_cus |
No |
int |
Number of CUs per TaskManager node. |
|
tm_slot_num |
No |
int |
Number of slots per TaskManager node. |
|
image |
No |
String |
Custom image. The format is Organization name/Image name:Image version. This parameter is valid only when feature is set to custom. You can use this parameter with the feature parameter to specify a user-defined Flink image for job running. |
|
feature |
No |
String |
User-defined job feature. Type of the Flink image used by a job.
|
|
flink_version |
No |
String |
Flink version. This parameter is valid only when feature is set to basic. You can use this parameter with the feature parameter to specify the version of the DLI basic Flink image used for job running. |
|
execution_agency_urn |
No |
String |
Name of the agency authorized to DLI. This parameter is configurable in Flink 1.15. |
|
operator_config |
No |
String |
Operator's parallelism degree. The operator ID and degree of parallelism are displayed in JSON format. |
|
static_estimator_config |
No |
String |
Resource estimation for the static stream graph, which is displayed in JSON format. |
|
runtime_config |
No |
String |
Customizes optimization parameters when a Flink job is running. |
|
real_cu_number |
No |
Integer |
Number of actually used CUs. The default value is 0, indicating that the value of cu_number is used. |
|
resource_config_version |
No |
String |
Resource configuration version. The value can be v1 or v2. The default value is v1. Compared with the v1 template, the v2 template does not support the setting of the number of CUs. The v2 template supports the setting of Job Manager Memory and Task Manager Memory. v1: applicable to Flink 1.12 and 1.15. v2: applicable to Flink 1.15 and 1.17. You are advised to use the parameter settings of v2. |
|
resource_config |
No |
Object |
Resource configuration of a Flink job. For detailed parameter descriptions, refer to Table 5. When the resource configuration version is v2, the configuration takes effect; when the resource configuration version is v1, the configuration is invalid. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
max_slot |
No |
integer |
Number of parallel tasks that a single TaskManager can support. Each task slot can execute one task in parallel. Increasing task slots enhances the parallel processing capacity of the TaskManager but also increases resource consumption. The number of task slots is linked to the CPU count of the TaskManager since each CPU can offer one task slot. By default, a single TM slot is set to 1. The minimum parallelism must not be less than 1. |
|
parallel_number |
No |
integer |
Number of tasks concurrently executed by each operator in a job. The default value is 1. |
|
jobmanager_resource_spec |
No |
Object |
JobManager resource specifications. For details about the parameters, see Table 5. |
|
taskmanager_resource_spec |
No |
Object |
TaskManager resource specifications. For details about the parameters, see Table 6. |
Example Request
None
Example Response
- The following example takes the flink_jar_job type as an example:
{ "is_success": "true", "message": "Job detail query succeeds.", "job_detail": { "job_id": 104, "user_id": "011c99a26ae84a1bb963a75e7637d3fd", "queue_name": "flinktest", "project_id": "330e068af1334c9782f4226acc00a2e2", "name": "jptest", "desc": "", "sql_body": "", "run_mode": "exclusive_cluster", "job_type": "flink_jar_job", "job_config": { "checkpoint_enabled": false, "checkpoint_interval": 10, "checkpoint_mode": "exactly_once", "log_enabled": false, "obs_bucket": null, "root_id": -1, "edge_group_ids": null, "graph_editor_enabled": false, "graph_editor_data": "", "manager_cu_number": 1, "executor_number": null, "executor_cu_number": null, "cu_number": 2, "parallel_number": 1, "smn_topic": null, "restart_when_exception": false, "idle_state_retention": 3600, "config_url": null, "udf_jar_url": null, "dirty_data_strategy": null, "entrypoint": "FemaleInfoCollection.jar", "execution_agency_urn": "myAgencyName", "dependency_jars": [ "FemaleInfoCollection.jar", "ObsBatchTest.jar" ], "dependency_files": [ "FemaleInfoCollection.jar", "ReadFromResource" ] }, "main_class": null, "entrypoint_args": null, "execution_graph": null, "status": "job_init", "status_desc": "", "create_time": 1578466221525, "update_time": 1578467395713, "start_time": null } } - The following example takes the flink_opensource_sql_job type as an example:
{ "is_success": "true", "message": "The job information query succeeds.", "job_detail": { "job_type": "flink_opensource_sql_job", "status_desc": "", "create_time": 1637632872828, "sql_body": "xxx", "savepoint_path": null, "main_class": null, "queue_name": "xie_container_general", "execution_graph": "xxx", "start_time": 1638433497621, "update_time": 1638449337993, "job_config": { "checkpoint_enabled": true, "checkpoint_interval": 600, "checkpoint_mode": "exactly_once", "log_enabled": true, "obs_bucket": "dli-test", "root_id": -1, "edge_group_ids": null, "graph_editor_enabled": false, "graph_editor_data": "", "manager_cu_number": 1, "executor_number": null, "executor_cu_number": null, "cu_number": 2, "parallel_number": 3, "smn_topic": "", "restart_when_exception": true, "resume_checkpoint": true, "resume_max_num": -1, "checkpoint_path": null, "idle_state_retention": 3600, "config_url": null, "udf_jar_url": "test/flink_test-1.0-SNAPSHOT-jar-with-dependencies.jar", "dirty_data_strategy": "0", "entrypoint": "test/flink_test-1.0-SNAPSHOT-jar-with-dependencies.jar", "dependency_jars": null, "dependency_files": null, "tm_cus": 1, "tm_slot_num": 3, "image": null, "feature": null, "flink_version": null, "operator_config": "xxx", "static_estimator_config": "xxx", "execution_agency_urn": "myAgencyName", "runtime_config": null }, "user_id": "xxx", "project_id": "xxx", "run_mode": "exclusive_cluster", "job_id": 90634, "name": "test_guoquan", "desc": "", "entrypoint_args": null, "status": "job_cancel_success" } }
Status Codes
Table 6 describes status codes.
Error Codes
If an error occurs when this API is called, the system does not return the result similar to the preceding example, but returns an error code and error message. For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot