public class PropertiesUtil extends Object
Modifier and Type | Method and Description |
---|---|
static org.apache.hadoop.conf.Configuration |
cloneConfig(org.apache.hadoop.conf.Configuration toCopy)
Utility to work around the limitation of the copy constructor
Configuration.Configuration(Configuration) provided by the Configuration
class. |
static Properties |
combineProperties(Properties props,
org.apache.hadoop.conf.Configuration conf)
Add properties from the given Configuration to the provided Properties.
|
static Properties |
deepCopy(Properties properties)
Use this to deep copy properties.
|
public static Properties deepCopy(Properties properties)
Properties
does not do a deep copy.properties
- public static Properties combineProperties(Properties props, org.apache.hadoop.conf.Configuration conf)
public static org.apache.hadoop.conf.Configuration cloneConfig(org.apache.hadoop.conf.Configuration toCopy)
Configuration.Configuration(Configuration)
provided by the Configuration
class. See https://issues.apache.org/jira/browse/HBASE-18378.
The copy constructor doesn't copy all the config settings, so we need to resort to
iterating through all the settings and setting it on the cloned config.toCopy
- configuration to copyCopyright © 2017 Apache Software Foundation. All Rights Reserved.