org.apache.hadoop.hdfs.server.blockmanagement

## Class NumberReplicas

- java.lang.Object
- - org.apache.hadoop.hdfs.util.EnumCounters<NumberReplicas.StoredReplicaState>
  - - org.apache.hadoop.hdfs.server.blockmanagement.NumberReplicas

-     public class NumberReplicas
      extends EnumCounters<NumberReplicas.StoredReplicaState>

  A immutable object that stores the number of live replicas and the number of decommissioned Replicas.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `NumberReplicas.StoredReplicaState`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `NumberReplicas()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `corruptReplicas()`
    `int` | `decommissioned()`
    `int` | `decommissionedAndDecommissioning()`
    `int` | `decommissioning()`
    `int` | `excessReplicas()`
    `int` | `liveEnteringMaintenanceReplicas()`
    `int` | `liveReplicas()`
    `int` | `maintenanceNotForReadReplicas()`
    `int` | `maintenanceReplicas()`
    `int` | `outOfServiceReplicas()`
    `int` | `readOnlyReplicas()`
    `int` | `redundantInternalBlocks()`
    `int` | `replicasOnStaleNodes()`

    - ### Methods inherited from class org.apache.hadoop.hdfs.util.EnumCounters

      `add, add, allLessOrEqual, anyGreaterOrEqual, asArray, deepCopyEnumCounter, equals, get, hashCode, negation, reset, reset, set, set, subtract, subtract, sum, toString`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### NumberReplicas

          public NumberReplicas()

  - ### Method Detail

    - #### liveReplicas

          public int liveReplicas()

    - #### readOnlyReplicas

          public int readOnlyReplicas()

    - #### decommissionedAndDecommissioning

          public int decommissionedAndDecommissioning()

      Returns:
        decommissioned and decommissioning replicas

    - #### decommissioned

          public int decommissioned()

      Returns:
        decommissioned replicas only

    - #### decommissioning

          public int decommissioning()

      Returns:
        decommissioning replicas only

    - #### corruptReplicas

          public int corruptReplicas()

    - #### excessReplicas

          public int excessReplicas()

    - #### replicasOnStaleNodes

          public int replicasOnStaleNodes()

      Returns:
        the number of replicas which are on stale nodes. This is not mutually exclusive with the other counts -- ie a replica may count as both "live" and "stale".

    - #### redundantInternalBlocks

          public int redundantInternalBlocks()

    - #### maintenanceNotForReadReplicas

          public int maintenanceNotForReadReplicas()

    - #### maintenanceReplicas

          public int maintenanceReplicas()

    - #### outOfServiceReplicas

          public int outOfServiceReplicas()

    - #### liveEnteringMaintenanceReplicas

          public int liveEnteringMaintenanceReplicas()

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.