ECTopologyVerifier (Apache Hadoop HDFS 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs.server.common, class: ECTopologyVerifier

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

# Class ECTopologyVerifier

java.lang.Object
org.apache.hadoop.hdfs.server.common.ECTopologyVerifier

@Private public final class ECTopologyVerifier extends Object
Class for verifying whether the cluster setup can support all enabled EC policies. Scenarios when the verification fails: 1. not enough data nodes compared to EC policy's highest data+parity number 2. not enough racks to satisfy BlockPlacementPolicyRackFaultTolerant

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final org.slf4j.Logger`
  `LOG`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static org.apache.hadoop.hdfs.protocol.ECTopologyVerifierResult`
  `getECTopologyVerifierResult(int numOfRacks, int numOfDataNodes, Collection<org.apache.hadoop.hdfs.protocol.ErasureCodingPolicy> policies)`
  Verifies whether the cluster setup can support all enabled EC policies.
  `static org.apache.hadoop.hdfs.protocol.ECTopologyVerifierResult`
  `getECTopologyVerifierResult(org.apache.hadoop.hdfs.protocol.DatanodeInfo[] report, Collection<org.apache.hadoop.hdfs.protocol.ErasureCodingPolicy> policies)`
  Verifies whether the cluster setup can support the given EC policies.

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

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

- ## Field Details

  - ### LOG

    public static final org.slf4j.Logger LOG

- ## Method Details

  - ### getECTopologyVerifierResult

    public static org.apache.hadoop.hdfs.protocol.ECTopologyVerifierResult getECTopologyVerifierResult(org.apache.hadoop.hdfs.protocol.DatanodeInfo[] report, Collection<org.apache.hadoop.hdfs.protocol.ErasureCodingPolicy> policies)
    Verifies whether the cluster setup can support the given EC policies.
    Parameters:
      `report` - list of data node descriptors for all data nodes
      `policies` - erasure coding policies to verify
    Returns:
      the status of the verification

  - ### getECTopologyVerifierResult

    public static org.apache.hadoop.hdfs.protocol.ECTopologyVerifierResult getECTopologyVerifierResult(int numOfRacks, int numOfDataNodes, Collection<org.apache.hadoop.hdfs.protocol.ErasureCodingPolicy> policies)
    Verifies whether the cluster setup can support all enabled EC policies.
    Parameters:
      `numOfRacks` - number of racks
      `numOfDataNodes` - number of data nodes
      `policies` - erasure coding policies to verify
    Returns:
      the status of the verification