@NotThreadSafe @PublicApi public final class UnderFileSystemConfiguration extends Object implements AlluxioConfiguration
Ufs configuration properties, including ufs specific configuration and global configuration.
The order of precedence for properties is:
This class extends InstancedConfiguration
. Variable substitution and aliases
are supported.
Constructor and Description |
---|
UnderFileSystemConfiguration(AlluxioConfiguration alluxioConf,
boolean readOnly)
Constructs a new instance of
UnderFileSystemConfiguration with the given properties. |
Modifier and Type | Method and Description |
---|---|
boolean |
clusterDefaultsLoaded() |
AlluxioProperties |
copyProperties()
Gets a copy of the
AlluxioProperties which back the AlluxioConfiguration . |
UnderFileSystemConfiguration |
createMountSpecificConf(Map<String,? extends Object> mountConf)
Creates a new instance from the current configuration and adds in new properties.
|
static UnderFileSystemConfiguration |
defaults(AlluxioConfiguration alluxioConf) |
static UnderFileSystemConfiguration |
emptyConfig() |
Object |
get(PropertyKey key)
Gets the value for the given key in the
Properties ; if this key is not found, a
RuntimeException is thrown. |
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. |
boolean |
getBoolean(PropertyKey key)
Gets the boolean representation of the value for the given key.
|
long |
getBytes(PropertyKey key)
Gets the bytes of the value for the given key.
|
<T> Class<T> |
getClass(PropertyKey key)
Gets the value for the given key as a class.
|
double |
getDouble(PropertyKey key)
Gets the double representation of the value for the given key.
|
java.time.Duration |
getDuration(PropertyKey key)
Gets the time of the key as a duration.
|
<T extends Enum<T>> |
getEnum(PropertyKey key,
Class<T> enumType)
Gets the value for the given key as an enum value.
|
int |
getInt(PropertyKey key)
Gets the integer representation of the value for the given key.
|
List<String> |
getList(PropertyKey key)
Gets the value for the given key as a list.
|
long |
getLong(PropertyKey key)
Gets the long integer representation of the value for the given key.
|
Map<String,Object> |
getMountSpecificConf() |
long |
getMs(PropertyKey key)
Gets the time of key in millisecond unit.
|
Map<String,Object> |
getNestedProperties(PropertyKey prefixKey)
Gets a set of properties that share a given common prefix key as a map.
|
Source |
getSource(PropertyKey key) |
String |
getString(PropertyKey key)
Gets the String value for the given key.
|
boolean |
isReadOnly() |
boolean |
isSet(PropertyKey key)
Checks if the configuration contains a value for the given key.
|
boolean |
isSetByUser(PropertyKey key) |
Set<PropertyKey> |
keySet() |
Map<String,Object> |
toMap(ConfigurationValueOptions opts) |
Map<String,String> |
toUserPropertyMap(ConfigurationValueOptions options) |
Set<PropertyKey> |
userKeySet() |
void |
validate()
Validates the configuration.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getOrDefault, getOrDefault, hash, toMap
public UnderFileSystemConfiguration(AlluxioConfiguration alluxioConf, boolean readOnly)
UnderFileSystemConfiguration
with the given properties.alluxioConf
- Alluxio configurationreadOnly
- whether only read operations are permittedpublic static UnderFileSystemConfiguration defaults(AlluxioConfiguration alluxioConf)
alluxioConf
- Alluxio configurationpublic static UnderFileSystemConfiguration emptyConfig()
public Map<String,Object> getMountSpecificConf()
public boolean isReadOnly()
UnderFileSystem
public UnderFileSystemConfiguration createMountSpecificConf(Map<String,? extends Object> mountConf)
mountConf
- the mount specific configuration mappublic Map<String,String> toUserPropertyMap(ConfigurationValueOptions options)
options
- options for formatting the configuration valuespublic Object get(PropertyKey key)
AlluxioConfiguration
Properties
; if this key is not found, a
RuntimeException is thrown.get
in interface AlluxioConfiguration
key
- the key to get the value forpublic Object get(PropertyKey key, ConfigurationValueOptions options)
AlluxioConfiguration
Properties
; if this key is not found, a
RuntimeException is thrown.get
in interface AlluxioConfiguration
key
- the key to get the value foroptions
- options for getting configuration valuepublic boolean isSet(PropertyKey key)
AlluxioConfiguration
isSet
in interface AlluxioConfiguration
key
- the key to checkpublic boolean isSetByUser(PropertyKey key)
isSetByUser
in interface AlluxioConfiguration
key
- the key to checkpublic Set<PropertyKey> keySet()
keySet
in interface AlluxioConfiguration
public Set<PropertyKey> userKeySet()
userKeySet
in interface AlluxioConfiguration
public String getString(PropertyKey key)
AlluxioConfiguration
getString
in interface AlluxioConfiguration
key
- the key to get the value forString
public int getInt(PropertyKey key)
AlluxioConfiguration
getInt
in interface AlluxioConfiguration
key
- the key to get the value forint
public long getLong(PropertyKey key)
AlluxioConfiguration
getLong
in interface AlluxioConfiguration
key
- the key to get the value forlong
public double getDouble(PropertyKey key)
AlluxioConfiguration
getDouble
in interface AlluxioConfiguration
key
- the key to get the value fordouble
public boolean getBoolean(PropertyKey key)
AlluxioConfiguration
getBoolean
in interface AlluxioConfiguration
key
- the key to get the value forboolean
public List<String> getList(PropertyKey key)
AlluxioConfiguration
getList
in interface AlluxioConfiguration
key
- the key to get the value forpublic <T extends Enum<T>> T getEnum(PropertyKey key, Class<T> enumType)
AlluxioConfiguration
getEnum
in interface AlluxioConfiguration
T
- the type of the enumkey
- the key to get the value forenumType
- the type of the enumpublic long getBytes(PropertyKey key)
AlluxioConfiguration
getBytes
in interface AlluxioConfiguration
key
- the key to get the value forpublic long getMs(PropertyKey key)
AlluxioConfiguration
getMs
in interface AlluxioConfiguration
key
- the key to get the value forpublic java.time.Duration getDuration(PropertyKey key)
AlluxioConfiguration
getDuration
in interface AlluxioConfiguration
key
- the key to get the value forpublic <T> Class<T> getClass(PropertyKey key)
AlluxioConfiguration
getClass
in interface AlluxioConfiguration
T
- the type of the classkey
- the key to get the value forpublic Map<String,Object> getNestedProperties(PropertyKey prefixKey)
AlluxioConfiguration
getNestedProperties
in interface AlluxioConfiguration
prefixKey
- the prefix keypublic AlluxioProperties copyProperties()
AlluxioConfiguration
AlluxioProperties
which back the AlluxioConfiguration
.copyProperties
in interface AlluxioConfiguration
public Source getSource(PropertyKey key)
getSource
in interface AlluxioConfiguration
key
- the property keypublic Map<String,Object> toMap(ConfigurationValueOptions opts)
toMap
in interface AlluxioConfiguration
opts
- options for formatting the configuration valuespublic void validate()
AlluxioConfiguration
validate
in interface AlluxioConfiguration
public boolean clusterDefaultsLoaded()
clusterDefaultsLoaded
in interface AlluxioConfiguration
Copyright © 2023. All Rights Reserved.