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

Hadoop QA commented on HDFS-8045:
---------------------------------

{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  http://issues.apache.org/jira/secure/attachment/12708970/HDFS-8045-001.patch
  against trunk revision 867d5d2.

    {color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

    {color:red}-1 tests included{color}.  The patch doesn't appear to include 
any new or modified tests.
                        Please justify why no new tests are needed for this 
patch.
                        Also please list what manual steps were performed to 
verify this patch.

    {color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

    {color:green}+1 javadoc{color}.  There were no new javadoc warning messages.

    {color:green}+1 eclipse:eclipse{color}.  The patch built with 
eclipse:eclipse.

    {color:green}+1 findbugs{color}.  The patch does not introduce any new 
Findbugs (version 2.0.3) warnings.

    {color:green}+1 release audit{color}.  The applied patch does not increase 
the total number of release audit warnings.

    {color:red}-1 core tests{color}.  The patch failed these unit tests in 
hadoop-hdfs-project/hadoop-hdfs:

                  org.apache.hadoop.hdfs.server.namenode.ha.TestRetryCacheWithHA
                  org.apache.hadoop.hdfs.qjournal.TestSecureNNWithQJM

                                      The following test timeouts occurred in 
hadoop-hdfs-project/hadoop-hdfs:

org.apache.hadoop.hdfs.server.blockmanagement.TestDatanodeManager

Test results: 
https://builds.apache.org/job/PreCommit-HDFS-Build/10162//testReport/
Console output: 
https://builds.apache.org/job/PreCommit-HDFS-Build/10162//console

This message is automatically generated.

> Incorrect calculation of NonDfsUsed and Remaining
> -------------------------------------------------
>
>                 Key: HDFS-8045
>                 URL: https://issues.apache.org/jira/browse/HDFS-8045
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: datanode
>    Affects Versions: 2.6.0
>            Reporter: zhouyingchao
>            Assignee: zhouyingchao
>         Attachments: HDFS-8045-001.patch
>
>
> After reserve some space via the param "dfs.datanode.du.reserved", we noticed 
> that the namenode usually report NonDfsUsed of Datanodes as 0 even if we 
> write some non-hdfs data to the volume. After some investigation, we think 
> there is an issue in the calculation of FsVolumeImpl.getAvailable - following 
> is the explaination.
> For a volume, let's use Raw to represent raw capacity, DfsUsed to represent 
> space consumed by hdfs blocks, Reserved to represent reservation through 
> "dfs.datanode.du.reserved", RbwReserved to represent space reservation for 
> rbw blocks, RealNonDfsUsed to represent real value of NonDfsUsed(which will 
> include non-hdfs files and meta data consumed by local filesystem).
> In current implementation, for a volume, available space will be actually 
> calculated as  
> {code}
> min{Raw - Reserved - DfsUsed -RbwReserved,  Raw - DfsUsed - RealNonDfsUsed }
> {code}
> Later on, Namenode will calculate NonDfsUsed of the volume as 
> {code}
> Raw - Reserved - DfsUsed - min{Raw - Reserved - DfsUsed - RbwReserved, Raw - 
> DfsUsed - RealNonDfsUsed}
> {code}
> Given the calculation, finally we will have -
> {code}
> if (Reserved + RbwReserved > RealNonDfsUsed) NonDfsUsed = RbwReserved;
> else NonDfsUsed = RealNonDfsUsed - Reserved;
> {code}
> Either way it is far from the correct value.
> After investigating the implementation, we believe the Reserved and 
> RbwReserved should be subtract from available in getAvailable since they are 
> actually not available to hdfs in any sense.  I'll post a patch soon.



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

Reply via email to