hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Some Body" <someb...@squareplanet.de>
Subject how to query JobTracker
Date Thu, 17 Jun 2010 12:53:51 GMT
Hi All,

What are the steps to query the cluster for running jobs with a particular JobName?
My driver class always submits my job with a preset name.
    Job job = new Job(config, "My Job Name");
    ......
    return job.waitForCompletion(true) ? 0 : 1;

I want to setup a cron to trigger the job submission and I want to ensure only 1 instance
of my job is running.
Surely I could do this via a shell wrapper, but I'd rather implement it in my driver class.

i.e. getAllJobs from the JobTracker, check for "My Job Name", and kill the old job before
submitting a new job.

I'm using (cloudera's) hadoop 0.20.2+228

Thanks,
Alan

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message