|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.data.hadoop.configuration.ConfigurationUtils
public abstract class ConfigurationUtils
Reusable utility class for common Configuration
operations.
Constructor Summary | |
---|---|
ConfigurationUtils()
|
Method Summary | |
---|---|
static void |
addArchives(Configuration configuration,
Resource... archives)
|
static void |
addFiles(Configuration configuration,
Resource... files)
|
static void |
addLibs(Configuration configuration,
Resource... libs)
|
static void |
addProperties(Configuration configuration,
Properties properties)
Adds the specified properties to the given Configuration object. |
static Properties |
asProperties(Configuration configuration)
Returns a static Properties copy of the given configuration. |
static Configuration |
createFrom(Configuration original,
Properties properties)
Creates a new Configuration based on the given arguments. |
static JobConf |
createFrom(JobConf original,
Properties properties)
Creates a new JobConf based on the given arguments. |
static Configuration |
merge(Configuration one,
Configuration two)
Creates a new Configuration by merging the given configurations. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConfigurationUtils()
Method Detail |
---|
public static void addProperties(Configuration configuration, Properties properties)
Configuration
object.
configuration
- configuration to manipulate. Should not be null.properties
- properties to add to the configuration. May be null.public static Configuration createFrom(Configuration original, Properties properties)
Configuration
based on the given arguments.
original
- initial configuration to read from. May be null.properties
- properties object to add to the newly created configuration. May be null.
public static JobConf createFrom(JobConf original, Properties properties)
JobConf
based on the given arguments. Identical to
createFrom(Configuration, Properties)
but forces the use of
JobConf
.
original
- initial configuration to read from. May be null.properties
- properties object to add to the newly created configuration. May be null.
public static Properties asProperties(Configuration configuration)
Properties
copy of the given configuration.
configuration
- Hadoop configurationpublic static Configuration merge(Configuration one, Configuration two)
Configuration
by merging the given configurations.
Ordering is important - the second configuration overriding values in the first.
one
- configuration to read from. May be null.two
- configuration to read from. May be null.
public static void addLibs(Configuration configuration, Resource... libs)
public static void addFiles(Configuration configuration, Resource... files)
public static void addArchives(Configuration configuration, Resource... archives)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |