public class JobConfigurationUtils extends Object
| Constructor and Description |
|---|
JobConfigurationUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Properties |
combineSysAndJobProperties(Properties sysProps,
Properties jobProps)
Get a new
Properties instance by combining a given system configuration Properties
object (first) and a job configuration Properties object (second). |
static Properties |
fileToProperties(String fileName)
Load the properties from the specified file into a
Properties object. |
static Properties |
fileToProperties(String fileName,
org.apache.hadoop.conf.Configuration conf)
Load the properties from the specified file into a
Properties object. |
static void |
putConfigurationIntoProperties(org.apache.hadoop.conf.Configuration configuration,
Properties properties)
Put all configuration properties in a given
Configuration object into a given
Properties object. |
static void |
putPropertiesIntoConfiguration(Properties properties,
org.apache.hadoop.conf.Configuration configuration)
Put all configuration properties in a given
Properties object into a given
Configuration object. |
static void |
putStateIntoConfiguration(State state,
org.apache.hadoop.conf.Configuration configuration)
Put all configuration properties in a given
State object into a given
Configuration object. |
public static Properties combineSysAndJobProperties(Properties sysProps, Properties jobProps)
Properties instance by combining a given system configuration Properties
object (first) and a job configuration Properties object (second).sysProps - the given system configuration Properties objectjobProps - the given job configuration Properties objectProperties instancepublic static void putPropertiesIntoConfiguration(Properties properties, org.apache.hadoop.conf.Configuration configuration)
Properties object into a given
Configuration object.properties - the given Properties objectconfiguration - the given Configuration objectpublic static void putConfigurationIntoProperties(org.apache.hadoop.conf.Configuration configuration,
Properties properties)
Configuration object into a given
Properties object.configuration - the given Configuration objectproperties - the given Properties objectpublic static void putStateIntoConfiguration(State state, org.apache.hadoop.conf.Configuration configuration)
State object into a given
Configuration object.state - the given State objectconfiguration - the given Configuration objectpublic static Properties fileToProperties(String fileName, org.apache.hadoop.conf.Configuration conf) throws IOException, org.apache.commons.configuration.ConfigurationException
Properties object.fileName - the name of the file to load properties fromconf - configuration object to determine the file system to be usedProperties instanceIOExceptionorg.apache.commons.configuration.ConfigurationExceptionpublic static Properties fileToProperties(String fileName) throws IOException, org.apache.commons.configuration.ConfigurationException
Properties object.fileName - the name of the file to load properties fromProperties instanceIOExceptionorg.apache.commons.configuration.ConfigurationException