HBASE-18788 NPE when running TestSerialReplication (Fabrice Monnier)

This commit is contained in:
Michael Stack 2017-10-08 17:03:39 -07:00
parent bb28a3b466
commit a4afa38f7a
No known key found for this signature in database
GPG Key ID: 9816C7FC8ACC93D2
1 changed files with 6 additions and 2 deletions

View File

@ -83,8 +83,12 @@ public class ReplicationMetaCleaner extends ScheduledChore {
List<ReplicationPeerDescription> peers = admin.listReplicationPeers();
for (ReplicationPeerDescription peerDesc : peers) {
for (Map.Entry<TableName, List<String>> map : peerDesc.getPeerConfig().getTableCFsMap()
.entrySet()) {
Map<TableName, List<String>> tableCFsMap = peerDesc.getPeerConfig().getTableCFsMap();
if (tableCFsMap ==null) {
continue;
}
for (Map.Entry<TableName, List<String>> map : tableCFsMap.entrySet()) {
if (serialTables.containsKey(map.getKey().getNameAsString())) {
serialTables.get(map.getKey().getNameAsString()).add(peerDesc.getPeerId());
break;