HBASE-11740 RegionStates.getRegionAssignments() gets stuck on clone (Virag Kothari)
This commit is contained in:
parent
dbf16df44c
commit
2c5825d897
|
@ -20,6 +20,7 @@ package org.apache.hadoop.hbase.master;
|
|||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
|
@ -144,9 +145,8 @@ public class RegionStates {
|
|||
/**
|
||||
* @return an unmodifiable the region assignment map
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public synchronized Map<HRegionInfo, ServerName> getRegionAssignments() {
|
||||
return (Map<HRegionInfo, ServerName>)regionAssignments.clone();
|
||||
return Collections.unmodifiableMap(regionAssignments);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue