ShellCommandConfig extends MapConfig { public String getCommand() { return Optional.ofNullable(get(ShellCommandConfig.COMMAND_SHELL_EXECUTE)).orElse("bin/run-container.sh"); } ShellCommandConfig(Config config); String getCommand(); Optional<String> getTaskOpts(); Optional<String> getJavaHome(); Optional<String> getAdditionalClasspathDir(); static final String ENV_COORDINATOR_SYSTEM_CONFIG; static final String ENV_SUBMISSION_CONFIG; static final String ENV_CONTAINER_ID; static final String ENV_COORDINATOR_URL; static final String ENV_JAVA_OPTS; static final String ENV_JAVA_HOME; static final String ENV_EXECUTION_ENV_CONTAINER_ID; static final String ENV_SPLIT_DEPLOYMENT_ENABLED; static final String ENV_APPLICATION_LIB_DIR; static final String ENV_LOGGED_STORE_BASE_DIR; static final String EXECUTION_PLAN_DIR; static final String ENV_ADDITIONAL_CLASSPATH_DIR; static final String COMMAND_SHELL_EXECUTE; static final String TASK_JVM_OPTS; static final String TASK_JAVA_HOME; static final String ADDITIONAL_CLASSPATH_DIR; }
@Test public void testGetCommand() { ShellCommandConfig shellCommandConfig = new ShellCommandConfig(new MapConfig()); assertEquals("bin/run-container.sh", shellCommandConfig.getCommand()); shellCommandConfig = new ShellCommandConfig( new MapConfig(ImmutableMap.of(ShellCommandConfig.COMMAND_SHELL_EXECUTE, "my-run-container.sh"))); assertEquals("my-run-container.sh", shellCommandConfig.getCommand()); }