Package com.linkedin.venice.writer
Class WriterChunkingHelper
java.lang.Object
com.linkedin.venice.writer.WriterChunkingHelper
This class is a helper class that contains writer side chunking logics.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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.
-
Field Details
-
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 inputpayload
- serialized payload could be value bytes or RMD bytes.schemaId
- value schema IDisChunkAwareCallback
- boolean flag indicating whether to create chunksizeReport
- supplier function for size report.maxSizeForUserPayloadPerMessageInBytes
- maximum size for payload in a messagekeyWithChunkingSuffixSerializer
- Chunking suffix serializer for keysendMessageFunction
- Pass in function for sending message- Returns:
- Chunked payload arrays and manifest.
-