[
https://issues.apache.org/jira/browse/HDFS-5078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13751720#comment-13751720
]
Jing Zhao commented on HDFS-5078:
---------------------------------
The patch looks good. Some minor comments:
1. In OpenFileCtx.java
{code}
if (getFlushedOffset() != (offset + count)) {
throw new IOException("output stream is out of sync, pos="
+ getFlushedOffset() + " and nextOffset should be"
+ (offset + count));
}
nextOffset = getFlushedOffset();
{code}
Here we do not need to call getFlushOffset several times. Instead, we can call
it once and use its value afterwards.
2. In WriteManager.java,
{code}
+ fos = dfsClient.append(fileIdPath,
+ config.getInt("io.file.buffer.size", 4096), null, null);
{code}
Let's use CommonConfigurationKeysPublic#IO_FILE_BUFFER_SIZE_KEY and
CommonConfigurationKeysPublic#IO_FILE_BUFFER_SIZE_DEFAULT here.
Similarly it will be better if we can move the constant string
"dfs.nfs3.dump.dir" and "/tmp/.hdfs-nfs" to Nfs3Constant.java.
> Support file append in NFSv3 gateway to enable data streaming to HDFS
> ---------------------------------------------------------------------
>
> Key: HDFS-5078
> URL: https://issues.apache.org/jira/browse/HDFS-5078
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: nfs
> Affects Versions: 3.0.0
> Reporter: Brandon Li
> Assignee: Brandon Li
> Attachments: HDFS-5078.patch
>
>
> Currently NFS gateway closes an output stream after it's idle for certain
> period (e.g., 10 seconds). The subsequent writes to the stream will fail.
> This JIRA is to track the change to reopen an output stream to the same file
> to append new data. This makes it possible for the application to directly
> stream data to HDFS.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira