hadoop-hdfs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thanh Do <than...@cs.wisc.edu>
Subject Why dataOut is FileOutputStream?
Date Thu, 04 Nov 2010 21:58:27 GMT
Hi all,

When a datanode receive a block, the datanode
write the block into 2 streams on disk:
- the data stream (dataOut)
- the checksum stream (checksumOut)

While the checksumOut is created with following code:
   this.checksumOut = new DataOutputStream(new BufferedOutputStream(
                                          streams.checksumOut,
                                          SMALL_BUFFER_SIZE));
The dataOut is simply FileOutputStream()

So, the checksumOut is buffered, but dataOut is not.

Is there any particular reason for doing so?
or it doesn't matter, because after that, we flush
the two streams anyway?

Thanks
Thanh

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message