bowenliang123 commented on code in PR #6758:
URL: https://github.com/apache/kyuubi/pull/6758#discussion_r1808050647


##########
extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/ranger/RuleAuthorization.scala:
##########
@@ -34,23 +35,22 @@ case class RuleAuthorization(spark: SparkSession) extends 
Authorization(spark) {
     val auditHandler = new SparkRangerAuditHandler
     val ugi = getAuthzUgi(spark.sparkContext)
     val (inputs, outputs, opType) = PrivilegesBuilder.build(plan, spark)
-    val requests = new ArrayBuffer[AccessRequest]()
+    var requests = new HashMap[(AccessResource, AccessType), AccessRequest]()

Review Comment:
   > I mean `mutable.LinkedHashSet[AccessRequest]` may be slower than HashSet + 
ArrayBuffer in our case.
   
   No, it wont be slowed down, as LinkedHashSet maintaining both HashSet and 
Linked list inside.



-- 
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: notifications-unsubscr...@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@kyuubi.apache.org
For additional commands, e-mail: notifications-h...@kyuubi.apache.org

Reply via email to