Details
-
Sub-task
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
None
-
None
-
None
-
None
Description
1. Change cachedRegionsLocations in HConnectionManager from SoftValueSortedMap to ConcurrentSkipListMap:
This change saves 15% CPU on the client side per profiling. In using the ConcurrentSkipListMap, we can do:
tableLocations.floorEntry(row).getValue()
instead of doing:
SortedMap<byte[], HRegionLocation> matchingRegions =
tableLocations.floorEntry(row).getValue();
if (!matchingRegions.isEmpty()) {
HRegionLocation possibleRegion =
matchingRegions.get(matchingRegions.lastKey());
}
2. NetUtils.getDefaultSocketFactory is very inefficient, use