public static ReduceWork getReduceWork(Configuration conf) {
return (ReduceWork) getBaseWork(conf, REDUCE_PLAN_NAME);
}
public static BaseWork getBaseWork(Configuration conf, String name) {
BaseWork gWork = null;
Path path = null;
try {
path = getPlanPath(conf, name);
assert path != null;
gWork = gWorkMap.get(path);
if (gWork == null) {
Path localPath;
if (ShimLoader.getHadoopShims().isLocalMode(conf)) {
localPath = path;
} else {
localPath = new Path(name);
}
InputStream in = new FileInputStream(localPath.toUri().getPath());
BaseWork ret = deserializePlan(in);
gWork = ret;
gWorkMap.put(path, gWork);
}
return gWork;
} catch (FileNotFoundException fnf) {