Class SiteConfiguration

  • All Implemented Interfaces:
    Iterable<Map.Entry<String,​String>>

    public class SiteConfiguration
    extends AccumuloConfiguration
    An AccumuloConfiguration which loads properties from an XML file, usually accumulo-site.xml. This implementation supports defaulting undefined property values to a parent configuration's definitions.

    The system property "org.apache.accumulo.config.file" can be used to specify the location of the XML configuration file on the classpath. If the system property is not defined, it defaults to "accumulo-site.xml".

    This class is a singleton.

    Note: Client code should not use this class, and it may be deprecated in the future.

    • Method Detail

      • getInstance

        public static SiteConfiguration getInstance()
        Gets an instance of this class. A new instance is only created on the first call.
        Throws:
        RuntimeException - if the configuration is invalid
      • getProperties

        public void getProperties​(Map<String,​String> props,
                                  com.google.common.base.Predicate<String> filter)
        Description copied from class: AccumuloConfiguration
        Returns property key/value pairs in this configuration. The pairs include those defined in this configuration which pass the given filter, and those supplied from the parent configuration which are not included from here.
        Specified by:
        getProperties in class AccumuloConfiguration
        Parameters:
        props - properties object to populate
        filter - filter for accepting properties from this configuration
      • getHadoopConfiguration

        protected org.apache.hadoop.conf.Configuration getHadoopConfiguration()
      • clearInstance

        public static void clearInstance()
        Clears the configuration properties in this configuration (but not the parent). This method supports testing and should not be called.
      • set

        public void set​(Property property,
                        String value)
        Sets a property. This method supports testing and should not be called.
        Parameters:
        property - property to set
        value - property value
      • set

        public void set​(String key,
                        String value)
        Sets a property. This method supports testing and should not be called.
        Parameters:
        key - key of property to set
        value - property value