|
@@ -39,8 +39,6 @@ import java.net.InetSocketAddress;
|
|
|
import java.nio.ByteBuffer;
|
|
|
import java.util.BitSet;
|
|
|
import java.util.concurrent.CompletionService;
|
|
|
-import java.util.concurrent.ExecutorCompletionService;
|
|
|
-import java.util.concurrent.ThreadPoolExecutor;
|
|
|
import java.util.concurrent.atomic.AtomicLong;
|
|
|
|
|
|
/**
|
|
@@ -110,7 +108,7 @@ abstract class StripedReconstructor {
|
|
|
// position in striped internal block
|
|
|
private long positionInBlock;
|
|
|
private StripedReader stripedReader;
|
|
|
- private ThreadPoolExecutor stripedReadPool;
|
|
|
+ private ErasureCodingWorker erasureCodingWorker;
|
|
|
private final CachingStrategy cachingStrategy;
|
|
|
private long maxTargetLength = 0L;
|
|
|
private final BitSet liveBitSet;
|
|
@@ -122,7 +120,7 @@ abstract class StripedReconstructor {
|
|
|
|
|
|
StripedReconstructor(ErasureCodingWorker worker,
|
|
|
StripedReconstructionInfo stripedReconInfo) {
|
|
|
- this.stripedReadPool = worker.getStripedReadPool();
|
|
|
+ this.erasureCodingWorker = worker;
|
|
|
this.datanode = worker.getDatanode();
|
|
|
this.conf = worker.getConf();
|
|
|
this.ecPolicy = stripedReconInfo.getEcPolicy();
|
|
@@ -225,7 +223,7 @@ abstract class StripedReconstructor {
|
|
|
}
|
|
|
|
|
|
CompletionService<Void> createReadService() {
|
|
|
- return new ExecutorCompletionService<>(stripedReadPool);
|
|
|
+ return erasureCodingWorker.createReadService();
|
|
|
}
|
|
|
|
|
|
ExtendedBlock getBlockGroup() {
|