[ 
https://issues.apache.org/jira/browse/HDFS-7855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14348016#comment-14348016
 ] 

Jing Zhao commented on HDFS-7855:
---------------------------------

bq. One question is that lastPacketInBlock is set to false when creating a 
DFSPacket object. And it is modified to true when DFSOutputStream wants it to 
be the last packet

For the last packet, looks like we always create a new packet and immediately 
set lastPacketInBlock to true? If this is the case, we only need to modify 
DFSPacket's constructor method and set lastPacketInBlock's value in the 
constructor. In this way we can convert it to final.

> Separate class Packet from DFSOutputStream
> ------------------------------------------
>
>                 Key: HDFS-7855
>                 URL: https://issues.apache.org/jira/browse/HDFS-7855
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Li Bo
>            Assignee: Li Bo
>         Attachments: HDFS-7855-001.patch, HDFS-7855-002.patch, 
> HDFS-7855-003.patch, HDFS-7855-004.patch, HDFS-7855-005.patch
>
>
> Class Packet is an inner class in DFSOutputStream and also used by 
> DataStreamer. This sub task separates Packet out of DFSOutputStream to aid 
> the separation in HDFS-7854.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to