private AdminResponse handleTriggerCompactionRequest(AdminRequest adminRequest) {
    ServerErrorCode error = validateRequest(adminRequest.getPartitionId(), RequestOrResponseType.AdminRequest, false);
    if (error != ServerErrorCode.NoError) {
      logger.error("Validating trigger compaction request failed with error {} for {}", error, adminRequest);
    } else if (!storeManager.scheduleNextForCompaction(adminRequest.getPartitionId())) {
      error = ServerErrorCode.UnknownError;
      logger.error("Triggering compaction failed for {}. Check if admin trigger is enabled for compaction",
          adminRequest);
    }
    return new AdminResponse(adminRequest.getCorrelationId(), adminRequest.getClientId(), error);
  }
Handles {@link com.github.ambry.protocol.AdminRequestOrResponseType#TriggerCompaction}.
@param adminRequest the {@link AdminRequest} received.
@return the {@link AdminResponse} to the request.
ambry-server/src/main/java/com/github/ambry/server/AmbryServerRequests.java