HBASE-10294 ServerManager#onlineServers synchronization
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1558174 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1951d272a2
commit
405b51a0eb
|
@ -421,8 +421,10 @@ public class ServerManager {
|
||||||
*/
|
*/
|
||||||
public Map<ServerName, ServerLoad> getOnlineServers() {
|
public Map<ServerName, ServerLoad> getOnlineServers() {
|
||||||
// Presumption is that iterating the returned Map is OK.
|
// Presumption is that iterating the returned Map is OK.
|
||||||
|
synchronized (this.onlineServers) {
|
||||||
return Collections.unmodifiableMap(this.onlineServers);
|
return Collections.unmodifiableMap(this.onlineServers);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public DeadServer getDeadServers() {
|
public DeadServer getDeadServers() {
|
||||||
|
|
Loading…
Reference in New Issue