public static BlobStoreControlAdminRequest readFrom(DataInputStream stream, AdminRequest adminRequest)
      throws IOException {
    // read the version
    Short versionId = stream.readShort();
    if (!versionId.equals(VERSION_V1)) {
      throw new IllegalStateException("Unrecognized version for BlobStoreControlAdminRequest: " + versionId);
    }
    short numReplicasCaughtUpPerPartition = stream.readShort();
    BlobStoreControlAction controlRequestType = BlobStoreControlAction.values()[stream.readByte()];
    return new BlobStoreControlAdminRequest(numReplicasCaughtUpPerPartition, controlRequestType, adminRequest);
  }
Reads from a stream and constructs a {@link BlobStoreControlAdminRequest}.
@param stream the stream to read from
@param adminRequest the {@link AdminRequest} that contains some necessary headers.
@return the {@link BlobStoreControlAdminRequest} constructed from the {@code stream}.
@throws IOException if there is any problem reading from the stream
ambry-protocol/src/main/java/com/github/ambry/protocol/BlobStoreControlAdminRequest.java