[ https://issues.apache.org/jira/browse/HDFS-1114?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12861725#action_12861725 ]
Tsz Wo (Nicholas), SZE commented on HDFS-1114: ---------------------------------------------- In Java 1.6, java.util.HashMap has an array of HashMap.Entry {code} //HashMap transient Entry[] table; {code} where HashMap.Entry has the following members {code} //HashMap.Entry final K key; V value; Entry<K,V> next; final int hash; {code} In the BlocksMap, we have the following invariants - K == V == BlockInfo - key == value, i.e. they point to the same BlockInfo object. Therefore, we may reduce the memory footprint by # eliminating HashMap.Entry class # keeping only one object reference # possibly eliminating next and hash Will provide more design details. > Reducing NameNode memory usage by an alternate hash table > --------------------------------------------------------- > > Key: HDFS-1114 > URL: https://issues.apache.org/jira/browse/HDFS-1114 > Project: Hadoop HDFS > Issue Type: Improvement > Components: name-node > Reporter: Tsz Wo (Nicholas), SZE > Assignee: Tsz Wo (Nicholas), SZE > > NameNode uses a java.util.HashMap to store BlockInfo objects. When there are > many blocks in HDFS, this map uses a lot of memory in the NameNode. We may > optimize the memory usage by a light weight hash table implementation. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.