Stopping and Deleting an MRS Cluster Job
Long-running or suspended jobs caused by resource misconfigurations, data exceptions, or logic errors must be stopped promptly to release cluster resources. Over time, historical execution records accumulate and degrade job list readability. To keep the job list easy to navigate, delete obsolete job records on a regular schedule. How do I stop an abnormal running job and delete completed job records? The MRS console enables you to manually stop running jobs and delete completed job records, streamlining overall job lifecycle management.
Stopping an MRS Cluster Job
This section describes how to manually stop a running job using the MRS console.
Spark SQL jobs cannot be stopped manually. When you stop a job, its status permanently changes to Killed, and it cannot be executed again.
- Log in to the MRS console.
- On the Active Clusters page, select a running target cluster and click its name to go to the cluster details page.
- Click Jobs.
- Stop jobs that are no longer needed to release cluster resources. Select a running job, and choose in the Operation column.
Verify the job status:
If the job status changes from Running to Killed, the job has been successfully stopped. Check the job list to confirm the status change.
Deleting an MRS Cluster Job
This section describes how to delete job records using the MRS console. You can delete job records individually or in batches.
Deleted jobs cannot be recovered. Deleting a job permanently removes its run logs and configuration settings. Before deleting a job, ensure that execution is complete and that the run logs are no longer needed.
- Log in to the MRS console.
- On the Active Clusters page, select a running target cluster and click its name to go to the cluster details page.
- Click .
- Choose from the Operation in the row of the target job to be deleted. Enter DELETE in the Delete Job dialog box and click OK.
You can delete only one job record at a time. Return to the job list and verify that the deleted job record is no longer displayed. Its absence confirms that the job was successfully deleted.
- Select multiple jobs and click Delete on the upper left of the job list. Enter DELETE in the Delete Job dialog box and click OK.
You can delete one, multiple, or all jobs. Return to the job list and verify that the deleted job record is no longer displayed. If the job list contains a large number of entries, refresh the page and verify again.
FAQs
Q: What should I do if a job status remains Running after I stop the job?
- Wait 1 to 2 minutes and refresh the page. Job status updates on the console may be slightly delayed.
- Verify the job type. Spark SQL jobs cannot be stopped manually. If you attempt to stop a Spark SQL job, the operation fails.
- Check whether the YARN application linked to the job has actually terminated. On MRS Manager, choose Cluster > Services > Yarn > Dashboard to open the YARN Web UI, and then check the application list.
Q: What should I do if an error states that a running job cannot be deleted?
A: Running jobs cannot be directly deleted. You must first stop the job and then delete its record.
Q: What should I do if batch deletion fails for certain jobs?
- Check whether any of the failed jobs are currently in the Running state. Running jobs cannot be deleted.
- If a job fails during batch deletion, delete it separately to view the specific error details.
Helpful Links
- For details about creating and submitting an MRS job, see Submitting an MRS Job.
- For details about viewing job status and logs, see Viewing MRS Job Details and Logs.
- For details about MRS job management capabilities, see MRS Job Introduction.