Package org.apache.hadoop.hbase.util
Class ConfigurationUtil
java.lang.Object
org.apache.hadoop.hbase.util.ConfigurationUtil
Utilities for storing more complex collection types in
Configuration
instances.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetKeyValues
(org.apache.hadoop.conf.Configuration conf, String key) Retrieve a list of key value pairs from configuration, stored under the provided keygetKeyValues
(org.apache.hadoop.conf.Configuration conf, String key, char delimiter) Retrieve a list of key value pairs from configuration, stored under the provided keystatic void
setKeyValues
(org.apache.hadoop.conf.Configuration conf, String key, Collection<Map.Entry<String, String>> keyValues) Store a collection of Map.Entry's in conf, with each entry separated by ',' and key values delimited byKVP_DELIMITER
static void
setKeyValues
(org.apache.hadoop.conf.Configuration conf, String key, Collection<Map.Entry<String, String>> keyValues, char delimiter) Store a collection of Map.Entry's in conf, with each entry separated by ',' and key values delimited by delimiter.
-
Field Details
-
KVP_DELIMITER
- See Also:
-
-
Constructor Details
-
ConfigurationUtil
private ConfigurationUtil()
-
-
Method Details
-
setKeyValues
public static void setKeyValues(org.apache.hadoop.conf.Configuration conf, String key, Collection<Map.Entry<String, String>> keyValues) Store a collection of Map.Entry's in conf, with each entry separated by ',' and key values delimited byKVP_DELIMITER
- Parameters:
conf
- configuration to store the collection inkey
- overall key to store keyValues underkeyValues
- kvps to be stored under key in conf
-
setKeyValues
public static void setKeyValues(org.apache.hadoop.conf.Configuration conf, String key, Collection<Map.Entry<String, String>> keyValues, char delimiter) Store a collection of Map.Entry's in conf, with each entry separated by ',' and key values delimited by delimiter.- Parameters:
conf
- configuration to store the collection inkey
- overall key to store keyValues underkeyValues
- kvps to be stored under key in confdelimiter
- character used to separate each kvp
-
getKeyValues
public static List<Map.Entry<String,String>> getKeyValues(org.apache.hadoop.conf.Configuration conf, String key) Retrieve a list of key value pairs from configuration, stored under the provided key- Parameters:
conf
- configuration to retrieve kvps fromkey
- key under which the key values are stored- Returns:
- the list of kvps stored under key in conf, or null if the key isn't present.
- See Also:
-
getKeyValues
public static List<Map.Entry<String,String>> getKeyValues(org.apache.hadoop.conf.Configuration conf, String key, char delimiter) Retrieve a list of key value pairs from configuration, stored under the provided key- Parameters:
conf
- configuration to retrieve kvps fromkey
- key under which the key values are storeddelimiter
- character used to separate each kvp- Returns:
- the list of kvps stored under key in conf, or null if the key isn't present.
- See Also:
-