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

Yongjun Zhang commented on HDFS-5215:
-------------------------------------

Hi [~brahmareddy],

I studied the callers of {{DF#getAvailable()}} including 
{{LocalDirAllocator#getLocalPathForWrite}} a little more and realize that they 
don't need to be aware of the {{reserved}} space specified by  
{{dfs.datanode.du.reserved}}. So we don't need to touch the implementation in 
DF.java.

Sorry for the forth and back.


> dfs.datanode.du.reserved is not taking effect as it's not considered while 
> getting the available space
> ------------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-5215
>                 URL: https://issues.apache.org/jira/browse/HDFS-5215
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: datanode
>    Affects Versions: 3.0.0
>            Reporter: Brahma Reddy Battula
>            Assignee: Brahma Reddy Battula
>         Attachments: HDFS-5215.patch
>
>
> {code}public long getAvailable() throws IOException {
>     long remaining = getCapacity()-getDfsUsed();
>     long available = usage.getAvailable();
>     if (remaining > available) {
>       remaining = available;
>     }
>     return (remaining > 0) ? remaining : 0;
>   } 
> {code}
> Here we are not considering the reserved space while getting the Available 
> Space.



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

Reply via email to