public static JobContext newJobContext(Configuration conf, JobID jobId) {
    try {
      return (JobContext)
          JOB_CONTEXT_CONSTRUCTOR.newInstance(conf, jobId);
    } catch (InstantiationException e) {
      throw new IllegalArgumentException("Can't instantiate JobContext", e);
    } catch (IllegalAccessException e) {
      throw new IllegalArgumentException("Can't instantiate JobContext", e);
    } catch (InvocationTargetException e) {
      throw new IllegalArgumentException("Can't instantiate JobContext", e);
    }
  }
public static JobContext newJobContext(Configuration conf, JobID jobId) {
    try {
      return (JobContext)
          JOB_CONTEXT_CONSTRUCTOR.newInstance(conf, jobId);
    } catch (InstantiationException e) {
      throw new IllegalArgumentException("Can't instantiate JobContext", e);
    } catch (IllegalAccessException e) {
      throw new IllegalArgumentException("Can't instantiate JobContext", e);
    } catch (InvocationTargetException e) {
      throw new IllegalArgumentException("Can't instantiate JobContext", e);
    }
  }
public static JobContext newJobContext ( Configuration conf , JobID jobId ) { try { return ( JobContext ) JOB_CONTEXT_CONSTRUCTOR . newInstance ( conf , jobId ) ; } catch ( InstantiationException e ) { throw new IllegalArgumentException ( "Can't instantiate JobContext" , e ) ; } catch ( IllegalAccessException e ) { throw new IllegalArgumentException ( "Can't instantiate JobContext" , e ) ; } catch ( InvocationTargetException e ) { throw new IllegalArgumentException ( "Can't instantiate JobContext" , e ) ; } }
Creates JobContext from a JobConf and jobId using the correct constructor
for based on Hadoop version. <code>jobId</code> could be null.

@param conf a configuration
@param jobId a job id
@return a job context
Creates JobContext from a JobConf and jobId using the correct constructor for based on Hadoop version . <code > jobId< / code > could be null .