@Override
  public void replaceRoots(Map<Operator<?>, Operator<?>> replacementMap) {
    LinkedHashMap<String, Operator<?>> newAliasToWork = new LinkedHashMap<String, Operator<?>>();

    for (Map.Entry<String, Operator<?>> entry: aliasToWork.entrySet()) {
      newAliasToWork.put(entry.getKey(), replacementMap.get(entry.getValue()));
    }

    setAliasToWork(newAliasToWork);
  }
For each map side operator - stores the alias the operator is working on
behalf of in the operator runtime state. This is used by reduce sink
operator - but could be useful for debugging as well.
ql/src/java/org/apache/hadoop/hive/ql/plan/MapWork.java