hadoop-hdfs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wang shu <uchicagoshuw...@gmail.com>
Subject Question regarding streamer thread implementation at DFSOutputStream.java
Date Tue, 13 Dec 2016 20:24:29 GMT
Hi all,

I have a question regarding the streamer thread (Line 382-575)
 implementation at DFSOutputStream.java(

What's the logic of line 468-485 and line 535-548, why it check the packet
is the last one twice and the comments are different, one is "
// wait for all data packets have been successfully acked" and another is "
// wait for the close packet has been acked".  What's the close packet?

My understanding of this is:
If a packet is not the last in block, then the packet is sent directly, and
no need to wait for ACK.
If a packet is the last one, then it will first wait for all previous
packet to be ACKed, and then it will send the last packet in this block(
called close packet, I guess?), and then will need wait the last packet to
be ACKed.

Thanks a lot for your help.



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