[ 
https://issues.apache.org/jira/browse/HDFS-3916?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Colin Patrick McCabe updated HDFS-3916:
---------------------------------------

    Attachment: HDFS-3916.005.patch

* don't need to typecast result of {{malloc}}, {{calloc}}
* {{hdfsPread}} must not change the position in the file
* {{hdfs_web.c}}: fix cases where we weren't setting {{errno}}
* {{hdfsAvailable}} should always return 0, since every read currently blocks.  
It should *not* return the remaining length of the file.
* {{hdfsHflush}}, {{hdfsFlush}}: return *EINVAL* if these are called on a file 
not opened for write.  Add a comment about implementing these by flushing the 
local write buffers, which we should implement later.
* {{initFileInfo}}: we don't need this function, since {{calloc}} already 
initializes everything to 0.
* always set {{workingDir}}, so we don't have to check it against *NULL*.  It 
currently starts as the root directory.
* add a comment referencing HDFS-3917
* split *OUTPUT* file handling into a separate function, since it is very long 
and doesn't relate to *INPUT* files at all.
                
> libwebhdfs (C client) code cleanups
> -----------------------------------
>
>                 Key: HDFS-3916
>                 URL: https://issues.apache.org/jira/browse/HDFS-3916
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: webhdfs
>    Affects Versions: 3.0.0
>            Reporter: Colin Patrick McCabe
>            Assignee: Colin Patrick McCabe
>         Attachments: 0002-fix.patch, HDFS-3916.003.patch, 
> HDFS-3916.004.patch, HDFS-3916.005.patch
>
>
> Code cleanups in libwebhdfs.
> * don't duplicate exception.c, exception.h, expect.h, jni_helper.c.  We have 
> one copy of these files; we don't need 2.
> * remember to set errno in all public library functions (this is part of the 
> API)
> * fix undefined symbols (if a function is not implemented, it should return 
> ENOTSUP, but still exist)
> * don't expose private data structures in the (end-user visible) public 
> headers
> * can't re-use hdfsBuilder as hdfsFS, because the strings in hdfsBuilder are 
> not dynamically allocated.

--
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

Reply via email to