code: public static void addToEnvironment(Map<String, String> environment,
  			String variable, String value) {
  		String val = environment.get(variable);
  		if (val == null) {
  			val = value;
  		} else {
  			val = val + File.pathSeparator + value;
  		}
  		environment.put(StringInterner.weakIntern(variable),
  				StringInterner.weakIntern(val));
  	}
docs: Copied method from org.apache.hadoop.yarn.util.Apps.
  It was broken by YARN-1824 (2.4.0) and fixed for 2.4.1
  by https://issues.apache.org/jira/browse/YARN-1931