I am tryng to execute a MapReduce job and I want to periodically poll its status. I am trying to use the submitJob(jobConf) method of Jobclient class in the code as follows
 JobConf conf = new JobConf(SampleJobClass.class)   
 JobClient j= new JobClient();
 j.setConf(conf);
 System.out.println("from conf" +j.getConf().toString());
 RunningJob submitJob=j.submitJob(conf);`
I keep getting a null pointer error at the line j.submitJob(conf) The error stack is :
Exception in thread "main" java.lang.NullPointerException
    at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:844)
    at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:818)
Can someone tell me how to solve this error?