org.apache.hadoop.hdfs.server.blockmanagement

## Class BlockPlacementStatusDefault

- java.lang.Object
- - org.apache.hadoop.hdfs.server.blockmanagement.BlockPlacementStatusDefault

- All Implemented Interfaces:
    org.apache.hadoop.hdfs.server.blockmanagement.BlockPlacementStatus

      public class BlockPlacementStatusDefault
      extends Object
      implements org.apache.hadoop.hdfs.server.blockmanagement.BlockPlacementStatus

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BlockPlacementStatusDefault(int currentRacks, int requiredRacks, int totalRacks)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getAdditionalReplicasRequired()` Return the number of additional replicas needed to ensure the block placement policy is satisfied.
    `String` | `getErrorDescription()` Get description info for log or printed in case replicas are failed to meet requirement of placement policy
    `boolean` | `isPlacementPolicySatisfied()` Boolean value to identify if replicas of this block satisfy requirement of placement policy

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### BlockPlacementStatusDefault

          public BlockPlacementStatusDefault(int currentRacks,
                                             int requiredRacks,
                                             int totalRacks)

  - ### Method Detail

    - #### isPlacementPolicySatisfied

          public boolean isPlacementPolicySatisfied()

      Description copied from interface: `org.apache.hadoop.hdfs.server.blockmanagement.BlockPlacementStatus`
      Boolean value to identify if replicas of this block satisfy requirement of placement policy
      Specified by:
        `isPlacementPolicySatisfied` in interface `org.apache.hadoop.hdfs.server.blockmanagement.BlockPlacementStatus`
      Returns:
        if replicas satisfy placement policy's requirement

    - #### getErrorDescription

          public String getErrorDescription()

      Description copied from interface: `org.apache.hadoop.hdfs.server.blockmanagement.BlockPlacementStatus`
      Get description info for log or printed in case replicas are failed to meet requirement of placement policy
      Specified by:
        `getErrorDescription` in interface `org.apache.hadoop.hdfs.server.blockmanagement.BlockPlacementStatus`
      Returns:
        description in case replicas are failed to meet requirement of placement policy

    - #### getAdditionalReplicasRequired

          public int getAdditionalReplicasRequired()

      Description copied from interface: `org.apache.hadoop.hdfs.server.blockmanagement.BlockPlacementStatus`
      Return the number of additional replicas needed to ensure the block placement policy is satisfied.
      Specified by:
        `getAdditionalReplicasRequired` in interface `org.apache.hadoop.hdfs.server.blockmanagement.BlockPlacementStatus`
      Returns:
        The number of new replicas needed to satisify the placement policy or zero if no extra are needed

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