public class ConfigUtils extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
ConfigUtils.ConfigContext
Interface that provides context-specific config helper functions, factored out to support
unit testing.
|
Constructor and Description |
---|
ConfigUtils() |
Modifier and Type | Method and Description |
---|---|
static Optional<String> |
getGcsRootUrl(org.apache.hadoop.conf.Configuration hadoopConfig) |
static org.apache.hadoop.conf.Configuration |
getHadoopConfiguration(Configuration flinkConfig,
ConfigUtils.ConfigContext configContext)
Loads the Hadoop configuration, by loading from a Hadoop conf dir (if one exists) and then
overlaying properties derived from the Flink config.
|
static Optional<com.google.auth.oauth2.GoogleCredentials> |
getStorageCredentials(org.apache.hadoop.conf.Configuration hadoopConfig,
ConfigUtils.ConfigContext configContext)
Creates an (optional) GoogleCredentials instance for the given Hadoop config and environment.
|
static String |
stringifyHadoopConfig(org.apache.hadoop.conf.Configuration hadoopConfig)
Helper to serialize a Hadoop config to a string, for logging.
|
public static org.apache.hadoop.conf.Configuration getHadoopConfiguration(Configuration flinkConfig, ConfigUtils.ConfigContext configContext)
flinkConfig
- The Flink configconfigContext
- The config context.public static Optional<com.google.auth.oauth2.GoogleCredentials> getStorageCredentials(org.apache.hadoop.conf.Configuration hadoopConfig, ConfigUtils.ConfigContext configContext)
hadoopConfig
- The Hadoop config.configContext
- The config context.public static Optional<String> getGcsRootUrl(org.apache.hadoop.conf.Configuration hadoopConfig)
public static String stringifyHadoopConfig(org.apache.hadoop.conf.Configuration hadoopConfig) throws RuntimeException
hadoopConfig
- The Hadoop config.RuntimeException
- On underlying IO failureCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.