hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yongjun Zhang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-5215) dfs.datanode.du.reserved is not taking effect as it's not considered while getting the available space
Date Thu, 19 Mar 2015 03:50:38 GMT

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

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

Hm, seems it's better we deduct reserved from DF.java:
{code}
 public long getAvailable() {
    return dirFile.getUsableSpace();
  }
{code}
That is, replace the above with {{ dirFile.getUsableSpace() - reserved; }}, if we define {{DF#getAvailable()}}
as the space available to HDFS.
 
Thanks.


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

Mime
View raw message