@Override
protected Map<String, Map<String, String>> performBuild() throws Exception {
Map<String, Map<String, String>> envs = new HashMap<String, Map<String,String>>();
for (Entry<String, DataHolder> entry : datas.entrySet()) {
String id = entry.getKey();
EnvironmentFactoryBean fb = new EnvironmentFactoryBean();
fb.setConfiguration(configuration);
fb.setProperties(getDataHolder(id).properties);
fb.setClasspath(StringUtils.collectionToDelimitedString(getDataHolder(id).classpathEntries, getDataHolder(id).delimiter));
fb.setDelimiter(getDataHolder(id).delimiter);
fb.setDefaultYarnAppClasspath(getDataHolder(id).defaultYarnAppClasspath);
fb.setDefaultMapreduceAppClasspath(getDataHolder(id).defaultMapreduceAppClasspath);
fb.setUseDefaultYarnClasspath(getDataHolder(id).useDefaultYarnClasspath);
fb.setUseDefaultMapreduceClasspath(getDataHolder(id).useDefaultMapreduceClasspath);
fb.setIncludeLocalSystemEnv(getDataHolder(id).includeLocalSystemEnv);
fb.setIncludeBaseDirectory(getDataHolder(id).includeBaseDirectory);
fb.afterPropertiesSet();
envs.put(id, fb.getObject());
}
return envs;
}