public class ConfigurationUtils extends Object
Configuration
related helper functions.public static MemorySize getJobManagerHeapMemory(Configuration configuration)
JobManagerOptions.JOB_MANAGER_HEAP_MEMORY
and
the old key JobManagerOptions.JOB_MANAGER_HEAP_MEMORY_MB
for backwards compatibility.configuration
- the configuration objectpublic static Optional<Time> getSystemResourceMetricsProbingInterval(Configuration configuration)
MetricOptions.SYSTEM_RESOURCE_METRICS_PROBING_INTERVAL
or Optional.empty()
if
MetricOptions.SYSTEM_RESOURCE_METRICS
are disabled.@Nonnull public static String[] parseTempDirectories(Configuration configuration)
CoreOptions.TMP_DIRS
.configuration
- configuration object@Nonnull public static String[] parseLocalStateDirectories(Configuration configuration)
CheckpointingOptions.LOCAL_RECOVERY_TASK_MANAGER_STATE_ROOT_DIRS
.configuration
- configuration objectpublic static Map<String,String> parseMap(String stringSerializedMap)
key1:value1,key2:value2
Parts of the string can be escaped by wrapping with single or double quotes.
stringSerializedMap
- a string to parsepublic static Time getStandaloneClusterStartupPeriodTime(Configuration configuration)
@Nonnull public static Configuration createConfiguration(Properties properties)
Configuration
from the given Properties
.properties
- to convert into a Configuration
Configuration
which has been populated by the values of the given Properties
@Nonnull public static Map<String,String> hideSensitiveValues(Map<String,String> keyValuePairs)
GlobalConfiguration.isSensitive(String)
with GlobalConfiguration.HIDDEN_CONTENT
.
This can be useful when displaying configuration values.
keyValuePairs
- for which to hide sensitive values@VisibleForTesting public static Map<String,String> parseTmResourceDynamicConfigs(String dynamicConfigsStr)
@VisibleForTesting public static Map<String,String> parseTmResourceJvmParams(String jvmParamsStr)
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.