Class SystemErasureCodingPolicies

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

@Private @Stable public final class SystemErasureCodingPolicies extends Object

The set of built-in erasure coding policies.

Although this is a private class, EC policy IDs need to be treated like a stable interface. Adding, modifying, or removing built-in policies can cause inconsistencies with older clients.

  • Field Details

  • Method Details

    • getPolicies

      public static List<ErasureCodingPolicy> getPolicies()
      Get system defined policies.
      Returns:
      system policies
    • getByID

      public static ErasureCodingPolicy getByID(byte id)
      Get a policy by policy ID.
      Returns:
      ecPolicy, or null if not found
    • getByName

      public static ErasureCodingPolicy getByName(String name)
      Get a policy by policy name.
      Returns:
      ecPolicy, or null if not found
    • getReplicationPolicy

      public static ErasureCodingPolicy getReplicationPolicy()
      Get the special REPLICATION policy.