Enum Class HdfsServerConstants.ReplicaState
java.lang.Object
java.lang.Enum<HdfsServerConstants.ReplicaState>
org.apache.hadoop.hdfs.server.common.HdfsServerConstants.ReplicaState
- All Implemented Interfaces:
Serializable,Comparable<HdfsServerConstants.ReplicaState>,Constable
- Enclosing interface:
- org.apache.hadoop.hdfs.server.common.HdfsServerConstants
Block replica states, which it can go through while being constructed.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptiongetState(int v) Retrieve ReplicaState corresponding to given index.intgetValue()Retrieve ReplicaState corresponding to index provided in binary stream.Returns the enum constant of this class with the specified name.static HdfsServerConstants.ReplicaState[]values()Returns an array containing the constants of this enum class, in the order they are declared.voidwrite(DataOutput out) Write to out
-
Enum Constant Details
-
FINALIZED
Replica is finalized. The state when replica is not modified. -
RBW
Replica is being written to. -
RWR
Replica is waiting to be recovered. -
RUR
Replica is under recovery. -
TEMPORARY
Temporary replica: created for replication and relocation only.
-
-
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
-
getValue
public int getValue() -
getState
Retrieve ReplicaState corresponding to given index.- Parameters:
v- Index to retrieveHdfsServerConstants.ReplicaState.- Returns:
HdfsServerConstants.ReplicaStateobject.- Throws:
IndexOutOfBoundsException- if the index is invalid.
-
read
Retrieve ReplicaState corresponding to index provided in binary stream.- Parameters:
in- Index value provided as bytes in given binary stream.- Returns:
HdfsServerConstants.ReplicaStateobject.- Throws:
IOException- if an I/O error occurs while reading bytes.IndexOutOfBoundsException- if the index is invalid.
-
write
Write to out- Throws:
IOException
-