Class UnderFileSystemConfiguration

  • All Implemented Interfaces:
    AlluxioConfiguration

    @NotThreadSafe
    @PublicApi
    public final class UnderFileSystemConfiguration
    extends java.lang.Object
    implements AlluxioConfiguration

    Ufs configuration properties, including ufs specific configuration and global configuration.

    The order of precedence for properties is:

    1. Ufs specific properties
    2. Global configuration properties

    This class extends InstancedConfiguration. Variable substitution and aliases are supported.

    • Constructor Detail

      • UnderFileSystemConfiguration

        public UnderFileSystemConfiguration​(AlluxioConfiguration alluxioConf,
                                            boolean readOnly)
        Constructs a new instance of UnderFileSystemConfiguration with the given properties.
        Parameters:
        alluxioConf - Alluxio configuration
        readOnly - whether only read operations are permitted
    • Method Detail

      • getMountSpecificConf

        public java.util.Map<java.lang.String,​java.lang.Object> getMountSpecificConf()
        Returns:
        the map of resolved mount specific configuration
      • isReadOnly

        public boolean isReadOnly()
        Returns:
        whether only read operations are permitted to the UnderFileSystem
      • createMountSpecificConf

        public UnderFileSystemConfiguration createMountSpecificConf​(java.util.Map<java.lang.String,​? extends java.lang.Object> mountConf)
        Creates a new instance from the current configuration and adds in new properties.
        Parameters:
        mountConf - the mount specific configuration map
        Returns:
        the updated configuration object
      • toUserPropertyMap

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

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

        public java.lang.Object get​(PropertyKey key,
                                    ConfigurationValueOptions options)
        Description copied from interface: AlluxioConfiguration
        Gets the value for the given key in the Properties; if this key is not found, a RuntimeException is thrown.
        Specified by:
        get in interface AlluxioConfiguration
        Parameters:
        key - the key to get the value for
        options - options for getting configuration value
        Returns:
        the value for the given key
      • isSet

        public boolean isSet​(PropertyKey key)
        Description copied from interface: AlluxioConfiguration
        Checks if the configuration contains a value for the given key.
        Specified by:
        isSet in interface AlluxioConfiguration
        Parameters:
        key - the key to check
        Returns:
        true if there is value for the key, false otherwise
      • isSetByUser

        public boolean isSetByUser​(PropertyKey key)
        Specified by:
        isSetByUser in interface AlluxioConfiguration
        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
      • getString

        public java.lang.String getString​(PropertyKey key)
        Description copied from interface: AlluxioConfiguration
        Gets the String value for the given key.
        Specified by:
        getString in interface AlluxioConfiguration
        Parameters:
        key - the key to get the value for
        Returns:
        the value for the given key as an String
      • getInt

        public int getInt​(PropertyKey key)
        Description copied from interface: AlluxioConfiguration
        Gets the integer representation of the value for the given key.
        Specified by:
        getInt in interface AlluxioConfiguration
        Parameters:
        key - the key to get the value for
        Returns:
        the value for the given key as an int
      • getLong

        public long getLong​(PropertyKey key)
        Description copied from interface: AlluxioConfiguration
        Gets the long integer representation of the value for the given key.
        Specified by:
        getLong in interface AlluxioConfiguration
        Parameters:
        key - the key to get the value for
        Returns:
        the value for the given key as a long
      • getDouble

        public double getDouble​(PropertyKey key)
        Description copied from interface: AlluxioConfiguration
        Gets the double representation of the value for the given key.
        Specified by:
        getDouble in interface AlluxioConfiguration
        Parameters:
        key - the key to get the value for
        Returns:
        the value for the given key as a double
      • getBoolean

        public boolean getBoolean​(PropertyKey key)
        Description copied from interface: AlluxioConfiguration
        Gets the boolean representation of the value for the given key.
        Specified by:
        getBoolean in interface AlluxioConfiguration
        Parameters:
        key - the key to get the value for
        Returns:
        the value for the given key as a boolean
      • getList

        public java.util.List<java.lang.String> getList​(PropertyKey key)
        Description copied from interface: AlluxioConfiguration
        Gets the value for the given key as a list.
        Specified by:
        getList in interface AlluxioConfiguration
        Parameters:
        key - the key to get the value for
        Returns:
        the list of values for the given key
      • getEnum

        public <T extends java.lang.Enum<T>> T getEnum​(PropertyKey key,
                                                       java.lang.Class<T> enumType)
        Description copied from interface: AlluxioConfiguration
        Gets the value for the given key as an enum value.
        Specified by:
        getEnum in interface AlluxioConfiguration
        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

        public long getBytes​(PropertyKey key)
        Description copied from interface: AlluxioConfiguration
        Gets the bytes of the value for the given key.
        Specified by:
        getBytes in interface AlluxioConfiguration
        Parameters:
        key - the key to get the value for
        Returns:
        the bytes of the value for the given key
      • getMs

        public long getMs​(PropertyKey key)
        Description copied from interface: AlluxioConfiguration
        Gets the time of key in millisecond unit.
        Specified by:
        getMs in interface AlluxioConfiguration
        Parameters:
        key - the key to get the value for
        Returns:
        the time of key in millisecond unit
      • getDuration

        public java.time.Duration getDuration​(PropertyKey key)
        Description copied from interface: AlluxioConfiguration
        Gets the time of the key as a duration.
        Specified by:
        getDuration in interface AlluxioConfiguration
        Parameters:
        key - the key to get the value for
        Returns:
        the value of the key represented as a duration
      • getClass

        public <T> java.lang.Class<T> getClass​(PropertyKey key)
        Description copied from interface: AlluxioConfiguration
        Gets the value for the given key as a class.
        Specified by:
        getClass in interface AlluxioConfiguration
        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

        public java.util.Map<java.lang.String,​java.lang.Object> getNestedProperties​(PropertyKey prefixKey)
        Description copied from interface: AlluxioConfiguration
        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.
        Specified by:
        getNestedProperties in interface AlluxioConfiguration
        Parameters:
        prefixKey - the prefix key
        Returns:
        a map from nested properties aggregated by the prefix
      • toMap

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

        public boolean clusterDefaultsLoaded()
        Specified by:
        clusterDefaultsLoaded in interface AlluxioConfiguration
        Returns:
        whether the configuration has been merged with cluster defaults