richardstartin commented on a change in pull request #8030:
URL: https://github.com/apache/pinot/pull/8030#discussion_r786589195
##########
File path:
pinot-core/src/main/java/org/apache/pinot/core/transport/grpc/GrpcQueryServer.java
##########
@@ -88,6 +94,20 @@ public void submit(ServerRequest request,
StreamObserver<ServerResponse> respons
return;
}
+ // Table level access control
+ GrpcRequesterIdentity requestIdentity = new
GrpcRequesterIdentity(request.getMetadataMap());
+ if (!_accessControl.hasDataAccess(requestIdentity,
queryRequest.getTableNameWithType())) {
+ Exception unsupportedOperationException = new
UnsupportedOperationException(
+ String.format("No access to table %s while processing request %s: %s
from broker: %d",
+ queryRequest.getTableNameWithType(), queryRequest.getRequestId(),
+ queryRequest.getQueryContext(), queryRequest.getBrokerId()));
+ LOGGER.error("Table not found: {}", queryRequest.getTableNameWithType(),
unsupportedOperationException);
Review comment:
This will not print the stack trace, it resolves to
```java
/**
* Log a message at the ERROR level according to the specified format
* and arguments.
* <p/>
* <p>This form avoids superfluous object creation when the logger
* is disabled for the ERROR level. </p>
*
* @param format the format string
* @param arg1 the first argument
* @param arg2 the second argument
*/
public void error(String format, Object arg1, Object arg2);
```
instead of
```java
/**
* Log an exception (throwable) at the ERROR level with an
* accompanying message.
*
* @param msg the message accompanying the exception
* @param t the exception (throwable) to log
*/
public void error(String msg, Throwable t);
```
I recently had to change one of these to identify the cause of an error:
#7948
--
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]