Class ECReconstructionCoordinator
java.lang.Object
org.apache.hadoop.ozone.container.ec.reconstruction.ECReconstructionCoordinator
- All Implemented Interfaces:
Closeable,AutoCloseable
The Coordinator implements the main flow of reconstructing
missing container replicas.
For a container reconstruction task, the main flow is: - ListBlock from all healthy replicas - calculate effective block group len for all blocks - create RECOVERING containers in TargetDNs - for each block - build a ECReconstructedStripedInputStream to read healthy chunks - build a ECBlockOutputStream to write out decoded chunks - for each stripe - use ECReconstructedStripedInputStream.recoverChunks to decode chunks - use ECBlockOutputStream.write to write decoded chunks to TargetDNs - PutBlock - Close RECOVERING containers in TargetDNs
-
Constructor Summary
ConstructorsConstructorDescriptionECReconstructionCoordinator(org.apache.hadoop.hdds.conf.ConfigurationSource conf, org.apache.hadoop.hdds.security.x509.certificate.client.CertificateClient certificateClient, org.apache.hadoop.hdds.security.symmetric.SecretKeySignerClient secretKeyClient, StateContext context, ECReconstructionMetrics metrics, String threadNamePrefix) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidreconstructECBlockGroup(org.apache.hadoop.hdds.scm.storage.BlockLocationInfo blockLocationInfo, org.apache.hadoop.hdds.client.ECReplicationConfig repConfig, SortedMap<Integer, org.apache.hadoop.hdds.protocol.DatanodeDetails> targetMap, org.apache.hadoop.ozone.container.common.helpers.BlockData[] blockDataGroup) voidreconstructECContainerGroup(long containerID, org.apache.hadoop.hdds.client.ECReplicationConfig repConfig, SortedMap<Integer, org.apache.hadoop.hdds.protocol.DatanodeDetails> sourceNodeMap, SortedMap<Integer, org.apache.hadoop.hdds.protocol.DatanodeDetails> targetNodeMap)
-
Constructor Details
-
ECReconstructionCoordinator
public ECReconstructionCoordinator(org.apache.hadoop.hdds.conf.ConfigurationSource conf, org.apache.hadoop.hdds.security.x509.certificate.client.CertificateClient certificateClient, org.apache.hadoop.hdds.security.symmetric.SecretKeySignerClient secretKeyClient, StateContext context, ECReconstructionMetrics metrics, String threadNamePrefix) throws IOException - Throws:
IOException
-
-
Method Details
-
reconstructECContainerGroup
public void reconstructECContainerGroup(long containerID, org.apache.hadoop.hdds.client.ECReplicationConfig repConfig, SortedMap<Integer, org.apache.hadoop.hdds.protocol.DatanodeDetails> sourceNodeMap, SortedMap<Integer, throws IOExceptionorg.apache.hadoop.hdds.protocol.DatanodeDetails> targetNodeMap) - Throws:
IOException
-
reconstructECBlockGroup
public void reconstructECBlockGroup(org.apache.hadoop.hdds.scm.storage.BlockLocationInfo blockLocationInfo, org.apache.hadoop.hdds.client.ECReplicationConfig repConfig, SortedMap<Integer, org.apache.hadoop.hdds.protocol.DatanodeDetails> targetMap, org.apache.hadoop.ozone.container.common.helpers.BlockData[] blockDataGroup) throws IOException- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
getECReconstructionMetrics
-