Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Querying Information About a Job

Updated on 2024-11-29 GMT+08:00

Function

This API is used to query information about a specified job in an MRS cluster.

URI

  • Format

    GET /v2/{project_id}/clusters/{cluster_id}/job-executions/{job_execution_id}

  • Parameter description
    Table 1 URI parameters

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Explanation

    Project ID. For details about how to obtain the project ID, see Obtaining a Project ID.

    Constraints

    N/A

    Value range

    The value must consist of 1 to 64 characters. Only letters and digits are allowed.

    Default value

    N/A

    cluster_id

    Yes

    String

    Explanation

    Cluster ID If this parameter is specified, the latest metadata of the cluster that has been patched will be obtained. For details about how to obtain the cluster ID, see Obtaining a Cluster ID.

    Constraints

    N/A

    Value range

    The value can contain 1 to 64 characters, including only letters, digits, underscores (_), and hyphens (-).

    Default value

    N/A

    job_execution_id

    Yes

    String

    Explanation

    The job ID. For details about how to obtain the job ID, see Obtaining a Job ID.

    Constraints

    N/A

    Value range

    N/A

    Default value

    N/A

Request Parameters

None

Response Parameters

Status code: 202

Table 2 Response parameter

Parameter

Type

Description

job_detail

JobQueryBean object

Explanation

Job details. For details about the parameter, see Table 3.

Table 3 Job parameters

Parameter

Type

Description

job_id

String

Explanation

The job ID.

Value range

N/A

user

String

Explanation

Name of the user who submits a job.

Value range

N/A

job_name

String

Explanation

Job name.

Value range

N/A

job_result

String

Explanation

Final result of a job.

Value range

  • FAILED: indicates that the job fails to be executed.
  • KILLED: indicates that the job is manually terminated during execution.
  • UNDEFINED: indicates that the job is being executed.
  • SUCCEEDED: indicates that the job has been successfully executed.

job_state

String

Explanation

Job execution status.

Value range

  • FAILED: indicates that the job failed.
  • KILLED: indicates that the job is terminated.
  • New: indicates that the job is created.
  • NEW_SAVING: indicates that the job has been created and is being saved.
  • SUBMITTED: indicates that the job is submitted.
  • ACCEPTED: indicates that the job is accepted.
  • RUNNING: indicates that the job is running.
  • FINISHED: indicates that the job is completed.

job_progress

Float

Explanation

Job execution progress.

Value range

N/A

job_type

String

Explanation

Job type.

Value range

  • MapReduce
  • SparkSubmit: Select this value when you call an API to query SparkPython jobs.
  • HiveScript
  • HiveSql
  • DistCp: imports and exports data.
  • SparkScript
  • SparkSql
  • Flink

started_time

Long

Explanation

Time when a job starts to execute. Unit: milliseconds

Value range

N/A

submitted_time

Long

Explanation

Time when a job is submitted. Unit: milliseconds

Value range

N/A

finished_time

Long

Explanation

Time when a job was completed. Unit: milliseconds

Value range

N/A

elapsed_time

Long

Explanation

Running duration of a job. Unit: milliseconds

Value range

N/A

arguments

String

Explanation

Running parameter.

Value range

N/A

properties

String

Explanation

Configuration parameter, which is used to configure -d parameters.

Value range

N/A

launcher_id

String

Explanation

Real-life job ID.

Value range

N/A

app_id

String

Explanation

Actual job ID.

Value range

N/A

tracking_url

String

Explanation

The URL for accessing logs. Currently, only SparkSubmit jobs support this parameter. This parameter accesses the Yarn Web UI via the EIP bound to the cluster. If the EIP is unbound from the cluster on the VPC console, the MRS service data is not updated in a timely manner and the access fails. In this case, you can bind the EIP to the cluster again to rectify the fault.

Value range

N/A

queue

String

Explanation

The type of the resource queue used by a job.

Value range

N/A

Status code: 500

Table 4 Response body parameters

Parameter

Type

Description

error_code

String

Explanation

Error code.

Value range

N/A

error_msg

String

Explanation

Error message.

Value range

N/A

Example Request

Query information about a job.

GET https://{endpoint}/v2/{project_id}/clusters/{cluster_id}/job-executions/{job_execution_id}

Example Response

Status code: 202

Job information successful queried.

{
  "job_detail" : {
    "job_id" : "431b135e-c090-489f-b1db-0abe3822b855",
    "user" : "xxxx",
    "job_name" : "pyspark1",
    "job_result" : "SUCCEEDED",
    "job_state" : "FINISHED",
    "job_progress" : 100,
    "job_type" : "SparkSubmit",
    "started_time" : 1564626578817,
    "submitted_time" : 1564626561541,
    "finished_time" : 1564626664930,
    "elapsed_time" : 86113,
    "queue" : "default",
    "arguments" : "[--class, org.apache.spark.examples.SparkPi, --driver-memory, 512MB, --num-executors, 1, --executor-cores, 1, --master, yarn-cluster, s3a://obs-test/jobs/spark/spark-examples_2.11-2.1.0.jar, 10000]",
    "launcher_id" : "application_1564622673393_0006",
    "app_id" : "application_1564622673393_0007",
    "properties" : "{}"
  }
}

Status code: 400

Failed to query information about a job.

{
  "error_msg" : "Failed to query the job."
  "error_code" : "0162"
}

Status Codes

See Status Codes.

Error Codes

See Error Codes.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback