Details
-
Sub-task
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.23.0
-
None
-
Reviewed
Description
This patch introduces two hash data structures for storing under-replicated, over-replicated and invalidated blocks.
1. LightWeightHashSet
2. LightWeightLinkedSet
Currently in all these cases we are using java.util.TreeSet which adds unnecessary overhead.
The main bottlenecks addressed by this patch are:
-cluster instability times, when these queues (especially under-replicated) tend to grow quite drastically,
-initial cluster startup, when the queues are initialized, after leaving safemode,
-block reports,
-explicit acks for block addition and deletion
1. The introduced structures are CPU-optimized.
2. They shrink and expand according to current capacity.
3. Add/contains/delete ops are performed in O(1) time (unlike current log n for TreeSet).
4. The sets are equipped with fast access methods for polling a number of elements (get+remove), which are used for handling the queues.