Package org.apache.hadoop.hdfs
Enum Class AddBlockFlag
- All Implemented Interfaces:
Serializable,Comparable<AddBlockFlag>,Constable
AddBlockFlag provides hints for new block allocation and placement.
Users can use this flag to control per DFSOutputStream
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAdvise that the first block replica NOT take into account DataNode locality.Advise that a block replica NOT be written to the local rack DataNode where 'local' means the same host as the client is being run on.Advise that a block replica NOT be written to the local DataNode where 'local' means the same host as the client is being run on. -
Method Summary
Modifier and TypeMethodDescriptionshortgetMode()static AddBlockFlagvalueOf(short mode) Returns the enum constant of this class with the specified name.static AddBlockFlagReturns the enum constant of this class with the specified name.static AddBlockFlag[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NO_LOCAL_WRITE
Advise that a block replica NOT be written to the local DataNode where 'local' means the same host as the client is being run on.- See Also:
-
CreateFlag.NO_LOCAL_WRITE
-
IGNORE_CLIENT_LOCALITY
Advise that the first block replica NOT take into account DataNode locality. The first block replica should be placed randomly within the cluster. Subsequent block replicas should follow DataNode locality rules.- See Also:
-
CreateFlag.IGNORE_CLIENT_LOCALITY
-
NO_LOCAL_RACK
Advise that a block replica NOT be written to the local rack DataNode where 'local' means the same host as the client is being run on.- See Also:
-
CreateFlag.NO_LOCAL_WRITE
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
mode- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getMode
public short getMode()
-