Details
Description
About 75% improvement in execution time.
1. Add the following method in SoftValueSortedMap:
public synchronized <K, V> Entry<K, V> lowerEntry(K key) { return ((TreeMap) this.internalMap).lowerEntry(key); }
2. Modify getCachedLocation:
Map.Entry<byte[], HRegionLocation> tEntry = tableLocations.lowerEntry(row); if (tEntry != null) { HRegionLocation possibleRegion = tEntry.getValue(); //other code }