private AdminResponse handleBlobStoreControlRequest(DataInputStream requestStream, AdminRequest adminRequest)
      throws StoreException, IOException {
    ServerErrorCode error;
    BlobStoreControlAdminRequest blobStoreControlAdminRequest =
        BlobStoreControlAdminRequest.readFrom(requestStream, adminRequest);
    PartitionId partitionId = blobStoreControlAdminRequest.getPartitionId();
    if (partitionId != null) {
      switch (blobStoreControlAdminRequest.getStoreControlAction()) {
        case StopStore:
          short numReplicasCaughtUpPerPartition = blobStoreControlAdminRequest.getNumReplicasCaughtUpPerPartition();
          logger.info(
              "Handling stop store request and {} replica(s) per partition should catch up before stopping store {}",
              numReplicasCaughtUpPerPartition, partitionId);
          error = handleStopStoreRequest(partitionId, numReplicasCaughtUpPerPartition);
          break;
        case StartStore:
          logger.info("Handling start store request on {}", partitionId);
          error = handleStartStoreRequest(partitionId);
          break;
        case AddStore:
          logger.info("Handling add store request for {}", partitionId);
          error = handleAddStoreRequest(partitionId);
          break;
        case RemoveStore:
          logger.info("Handling remove store request on {}", partitionId);
          error = handleRemoveStoreRequest(partitionId);
          break;
        default:
          throw new IllegalArgumentException(
              "NetworkRequest type not supported: " + blobStoreControlAdminRequest.getStoreControlAction());
      }
    } else {
      error = ServerErrorCode.BadRequest;
      logger.debug("The partition Id should not be null.");
    }
    return new AdminResponse(adminRequest.getCorrelationId(), adminRequest.getClientId(), error);
  }
Handles {@link com.github.ambry.protocol.AdminRequestOrResponseType#BlobStoreControl}.
@param requestStream the serialized bytes of the request.
@param adminRequest the {@link AdminRequest} received.
@return the {@link AdminResponse} to the request.
@throws IOException if there is any I/O error reading from the {@code requestStream}.
ambry-server/src/main/java/com/github/ambry/server/AmbryServerRequests.java