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

   ## Summary
   Adds a minimal SPI to let plugins substitute the `SegmentPreProcessor` used 
at segment load:
   - `SegmentPreProcessorProvider`: creates the pre-processor for one 
preprocess run. Implementations are discovered through `ServiceLoader`, 
enumerated on the default classloader and on every plugin classloader 
(`PluginManager#getPluginClassLoaders`), with the highest-priority provider 
winning — the same convention as `IndexPlugin`.
   - `SegmentPreProcessor.create(...)`: resolves the provider once and falls 
back to the plain `SegmentPreProcessor` when none is registered, so behavior is 
unchanged for deployments without a provider.
   - `ImmutableSegmentLoader` constructs the pre-processor through 
`create(...)` at its two call sites.
   
   The motivation is resources that span every index handler of one preprocess 
run — e.g. staging a local copy of a remote source file that several handlers 
read. Handlers run in unspecified order relative to each other, so no single 
handler can own such a resource's lifecycle; a pre-processor subclass wrapping 
`process()` can open it before `super.process(...)` and release it in a 
`finally`.
   


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