org.apache.hadoop.hdfs.server.common
Enum HdfsServerConstants.ReplicaState

java.lang.Object
  extended by java.lang.Enum<HdfsServerConstants.ReplicaState>
      extended by org.apache.hadoop.hdfs.server.common.HdfsServerConstants.ReplicaState
All Implemented Interfaces:
Serializable, Comparable<HdfsServerConstants.ReplicaState>
Enclosing class:
org.apache.hadoop.hdfs.server.common.HdfsServerConstants

public static enum HdfsServerConstants.ReplicaState
extends Enum<HdfsServerConstants.ReplicaState>

Block replica states, which it can go through while being constructed.


Enum Constant Summary
FINALIZED
          Replica is finalized.
RBW
          Replica is being written to.
RUR
          Replica is under recovery.
RWR
          Replica is waiting to be recovered.
TEMPORARY
          Temporary replica: created for replication and relocation only.
 
Method Summary
static HdfsServerConstants.ReplicaState getState(int v)
           
 int getValue()
           
static HdfsServerConstants.ReplicaState read(DataInput in)
          Read from in
static HdfsServerConstants.ReplicaState valueOf(String name)
          Returns the enum constant of this type with the specified name.
static HdfsServerConstants.ReplicaState[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 void write(DataOutput out)
          Write to out
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

FINALIZED

public static final HdfsServerConstants.ReplicaState FINALIZED
Replica is finalized. The state when replica is not modified.


RBW

public static final HdfsServerConstants.ReplicaState RBW
Replica is being written to.


RWR

public static final HdfsServerConstants.ReplicaState RWR
Replica is waiting to be recovered.


RUR

public static final HdfsServerConstants.ReplicaState RUR
Replica is under recovery.


TEMPORARY

public static final HdfsServerConstants.ReplicaState TEMPORARY
Temporary replica: created for replication and relocation only.

Method Detail

values

public static HdfsServerConstants.ReplicaState[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (HdfsServerConstants.ReplicaState c : HdfsServerConstants.ReplicaState.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static HdfsServerConstants.ReplicaState valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
NullPointerException - if the argument is null

getValue

public int getValue()

getState

public static HdfsServerConstants.ReplicaState getState(int v)

read

public static HdfsServerConstants.ReplicaState read(DataInput in)
                                             throws IOException
Read from in

Throws:
IOException

write

public void write(DataOutput out)
           throws IOException
Write to out

Throws:
IOException


Copyright © 2013 Apache Software Foundation. All Rights Reserved.