private ReplicationQueueData convert(ZkReplicationQueueData zkData) {
    Map<String, ReplicationGroupOffset> groupOffsets = new HashMap<>();
    zkData.getWalOffsets().forEach((wal, offset) -> {
      String walGroup = AbstractFSWALProvider.getWALPrefixFromWALName(wal);
      groupOffsets.compute(walGroup, (k, oldOffset) -> {
        if (oldOffset == null) {
          return new ReplicationGroupOffset(wal, offset);
        }
        // we should record the first wal's offset
        long oldWalTs = AbstractFSWALProvider.getTimestamp(oldOffset.getWal());
        long walTs = AbstractFSWALProvider.getTimestamp(wal);
        if (walTs < oldWalTs) {
          return new ReplicationGroupOffset(wal, offset);
        }
        return oldOffset;
      });
    });
    return new ReplicationQueueData(zkData.getQueueId(), ImmutableMap.copyOf(groupOffsets));
  }
For replication peer cluster key or endpoint class, null and empty string is same. So here
don't use {@link StringUtils#equals(CharSequence, CharSequence)} directly.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ReplicationPeerManager.java