private AdminResponse handleBlobIndexRequest(DataInputStream requestStream, AdminRequest adminRequest) {
    final int correlationId = adminRequest.getCorrelationId();
    final String clientId = adminRequest.getClientId();
    BlobIndexAdminRequest blobIndexAdminRequest = null;
    String errorMessage = null;
    try {
      blobIndexAdminRequest = BlobIndexAdminRequest.readFrom(requestStream, adminRequest, storeKeyFactory);
    } catch (Exception e) {
      logger.error("Failed to deserialize BlobIndexAdminRequest", e);
      return new AdminResponseWithContent(correlationId, clientId, ServerErrorCode.BadRequest, null);
    }

    BlobId blobId = (BlobId) blobIndexAdminRequest.getStoreKey();
    try {
      PartitionId partitionId = blobId.getPartition();
      Store store = storeManager.getStore(partitionId);
      if (store == null) {
        logger.error("BlobId {}'s partition[{}] doesn't exist or stopped in this host", blobId, partitionId.getId());
        return new AdminResponseWithContent(correlationId, clientId, ServerErrorCode.ReplicaUnavailable, null);
      }

      Map<String, MessageInfo> messages = store.findAllMessageInfosForKey(blobId);
      // Serialize with JSON
      String json = objectMapper.writeValueAsString(messages);
      return new AdminResponseWithContent(correlationId, clientId, ServerErrorCode.NoError, json.getBytes());
    } catch (StoreException e) {
      logger.error("Failed to find all message infos for given key {}", blobId, e);
      errorMessage = e.getMessage();
    } catch (IOException e) {
      logger.error("Failed to serialize to json string", e);
      errorMessage = e.getMessage();
    } catch (Exception e) {
      logger.error("Unexpected error when handleBlobIndexRequest", e);
      errorMessage = e.getMessage();
    }
    return new AdminResponseWithContent(correlationId, clientId, ServerErrorCode.UnknownError,
        errorMessage.getBytes());
  }
Handles {@link BlobIndexAdminRequest}.
@param requestStream the serialized bytes of the request.
@param adminRequest the {@link AdminRequest} received.
@return the {@link AdminResponseWithContent} to the request.
ambry-server/src/main/java/com/github/ambry/server/AmbryServerRequests.java