code: private AllocatorPerContext obtainContext(String contextCfgItemName) {
      synchronized (contexts) {
        AllocatorPerContext l = contexts.get(contextCfgItemName);
        if (l == null) {
          contexts.put(contextCfgItemName, 
                      (l = new AllocatorPerContext(contextCfgItemName)));
        }
        return l;
      }
    }
docs: This method must be used to obtain the dir allocation context for a
  particular value of the context name. The context name must be an item
  defined in the Configuration object for which we want to control the
  dir allocations (e.g., <code>mapred.local.dir</code>). The method will
  create a context for that name if it doesn't already exist.