Package com.linkedin.venice.utils
Class ChunkingTestUtils
- java.lang.Object
-
- com.linkedin.venice.utils.ChunkingTestUtils
-
public final class ChunkingTestUtils extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static int
CHUNK_LENGTH
static KeyWithChunkingSuffixSerializer
KEY_WITH_CHUNKING_SUFFIX_SERIALIZER
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]
createChunkBytes(int startValue, int chunkLength)
static ChunkedKeySuffix
createChunkedKeySuffix(int firstSegmentNumber, int firstSequenceNumber, int chunkIndex)
static PubSubMessage<KafkaKey,KafkaMessageEnvelope,java.lang.Long>
createChunkedRecord(byte[] serializedKey, int firstSegmentNumber, int firstSequenceNumber, int chunkIndex, int firstMessageOffset, PubSubTopicPartition pubSubTopicPartition)
static PubSubMessage<KafkaKey,KafkaMessageEnvelope,java.lang.Long>
createChunkValueManifestRecord(byte[] serializedKey, PubSubMessage<KafkaKey,KafkaMessageEnvelope,java.lang.Long> firstMessage, int numberOfChunks, PubSubTopicPartition pubSubTopicPartition)
static PubSubMessage<KafkaKey,KafkaMessageEnvelope,java.lang.Long>
createDeleteRecord(byte[] serializedKey, byte[] serializedRmd, PubSubTopicPartition pubSubTopicPartition)
static KafkaMessageEnvelope
createKafkaMessageEnvelope(MessageType messageType, int segmentNumber, int sequenceNumber)
static PubSubMessage<KafkaKey,KafkaMessageEnvelope,java.lang.Long>
createPutRecord(byte[] serializedKey, byte[] serializedValue, byte[] serializedRmd, PubSubTopicPartition pubSubTopicPartition)
static java.nio.ByteBuffer
createReplicationMetadataPayload(int size)
static PubSubMessage<KafkaKey,KafkaMessageEnvelope,java.lang.Long>
createUpdateRecord(byte[] serializedKey, byte[] serializedValue, PubSubTopicPartition pubSubTopicPartition)
-
-
-
Field Detail
-
CHUNK_LENGTH
public static final int CHUNK_LENGTH
- See Also:
- Constant Field Values
-
KEY_WITH_CHUNKING_SUFFIX_SERIALIZER
public static final KeyWithChunkingSuffixSerializer KEY_WITH_CHUNKING_SUFFIX_SERIALIZER
-
-
Method Detail
-
createChunkBytes
public static byte[] createChunkBytes(int startValue, int chunkLength)
-
createChunkedKeySuffix
public static ChunkedKeySuffix createChunkedKeySuffix(int firstSegmentNumber, int firstSequenceNumber, int chunkIndex)
-
createKafkaMessageEnvelope
public static KafkaMessageEnvelope createKafkaMessageEnvelope(MessageType messageType, int segmentNumber, int sequenceNumber)
-
createChunkedRecord
public static PubSubMessage<KafkaKey,KafkaMessageEnvelope,java.lang.Long> createChunkedRecord(byte[] serializedKey, int firstSegmentNumber, int firstSequenceNumber, int chunkIndex, int firstMessageOffset, PubSubTopicPartition pubSubTopicPartition)
-
createChunkValueManifestRecord
public static PubSubMessage<KafkaKey,KafkaMessageEnvelope,java.lang.Long> createChunkValueManifestRecord(byte[] serializedKey, PubSubMessage<KafkaKey,KafkaMessageEnvelope,java.lang.Long> firstMessage, int numberOfChunks, PubSubTopicPartition pubSubTopicPartition)
-
createReplicationMetadataPayload
public static java.nio.ByteBuffer createReplicationMetadataPayload(int size)
-
createDeleteRecord
public static PubSubMessage<KafkaKey,KafkaMessageEnvelope,java.lang.Long> createDeleteRecord(byte[] serializedKey, byte[] serializedRmd, PubSubTopicPartition pubSubTopicPartition)
-
createPutRecord
public static PubSubMessage<KafkaKey,KafkaMessageEnvelope,java.lang.Long> createPutRecord(byte[] serializedKey, byte[] serializedValue, byte[] serializedRmd, PubSubTopicPartition pubSubTopicPartition)
-
createUpdateRecord
public static PubSubMessage<KafkaKey,KafkaMessageEnvelope,java.lang.Long> createUpdateRecord(byte[] serializedKey, byte[] serializedValue, PubSubTopicPartition pubSubTopicPartition)
-
-