Hi Michael,
Thanks for the reply. I've tried to write some code to do this now but its not working. I was wondering if there's anything obviously wrong? After my runJob() I put (just as a test):

JobClient aJC = new JobClient();
String jobid = jobConf.get("mapred.job.id");
aJC.setConf(jobConf); //I've tried with and without this line
TaskReport [] treps = aJC.getMapTaskReports(jobid);
for(TaskReport trep : treps) {
   System.out.println(trep.getState());
}

However, when I run it, I get a NullPointerException on the aJC.getMapTasksReports() line. I know its getting the correct jobid.

I've also tried similar code in my Map function for killing the class, but I get a NullPointerException when I try and do:
RunningJob rj  = aJC.getJob(jobid);

I'm thinking the new JobClient class needs to be connected to the JobTracker in some way? If so, could someone explain how this is done? Or am I way off?

Thanks,
Ollie

Quoting Michael Bieniosek <[EMAIL PROTECTED]>:


On 8/2/07 5:20 AM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:

I've found the
getMapTaskReports method in the JobClient class, but can't work out
how to access it other than by creating a new instance of JobClient -
but then that JobClient would be a differnt one to the one that was
running my job, so would access a different set of TaskReports?

That doesn't matter -- jobs are bound to jobtrackers, not to jobclients.
You can create a new JobClient and access all the jobs that the jobtracker
knows about.

-Michael





Reply via email to