@ThreadSafe public final class SpecificPathConfiguration extends Object implements AlluxioConfiguration
Constructor and Description |
---|
SpecificPathConfiguration(AlluxioConfiguration clusterConf,
PathConfiguration pathConf,
AlluxioURI path)
Constructs a new instance with the specified references without copying the underlying
properties.
|
Modifier and Type | Method and Description |
---|---|
boolean |
clusterDefaultsLoaded() |
AlluxioProperties |
copyProperties()
Gets a copy of the
AlluxioProperties which back the AlluxioConfiguration . |
String |
get(PropertyKey key)
Gets the value for the given key in the
Properties ; if this key is not found, a
RuntimeException is thrown. |
String |
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.
|
float |
getFloat(PropertyKey key)
Gets the float representation of the value for the given key.
|
int |
getInt(PropertyKey key)
Gets the integer representation of the value for the given key.
|
List<String> |
getList(PropertyKey key,
String delimiter)
Gets the value for the given key as a list.
|
long |
getLong(PropertyKey key)
Gets the long representation of the value for the given key.
|
long |
getMs(PropertyKey key)
Gets the time of key in millisecond unit.
|
Map<String,String> |
getNestedProperties(PropertyKey prefixKey)
Gets a set of properties that share a given common prefix key as a map.
|
Source |
getSource(PropertyKey key) |
boolean |
isSet(PropertyKey key)
Checks if the configuration contains a value for the given key.
|
boolean |
isSetByUser(PropertyKey key) |
Set<PropertyKey> |
keySet() |
Map<String,String> |
toMap(ConfigurationValueOptions opts) |
Set<PropertyKey> |
userKeySet() |
void |
validate()
Validates the configuration.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getOrDefault, getOrDefault, hash, toMap
public SpecificPathConfiguration(AlluxioConfiguration clusterConf, PathConfiguration pathConf, AlluxioURI path)
clusterConf
- the cluster level configurationpathConf
- the path level configurationpath
- the specific Alluxio pathpublic String 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 String 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 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 float getFloat(PropertyKey key)
AlluxioConfiguration
getFloat
in interface AlluxioConfiguration
key
- the key to get the value forfloat
public boolean getBoolean(PropertyKey key)
AlluxioConfiguration
getBoolean
in interface AlluxioConfiguration
key
- the key to get the value forboolean
public List<String> getList(PropertyKey key, String delimiter)
AlluxioConfiguration
getList
in interface AlluxioConfiguration
key
- the key to get the value fordelimiter
- the delimiter to split the valuespublic <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,String> 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,String> 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.