abhishekrb19 commented on code in PR #14106:
URL: https://github.com/apache/druid/pull/14106#discussion_r1170213308


##########
indexing-service/src/main/java/org/apache/druid/indexing/overlord/supervisor/SupervisorResource.java:
##########
@@ -120,6 +147,18 @@ public Response specPost(final SupervisorSpec spec, 
@Context final HttpServletRe
     );
   }
 
+  private Set<ResourceAction> getNeededResourceActionsForTask(final 
SupervisorSpec spec)
+  {
+    final Set<ResourceAction> resourceActions = new HashSet<>();
+    resourceActions.addAll(spec.getDataSources().stream()

Review Comment:
   Static analysis is failing with the `addAll` call. Think it can be done 
inline with the stream() chain:
   ```java
   final Set<ResourceAction> resourceActions = spec.getDataSources().stream()
                                                       .map(dataSource -> new 
ResourceAction(new Resource(
                                                           dataSource,
                                                           
ResourceType.DATASOURCE
                                                       ), 
Action.WRITE)).collect(Collectors.toSet());
   ```



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