Class ReadPointCalculationLock
java.lang.Object
org.apache.hadoop.hbase.regionserver.ReadPointCalculationLock
Lock to manage concurrency between 
RegionScanner and
 HRegion.getSmallestReadPoint(). We need to ensure that while we are calculating the
 smallest read point, no new scanners can modify the scannerReadPoints Map. We used to achieve
 this by synchronizing on the scannerReadPoints object. But this may block the read thread and
 reduce the read performance. Since the scannerReadPoints object is a
 ConcurrentHashMap, which is thread-safe, so the
 RegionScanner can record their read points concurrently, what it needs to do is just
 acquiring a shared lock. When we calculate the smallest read point, we need to acquire an
 exclusive lock. This can improve read performance in most scenarios, only not when we have a lot
 of delta operations, like Append or
 Increment. So we introduce a flag to enable/disable this
 feature.- 
Nested Class SummaryNested Classes
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescription(package private) voidlock(ReadPointCalculationLock.LockType lockType) (package private) voidunlock(ReadPointCalculationLock.LockType lockType) 
- 
Field Details- 
useReadWriteLockForReadPoints
- 
lock
- 
readWriteLock
 
- 
- 
Constructor Details- 
ReadPointCalculationLockReadPointCalculationLock(org.apache.hadoop.conf.Configuration conf) 
 
- 
- 
Method Details- 
lock
- 
unlock
 
-