[
https://issues.apache.org/jira/browse/HBASE-11290?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Virag Kothari updated HBASE-11290:
----------------------------------
Attachment: HBASE-11290-0.98.patch
The attached patch for 0.98 does the following:
- Uses a concurrent cache to implement region locks
- All Hashmap converted to CHM, Treemap to ConcurrentSkipListMap.
- For RegionStates, setters updating multiple collections keyed by region names
will acquire region locks. (ServerHoldings map is keyed by serverName, but it
didn't seem necessary to obtain server locks).
- Getters can directly use CHM or ConcurrentSkipListMap without additional
locks.
- RegionPlans TreeMap in AM also converted to ConcurrentSkipListMap
WIP:
- Need a way to remove entries from Cache. Was looking at Guava's CacheBuilder
(allows soft values) yest. Can that help?
- Patch for trunk
Please review. Thanks!
> Unlock RegionStates
> -------------------
>
> Key: HBASE-11290
> URL: https://issues.apache.org/jira/browse/HBASE-11290
> Project: HBase
> Issue Type: Sub-task
> Reporter: Francis Liu
> Assignee: Virag Kothari
> Attachments: HBASE-11290-0.98.patch, HBASE-11290.draft.patch
>
>
> Even though RegionStates is a highly accessed data structure in HMaster. Most
> of it's methods are synchronized. Which limits concurrency. Even simply
> making some of the getters non-synchronized by using concurrent data
> structures has helped with region assignments. We can go as simple as this
> approach or create locks per region or a bucket lock per region bucket.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)