@Override
  protected void prepareBuffer() {
    super.prepareBuffer();
    bufferToSend.writeInt(batchDeletePartitionRequestInfos.size());
    for (BatchDeletePartitionRequestInfo partitionRequestInfo : batchDeletePartitionRequestInfos) {
      partitionRequestInfo.writeTo(bufferToSend);
    }
    bufferToSend.writeLong(deletionTimeInMs);
  }
Constructs {@link BatchDeleteRequest} reading from a stream {@link DataInputStream}
@param stream the stream to read from
@param clusterMap the {@link ClusterMap} to use
@return the constructed {@link BatchDeleteRequest}
ambry-protocol/src/main/java/com/github/ambry/protocol/BatchDeleteRequest.java