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

Tsz Wo (Nicholas), SZE commented on HDFS-4635:
----------------------------------------------

TestGSet failed by the round off error in TestGSet.isPowerOfTwo(..): 2^29 = 
536870912 but isPowerOfTwo(536870912) = false.  We may fix it as below.
{code}
  private static boolean isPowerOfTwo(int num) {
    if (num == 0) {
      return true;
    }
    return num > 0 && Integer.bitCount(num) == 1;
  }
{code}

                
> Move BlockManager#computeCapacity to LightWeightGSet
> ----------------------------------------------------
>
>                 Key: HDFS-4635
>                 URL: https://issues.apache.org/jira/browse/HDFS-4635
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: namenode
>            Reporter: Suresh Srinivas
>            Assignee: Suresh Srinivas
>         Attachments: HDFS-4635.patch, HDFS-4635.patch
>
>
> The computeCapacity in BlockManager that calculates the LightWeightGSet 
> capacity as the percentage of total JVM memory should be moved to 
> LightWeightGSet. This helps in other maps that are based on the GSet to make 
> use of the same functionality.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to