[
https://issues.apache.org/jira/browse/HDFS-1966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042513#comment-13042513
]
Tsz Wo (Nicholas), SZE commented on HDFS-1966:
----------------------------------------------
Jitendra, thanks for the review.
> 1. What is the reason for defining header classes inside the Op enum?
It is because the headers are operation related. There are other classes like
{{PacketHeader}} which is nothing to do with operations.
> 2. I will recommend adding a factory to create right header object depending
> on the opcode. The factory could be useful at the receiving end.
We already have {{DataTransferProtocol.Receiver}}. I think it is the factory
you mean.
> 3. Please add a few unit tests for serialization/de-serialization of the
> headers.
We have many tests for read, write, fault-inject tests, balancer, etc. These
tests cover {{DataTransferProtocol}}. So adding new tests for the header seems
redundant. Do you agree?
> Encapsulate individual DataTransferProtocol op header
> -----------------------------------------------------
>
> Key: HDFS-1966
> URL: https://issues.apache.org/jira/browse/HDFS-1966
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: data-node, hdfs client
> Reporter: Tsz Wo (Nicholas), SZE
> Assignee: Tsz Wo (Nicholas), SZE
> Attachments: h1966_20110519.patch, h1966_20110524.patch,
> h1966_20110526.patch, h1966_20110527b.patch
>
>
> It will make a clear distinction between the variables used in the protocol
> and the others.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira