Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to stop a job?

Solved Go to solution

How to stop a job?

New Contributor

Is there a way (command), to stop for some time or kill whole job, inside mapper code written in Java?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: How to stop a job?

Master Guru
Stopping a job may not be easily controllable, unless perhaps you are running the job in a FairScheduler pool and you deallocate all resources out of that pool (the config change can be done in dynamic fashion). This would also stop all other jobs in that pool, however.

Killing a job from within a Map Task is possible, if only in insecure environments. You can use the JobClient API and call its killJob method. Since this call relies on authentication, it may not work right out in a kerberos secured runtime cluster.
1 REPLY 1
Highlighted

Re: How to stop a job?

Master Guru
Stopping a job may not be easily controllable, unless perhaps you are running the job in a FairScheduler pool and you deallocate all resources out of that pool (the config change can be done in dynamic fashion). This would also stop all other jobs in that pool, however.

Killing a job from within a Map Task is possible, if only in insecure environments. You can use the JobClient API and call its killJob method. Since this call relies on authentication, it may not work right out in a kerberos secured runtime cluster.
Don't have an account?
Coming from Hortonworks? Activate your account here