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

Anatoli Shein commented on HDFS-9271:
-------------------------------------

Thank you [~bobhansen] for your comments. Here is what I did:

A few comments:
* In GetBlockLocations(hdfspp.h, filesystem.cc), use offset_t or uint64_t 
rather than long. It's less ambiguous.
(/) I used uint64_t and also updated short variables to uint16_t
* In getAbsolutePath (hdfs.cc), how about returning optional(string) rather 
than an empty string on error. It makes the error state explicit and explicitly 
checked.
(/) Done
* Make a new bug to capture supporting ".." semantics
(/) Bug filed: HDFS-10621.
* It appears the majority of hdfs_ext_test.c has been commented out. What this 
intentional, or debugging dirt that slipped in?
(/) Debugging dirt removed
* Can we add a test for relative paths for all the functions where we added 
them in?
(/) Added this to hdfs_ext_test.c
* Can we implement hdfsMove and/or hdfsTruncateFile with just metadata 
operations?
(x) As per our conversation today, this cannot be done yet
* Move to libhdfspp implementations in hdfs_shim for 
GetDefaultBlocksize\[AtPath]
(/) Done
* Implement hdfsUnbufferFile as a no-op?
(/) Done
* Do we support single-dot relative paths? e.g. can I call hdfsGetPathInfo(fs, 
".")? Do we have tests over that?
(x) We do not support this yet. It is captured in HDFS-10621.
* Do we have tests that show that libhdfspp's getReadStatistics match libhdfs's 
getReadStatistics?
(x) We do not track which bytes were remote or local. Temporary assume 
everything is local.

Minor little nits:
* For the absolute path, I personally prefer abs_path = getAbsolutPath(...) 
rather than abs_path(getAbsolutePath). They both compile to the same thing (see 
https://en.wikipedia.org/wiki/Return_value_optimization); I think the 
whitespace with the assignment makes the what and the content separation cleaner
(/) Done
* Refactor CheckSystemAndHandle to use CheckHandle 
(https://en.wikipedia.org/wiki/Don't_repeat_yourself)
(/) Done

> Implement basic NN operations
> -----------------------------
>
>                 Key: HDFS-9271
>                 URL: https://issues.apache.org/jira/browse/HDFS-9271
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: hdfs-client
>            Reporter: Bob Hansen
>            Assignee: Anatoli Shein
>         Attachments: HDFS-9271.HDFS-8707.000.patch, 
> HDFS-9271.HDFS-8707.001.patch, HDFS-9271.HDFS-8707.002.patch
>
>
> Expose via C and C++ API:
> * mkdirs
> * rename
> * delete
> * stat
> * chmod
> * chown
> * getListing
> * setOwner



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

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to