HBASE-11740 RegionStates.getRegionAssignments() gets stuck on clone (Virag Kothari)
This commit is contained in:
parent
0ca9a85c4d
commit
a3f99265c3
@ -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;
|
||||
@ -148,9 +149,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…
x
Reference in New Issue
Block a user