-
Type:
Sub-task
-
Status: Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 2.9.0, 3.0.0-alpha4
-
Component/s: namenode
-
Labels:None
-
Hadoop Flags:Reviewed
As discussed in HDFS-11535, this JIRA adds a new function combining both the new and the old chooseRandom methods for better performance.
More specifically, when choosing a random node with storage type requirement, the combined method first tries the old method of blindly picking a random node. If this node satisfies, it is returned. Otherwise, the new chooseRandom is called, which guarantees to find a eligible node in one call (if there is one at all).