[
https://issues.apache.org/jira/browse/HDFS-5259?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13785726#comment-13785726
]
Jing Zhao commented on HDFS-5259:
---------------------------------
The patch looks good to me. The only one concern:
{code}
+ byte[] fullData = request.getData().array();
+ byte[] appendedData = new byte[(int) smallerCount];
+ System.arraycopy(fullData, (int) (cachedOffset - offset), appendedData,
+ 0, (int) smallerCount);
{code}
Here I think we may avoid this data copy by passing the bytebuffer from the
WriteRequest to the WriteCtx, instead of passing in a byte array. And if we
make this change, we may also want to add some unit tests.
> Support client which combines appended data with old data before sends it to
> NFS server
> ---------------------------------------------------------------------------------------
>
> Key: HDFS-5259
> URL: https://issues.apache.org/jira/browse/HDFS-5259
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: nfs
> Reporter: Yesha Vora
> Assignee: Brandon Li
> Attachments: HDFS-5259.000.patch, HDFS-5259.001.patch
>
>
> The append does not work with some Linux client. The Client gets
> "Input/output Error" when it tries to append. And NFS server considers it as
> random write and fails the request.
--
This message was sent by Atlassian JIRA
(v6.1#6144)