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:
  • 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