richardstartin commented on a change in pull request #8030:
URL: https://github.com/apache/pinot/pull/8030#discussion_r786585835



##########
File path: 
pinot-core/src/main/java/org/apache/pinot/core/transport/grpc/GrpcQueryServer.java
##########
@@ -48,11 +51,14 @@
   private final Server _server;
   private final ExecutorService _executorService =
       
Executors.newFixedThreadPool(ResourceManager.DEFAULT_QUERY_WORKER_THREADS);
+  private final AccessControl _accessControl;
 
-  public GrpcQueryServer(int port, QueryExecutor queryExecutor, ServerMetrics 
serverMetrics) {
+  public GrpcQueryServer(int port, QueryExecutor queryExecutor, ServerMetrics 
serverMetrics,
+      AccessControlFactory accessControlFactory) {
     _queryExecutor = queryExecutor;
     _serverMetrics = serverMetrics;
     _server = ServerBuilder.forPort(port).addService(this).build();
+    _accessControl = accessControlFactory.create();

Review comment:
       Why not inject the `AccessControl` instead of the factory to make this 
more testable?




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