private static void sendReplicationControlRequest(ServerAdminTool serverAdminTool, DataNodeId dataNodeId,
      PartitionId partitionId, List<String> origins, boolean enable) throws IOException, TimeoutException {
    ServerErrorCode errorCode = serverAdminTool.controlReplication(dataNodeId, partitionId, origins, enable);
    if (errorCode == ServerErrorCode.NoError) {
      LOGGER.info("Enable state of replication from {} has been set to {} for {} on {}",
          origins.isEmpty() ? "all DCs" : origins, enable, partitionId == null ? "all partitions" : partitionId,
          dataNodeId);
    } else {
      LOGGER.error(
          "From {}, received server error code {} for request to set enable state {} for replication from {} for {}",
          dataNodeId, errorCode, enable, origins, partitionId);
    }
  }
Sends a {@link ReplicationControlAdminRequest} to {@code dataNodeId} to set enable status of replication from
{@code origins} to {@code enable} for {@code partitionId}.
@param serverAdminTool the {@link ServerAdminTool} instance to use.
@param dataNodeId the {@link DataNodeId} to send the request to.
@param partitionId the partition id  on which the operation will take place. Can be {@code null}.
@param origins the names of the datacenters from which replication should be controlled.
@param enable the enable (or disable) status required for replication control.
@throws IOException
@throws TimeoutException
ambry-tools/src/main/java/com/github/ambry/tools/admin/ServerAdminTool.java