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

Akira Ajisaka commented on HDFS-11195:
--------------------------------------

Thanks [~yuanbo] for reporting this and providing the patch. Now I have one 
comment:
{code:title=HdfsWriter.java}
  private void releaseDfsResourcesAndThrow() throws Exception {
    cleanupAndThrow(LOG, out);
    cleanupAndThrow(LOG, client);
  }
{code}
If an exception is thrown when closing {{out}}, {{client}} won't be closed. I'd 
like to re-use {{exceptionCaught}} to close them as follows:
{code:title=HdfsWriter#channelRead0}
      } catch (Exception cause) {
        exceptionCaught(ctx, cause);
      }
{code}

> 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
>         Attachments: HDFS-11195.001.patch, HDFS-11195.002.patch
>
>
> 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