ErasureCodingPolicy (Apache Hadoop HDFS Client 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs.protocol, class: ErasureCodingPolicy

Package org.apache.hadoop.hdfs.protocol

# Class ErasureCodingPolicy

java.lang.Object
org.apache.hadoop.hdfs.protocol.ErasureCodingPolicy

All Implemented Interfaces:
  `Serializable`

@Private public final class ErasureCodingPolicy extends Object implements Serializable
A policy about how to write/read/code an erasure coding file.

Note this class should be lightweight and immutable, because it's cached by `SystemErasureCodingPolicies`, to be returned as a part of `HdfsFileStatus`.

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ErasureCodingPolicy(String name, org.apache.hadoop.io.erasurecode.ECSchema schema, int cellSize, byte id)`
  `ErasureCodingPolicy(org.apache.hadoop.io.erasurecode.ECSchema schema, int cellSize)`
  `ErasureCodingPolicy(org.apache.hadoop.io.erasurecode.ECSchema schema, int cellSize, byte id)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static String`
  `composePolicyName(org.apache.hadoop.io.erasurecode.ECSchema schema, int cellSize)`
  `boolean`
  `equals(Object o)`
  `int`
  `getCellSize()`
  `String`
  `getCodecName()`
  `byte`
  `getId()`
  `String`
  `getName()`
  `int`
  `getNumDataUnits()`
  `int`
  `getNumParityUnits()`
  `org.apache.hadoop.io.erasurecode.ECSchema`
  `getSchema()`
  `int`
  `hashCode()`
  `boolean`
  `isReplicationPolicy()`
  `boolean`
  `isSystemPolicy()`
  `String`
  `toString()`

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

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

- ## Constructor Details

  - ### ErasureCodingPolicy

    public ErasureCodingPolicy(String name, org.apache.hadoop.io.erasurecode.ECSchema schema, int cellSize, byte id)

  - ### ErasureCodingPolicy

    public ErasureCodingPolicy(org.apache.hadoop.io.erasurecode.ECSchema schema, int cellSize, byte id)

  - ### ErasureCodingPolicy

    public ErasureCodingPolicy(org.apache.hadoop.io.erasurecode.ECSchema schema, int cellSize)

- ## Method Details

  - ### composePolicyName

    public static String composePolicyName(org.apache.hadoop.io.erasurecode.ECSchema schema, int cellSize)

  - ### getName

    public String getName()

  - ### getSchema

    public org.apache.hadoop.io.erasurecode.ECSchema getSchema()

  - ### getCellSize

    public int getCellSize()

  - ### getNumDataUnits

    public int getNumDataUnits()

  - ### getNumParityUnits

    public int getNumParityUnits()

  - ### getCodecName

    public String getCodecName()

  - ### getId

    public byte getId()

  - ### isReplicationPolicy

    public boolean isReplicationPolicy()

  - ### isSystemPolicy

    public boolean isSystemPolicy()

  - ### equals

    public boolean equals(Object o)
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`