I had run a long-running batch job in DataProc Serverless. After some time of running, I figured out that running the job any longer was a waste of time and money, and I wanted to stop it.
I couldn't find a way to kill the job. However, there were two other ways.
- Cancel the batch
- Delete the batch
Initially, I used the first option, and I cancelled the job using:
gcloud dataproc batches cancel BATCH --region=REGION
On the dataproc batch console, it showed the job got cancelled, and I also saw the DCU and shuffle storage usage.
But the surprising point is, I can see the job is still running after one day on the spark history server.
After this, I thought of going with the second option to delete the batch job, and I ran this command.
gcloud dataproc batches delete BATCH --region=REGION
This removed the batch entry from the dataproc batch console, but the job is still seen to be running through the spark history server.
My query is:
- What is the best way to kill the job?
- Am I still being charged once I canceled the running job?