mimaison commented on code in PR #22307:
URL: https://github.com/apache/kafka/pull/22307#discussion_r3451717981
##########
core/src/main/scala/kafka/server/ControllerApis.scala:
##########
@@ -204,9 +205,9 @@ class ControllerApis(
val future = deleteTopics(context,
deleteTopicsRequest.data,
request.context.apiVersion,
- authHelper.authorize(request.context, DELETE, CLUSTER, CLUSTER_NAME,
logIfDenied = false),
- names => authHelper.filterByAuthorized(request.context, DESCRIBE, TOPIC,
names)(n => n),
- names => authHelper.filterByAuthorized(request.context, DELETE, TOPIC,
names)(n => n))
+ authHelper.authorize(request.context, DELETE, CLUSTER, CLUSTER_NAME,
true, false, 1),
+ names => authHelper.filterByAuthorized(request.context, DESCRIBE, TOPIC,
names.asJava, (n: String) => n).asScala.toSet,
+ names => authHelper.filterByAuthorized(request.context, DELETE, TOPIC,
names.asJava, (n: String) => n).asScala.toSet)
Review Comment:
It seems we already use a few java types in `deleteTopics()`. I wonder if we
could use `java.lang.Iterable[String] => util.Set[String]` for the
`getDescribableTopics` and `getDeletableTopics` arguments.
The same may work in the create topics and partitions path. That would
suppress most of these conversions.
--
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]