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

James Clampffer commented on HDFS-9271:
---------------------------------------

Awesome! Thanks for this, it pretty much completes the the read side of things 
from a functional point of view, +1.


Two minor issues, but the fixes are isolated and chances of hitting them are 
low so let's defer to another JIRA and land this work:

1)  get_working_directory and set_working_directory should be synchronized.  
What you really don't want is get_working_directory to be called right as 
operator= is being called in set_working_directory since it might not have the 
null terminator copied in yet.

2) Make FileHandleImpl::bytes_read atomic or wrap access in a lock; 
std::atomic<uint64_t> might be the way to go.  The common case of 1 FH per 
operation won't ever have issues but if a lot of async PositionRead calls are 
made the sum of the bytes read could be incorrect occasionally depending on the 
memory model of the hardware.

Let me know what you think about handling those in another jira and I'll commit 
to HDFS-8707.

> 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, 
> HDFS-9271.HDFS-8707.003.patch, HDFS-9271.HDFS-8707.004.patch, 
> HDFS-9271.HDFS-8707.005.patch, HDFS-9271.HDFS-8707.006.patch, 
> HDFS-9271.HDFS-8707.007.patch, HDFS-9271.HDFS-8707.008.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