HDFS-11301. Double wrapping over RandomAccessFile in LocalReplicaInPipeline#createStreams. Contributed by Hanisha Koneru.

This commit is contained in:
Arpit Agarwal 2017-01-09 10:32:18 -08:00
parent 287d3d6804
commit 91bf504440
1 changed files with 1 additions and 3 deletions

View File

@ -308,9 +308,7 @@ public class LocalReplicaInPipeline extends LocalReplica
FileOutputStream crcOut = null;
try {
blockOut = fileIoProvider.getFileOutputStream(
getVolume(),
fileIoProvider.getRandomAccessFile(getVolume(), blockFile, "rw")
.getFD());
getVolume(), new RandomAccessFile(blockFile, "rw").getFD());
crcOut = fileIoProvider.getFileOutputStream(getVolume(), metaRAF.getFD());
if (!isCreate) {
blockOut.getChannel().position(blockDiskSize);