HBASE-5088 addendum
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1228761 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d821f6fcfc
commit
dd604d3136
|
@ -522,9 +522,9 @@ public class HConnectionManager {
|
|||
* Map of table to table {@link HRegionLocation}s. The table key is made
|
||||
* by doing a {@link Bytes#mapKey(byte[])} of the table's name.
|
||||
*/
|
||||
private final Map<Integer, SoftValueSortedMap<byte [], HRegionLocation>>
|
||||
private final Map<Integer, SortedMap<byte [], HRegionLocation>>
|
||||
cachedRegionLocations =
|
||||
new HashMap<Integer, SoftValueSortedMap<byte [], HRegionLocation>>();
|
||||
new HashMap<Integer, SortedMap<byte [], HRegionLocation>>();
|
||||
|
||||
// The presence of a server in the map implies it's likely that there is an
|
||||
// entry in cachedRegionLocations that map to this server; but the absence
|
||||
|
@ -1069,7 +1069,7 @@ public class HConnectionManager {
|
|||
*/
|
||||
HRegionLocation getCachedLocation(final byte [] tableName,
|
||||
final byte [] row) {
|
||||
SoftValueSortedMap<byte [], HRegionLocation> tableLocations =
|
||||
SortedMap<byte [], HRegionLocation> tableLocations =
|
||||
getTableLocations(tableName);
|
||||
|
||||
// start to examine the cache. we can only do cache actions
|
||||
|
@ -1180,11 +1180,11 @@ public class HConnectionManager {
|
|||
* @param tableName
|
||||
* @return Map of cached locations for passed <code>tableName</code>
|
||||
*/
|
||||
private SoftValueSortedMap<byte [], HRegionLocation> getTableLocations(
|
||||
private SortedMap<byte [], HRegionLocation> getTableLocations(
|
||||
final byte [] tableName) {
|
||||
// find the map of cached locations for this table
|
||||
Integer key = Bytes.mapKey(tableName);
|
||||
SoftValueSortedMap<byte [], HRegionLocation> result;
|
||||
SortedMap<byte [], HRegionLocation> result;
|
||||
synchronized (this.cachedRegionLocations) {
|
||||
result = this.cachedRegionLocations.get(key);
|
||||
// if tableLocations for this table isn't built yet, make one
|
||||
|
|
Loading…
Reference in New Issue