[
https://issues.apache.org/jira/browse/HDFS-13400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16427205#comment-16427205
]
Erik Krogen edited comment on HDFS-13400 at 4/5/18 4:25 PM:
------------------------------------------------------------
[~elgoiri] FYI cancelling Patch Available because what I have posted does not
contain any sort of fix; it is just a unit test.
This ends up being kind of tricky. The position of the stream is not known
until the DataNode is contacted and it performs {{DFSClient#append}}. In the
current setup, the DataNode does not send a response until it is done writing
the file... So I don't see a clean way for it to communicate an initial
position back to the client.
was (Author: xkrogen):
[~elgoiri] FYI cancelling Patch Available because what I have posted does not
contain any sort of fix...
This ends up being kind of tricky. The position of the stream is not known
until the DataNode is contacted and it performs {{DFSClient#append}}. In the
current setup, the DataNode does not send a response until it is done writing
the file... So I don't see a clean way for it to communicate an initial
position back to the client.
> WebHDFS append returned stream has incorrectly set position
> -----------------------------------------------------------
>
> Key: HDFS-13400
> URL: https://issues.apache.org/jira/browse/HDFS-13400
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: webhdfs
> Affects Versions: 2.9.0, 2.8.3, 2.7.5, 3.0.1
> Reporter: Erik Krogen
> Priority: Minor
> Attachments: HDFS-13400-unit-test.patch
>
>
> If you call {{getPos()}} on an {{FSDataOutputStream}} returned by
> {{WebHdfsFileSystem#append}}, it will initially return 0, even if the file
> already had content. This method should return the initial length of the file
> before appending.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]