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) {
        // Convert checked exception ExecutorException to an unchecked exception as
        // we have failed to create even the default executor thus not recoverable
        throw new CliException(e);
      }
    }

    finishInitialization(shellEnvHandler);
    finishInitialization(executorEnvHandler);
  }
Gives CliEnvironment a chance to apply settings, especially during initialization, things like
making default values take effect
samza-sql-shell/src/main/java/org/apache/samza/sql/client/cli/CliEnvironment.java