You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by mc...@apache.org on 2019/01/09 21:37:57 UTC

[incubator-pinot] branch access-denied-log created (now 29bf13c)

This is an automated email from the ASF dual-hosted git repository.

mcvsubbu pushed a change to branch access-denied-log
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git.


      at 29bf13c  Added a log when access is denied

This branch includes the following new commits:

     new 29bf13c  Added a log when access is denied

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[incubator-pinot] 01/01: Added a log when access is denied

Posted by mc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mcvsubbu pushed a commit to branch access-denied-log
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git

commit 29bf13c2f31baf9d69bdf3da58fbf0e77823ac70
Author: Subbu Subramaniam <ss...@linkedin.com>
AuthorDate: Wed Jan 9 13:36:05 2019 -0800

    Added a log when access is denied
---
 .../pinot/broker/requesthandler/BaseBrokerRequestHandler.java       | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pinot-broker/src/main/java/com/linkedin/pinot/broker/requesthandler/BaseBrokerRequestHandler.java b/pinot-broker/src/main/java/com/linkedin/pinot/broker/requesthandler/BaseBrokerRequestHandler.java
index ea8eb0e..2b9304d 100644
--- a/pinot-broker/src/main/java/com/linkedin/pinot/broker/requesthandler/BaseBrokerRequestHandler.java
+++ b/pinot-broker/src/main/java/com/linkedin/pinot/broker/requesthandler/BaseBrokerRequestHandler.java
@@ -107,7 +107,7 @@ public abstract class BaseBrokerRequestHandler implements BrokerRequestHandler {
       return "";
     }
   }
-  
+
   @Override
   public BrokerResponse handleRequest(JSONObject request, @Nullable RequesterIdentity requesterIdentity)
       throws Exception {
@@ -149,8 +149,8 @@ public abstract class BaseBrokerRequestHandler implements BrokerRequestHandler {
     // Check table access
     boolean hasAccess = _accessControlFactory.create().hasAccess(requesterIdentity, brokerRequest);
     if (!hasAccess) {
-      _brokerMetrics.addMeteredTableValue(brokerRequest.getQuerySource().getTableName(),
-          BrokerMeter.REQUEST_DROPPED_DUE_TO_ACCESS_ERROR, 1);
+      _brokerMetrics.addMeteredTableValue(tableName, BrokerMeter.REQUEST_DROPPED_DUE_TO_ACCESS_ERROR, 1);
+      LOGGER.info("Access denied for requestId {}, table {}", requestId, tableName);
       requestStatistics.setErrorCode(QueryException.ACCESS_DENIED_ERROR_CODE);
       return new BrokerResponseNative(QueryException.ACCESS_DENIED_ERROR);
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org