Beispiel #1
0
 private void checkSpecs(Job job)
     throws ClassNotFoundException, InterruptedException, IOException {
   JobConf jConf = (JobConf) job.getConfiguration();
   // Check the output specification
   //// default reduce num is 1 if do not set mapreduce.job.reduces.
   //// if not set mapred.mapper.new-api, will use oldMapper API
   if (jConf.getNumReduceTasks() == 0 ? jConf.getUseNewMapper() : jConf.getUseNewReducer()) {
     org.apache.hadoop.mapreduce.OutputFormat<?, ?> output =
         ReflectionUtils.newInstance(job.getOutputFormatClass(), job.getConfiguration());
     output.checkOutputSpecs(job);
   } else {
     jConf.getOutputFormat().checkOutputSpecs(jtFs, jConf);
   }
 }