public static byte[] toByteArray(final ReplicationPeerConfig peerConfig) {
    byte[] bytes = convert(peerConfig).toByteArray();
    return ProtobufUtil.prependPBMagic(bytes);
  }
Returns Serialized protobuf of <code>peerConfig</code> with pb magic prefix prepended suitable
for use as content of a this.peersZNode; i.e. the content of PEER_ID znode under
/hbase/replication/peers/PEER_ID
hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationPeerConfigUtil.java