JobConfig extends MapConfig { public Optional<String> getLoggedStorePath() { return Optional.ofNullable(get(JOB_LOGGED_STORE_BASE_DIR)); } JobConfig(Config config); Optional<String> getName(); String getCoordinatorSystemName(); String getCoordinatorSystemNameOrNull(); Optional<String> getDefaultSystem(); int getContainerCount(); int getMonitorRegexFrequency(); boolean getMonitorRegexDisabled(); int getMonitorPartitionChangeFrequency(); Map<String, Pattern> getMonitorRegexPatternMap(String rewritersList); Optional<String> getRegexResolvedStreams(String rewriterName); Optional<String> getRegexResolvedSystem(String rewriterName); Config getRegexResolvedInheritedConfig(String rewriterName); Optional<String> getStreamJobFactoryClass(); String getJobId(); boolean failOnCheckpointValidation(); Optional<String> getConfigRewriters(); Optional<String> getConfigRewriterClass(String name); boolean isSSPGrouperProxyEnabled(); String getSystemStreamPartitionGrouperFactory(); String getLocationIdProviderFactory(); Optional<String> getSecurityManagerFactory(); Optional<String> getSSPMatcherClass(); String getSSPMatcherConfigRegex(); String getSSPMatcherConfigRanges(); String getSSPMatcherConfigJobFactoryRegex(); int getThreadPoolSize(); int getDebounceTimeMs(); Optional<String> getNonLoggedStorePath(); Optional<String> getLoggedStorePath(); String getMetadataStoreFactory(); boolean getDiagnosticsEnabled(); boolean getAutosizingEnabled(); static boolean isAutosizingConfig(String configParam); boolean getJMXEnabled(); String getSystemStreamPartitionMapperFactoryName(); int getStandbyTaskReplicationFactor(); boolean getStandbyTasksEnabled(); boolean isSplitDeploymentEnabled(); static Optional<File> getMetadataFile(String execEnvContainerId); String getCoordinatorStreamFactory(); Optional<String> getConfigLoaderFactory(); boolean getStartpointEnabled(); static final String STREAM_JOB_FACTORY_CLASS; static final String CONFIG_REWRITERS; static final String CONFIG_REWRITER_CLASS; static final String CONFIG_LOADER_FACTORY; static final String JOB_NAME; static final String JOB_ID; static final String JOB_COORDINATOR_SYSTEM; static final String JOB_DEFAULT_SYSTEM; static final String JOB_JMX_ENABLED; static final String JOB_CONTAINER_COUNT; static final String JOB_CONTAINER_THREAD_POOL_SIZE; static final String JOB_INTERMEDIATE_STREAM_PARTITIONS; static final String JOB_DEBOUNCE_TIME_MS; static final String SSP_INPUT_EXPANSION_ENABLED; static final boolean DEFAULT_INPUT_EXPANSION_ENABLED; static final String SSP_GROUPER_FACTORY; static final String SSP_MATCHER_CLASS; static final String SSP_MATCHER_CLASS_REGEX; static final String SSP_MATCHER_CLASS_RANGE; static final String SSP_MATCHER_CONFIG_REGEX; static final String SSP_MATCHER_CONFIG_RANGES; static final String SSP_MATCHER_CONFIG_JOB_FACTORY_REGEX; static final String SYSTEM_STREAM_PARTITION_MAPPER_FACTORY; static final String JOB_FAIL_CHECKPOINT_VALIDATION; static final String MONITOR_PARTITION_CHANGE; static final String MONITOR_PARTITION_CHANGE_FREQUENCY_MS; static final String MONITOR_INPUT_REGEX_FREQUENCY_MS; static final String REGEX_RESOLVED_STREAMS; static final String REGEX_RESOLVED_SYSTEM; static final String REGEX_INHERITED_CONFIG; static final String JOB_SECURITY_MANAGER_FACTORY; static final String METADATA_STORE_FACTORY; static final String STARTPOINT_METADATA_STORE_FACTORY; static final String LOCATION_ID_PROVIDER_FACTORY; static final String PROCESSOR_ID; static final String PROCESSOR_LIST; static final String JOB_NON_LOGGED_STORE_BASE_DIR; static final String JOB_LOGGED_STORE_BASE_DIR; static final String JOB_DIAGNOSTICS_ENABLED; static final String STANDBY_TASKS_REPLICATION_FACTOR; static final String CONTAINER_METADATA_FILENAME_FORMAT; static final String CONTAINER_METADATA_DIRECTORY_SYS_PROPERTY; static final String JOB_AUTOSIZING_ENABLED; static final String JOB_AUTOSIZING_CONTAINER_COUNT; static final String JOB_AUTOSIZING_CONTAINER_THREAD_POOL_SIZE; static final String JOB_AUTOSIZING_CONTAINER_MAX_HEAP_MB; static final String JOB_AUTOSIZING_CONTAINER_MEMORY_MB; static final String JOB_AUTOSIZING_CONTAINER_MAX_CORES; static final String COORDINATOR_STREAM_FACTORY; static final String DEFAULT_COORDINATOR_STREAM_CONFIG_FACTORY; static final String JOB_SPLIT_DEPLOYMENT_ENABLED; }
@Test public void testGetLoggedStorePath() { String loggedStorePath = "/path/to/logged/store"; JobConfig jobConfig = new JobConfig(new MapConfig(ImmutableMap.of(JobConfig.JOB_LOGGED_STORE_BASE_DIR, loggedStorePath))); assertEquals(Optional.of(loggedStorePath), jobConfig.getLoggedStorePath()); jobConfig = new JobConfig(new MapConfig()); assertEquals(Optional.empty(), jobConfig.getLoggedStorePath()); }