9aman opened a new pull request, #12334:
URL: https://github.com/apache/pinot/pull/12334
## Scope of the PR
Enhance **server and controller API** to return **partition to primary key
count** for realtime tables that have **upsert** enabled:
1. Server API: returns the map for all the partitions hosted by the instance.
2. Controller API: returns the map for the table.
## Testing
The changes were tested locally by invoking the **server endpoint** followed
by **controller endpoint** to test that there is no duplication in counting
PK's. The replication of segments across servers could be a potential reason
for duplication, but the controller API has taken care of it.
- Server responses:
```
{
"tableName": "upsertMeetupRsvp_REALTIME",
"diskSizeInBytes": 0,
"numSegments": 1,
"numRows": 0,
"columnLengthMap": {},
"columnCardinalityMap": {},
"maxNumMultiValuesMap": {},
"columnIndexSizeMap": {},
"upsertPartitionToPrimaryKeyCountMap": {
"0": 48
}
},
{
"tableName": "upsertMeetupRsvp_REALTIME",
"diskSizeInBytes": 0,
"numSegments": 1,
"numRows": 0,
"columnLengthMap": {},
"columnCardinalityMap": {},
"maxNumMultiValuesMap": {},
"columnIndexSizeMap": {},
"upsertPartitionToPrimaryKeyCountMap": {
"1": 45
}
}
```
- Controller response
```
{
"tableName": "upsertMeetupRsvp_REALTIME",
"diskSizeInBytes": 0,
"numSegments": 2,
"numRows": 0,
"columnLengthMap": {},
"columnCardinalityMap": {},
"maxNumMultiValuesMap": {},
"columnIndexSizeMap": {},
"upsertPartitionToPrimaryKeyCountMap": {
"0": 48,
"1": 45
}
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]