[ 
https://issues.apache.org/jira/browse/HDFS-11195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15724096#comment-15724096
 ] 

Yuanbo Liu commented on HDFS-11195:
-----------------------------------

I have reproduced this issue in trunk branch, but still doesn't come up with a 
good solution to solve this problem.
The related code is here {{WebHdfsHandler#onAppend}}:
{code}
  private void onAppend(ChannelHandlerContext ctx) throws IOException {
     ....
    resp = new DefaultHttpResponse(HTTP_1_1, OK);
    resp.headers().set(CONTENT_LENGTH, 0);
    ctx.pipeline().replace(this, HdfsWriter.class.getSimpleName(),
      new HdfsWriter(dfsClient, out, resp));
  }
{code}
{{HdfsWriter}} doesn't write successfully, but the response has been set to 
200(OK).

> When appending files by webhdfs rest api fails, it returns 200
> --------------------------------------------------------------
>
>                 Key: HDFS-11195
>                 URL: https://issues.apache.org/jira/browse/HDFS-11195
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Yuanbo Liu
>            Assignee: Yuanbo Liu
>
> Suppose that there is a Hadoop cluster contains only one datanode, and 
> dfs.replication=3. Run:
> {code}
> curl -i -X POST -T <LOCAL_FILE> 
> "http://<DATANODE>:<PORT>/webhdfs/v1/<PATH>?op=APPEND"
> {code}
> it returns 200, even though append operation fails.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to