Class ConfigurationUtil

java.lang.Object
org.apache.hadoop.hbase.util.ConfigurationUtil

@Public public final class ConfigurationUtil extends Object
Utilities for storing more complex collection types in Configuration instances.
  • Field Details

  • Constructor Details

  • 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 by KVP_DELIMITER
      Parameters:
      conf - configuration to store the collection in
      key - overall key to store keyValues under
      keyValues - 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 in
      key - overall key to store keyValues under
      keyValues - kvps to be stored under key in conf
      delimiter - 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 from
      key - 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 from
      key - key under which the key values are stored
      delimiter - 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: