Fredy Wijaya has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/13590


Change subject: IMPALA-8654: Log the SQL statement in the Ranger audit log
......................................................................

IMPALA-8654: Log the SQL statement in the Ranger audit log

This patch logs the SQL statement to be authorized in the Ranger audit
log since it was a required field prior to the fix in RANGER-2463 to
avoid a NullPointerException in the Ranger admin that could cause the
Ranger audit logs to not show up in the Ranger web UI.

Logging the SQL statement requires proper implementation of
StatementBase::toSql() which unfortunately is not available in all SQL
statements. See IMPALA-8655.

Testing:
- Updated the RangerAuditLogTest
- Tested the changes against Solr cluster

Change-Id: Id9f584ac4209604675eb13b6d6f349c6cbb1a387
---
M fe/src/main/java/org/apache/impala/analysis/AnalysisContext.java
M fe/src/main/java/org/apache/impala/analysis/CreateDbStmt.java
M fe/src/main/java/org/apache/impala/authorization/AuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/BaseAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/authorization/NoopAuthorizationFactory.java
M 
fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java
M 
fe/src/main/java/org/apache/impala/authorization/ranger/RangerBufferAuditHandler.java
M 
fe/src/main/java/org/apache/impala/authorization/sentry/SentryAuthorizationChecker.java
M 
fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java
M fe/src/test/java/org/apache/impala/common/FrontendTestBase.java
10 files changed, 84 insertions(+), 12 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/90/13590/1
--
To view, visit http://gerrit.cloudera.org:8080/13590
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id9f584ac4209604675eb13b6d6f349c6cbb1a387
Gerrit-Change-Number: 13590
Gerrit-PatchSet: 1
Gerrit-Owner: Fredy Wijaya <fwij...@cloudera.com>

Reply via email to