HBASE-25311 UI throws NPE (#2688)
Signed-off-by: Guanghao Zhang <zghao@apache.org> Signed-off-by: Wellington Chevreuil <wellington.chevreuil@gmail.com> Signed-off-by: Viraj Jasani <vjasani@apache.org>
This commit is contained in:
parent
a307d706c8
commit
b0f20399e7
|
@ -3621,8 +3621,15 @@ public class HMaster extends HRegionServer implements MasterServices {
|
|||
List<ReplicationLoadSource> replicationLoadSources =
|
||||
getServerManager().getLoad(serverName).getReplicationLoadSourceList();
|
||||
for (ReplicationLoadSource replicationLoadSource : replicationLoadSources) {
|
||||
replicationLoadSourceMap.get(replicationLoadSource.getPeerID())
|
||||
.add(new Pair<>(serverName, replicationLoadSource));
|
||||
List<Pair<ServerName, ReplicationLoadSource>> replicationLoadSourceList =
|
||||
replicationLoadSourceMap.get(replicationLoadSource.getPeerID());
|
||||
if (replicationLoadSourceList == null) {
|
||||
LOG.debug("{} does not exist, but it exists "
|
||||
+ "in znode(/hbase/replication/rs). when the rs restarts, peerId is deleted, so "
|
||||
+ "we just need to ignore it", replicationLoadSource.getPeerID());
|
||||
continue;
|
||||
}
|
||||
replicationLoadSourceList.add(new Pair<>(serverName, replicationLoadSource));
|
||||
}
|
||||
}
|
||||
for (List<Pair<ServerName, ReplicationLoadSource>> loads : replicationLoadSourceMap.values()) {
|
||||
|
|
Loading…
Reference in New Issue