[
https://issues.apache.org/jira/browse/HDFS-6136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13946302#comment-13946302
]
Nick White commented on HDFS-6136:
----------------------------------
The current implementation always sends an empty packet at the end of a block
transfer with the lastpacketinblock is set to true. However, if you send a
packet with data in (ie datalen > 0) as your last packet (and so set the
lastpacketinblock = true) the DN throws an exception (I've not got a stack
trace to hand) and refuses to accept the block. I believe this should be
supported behaviour, as it saves a bit of network traffic. Thanks -
> PacketReceiver#doRead calls setFieldsFromData with wrong argument
> -----------------------------------------------------------------
>
> Key: HDFS-6136
> URL: https://issues.apache.org/jira/browse/HDFS-6136
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: datanode
> Affects Versions: 3.0.0, 2.3.0
> Reporter: Nick White
> Labels: patch
> Attachments: HDFS-6136.patch, HDFS-6136.txt
>
>
> PacketHeader#setFieldsFromData takes the packet length as the first argument,
> but PacketReceiver#doRead passes the dataPlusChecksumLen (which is 4 less).
--
This message was sent by Atlassian JIRA
(v6.2#6252)