Jackie-Jiang opened a new pull request #7255:
URL: https://github.com/apache/pinot/pull/7255


   ## Description
   Currently there are 3 different classes for segment ZK metadata: 
`OfflineSegmentZKMetadata`, `RealtimeSegmentZKMetadata`, 
`LLCRealtimeSegmentZKMetadata`, and 3 different sets of APIs to read them from 
the ZK.
   The problem with this approach:
   - Need to know the type of segment before reading the ZK metadata, which is 
hard to use and makes common code non-sharable
   - Impossible to mix different types of ZK metadata. E.g. to support segment 
push to LLC table
   
   This PR unifies these 3 classes to `SegmentZKMetadata` class which is backed 
by the `ZNRecord` to:
   - Solve the problems above
   - Read fields from `ZNRecord` on demand to avoid pre-read all fields (in 
most cases only one or two fields are required)
   - Directly write the fields back to `ZNRecord` to avoid the overhead of 
creating a new `ZNRecord` when persisting back the segment ZK metadata
   
   The following keys are deprecated, backward-compatibility is maintained:
   - `segment.realtime.download.url` and `segment.offline.download.url`: 
replaced by `segment.download.url`
   - `segment.offline.push.time`: replaced by `segment.push.time`
   - `segment.offline.refresh.time`: replaced by `segment.refresh.time`
   - `segment.name`: use ZNRecord id instead
   - `segment.table.name`: decouple segment from table
   - `segment.type`: no need to differentiate


-- 
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]

Reply via email to