String... commands) throws
IOException,
SliderException {
env.put(ACCUMULO_LOG_DIR, ApplicationConstants.LOG_DIR_EXPANSION_VAR);
String hadoop_home = System.getenv(HADOOP_HOME);
MapOperations globalOptions =
instance.getAppConfOperations().getGlobalOptions();
hadoop_home = globalOptions.getOption(OPTION_HADOOP_HOME, hadoop_home);
if (hadoop_home == null) {
throw new BadConfigException(
"Undefined env variable/config option: " + HADOOP_HOME);
}
ProviderUtils.validatePathReferencesLocalDir("HADOOP_HOME", hadoop_home);
env.put(HADOOP_HOME, hadoop_home);
env.put(HADOOP_PREFIX, hadoop_home);
//buildup accumulo home env variable to be absolute or relative
String accumulo_home = providerUtils.buildPathToHomeDir(instance,
"bin", "accumulo");
File image = new File(accumulo_home);
String accumuloPath = image.getAbsolutePath();
env.put(ACCUMULO_HOME, accumuloPath);
ProviderUtils.validatePathReferencesLocalDir("ACCUMULO_HOME", accumuloPath);
env.put(ACCUMULO_CONF_DIR, confDir.getAbsolutePath());
String zkHome = globalOptions.getMandatoryOption(OPTION_ZK_HOME);
ProviderUtils.validatePathReferencesLocalDir("ZOOKEEPER_HOME", zkHome);
env.put(ZOOKEEPER_HOME, zkHome);