HADOOP-17235. Erasure Coding: Remove dead code from common side. Contributed by Fei Hui.
This commit is contained in:
parent
658b1a6cde
commit
7e671f3b65
|
@ -54,34 +54,6 @@ public class ECBlockGroup {
|
|||
return parityBlocks;
|
||||
}
|
||||
|
||||
/**
|
||||
* Any erased data block?
|
||||
* @return true if any erased data block, false otherwise
|
||||
*/
|
||||
public boolean anyErasedDataBlock() {
|
||||
for (int i = 0; i < dataBlocks.length; ++i) {
|
||||
if (dataBlocks[i].isErased()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Any erased parity block?
|
||||
* @return true if any erased parity block, false otherwise
|
||||
*/
|
||||
public boolean anyErasedParityBlock() {
|
||||
for (int i = 0; i < parityBlocks.length; ++i) {
|
||||
if (parityBlocks[i].isErased()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get erased blocks count
|
||||
* @return erased count of blocks
|
||||
|
|
|
@ -172,27 +172,4 @@ public abstract class ErasureDecoder extends Configured
|
|||
|
||||
return erasedIndexes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get erased input blocks from inputBlocks
|
||||
* @param inputBlocks
|
||||
* @return an array of erased blocks from inputBlocks
|
||||
*/
|
||||
protected ECBlock[] getErasedBlocks(ECBlock[] inputBlocks) {
|
||||
int numErased = getNumErasedBlocks(inputBlocks);
|
||||
if (numErased == 0) {
|
||||
return new ECBlock[0];
|
||||
}
|
||||
|
||||
ECBlock[] erasedBlocks = new ECBlock[numErased];
|
||||
int i = 0, j = 0;
|
||||
for (; i < inputBlocks.length && j < erasedBlocks.length; i++) {
|
||||
if (inputBlocks[i].isErased()) {
|
||||
erasedBlocks[j++] = inputBlocks[i];
|
||||
}
|
||||
}
|
||||
|
||||
return erasedBlocks;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -66,10 +66,6 @@ public abstract class TestCoderBase {
|
|||
|
||||
protected boolean allowChangeInputs;
|
||||
|
||||
protected int getChunkSize() {
|
||||
return chunkSize;
|
||||
}
|
||||
|
||||
protected void setChunkSize(int chunkSize) {
|
||||
this.chunkSize = chunkSize;
|
||||
this.zeroChunkBytes = new byte[chunkSize]; // With ZERO by default
|
||||
|
@ -90,10 +86,6 @@ public abstract class TestCoderBase {
|
|||
}
|
||||
}
|
||||
|
||||
protected boolean isAllowDump() {
|
||||
return allowDump;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare before running the case.
|
||||
* @param conf
|
||||
|
|
Loading…
Reference in New Issue