Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.12.2
-
None
-
None
Description
A name node currently maintains a datanode map which maps a storage id to a dataNodeDescriptor. When the name node needs to get a datanodeDescriptor by its name (hostname:port#) or by its host name, it has to iterate through the data node set, which is very inefficent. I'd like to add an additional map that maps a host name to an array list of DatanodeDescriptors that contains all the data nodes running on the host. Since most of time a node runs only one data node, the intial size of the array list is set to be 1.