I checked the DataNode code and found the variable blockIn in BlockSender
(used to read data from disk) is object of class RandomAccessFile. Why not
used BufferedInputStream for performance improvement?


public synchronized InputStream getBlockInputStream(Block b, long
seekOffset) throws IOException {

    File blockFile = getBlockFile(b);
    RandomAccessFile blockInFile = new RandomAccessFile(blockFile, "r");
    if (seekOffset > 0) {
      blockInFile.seek(seekOffset);
    }
    return new FileInputStream(blockInFile.getFD());
  }
-- 
View this message in context: 
http://old.nabble.com/why-does-not-BlockSender-use-BufferedInputStream--tp26838319p26838319.html
Sent from the Hadoop core-user mailing list archive at Nabble.com.

Reply via email to