Class AsyncErasureCoding

java.lang.Object
org.apache.hadoop.hdfs.server.federation.router.ErasureCoding
org.apache.hadoop.hdfs.server.federation.router.async.AsyncErasureCoding

public class AsyncErasureCoding extends ErasureCoding
Provides asynchronous operations for erasure coding in HDFS Federation. This class extends ErasureCoding and overrides its methods to perform erasure coding operations in a non-blocking manner, allowing for concurrent execution and improved performance.
  • Constructor Details

  • Method Details

    • getErasureCodingPolicies

      public org.apache.hadoop.hdfs.protocol.ErasureCodingPolicyInfo[] getErasureCodingPolicies() throws IOException
      Asynchronously get an array of all erasure coding policies. This method checks the operation category and then invokes the getErasureCodingPolicies method concurrently across all namespaces.

      The results are merged and returned as an array of ErasureCodingPolicyInfo.

      Overrides:
      getErasureCodingPolicies in class ErasureCoding
      Returns:
      Array of ErasureCodingPolicyInfo.
      Throws:
      IOException - If an I/O error occurs.
    • getErasureCodingCodecs

      public Map<String,String> getErasureCodingCodecs() throws IOException
      Asynchronously get the erasure coding codecs available. This method checks the operation category and then invokes the getErasureCodingCodecs method concurrently across all namespaces.

      The results are merged into a single map of codec names to codec properties.

      Overrides:
      getErasureCodingCodecs in class ErasureCoding
      Returns:
      Map of erasure coding codecs.
      Throws:
      IOException - If an I/O error occurs.
    • addErasureCodingPolicies

      public org.apache.hadoop.hdfs.protocol.AddErasureCodingPolicyResponse[] addErasureCodingPolicies(org.apache.hadoop.hdfs.protocol.ErasureCodingPolicy[] policies) throws IOException
      Asynchronously add an array of erasure coding policies. This method checks the operation category and then invokes the addErasureCodingPolicies method concurrently across all namespaces.

      The results are merged and returned as an array of AddErasureCodingPolicyResponse.

      Overrides:
      addErasureCodingPolicies in class ErasureCoding
      Parameters:
      policies - Array of erasure coding policies to add.
      Returns:
      Array of AddErasureCodingPolicyResponse.
      Throws:
      IOException - If an I/O error occurs.
    • getErasureCodingPolicy

      public org.apache.hadoop.hdfs.protocol.ErasureCodingPolicy getErasureCodingPolicy(String src) throws IOException
      Asynchronously get the erasure coding policy for a given source path. This method checks the operation category and then invokes the getErasureCodingPolicy method sequentially for the given path.

      The result is returned as an ErasureCodingPolicy object.

      Overrides:
      getErasureCodingPolicy in class ErasureCoding
      Parameters:
      src - Source path to get the erasure coding policy for.
      Returns:
      ErasureCodingPolicy for the given path.
      Throws:
      IOException - If an I/O error occurs.
    • getECTopologyResultForPolicies

      public org.apache.hadoop.hdfs.protocol.ECTopologyVerifierResult getECTopologyResultForPolicies(String[] policyNames) throws IOException
      Asynchronously get the EC topology result for the given policies. This method checks the operation category and then invokes the getECTopologyResultForPolicies method concurrently across all namespaces.

      The results are merged and the first unsupported result is returned.

      Overrides:
      getECTopologyResultForPolicies in class ErasureCoding
      Parameters:
      policyNames - Array of policy names to check.
      Returns:
      ECTopologyVerifierResult for the policies.
      Throws:
      IOException - If an I/O error occurs.
    • getECBlockGroupStats

      public org.apache.hadoop.hdfs.protocol.ECBlockGroupStats getECBlockGroupStats() throws IOException
      Asynchronously get the erasure coding block group statistics. This method checks the operation category and then invokes the getECBlockGroupStats method concurrently across all namespaces.

      The results are merged and returned as an ECBlockGroupStats object.

      Overrides:
      getECBlockGroupStats in class ErasureCoding
      Returns:
      ECBlockGroupStats for the erasure coding block groups.
      Throws:
      IOException - If an I/O error occurs.