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

   ## Summary
   
   `SegmentDirectoryLoaderContext.segmentDirectoryConfigs` was a `Map<String, 
String>` that in practice only ever held a single `readMode` entry (built by 
`IndexLoadingConfig` as `Map.of(READ_MODE_KEY, readMode)` and read back via 
`ReadMode.valueOf(map.get(READ_MODE_KEY))`). This replaces the stringly-typed 
map with a typed `ReadMode` field.
   
   Changes:
   - `SegmentDirectoryLoaderContext`: add a `ReadMode` field (builder defaults 
to `ReadMode.DEFAULT_MODE`); remove `getSegmentDirectoryConfigs()` / 
`setSegmentDirectoryConfigs()`.
   - `DefaultSegmentDirectoryLoader` / `TierBasedSegmentDirectoryLoader`: read 
`context.getReadMode()` directly instead of parsing the map.
   - Remove `IndexLoadingConfig.getSegmentDirectoryConfigs()`; update all 
builder call sites to `setReadMode(...)`.
   - `SegmentLocalFSDirectory`: consolidate constructors around `(File, 
SegmentMetadataImpl, ReadMode, @Nullable SegmentDirectoryLoaderContext)`.
   
   This changes the public `SegmentDirectoryLoaderContext` SPI consumed by 
custom `SegmentDirectoryLoader` implementations. `ReadMode.DEFAULT_MODE` 
resolves to `mmap`, so default behavior is unchanged.
   


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