public static ReplicationProtos.SyncReplicationState
    toSyncReplicationState(SyncReplicationState state) {
    ReplicationProtos.SyncReplicationState.Builder syncReplicationStateBuilder =
      ReplicationProtos.SyncReplicationState.newBuilder();
    syncReplicationStateBuilder
      .setState(ReplicationProtos.SyncReplicationState.State.forNumber(state.ordinal()));
    return syncReplicationStateBuilder.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