public static void setMapRedWork(Configuration conf, MapredWork w, Path hiveScratchDir) {
    String useName = conf.get(INPUT_NAME);
    if (useName == null) {
      useName = "mapreduce:" + hiveScratchDir;
    }
    conf.set(INPUT_NAME, useName);
    setMapWork(conf, w.getMapWork(), hiveScratchDir, true);
    if (w.getReduceWork() != null) {
      conf.set(INPUT_NAME, useName);
      setReduceWork(conf, w.getReduceWork(), hiveScratchDir, true);
    }
  }
Returns the Map or Reduce plan
Side effect: the BaseWork returned is also placed in the gWorkMap
@param conf
@param name
@return BaseWork based on the name supplied will return null if name is null
@throws RuntimeException if the configuration files are not proper or if plan can not be loaded
ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java