HDFS-8363. Erasure Coding: DFSStripedInputStream#seekToNewSource. (yliu)
This commit is contained in:
parent
54d2827522
commit
8da9e18dad
@ -204,3 +204,5 @@
|
||||
|
||||
HDFS-8368. Erasure Coding: DFS opening a non-existent file need to be
|
||||
handled properly (Rakesh R via zhz)
|
||||
|
||||
HDFS-8363. Erasure Coding: DFSStripedInputStream#seekToNewSource. (yliu)
|
||||
|
@ -130,12 +130,12 @@ boolean include(long pos) {
|
||||
}
|
||||
}
|
||||
|
||||
private final short groupSize = HdfsConstants.NUM_DATA_BLOCKS;
|
||||
private final BlockReader[] blockReaders = new BlockReader[groupSize];
|
||||
private final DatanodeInfo[] currentNodes = new DatanodeInfo[groupSize];
|
||||
private final BlockReader[] blockReaders;
|
||||
private final DatanodeInfo[] currentNodes;
|
||||
private final int cellSize;
|
||||
private final short dataBlkNum;
|
||||
private final short parityBlkNum;
|
||||
private final short groupSize;
|
||||
/** the buffer for a complete stripe */
|
||||
private ByteBuffer curStripeBuf;
|
||||
private final ECSchema schema;
|
||||
@ -155,6 +155,9 @@ boolean include(long pos) {
|
||||
cellSize = schema.getChunkSize();
|
||||
dataBlkNum = (short) schema.getNumDataUnits();
|
||||
parityBlkNum = (short) schema.getNumParityUnits();
|
||||
groupSize = dataBlkNum;
|
||||
blockReaders = new BlockReader[groupSize];
|
||||
currentNodes = new DatanodeInfo[groupSize];
|
||||
curStripeRange = new StripeRange(0, 0);
|
||||
readingService =
|
||||
new ExecutorCompletionService<>(dfsClient.getStripedReadsThreadPool());
|
||||
@ -391,6 +394,12 @@ private int getStripedBufOffset(long offsetInBlockGroup) {
|
||||
return (int) (offsetInBlockGroup % stripeLen);
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized boolean seekToNewSource(long targetPos)
|
||||
throws IOException {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected synchronized int readWithStrategy(ReaderStrategy strategy,
|
||||
int off, int len) throws IOException {
|
||||
|
Loading…
Reference in New Issue
Block a user