-
Notifications
You must be signed in to change notification settings - Fork 9.2k
HDFS-16566 Erasure Coding: Recovery may cause excess replicas when busy DN exsits #4252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 12 commits
19943da
85648bc
6022160
6f147d5
322f555
61c5aa6
affee20
32985a9
85673d1
9b0536b
5cfca89
686b7a5
c30f008
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -127,7 +127,7 @@ public void processErasureCodingTasks( | |
| reconInfo.getExtendedBlock(), reconInfo.getErasureCodingPolicy(), | ||
| reconInfo.getLiveBlockIndices(), reconInfo.getSourceDnInfos(), | ||
| reconInfo.getTargetDnInfos(), reconInfo.getTargetStorageTypes(), | ||
| reconInfo.getTargetStorageIDs()); | ||
| reconInfo.getTargetStorageIDs(), reconInfo.getExcludeReconstructedIndices()); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably makes more sense to make a StripedReconstructionInfo constructor that takes BlockECReconstructionInfo as the input parameter. Let's leave this out as a follow up. |
||
| // It may throw IllegalArgumentException from task#stripedReader | ||
| // constructor. | ||
| final StripedBlockReconstructor task = | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,26 +41,28 @@ public class StripedReconstructionInfo { | |
| private final DatanodeInfo[] targets; | ||
| private final StorageType[] targetStorageTypes; | ||
| private final String[] targetStorageIds; | ||
| private final byte[] excludeReconstructedIndices; | ||
|
|
||
| public StripedReconstructionInfo(ExtendedBlock blockGroup, | ||
| ErasureCodingPolicy ecPolicy, byte[] liveIndices, DatanodeInfo[] sources, | ||
| byte[] targetIndices) { | ||
| this(blockGroup, ecPolicy, liveIndices, sources, targetIndices, null, | ||
| null, null); | ||
| null, null, new byte[0]); | ||
| } | ||
|
|
||
| StripedReconstructionInfo(ExtendedBlock blockGroup, | ||
| ErasureCodingPolicy ecPolicy, byte[] liveIndices, DatanodeInfo[] sources, | ||
| DatanodeInfo[] targets, StorageType[] targetStorageTypes, | ||
| String[] targetStorageIds) { | ||
| String[] targetStorageIds, byte[] excludeReconstructedIndices) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't understand this.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When the DN receive the command of EC reconstruction, the ec task is processed in ErasureCodingWorker.processErasureCodingTasks().In this function, it calls the constructor you mentioned. |
||
| this(blockGroup, ecPolicy, liveIndices, sources, null, targets, | ||
| targetStorageTypes, targetStorageIds); | ||
| targetStorageTypes, targetStorageIds, excludeReconstructedIndices); | ||
| } | ||
|
|
||
| private StripedReconstructionInfo(ExtendedBlock blockGroup, | ||
| ErasureCodingPolicy ecPolicy, byte[] liveIndices, DatanodeInfo[] sources, | ||
| byte[] targetIndices, DatanodeInfo[] targets, | ||
| StorageType[] targetStorageTypes, String[] targetStorageIds) { | ||
| StorageType[] targetStorageTypes, String[] targetStorageIds, | ||
| byte[] excludeReconstructedIndices) { | ||
|
|
||
| this.blockGroup = blockGroup; | ||
| this.ecPolicy = ecPolicy; | ||
|
|
@@ -70,6 +72,7 @@ private StripedReconstructionInfo(ExtendedBlock blockGroup, | |
| this.targets = targets; | ||
| this.targetStorageTypes = targetStorageTypes; | ||
| this.targetStorageIds = targetStorageIds; | ||
| this.excludeReconstructedIndices = excludeReconstructedIndices; | ||
| } | ||
|
|
||
| ExtendedBlock getBlockGroup() { | ||
|
|
@@ -104,5 +107,9 @@ String[] getTargetStorageIds() { | |
| return targetStorageIds; | ||
| } | ||
|
|
||
| byte[] getExcludeReconstructedIndices() { | ||
| return excludeReconstructedIndices; | ||
| } | ||
|
|
||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.