HBASE-18788 NPE when running TestSerialReplication (Fabrice Monnier)

This commit is contained in:
Michael Stack 2017-10-08 17:03:39 -07:00
parent 9ae2750588
commit 6e772096ad
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(); List<ReplicationPeerDescription> peers = admin.listReplicationPeers();
for (ReplicationPeerDescription peerDesc : peers) { for (ReplicationPeerDescription peerDesc : peers) {
for (Map.Entry<TableName, List<String>> map : peerDesc.getPeerConfig().getTableCFsMap() Map<TableName, List<String>> tableCFsMap = peerDesc.getPeerConfig().getTableCFsMap();
.entrySet()) { if (tableCFsMap ==null) {
continue;
}
for (Map.Entry<TableName, List<String>> map : tableCFsMap.entrySet()) {
if (serialTables.containsKey(map.getKey().getNameAsString())) { if (serialTables.containsKey(map.getKey().getNameAsString())) {
serialTables.get(map.getKey().getNameAsString()).add(peerDesc.getPeerId()); serialTables.get(map.getKey().getNameAsString()).add(peerDesc.getPeerId());
break; break;