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

Yi Liu commented on HDFS-7838:
------------------------------

{quote}
It seems confusing to translate false => 1 and true => 0. I realize that 
returning 0 on success is an old C convention, but both returns of truncate are 
"successful". It seems a lot more intuitive to have true => 1, false => 0, 
error => negative.
Also, this is a little pedantic, but please check against JNI_TRUE rather than 
doing !jVal.z or similar.
{quote}

Thanks Colin for the review. Update the patch to address the comments.

{quote}
>> I file HDFS-7902 for [libwebhdfs], thanks.
Thanks for that. In the meantime, can you add a stub function to libwebhdfs 
that does nothing but set errno to ENOTSUP and return -1? Thanks.
{quote}
I add truncate support for libwebhdfs instead of setting errno to ENOTSUP and 
returning -1. Is there any reason we don't support it?

> Expose truncate API for libhdfs
> -------------------------------
>
>                 Key: HDFS-7838
>                 URL: https://issues.apache.org/jira/browse/HDFS-7838
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: datanode, namenode
>    Affects Versions: 2.7.0
>            Reporter: Yi Liu
>            Assignee: Yi Liu
>         Attachments: HDFS-7838.001.patch, HDFS-7838.002.patch, 
> HDFS-7838.003.patch
>
>
> It's good to expose truncate in libhdfs.



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

Reply via email to