public class IntConfOption extends AbstractConfOption
Constructor and Description |
---|
IntConfOption(String key,
int defaultValue,
String description)
Constructor
|
IntConfOption(String key,
long defaultValue,
String description)
Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
get(org.apache.hadoop.conf.Configuration conf)
Lookup value
|
int |
getDefaultValue() |
String |
getDefaultValueStr()
Get string representation of default value
|
ConfOptionType |
getType()
Get type this option holds
|
boolean |
isDefaultValue(org.apache.hadoop.conf.Configuration conf)
Check if the value set is the same as the default value
|
void |
set(org.apache.hadoop.conf.Configuration conf,
int value)
Set value
|
void |
setIfUnset(org.apache.hadoop.conf.Configuration conf,
int value)
Set value if it's not already present
|
compareTo, contains, equals, getDescription, getKey, hashCode, toString
public IntConfOption(String key, int defaultValue, String description)
key
- keydefaultValue
- default valuedescription
- configuration descriptionpublic int getDefaultValue()
public boolean isDefaultValue(org.apache.hadoop.conf.Configuration conf)
AbstractConfOption
isDefaultValue
in class AbstractConfOption
conf
- Configurationpublic String getDefaultValueStr()
AbstractConfOption
getDefaultValueStr
in class AbstractConfOption
public ConfOptionType getType()
AbstractConfOption
getType
in class AbstractConfOption
public int get(org.apache.hadoop.conf.Configuration conf)
conf
- Configurationpublic void set(org.apache.hadoop.conf.Configuration conf, int value)
conf
- Configurationvalue
- to setpublic void setIfUnset(org.apache.hadoop.conf.Configuration conf, int value)
conf
- Configurationvalue
- to setCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.