public final class TachyonConf extends Object
All the runtime configuration properties of Tachyon. This class works like a dictionary and serves each Tachyon configuration property as a key-value pair.
Tachyon configuration properties are loaded into this class in the following order with decreasing priority:
tachyon-env.sh or from OS settings;tachyon-site.properties file;tachyon-default.properties file.
The default properties are defined in a property file tachyon-default.properties
distributed with Tachyon jar. Tachyon users can override values of these default properties by
creating tachyon-site.properties and putting it under java CLASSPATH
when running Tachyon (e.g., ${TACHYON_HOME}/conf/)
Developers can create an instance of this class by new TachyonConf(), which will
load values from any Java system properties set as well.
The class only supports creation using new TachyonConf(properties) to override
default values.
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_PROPERTIES
File to set default properties
|
static String |
SITE_PROPERTIES
File to set customized properties
|
| Constructor and Description |
|---|
TachyonConf()
Default constructor.
|
TachyonConf(Map<String,String> props)
Overrides default properties.
|
TachyonConf(Properties props)
Overrides default properties.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsKey(String key) |
boolean |
equals(Object obj) |
String |
get(String key) |
boolean |
getBoolean(String key) |
long |
getBytes(String key) |
<T> Class<T> |
getClass(String key) |
double |
getDouble(String key) |
<T extends Enum<T>> |
getEnum(String key,
Class<T> enumType) |
float |
getFloat(String key) |
int |
getInt(String key) |
Properties |
getInternalProperties() |
List<String> |
getList(String key,
String delimiter) |
long |
getLong(String key) |
int |
hashCode() |
void |
merge(TachyonConf alternateConf)
Merge the current configuration properties with another one.
|
void |
set(String key,
String value) |
Map<String,String> |
toMap()
Returns the properties as a Map.
|
String |
toString() |
public static final String DEFAULT_PROPERTIES
public static final String SITE_PROPERTIES
public TachyonConf(Map<String,String> props)
props - override Propertiespublic TachyonConf(Properties props)
props - override Propertiespublic TachyonConf()
public Properties getInternalProperties()
Properties of this TachyonConf instancepublic void merge(TachyonConf alternateConf)
alternateConf - The source TachyonConf to be merged.public boolean containsKey(String key)
public int getInt(String key)
public long getLong(String key)
public double getDouble(String key)
public float getFloat(String key)
public boolean getBoolean(String key)
public long getBytes(String key)
public Map<String,String> toMap()
Copyright © 2015. All Rights Reserved.