aho135 commented on code in PR #19272:
URL: https://github.com/apache/druid/pull/19272#discussion_r3114461032
##########
indexing-service/src/main/java/org/apache/druid/indexing/overlord/supervisor/SupervisorResource.java:
##########
@@ -201,10 +201,20 @@ public Response specGetAll(
{
return asLeaderWithSupervisorManager(
manager -> {
- Set<String> authorizedSupervisorIds = filterAuthorizedSupervisorIds(
- req,
- manager,
- manager.getSupervisorIds()
+ Function<String, Iterable<ResourceAction>> readRaGenerator =
supervisorId -> {
+ Optional<SupervisorSpec> supervisorSpecOptional =
manager.getSupervisorSpec(supervisorId);
+ return supervisorSpecOptional
+ .transform(spec -> SPEC_DATASOURCE_READ_RA_GENERATOR.apply(new
VersionedSupervisorSpec(spec, null)))
Review Comment:
Thanks for the review @abhishekrb19! Yeah that was kind of a roundabout way
of doing things. I made an update to filterAuthorizedSupervisorIds to pass in
the Authorization function and it looks cleaner now. Lmk what you think!
--
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]