protected MessageFormatWriteSet getMessageFormatWriteSet(PutRequest receivedRequest)
      throws MessageFormatException, IOException {
    MessageFormatInputStream stream =
        new PutMessageFormatInputStream(receivedRequest.getBlobId(), receivedRequest.getBlobEncryptionKey(),
            receivedRequest.getBlobProperties(), receivedRequest.getUsermetadata(), receivedRequest.getBlobStream(),
            receivedRequest.getBlobSize(), receivedRequest.getBlobType(), (short) 0, receivedRequest.isCompressed());
    BlobProperties properties = receivedRequest.getBlobProperties();
    long expirationTime = Utils.addSecondsToEpochTime(receivedRequest.getBlobProperties().getCreationTimeInMs(),
        properties.getTimeToLiveInSeconds());
    MessageInfo info = new MessageInfo.Builder(receivedRequest.getBlobId(), stream.getSize(), properties.getAccountId(),
        properties.getContainerId(), properties.getCreationTimeInMs()).expirationTimeInMs(expirationTime)
        .crc(receivedRequest.getCrc())
        .lifeVersion(MessageInfo.LIFE_VERSION_FROM_FRONTEND)
        .build();
    ArrayList<MessageInfo> infoList = new ArrayList<>();
    infoList.add(info);
    return new MessageFormatWriteSet(stream, infoList, false);
  }
Get the formatted messages which needs to be written to Store.
@param receivedRequest received Put Request
@return {@link MessageFormatWriteSet} that contains the formatted messages which needs to be written to store.
ambry-server/src/main/java/com/github/ambry/server/AmbryRequests.java