hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amar Kamat <ama...@yahoo-inc.com>
Subject Re: Is it possible to submit job to JobClient and exit immediately?
Date Thu, 15 Jan 2009 14:12:51 GMT
Andrew wrote:
> For now, I use such code blocks in all my MR jobs:
> 	
> try {
> 	JobClient.runJob(job);
>   
JobClient jc = new JobClient(job);
jc.submitJob(job); // submits a job and comes out
> } catch (IOException exc) {
> 	LOG.info("Job failed", exc);
> }
> System.exit(0);
>
> But this code waits until MR job to complete. Thus, I have to run it on 
> machine that is always online to jobtracker.
>
> My purpose is to write code that submits job to job tracker and exits without 
> waiting for job to complete. I've tried 
>
> try {
> 	JobID jobid = new JobClient(job).submitJob(job).getID();
> } catch (IOException exc) {
> 	LOG.info("Job failed", exc);
> }
> System.exit(0);
>
> This code fails  with "java.lang.IllegalStateException: Shutdown in progress". 
>   
Can you check what state the jobtracker via its web-ui? Can you see what 
is happening to the jobtracker by checking its logs?
Amar
> It seems, that JobClient creates non-daemon threads on submitJob() 
> invocation.
>
>
> So, is there the way to submit job and exit immediately?
>
>   


Mime
View raw message