Class AsyncErasureCoding
java.lang.Object
org.apache.hadoop.hdfs.server.federation.router.ErasureCoding
org.apache.hadoop.hdfs.server.federation.router.async.AsyncErasureCoding
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.hdfs.protocol.AddErasureCodingPolicyResponse[]addErasureCodingPolicies(org.apache.hadoop.hdfs.protocol.ErasureCodingPolicy[] policies) Asynchronously add an array of erasure coding policies.org.apache.hadoop.hdfs.protocol.ECBlockGroupStatsAsynchronously get the erasure coding block group statistics.org.apache.hadoop.hdfs.protocol.ECTopologyVerifierResultgetECTopologyResultForPolicies(String[] policyNames) Asynchronously get the EC topology result for the given policies.Asynchronously get the erasure coding codecs available.org.apache.hadoop.hdfs.protocol.ErasureCodingPolicyInfo[]Asynchronously get an array of all erasure coding policies.org.apache.hadoop.hdfs.protocol.ErasureCodingPolicyAsynchronously get the erasure coding policy for a given source path.Methods inherited from class org.apache.hadoop.hdfs.server.federation.router.ErasureCoding
disableErasureCodingPolicy, enableErasureCodingPolicy, removeErasureCodingPolicy, setErasureCodingPolicy, unsetErasureCodingPolicy
-
Constructor Details
-
AsyncErasureCoding
-
-
Method Details
-
getErasureCodingPolicies
public org.apache.hadoop.hdfs.protocol.ErasureCodingPolicyInfo[] getErasureCodingPolicies() throws IOExceptionAsynchronously 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:
getErasureCodingPoliciesin classErasureCoding- Returns:
- Array of ErasureCodingPolicyInfo.
- Throws:
IOException- If an I/O error occurs.
-
getErasureCodingCodecs
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:
getErasureCodingCodecsin classErasureCoding- 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:
addErasureCodingPoliciesin classErasureCoding- 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:
getErasureCodingPolicyin classErasureCoding- 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:
getECTopologyResultForPoliciesin classErasureCoding- Parameters:
policyNames- Array of policy names to check.- Returns:
- ECTopologyVerifierResult for the policies.
- Throws:
IOException- If an I/O error occurs.
-
getECBlockGroupStats
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:
getECBlockGroupStatsin classErasureCoding- Returns:
- ECBlockGroupStats for the erasure coding block groups.
- Throws:
IOException- If an I/O error occurs.
-