@Override
      public Pair<ServerName, List<ZkReplicationQueueData>> next() throws Exception {
        if (previousServerName != null) {
          if (hasRegionReplicaReplicationQueue) {
            // if there are region_replica_replication queues, we can not delete it, just delete
            // other queues, see HBASE-29169.
            cleanupQueuesWithoutRegionReplicaReplication(previousServerName);
          } else {
            ZKUtil.deleteNodeRecursively(zookeeper, getRsNode(previousServerName));
          }
        }
        if (!iter.hasNext()) {
          // If there are region_replica_replication queues then we can not delete the data right
          // now, otherwise we may crash the old region servers, see HBASE-29169.
          // The migration procedure has a special step to cleanup everything
          return null;
        }
        hasRegionReplicaReplicationQueue = false;
        String replicator = iter.next();
        ServerName serverName = ServerName.parseServerName(replicator);
        previousServerName = serverName;
        List<String> queueIdList = ZKUtil.listChildrenNoWatch(zookeeper, getRsNode(serverName));
        if (CollectionUtils.isEmpty(queueIdList)) {
          return Pair.newPair(serverName, Collections.emptyList());
        }
        List<ZkReplicationQueueData> queueDataList = new ArrayList<>(queueIdList.size());
        for (String queueIdStr : queueIdList) {
          ReplicationQueueInfo queueInfo = new ReplicationQueueInfo(queueIdStr);
          if (queueInfo.getPeerId().equals(REGION_REPLICA_REPLICATION_PEER)) {
            // we do not need to migrate the data for this queue, skip
            LOG.debug("Found region replica replication queue {}, skip", queueInfo);
            hasRegionReplicaReplicationQueue = true;
            continue;
          }
          ReplicationQueueId queueId;
          if (queueInfo.getDeadRegionServers().isEmpty()) {
            queueId = new ReplicationQueueId(serverName, queueInfo.getPeerId());
          } else {
            queueId = new ReplicationQueueId(serverName, queueInfo.getPeerId(),
              queueInfo.getDeadRegionServers().get(0));
          }
          List<String> wals =
            ZKUtil.listChildrenNoWatch(zookeeper, getQueueNode(serverName, queueIdStr));
          ZkReplicationQueueData queueData;
          if (wals == null || wals.isEmpty()) {
            queueData = new ZkReplicationQueueData(queueId, Collections.emptyMap());
          } else {
            Map<String, Long> walOffsets = new HashMap<>();
            for (String wal : wals) {
              byte[] data = ZKUtil.getData(zookeeper, getFileNode(serverName, queueIdStr, wal));
              if (data == null || data.length == 0) {
                walOffsets.put(wal, 0L);
              } else {
                walOffsets.put(wal, ZKUtil.parseWALPositionFrom(data));
              }
            }
            queueData = new ZkReplicationQueueData(queueId, walOffsets);
          }
          queueDataList.add(queueData);
        }
        return Pair.newPair(serverName, queueDataList);
      }
The name of the znode that contains queues of hfile references to be replicated
hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ZKReplicationQueueStorageForMigration.java