- Common ways to obtain ReplicaInputStreams
private void myMethod () {ReplicaInputStreams r =
FsDatasetSpi fsDatasetSpi;ExtendedBlock b;fsDatasetSpi.getTmpInputStreams(b, blkoff, ckoff)
- Smart code suggestions by Codota
}
boolean transferTo = transferToAllowed && !verifyChecksum && baseStream instanceof SocketOutputStream && ris.getDataIn() instanceof FileInputStream; if (transferTo) { FileChannel fileChannel = ((FileInputStream)ris.getDataIn()).getChannel(); blockInPosition = fileChannel.position(); streamForSendChunks = baseStream;
FileChannel fileCh = ((FileInputStream)ris.getDataIn()).getChannel(); LongWritable waitTime = new LongWritable(); LongWritable transferTime = new LongWritable();
try (ReplicaInputStreams instr = datanode.data.getTmpInputStreams(block, blkoff, ckoff)) { IOUtils.readFully(instr.getDataIn(), buf, 0, sizePartialChunk);
try (ReplicaInputStreams instr = datanode.data.getTmpInputStreams(block, blkoff, ckoff)) { IOUtils.readFully(instr.getDataIn(), buf, 0, sizePartialChunk);