So I have partitioned my data in pinot `"segmentP...
# troubleshooting
a
So I have partitioned my data in pinot
"segmentPartitionConfig": {
"columnPartitionMap": {
"userId": {
"functionName": "Murmur3",
"numPartitions": 5
}
}
}
and 5 kafka partitions 1. Game_Sch_evolution__0__6__20250113T1043Z
"segment.partition.metadata": "{\"columnPartitionMap\":{\"userId\":{\"partitions\":[0,1],\"functionName\":\"Murmur3\",\"functionConfig\":null,\"numPartitions\":5}}}",
here : partition = [0,1] 2. Game_Sch_evolution__3__15__20250113T1048Z. Here partition = [2,3]
"segment.partition.metadata": "{\"columnPartitionMap\":{\"userId\":{\"partitions\":[2,3],\"functionName\":\"Murmur3\",\"functionConfig\":null,\"numPartitions\":5}}}",
why does it have partitions like that in the partition array and what does 2 numbers like 0,1 and 2,3 in the metadata means ? in partition array @Gonzalo Ortiz @robert zych
r
why does it have partitions like that in the partition array and what does 2 numbers like 0,1 and 2,3 in the metadata means ?
When the partitions array contains multiple values it means that your segment contains data from multiple partitions. Check that the same partition function and number of partitions are matching. For example, by default Kafka uses
murmur2
which is the same as
Murmur
in Pinot
a
"segmentPartitionConfig": {
"columnPartitionMap": {
"userId": {
"functionName": "Murmur3",
"numPartitions": 5
}
}
}
Is this the wrong functionName then ? because in kafka i have 5 partitions 0,1,2,3,4 but in pinot my data is only going to 0,1,2,3 4 is not happening I have tried with diff IDs so number%5 = 0 goes to zeroth kafka partioon and zeroth segment in pinot right so number%5 = 1 goes to zeroth kafka partioon and 1st segment in pinot right so number%5 = 2 goes to zeroth kafka partioon and 2nd segment in pinot right so number%5 = 3 goes to zeroth kafka partioon and 3rd segment in pinot right so number%5 = 4 goes to zeroth kafka partioon and 4th segment in pinot right but 4 is always empty
r
Why are you using
Murmur3
in Pinot?
Try just
Murmur
instead
a
got it , but on the call that day people were talking about murmur3 , ist not right or something wrong wirth it?
r
You have to use the same hash function in Pinot that Kafka is using
a
aaaahhh got it thats how we will gain the usage of that fucntion . should I rebuild the segments again ?
with murmur
r
Yes, you have to rebuild the segments
Also, your kafka topic also has to be partitioned on userId
a
but how does one come to know which functionName to use with the kafka . ? yes my kafka topic is partitioned by that only into 5 partitions so I am sending the data partitioned by key in kakfa
Copy code
producer.produce(
    topic,
    key=key,
    value=json.dumps(message_data),
    callback=delivery_report
)
here key is userID
so same key goes to same partition, thats what you meant right ?
r
Yes
a
"segmentPartitionConfig": { "columnPartitionMap": { "userId": { "functionName": "Murmur", "numPartitions": 5 } } }
so this will help me retreiveing data faster right even tho its partitioned the data will be accessed by a hash key of that userID, right ? Beacuse I question was as pinot already knows that data is in this segment how does this partition leverage it ?
r
yes, partitioning can help reduce query latencies for some queries
for example, if you query by a specific userId now a smaller set of segments needs to be used
you can verify by checking the stats in the query console
a
got it , thanks a lot
g
kudos to Robert!