public static ReplicationProtos.ReplicationPeerDescription
    toProtoReplicationPeerDescription(ReplicationPeerDescription desc) {
    ReplicationProtos.ReplicationPeerDescription.Builder builder =
      ReplicationProtos.ReplicationPeerDescription.newBuilder();
    builder.setId(desc.getPeerId());

    ReplicationProtos.ReplicationState.Builder stateBuilder =
      ReplicationProtos.ReplicationState.newBuilder();
    stateBuilder.setState(desc.isEnabled()
      ? ReplicationProtos.ReplicationState.State.ENABLED
      : ReplicationProtos.ReplicationState.State.DISABLED);
    builder.setState(stateBuilder.build());

    builder.setConfig(convert(desc.getPeerConfig()));
    builder.setSyncReplicationState(toSyncReplicationState(desc.getSyncReplicationState()));

    return builder.build();
  }
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