Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
In org.apache.hadoop.util.Progress.get(), we walk through the tree of objects to find the root of a node, before figuring out the progress. This approach is not optimized, especially since get() is called frequently. Each Progressnode should cache its root object, and this is easy to do since nodes do not change their parents.
Keeping track of the root node is also useful in synchronization issues. [see HADOOP-1970 for more details]. The root node can be used to synchronize the entire structure for methods that need to traverse the tree in different directions and lock nodes along the way.