/** * Run a single task. * * @param args the first argument is the task directory */ public static void main(String[] args) throws ClassNotFoundException, IOException, InterruptedException { if (!new IsolationRunner().run(args)) { System.exit(1); } } }
ClassLoader classLoader = makeClassLoader(conf, workDirName); Thread.currentThread().setContextClassLoader(classLoader); conf.setClassLoader(classLoader); } else { int numMaps = conf.getNumMapTasks(); fillInMissingMapOutputs(local, taskId, numMaps, conf); task = new ReduceTask(jobFilename.toString(), taskId, partition, numMaps, 1, conf.getUser());
makeClassLoader(conf, new File(workDirName.toString())); Thread.currentThread().setContextClassLoader(classLoader); conf.setClassLoader(classLoader);
ClassLoader classLoader = makeClassLoader(conf, workDirName); Thread.currentThread().setContextClassLoader(classLoader); conf.setClassLoader(classLoader); } else { int numMaps = conf.getNumMapTasks(); fillInMissingMapOutputs(local, taskId, numMaps, conf); task = new ReduceTask(jobFilename.toString(), taskId, partition, numMaps);
assertTrue(localFs.exists(mapJobXml)); new IsolationRunner().run(new String[] { new File(mapJobXml.toUri()).getCanonicalPath() });