use of org.apache.samza.sql.client.exceptions.CliException in project samza by apache.
the class CliEnvironment method finishInitialization.
/**
* Gives CliEnvironment a chance to apply settings, especially during initialization, things like
* making default values take effect
*/
public void finishInitialization() throws CliException {
if (executor == null) {
try {
createShellExecutor(CliConstants.DEFAULT_EXECUTOR_CLASS);
activeExecutorClassName = CliConstants.DEFAULT_EXECUTOR_CLASS;
executorEnvHandler = executor.getEnvironmentVariableHandler();
if (delayedExecutorVars != null) {
for (Map.Entry<String, String> entry : delayedExecutorVars.entrySet()) {
setEnvironmentVariable(entry.getKey(), entry.getValue());
}
delayedExecutorVars = null;
}
} catch (ExecutorException | CommandHandlerException e) {
// we have failed to create even the default executor thus not recoverable
throw new CliException(e);
}
}
finishInitialization(shellEnvHandler);
finishInitialization(executorEnvHandler);
}
Aggregations