private static Map<String, String> configureEnv(Configuration conf) throws IOException { Map<String, String> environment = new HashMap<String, String>(); MRApps.addToEnvironment(environment, Environment.CLASSPATH.name(), getInitialClasspath(conf), conf); if (initialAppClasspath != null) { MRApps.addToEnvironment(environment, Environment.APP_CLASSPATH.name(), initialAppClasspath, conf); } // Shell environment.put(Environment.SHELL.name(), conf .get(MRJobConfig.MAPRED_ADMIN_USER_SHELL, MRJobConfig.DEFAULT_SHELL)); // Add pwd to LD_LIBRARY_PATH, add this before adding anything else MRApps.addToEnvironment(environment, Environment.LD_LIBRARY_PATH.name(), MRApps.crossPlatformifyMREnv(conf, Environment.PWD), conf); // Add the env variables passed by the admin MRApps.setEnvFromInputProperty(environment, MRJobConfig.MAPRED_ADMIN_USER_ENV, MRJobConfig.DEFAULT_MAPRED_ADMIN_USER_ENV, conf); return environment; }
environment, Environment.CLASSPATH.name(), getInitialClasspath(conf), conf);
environment, Environment.CLASSPATH.name(), getInitialClasspath(conf), conf);