noob-se7en opened a new pull request, #18431:
URL: https://github.com/apache/pinot/pull/18431
## Summary
Bump `PinotTaskManager#shouldUseConcurrentPath` and
`#resolveConcurrentScheduling` from package-private `@VisibleForTesting` to
`protected @VisibleForTesting`, so subclasses in other packages can integrate
with the concurrent scheduling path introduced in #18272.
## Why
Distributions that subclass `PinotTaskManager` need a way to plug in a
per-table policy for concurrent scheduling — e.g. defaulting it to `true` for
specific task types — without duplicating the dispatcher logic. The natural
extension hook is `resolveConcurrentScheduling(TableConfig)`, which
`shouldUseConcurrentPath` calls per table.
Today both methods are package-private, which means:
1. A subclass in a different package cannot **call**
`shouldUseConcurrentPath` to reuse the dispatcher in its own override of
`scheduleTasks`.
2. A subclass in a different package cannot **polymorphically override**
`resolveConcurrentScheduling` — Java treats a same-named method declared there
as hidden rather than overridden, so the parent's `shouldUseConcurrentPath`
always resolves to the parent's resolver.
Widening to `protected` makes both methods proper extension seams, matching
their intent in the design.
## What
```diff
@VisibleForTesting
- boolean shouldUseConcurrentPath(TaskSchedulingContext context) {
+ protected boolean shouldUseConcurrentPath(TaskSchedulingContext context) {
...
@VisibleForTesting
- boolean resolveConcurrentScheduling(TableConfig tableConfig) {
+ protected boolean resolveConcurrentScheduling(TableConfig tableConfig) {
```
No behavioral change. Both methods keep `@VisibleForTesting`; the existing
same-package tests in `PinotTaskManagerConcurrentSchedulingTest` continue to
work unchanged.
## Test plan
- [x] `pinot-controller` compiles cleanly
- [x] Existing `PinotTaskManagerConcurrentSchedulingTest` (same package)
unaffected by the visibility widening
- [ ] Reviewer confirms no other call sites or visibility constraints are
violated
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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]