You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Edwin <ed...@gmail.com> on 2009/01/27 10:38:12 UTC

Interrupting JobClient.runJob

Hi

I am looking for a way to interrupt a thread that entered
JobClient.runJob(). The runJob() method keep polling the JobTracker until
the job is completed. After reading the source code, I know that the
InterruptException is caught in runJob(). Thus, I can't interrupt it using
Thread.interrupt() call. Is there anyway I can interrupt a polling thread
without terminating the job? If terminating the job is the only way to
escape, how can I terminate the current job?

Thank you very much.

Regards
Edwin

Re: Interrupting JobClient.runJob

Posted by Amareshwari Sriramadasu <am...@yahoo-inc.com>.
Edwin wrote:
> Hi
>
> I am looking for a way to interrupt a thread that entered
> JobClient.runJob(). The runJob() method keep polling the JobTracker until
> the job is completed. After reading the source code, I know that the
> InterruptException is caught in runJob(). Thus, I can't interrupt it using
> Thread.interrupt() call. Is there anyway I can interrupt a polling thread
> without terminating the job? If terminating the job is the only way to
> escape, how can I terminate the current job?
>
> Thank you very much.
>
> Regards
> Edwin
>
>   
Yes. there is noway to stop the client from polling.
If you want to Stop client thread, use <ctrl>+c or kill the client 
process itself.

You can kill a job using the command:
bin/hadoop job -kill <jobid>

-Amareshwari