Viewing the Web UI
During Spark job execution, task scheduling, stage breakdown, and resource utilization are distributed across cluster nodes, making it difficult to monitor overall job health in real time. The web UI provides real-time visibility into DAG execution graphs, stage and task details, executor resource usage, and SQL execution plans. These metrics streamline job monitoring, performance bottleneck analysis, and resource optimization.
Web UI is a web-based user interface that displays the execution status of Spark applications. It includes the following modules:
- Jobs tab
- Stages tab
- Storage tab
- Environment tab
- Executors tab
- Gluten SQL/DataFrame tab (Optimized execution plan)
- SQL/DataFrame tab (SQL query execution details)
Precautions
- Do not clear the event log data in the original OBS job path. Otherwise, the web UI will not be accessible. The following paths must not be cleared:
- obs://{endpoint_user_bucket}/aidatalake/workspace_{workspaceid}/spark/endpoint_{endpointId}/archive/xxx
- obs://{endpoint_user_bucket}/aidatalake/workspace_{workspaceid}/spark/endpoint_{endpointId}/running/jobs/staging/xxx
- Historical job runs use the agency configured for the endpoint. This agency must have the read-only permission for the OBS bucket and directory where the event logs are stored.
- In API mode, only one historical job can be resubmitted at a time. The target endpoint must be a SparkJob endpoint.
- A newly started Spark History UI job runs continuously until it fails or is manually canceled.
Viewing the Web UI of a Job Run
- Log in to the AI DataLake console.
- Choose Job Development > Job Run History, and then click the Spark tab.
- Above the Spark job list, click SparkSQL or SparkJob.
- Access the Web UI using either of the following methods:
- In the Operation column of the target job, click Web UI.
- Click the target job name. On the Job Run Details panel that appears, click Web UI at the bottom.
Viewing the Spark History UI of a Historical Job
You cannot directly access the Web UI of a completed Spark job. However, you can view the Spark History UI by resubmitting the job through an API and configuring the required parameters.
- Submit a job using the API. For details, see Starting a Spark Job - RunSparkJob.
The following table lists the parameters supported by SparkJob and SparkSQL jobs during job submission.
Table 1 Parameter description Parameter
Description
execution_mode
The execution mode. The value is fixed to batch.
name
The job name.
type
The job type.
To view historical jobs, Spark jobs of the spark_jar_job type are required.
- SparkJob: spark.aidatalake.history.jobId
- SparkSQL: spark.aidatalake.history.statementId
The job ID of the original job or the statement ID of the original SQL job. Specify either value.
You can view this value on the AI DataLake console.
endpoint_name
The endpoint name. Set this parameter to the endpoint of the SparkJob.
Sample code:
- SparkJob
{ "execution_mode": "batch", "name": "history-server-job", "job_config": { "type": "spark_jar_job" }, "spark_config": { "spark.aidatalake.history.jobId": "Job ID of the original job" }, "endpoint_name": "Endpoint name" } - SparkSQL
{ "execution_mode": "batch", "name": "history-server-sql", "job_config": { "type": "spark_jar_job" }, "spark_config": { "spark.aidatalake.history.statementId": "Statement ID of the original SQL job" }, "endpoint_name": "Endpoint name" }
- View the Web UI on the AI DataLake console.
- Log in to the AI DataLake console.
- Choose Job Development > Job Run History, and then click the Spark tab.
- Above the Spark job list, click SparkJob.
- Access the Web UI using either of the following methods:
- In the Operation column of the target job, click Web UI.
- Click the target job name. On the Job Run Details panel that appears, click Web UI at the bottom.
What is your overall rating for this page?
Thank 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