HdfsServerConstants.BlockUCState (Apache Hadoop HDFS 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs.server.common, interface: HdfsServerConstants, enum: BlockUCState

Package org.apache.hadoop.hdfs.server.common

# Enum Class HdfsServerConstants.BlockUCState

java.lang.Object
java.lang.Enum<HdfsServerConstants.BlockUCState>
org.apache.hadoop.hdfs.server.common.HdfsServerConstants.BlockUCState

All Implemented Interfaces:
  `Serializable`, `Comparable<HdfsServerConstants.BlockUCState>`, `Constable`

Enclosing interface:
  HdfsServerConstants

public static enum HdfsServerConstants.BlockUCState extends Enum<HdfsServerConstants.BlockUCState>
States, which a block can go through while it is under construction.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class java.lang.Enum

  `Enum.EnumDesc<E extends Enum<E>>`

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `COMMITTED`
  The block is committed.
  The client reported that all bytes are written to data-nodes with the given generation stamp and block length, but no `HdfsServerConstants.ReplicaState.FINALIZED` replicas has yet been reported by data-nodes themselves.
  `COMPLETE`
  Block construction completed.
  The block has at least the configured minimal replication number of `HdfsServerConstants.ReplicaState.FINALIZED` replica(s), and is not going to be modified.
  `UNDER_CONSTRUCTION`
  The block is under construction.
  It has been recently allocated for write or append.
  `UNDER_RECOVERY`
  The block is under recovery.
  When a file lease expires its last block may not be `COMPLETE` and needs to go through a recovery procedure, which synchronizes the existing replicas contents.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static HdfsServerConstants.BlockUCState`
  `valueOf(String name)`
  Returns the enum constant of this class with the specified name.
  `static HdfsServerConstants.BlockUCState[]`
  `values()`
  Returns an array containing the constants of this enum class, in the order they are declared.

  ### Methods inherited from class java.lang.Enum

  `clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

  ### Methods inherited from class java.lang.Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### COMPLETE

    public static final HdfsServerConstants.BlockUCState COMPLETE
    Block construction completed.
    The block has at least the configured minimal replication number of `HdfsServerConstants.ReplicaState.FINALIZED` replica(s), and is not going to be modified. NOTE, in some special cases, a block may be forced to COMPLETE state, even if it doesn't have required minimal replications.

  - ### UNDER_CONSTRUCTION

    public static final HdfsServerConstants.BlockUCState UNDER_CONSTRUCTION
    The block is under construction.
    It has been recently allocated for write or append.

  - ### UNDER_RECOVERY

    public static final HdfsServerConstants.BlockUCState UNDER_RECOVERY
    The block is under recovery.
    When a file lease expires its last block may not be `COMPLETE` and needs to go through a recovery procedure, which synchronizes the existing replicas contents.

  - ### COMMITTED

    public static final HdfsServerConstants.BlockUCState COMMITTED
    The block is committed.
    The client reported that all bytes are written to data-nodes with the given generation stamp and block length, but no `HdfsServerConstants.ReplicaState.FINALIZED` replicas has yet been reported by data-nodes themselves.

- ## Method Details

  - ### values

    public static HdfsServerConstants.BlockUCState[] 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

    public static HdfsServerConstants.BlockUCState valueOf(String name)
    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 name
      `NullPointerException` - if the argument is null