public class PullFileLoader extends Object
| Modifier and Type | Field and Description |
|---|---|
static Set<String> |
DEFAULT_HOCON_PULL_FILE_EXTENSIONS |
static Set<String> |
DEFAULT_JAVA_PROPS_PULL_FILE_EXTENSIONS |
static boolean |
DEFAULT_PROPERTY_DELIMITER_PARSING_ENABLED_KEY |
static String |
GLOBAL_HOCON_EXTENSION |
static org.apache.hadoop.fs.PathFilter |
GLOBAL_HOCON_PATH_FILTER |
static org.apache.hadoop.fs.PathFilter |
GLOBAL_PATH_FILTER |
static String |
GLOBAL_PROPS_EXTENSION |
static org.apache.hadoop.fs.PathFilter |
GLOBAL_PROPS_PATH_FILTER |
static String |
PROPERTY_DELIMITER_PARSING_ENABLED_KEY |
| Constructor and Description |
|---|
PullFileLoader(org.apache.hadoop.fs.Path rootDirectory,
org.apache.hadoop.fs.FileSystem fs,
Collection<String> javaPropsPullFileExtensions,
Collection<String> hoconPullFileExtensions) |
| Modifier and Type | Method and Description |
|---|---|
List<org.apache.hadoop.fs.Path> |
fetchJobFilesRecursively(org.apache.hadoop.fs.Path path) |
com.typesafe.config.Config |
loadPullFile(org.apache.hadoop.fs.Path path,
com.typesafe.config.Config sysProps,
boolean loadGlobalProperties) |
com.typesafe.config.Config |
loadPullFile(org.apache.hadoop.fs.Path path,
com.typesafe.config.Config sysProps,
boolean loadGlobalProperties,
boolean resolve)
Load a single pull file.
|
List<com.typesafe.config.Config> |
loadPullFilesRecursively(org.apache.hadoop.fs.Path path,
com.typesafe.config.Config sysProps,
boolean loadGlobalProperties)
Find and load all pull files under a base
Path recursively in an order sorted by last modified date. |
public static final String GLOBAL_PROPS_EXTENSION
public static final org.apache.hadoop.fs.PathFilter GLOBAL_PROPS_PATH_FILTER
public static final String GLOBAL_HOCON_EXTENSION
public static final org.apache.hadoop.fs.PathFilter GLOBAL_HOCON_PATH_FILTER
public static final org.apache.hadoop.fs.PathFilter GLOBAL_PATH_FILTER
public static final Set<String> DEFAULT_JAVA_PROPS_PULL_FILE_EXTENSIONS
public static final Set<String> DEFAULT_HOCON_PULL_FILE_EXTENSIONS
public static final String PROPERTY_DELIMITER_PARSING_ENABLED_KEY
public static final boolean DEFAULT_PROPERTY_DELIMITER_PARSING_ENABLED_KEY
public PullFileLoader(org.apache.hadoop.fs.Path rootDirectory,
org.apache.hadoop.fs.FileSystem fs,
Collection<String> javaPropsPullFileExtensions,
Collection<String> hoconPullFileExtensions)
public com.typesafe.config.Config loadPullFile(org.apache.hadoop.fs.Path path,
com.typesafe.config.Config sysProps,
boolean loadGlobalProperties,
boolean resolve)
throws IOException
path - The Path to the pull file to load, full pathsysProps - A Config used as fallback.loadGlobalProperties - if true, will also load at most one *.properties file per directory from the
rootDirectory to the pull file Path.resolve - if true, call Config.resolve() on the config after loading itConfig.IOExceptionpublic com.typesafe.config.Config loadPullFile(org.apache.hadoop.fs.Path path,
com.typesafe.config.Config sysProps,
boolean loadGlobalProperties)
throws IOException
IOExceptionpublic List<com.typesafe.config.Config> loadPullFilesRecursively(org.apache.hadoop.fs.Path path, com.typesafe.config.Config sysProps, boolean loadGlobalProperties)
Path recursively in an order sorted by last modified date.path - base Path where pull files should be found recursively.sysProps - A Config used as fallback.loadGlobalProperties - if true, will also load at most one *.properties file per directory from the
rootDirectory to the pull file Path for each pull file.Configs. Files that fail to parse successfully will be logged,
but will not result in a Config objectpublic List<org.apache.hadoop.fs.Path> fetchJobFilesRecursively(org.apache.hadoop.fs.Path path)