[ https://issues.apache.org/jira/browse/HDFS-7855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14347637#comment-14347637 ]
Jing Zhao commented on HDFS-7855: --------------------------------- Thanks for working on this, Bo! The patch looks good to me in general. Some minors: # The new DFSPacket class does not need to be public # In {{DFSPacket#writeTo}}, {{assert checksumPos == dataStart;}} should be unnecessary since it's always true. We can use this chance to delete it. # The getter methods for final fields (e.g., {{isHeartbeatPacket}} and {{getSeqno}}) does not need to acquire object's monitor. # Looks like we can also convert {{lastPacketInBlock}} to be final since its modification pattern is always like: {code} currentPacket = createPacket(0, 0, bytesCurBlock, currentSeqno++); currentPacket.lastPacketInBlock = true; {code} # We have a javadoc warning reported by Jenkins. > 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)