Package alluxio.conf

Interface AlluxioConfiguration

    • Method Detail

      • get

        java.lang.Object get​(PropertyKey key)
        Gets the value for the given key in the Properties; if this key is not found, a RuntimeException is thrown.
        Parameters:
        key - the key to get the value for
        Returns:
        the value for the given key
      • get

        java.lang.Object get​(PropertyKey key,
                             ConfigurationValueOptions options)
        Gets the value for the given key in the Properties; if this key is not found, a RuntimeException is thrown.
        Parameters:
        key - the key to get the value for
        options - options for getting configuration value
        Returns:
        the value for the given key
      • getOrDefault

        default <T> T getOrDefault​(PropertyKey key,
                                   T defaultValue)
        Type Parameters:
        T - the type of default value
        Parameters:
        key - the key to get the value for
        defaultValue - the value to return if no value is set for the specified key
        Returns:
        the value
      • getOrDefault

        default java.lang.Object getOrDefault​(PropertyKey key,
                                              java.lang.Object defaultValue,
                                              ConfigurationValueOptions options)
        Parameters:
        key - the key to get the value for
        defaultValue - the value to return if no value is set for the specified key
        options - options for getting configuration value
        Returns:
        the value
      • isSet

        boolean isSet​(PropertyKey key)
        Checks if the configuration contains a value for the given key.
        Parameters:
        key - the key to check
        Returns:
        true if there is value for the key, false otherwise
      • isSetByUser

        boolean isSetByUser​(PropertyKey key)
        Parameters:
        key - the key to check
        Returns:
        true if there is value for the key set by user, false otherwise even when there is a default value for the key
      • keySet

        java.util.Set<PropertyKey> keySet()
        Returns:
        the keys configured by the configuration
      • userKeySet

        java.util.Set<PropertyKey> userKeySet()
        Returns:
        the keys set by user
      • getString

        java.lang.String getString​(PropertyKey key)
        Gets the String value for the given key.
        Parameters:
        key - the key to get the value for
        Returns:
        the value for the given key as an String
      • getInt

        int getInt​(PropertyKey key)
        Gets the integer representation of the value for the given key.
        Parameters:
        key - the key to get the value for
        Returns:
        the value for the given key as an int
      • getLong

        long getLong​(PropertyKey key)
        Gets the long integer representation of the value for the given key.
        Parameters:
        key - the key to get the value for
        Returns:
        the value for the given key as a long
      • getDouble

        double getDouble​(PropertyKey key)
        Gets the double representation of the value for the given key.
        Parameters:
        key - the key to get the value for
        Returns:
        the value for the given key as a double
      • getBoolean

        boolean getBoolean​(PropertyKey key)
        Gets the boolean representation of the value for the given key.
        Parameters:
        key - the key to get the value for
        Returns:
        the value for the given key as a boolean
      • getList

        java.util.List<java.lang.String> getList​(PropertyKey key)
        Gets the value for the given key as a list.
        Parameters:
        key - the key to get the value for
        Returns:
        the list of values for the given key
      • getEnum

        <T extends java.lang.Enum<T>> T getEnum​(PropertyKey key,
                                                java.lang.Class<T> enumType)
        Gets the value for the given key as an enum value.
        Type Parameters:
        T - the type of the enum
        Parameters:
        key - the key to get the value for
        enumType - the type of the enum
        Returns:
        the value for the given key as an enum value
      • getBytes

        long getBytes​(PropertyKey key)
        Gets the bytes of the value for the given key.
        Parameters:
        key - the key to get the value for
        Returns:
        the bytes of the value for the given key
      • getMs

        long getMs​(PropertyKey key)
        Gets the time of key in millisecond unit.
        Parameters:
        key - the key to get the value for
        Returns:
        the time of key in millisecond unit
      • getDuration

        java.time.Duration getDuration​(PropertyKey key)
        Gets the time of the key as a duration.
        Parameters:
        key - the key to get the value for
        Returns:
        the value of the key represented as a duration
      • getClass

        <T> java.lang.Class<T> getClass​(PropertyKey key)
        Gets the value for the given key as a class.
        Type Parameters:
        T - the type of the class
        Parameters:
        key - the key to get the value for
        Returns:
        the value for the given key as a class
      • getNestedProperties

        java.util.Map<java.lang.String,​java.lang.Object> getNestedProperties​(PropertyKey prefixKey)
        Gets a set of properties that share a given common prefix key as a map. E.g., if A.B=V1 and A.C=V2, calling this method with prefixKey=A returns a map of {B=V1, C=V2}, where B and C are also valid properties. If no property shares the prefix, an empty map is returned.
        Parameters:
        prefixKey - the prefix key
        Returns:
        a map from nested properties aggregated by the prefix
      • getSource

        Source getSource​(PropertyKey key)
        Parameters:
        key - the property key
        Returns:
        the source for the given key
      • toMap

        default java.util.Map<java.lang.String,​java.lang.Object> toMap()
        Returns:
        a map from all configuration property names to their values; values may potentially be null
      • toMap

        java.util.Map<java.lang.String,​java.lang.Object> toMap​(ConfigurationValueOptions opts)
        Parameters:
        opts - options for formatting the configuration values
        Returns:
        a map from all configuration property names to their values; values may potentially be null
      • validate

        void validate()
        Validates the configuration.
        Throws:
        java.lang.IllegalStateException - if invalid configuration is encountered
      • clusterDefaultsLoaded

        boolean clusterDefaultsLoaded()
        Returns:
        whether the configuration has been merged with cluster defaults
      • hash

        default java.lang.String hash()
        Returns:
        hash of properties, if hashing is not supported, return empty string