Class WriterChunkingHelper

java.lang.Object
com.linkedin.venice.writer.WriterChunkingHelper

public class WriterChunkingHelper extends Object
This class is a helper class that contains writer side chunking logics.
  • Field Details

    • EMPTY_BYTE_BUFFER

      public static final ByteBuffer EMPTY_BYTE_BUFFER
  • Constructor Details

    • WriterChunkingHelper

      public WriterChunkingHelper()
  • Method Details

    • chunkPayloadAndSend

      public static ChunkedPayloadAndManifest chunkPayloadAndSend(byte[] serializedKey, byte[] payload, boolean isValuePayload, int schemaId, int chunkedKeySuffixStartingIndex, boolean isChunkAwareCallback, Supplier<String> sizeReport, int maxSizeForUserPayloadPerMessageInBytes, KeyWithChunkingSuffixSerializer keyWithChunkingSuffixSerializer, BiConsumer<VeniceWriter.KeyProvider,Put> sendMessageFunction)
      This method chunks payload and send each chunk out.
      Parameters:
      serializedKey - serialized key input
      payload - serialized payload could be value bytes or RMD bytes.
      schemaId - value schema ID
      isChunkAwareCallback - boolean flag indicating whether to create chunk
      sizeReport - supplier function for size report.
      maxSizeForUserPayloadPerMessageInBytes - maximum size for payload in a message
      keyWithChunkingSuffixSerializer - Chunking suffix serializer for key
      sendMessageFunction - Pass in function for sending message
      Returns:
      Chunked payload arrays and manifest.