Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,10 @@ RawErasureDecoder getDecoder() {
return decoder;
}

int getNumLiveBlocks(){
return liveBitSet.cardinality();
}

void cleanup() {
if (decoder != null) {
decoder.release();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,10 @@ class StripedWriter {
assert targetStorageIds != null;

writers = new StripedBlockWriter[targets.length];

targetIndices = new short[targets.length];
Preconditions.checkArgument(
targetIndices.length <= dataBlkNum + parityBlkNum - reconstructor.getNumLiveBlocks(),
"Reconstrutcion work gets too much targets.");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kidd53685368 Sorry, I have one more request. Reconstrutcion is a typo of Reconstruction.

Preconditions.checkArgument(targetIndices.length <= parityBlkNum,
"Too much missed striped blocks.");
initTargetIndices();
Expand Down