[
https://issues.apache.org/jira/browse/HDFS-6892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14111102#comment-14111102
]
Haohui Mai commented on HDFS-6892:
----------------------------------
Looks good to me. I think there are multiple places that the code can be
simplified by merging the declarations and definitions:
{code}
+ FileHandle handle = null;
+ handle = readHandle(xdr);
{code}
to
{code}
FileHandle handle = readHandle(xdr);
{code}
And
{code}
+ FileHandle handle = null;
+ long cookie;
+ long cookieVerf;
+ int count;
+ handle = readHandle(xdr);
cookie = xdr.readHyper();
cookieVerf = xdr.readHyper();
count = xdr.readInt();
{code}
to
{code}
FileHandle handle = readHandle(xdr);
long cookie = xdr.readHyper();
long cookieVerf = xdr.readHyper();
int count = xdr.readInt();
{code}
+1 once addressed.
> Add XDR packaging method for each NFS request
> ---------------------------------------------
>
> Key: HDFS-6892
> URL: https://issues.apache.org/jira/browse/HDFS-6892
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: nfs
> Affects Versions: 2.2.0
> Reporter: Brandon Li
> Assignee: Brandon Li
> Attachments: HDFS-6892.001.patch, HDFS-6892.002.patch,
> HDFS-6892.003.patch
>
>
> This method can be used for unit tests.
> Most request implements this by overriding RequestWithHandle#serialize()
> method. However, some request classes missed it, e.g., COMMIT3Request,
> MKDIR3Request,READDIR3Request, READDIRPLUS3Request,
> RMDIR3RequestREMOVE3Request, SETATTR3Request,SYMLINK3Request. RENAME3Reqeust
> is another example.
--
This message was sent by Atlassian JIRA
(v6.2#6252)