public static byte[] toByteArray(SyncReplicationState state) {
    return ProtobufUtil
      .prependPBMagic(ReplicationPeerConfigUtil.toSyncReplicationState(state).toByteArray());
  }
Used by synchronous replication. Indicate the state of the current cluster in a synchronous
replication peer. The state may be one of {@link SyncReplicationState#ACTIVE},
{@link SyncReplicationState#DOWNGRADE_ACTIVE} or {@link SyncReplicationState#STANDBY}.
<p>
For asynchronous replication, the state is {@link SyncReplicationState#NONE}.
hbase-client/src/main/java/org/apache/hadoop/hbase/replication/SyncReplicationState.java