@InterfaceAudience.Private @InterfaceStability.Evolving public enum ReplaceDatanodeOnFailure extends Enum<ReplaceDatanodeOnFailure>
Enum Constant and Description |
---|
ALWAYS
Always add a new datanode when an existing datanode is removed.
|
DEFAULT
DEFAULT policy:
Let r be the replication number.
|
DISABLE
The feature is disabled in the entire site.
|
NEVER
Never add a new datanode.
|
Modifier and Type | Method and Description |
---|---|
void |
checkEnabled()
Check if the feature is enabled.
|
static ReplaceDatanodeOnFailure |
get(Configuration conf)
Get the setting from configuration.
|
boolean |
satisfy(short replication,
DatanodeInfo[] existings,
boolean isAppend,
boolean isHflushed)
Is the policy satisfied?
|
static ReplaceDatanodeOnFailure |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ReplaceDatanodeOnFailure[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
void |
write(Configuration conf)
Write the setting to configuration.
|
public static final ReplaceDatanodeOnFailure DISABLE
public static final ReplaceDatanodeOnFailure NEVER
public static final ReplaceDatanodeOnFailure DEFAULT
public static final ReplaceDatanodeOnFailure ALWAYS
public static ReplaceDatanodeOnFailure[] values()
for (ReplaceDatanodeOnFailure c : ReplaceDatanodeOnFailure.values()) System.out.println(c);
public static ReplaceDatanodeOnFailure valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is nullpublic void checkEnabled()
public boolean satisfy(short replication, DatanodeInfo[] existings, boolean isAppend, boolean isHflushed)
public static ReplaceDatanodeOnFailure get(Configuration conf)
public void write(Configuration conf)
Copyright © 2013 Apache Software Foundation. All rights reserved.