Skip to main content

remote_metadata_partition

Function remote_metadata_partition 

Source
pub fn remote_metadata_partition(
    topic_id: u128,
    user_partition: i32,
    metadata_partition_count: i32,
) -> Option<i32>
Expand description

Map a user topic-id partition to its KIP-405 metadata topic partition.

This is byte-for-byte compatible with Kafka’s RemoteLogMetadataTopicPartitioner: Java Objects.hash receives the UUID’s least-significant bits, most-significant bits, and user partition; its big-endian int bytes are passed through Kafka Murmur2 and Utils.toPositive before the metadata partition modulo.