You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-user@hadoop.apache.org by Aaron Baff <Aa...@telescope.tv> on 2011/05/03 21:19:42 UTC

NPE during RunningJob.getCounters()

Cross post from common-users.

I'm using v0.21.0, with the Old API, and I have a daemon that runs and monitors MR Jobs, allows us to fetch data from the JobTracker about the MR Job's, etc. We're using Thrift as the API (so we can do PHP->Java). We're having an issue where some requests for MR Job Counters throws a NullPointerException. I do have JobClient.getJob(JobID) in order to get the RunningJob object, and I'm checking to make sure that is not NULL, which means as far as I can tell that the connection between the JobClient and the JobTracker must still be valid. Yet I still get the NPE from the getCounters(). Stack trace is below. Anyone have any ideas what's happening? Is the JobClient not meant to be persistent and I should create a new one every single time?

--Aaron

java.lang.NullPointerException
            at org.apache.hadoop.mapred.Counters.downgrade(Counters.java:77)
            at org.apache.hadoop.mapred.JobClient$NetworkedJob.getCounters(JobClient.java:381)
            at com.telescope.HadoopThrift.service.ServiceImpl.getReportResults(ServiceImpl.java:350)
            at com.telescope.HadoopThrift.gen.HadoopThrift$Processor$getReportResults.process(HadoopThrift.java:545)
            at com.telescope.HadoopThrift.gen.HadoopThrift$Processor.process(HadoopThrift.java:421)
            at org.apache.thrift.server.TNonblockingServer$FrameBuffer.invoke(TNonblockingServer.java:697)
            at org.apache.thrift.server.THsHaServer$Invocation.run(THsHaServer.java:317)
            at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
            at java.lang.Thread.run(Thread.java:619)