[
https://issues.apache.org/jira/browse/DRILL-6689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16584764#comment-16584764
]
ASF GitHub Bot commented on DRILL-6689:
---------------------------------------
asfgit closed pull request #1432: DRILL-6689: Include query user information to
drillbit.log
URL: https://github.com/apache/drill/pull/1432
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/Foreman.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/Foreman.java
index 16e8eb0d8cd..fa085e99b04 100644
---
a/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/Foreman.java
+++
b/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/Foreman.java
@@ -260,9 +260,10 @@ public void run() {
break;
case SQL:
final String sql = queryRequest.getPlan();
- // log query id and query text before starting any real work. Also, put
+ // log query id, username and query text before starting any real
work. Also, put
// them together such that it is easy to search based on query id
- logger.info("Query text for query id {}: {}", this.queryIdString, sql);
+ logger.info("Query text for query with id {} issued by {}: {}",
queryIdString,
+ queryContext.getQueryUserName(), sql);
runSQL(sql);
break;
case EXECUTION:
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Include query user information to drillbit.log
> ----------------------------------------------
>
> Key: DRILL-6689
> URL: https://issues.apache.org/jira/browse/DRILL-6689
> Project: Apache Drill
> Issue Type: Improvement
> Reporter: Bohdan Kazydub
> Assignee: Bohdan Kazydub
> Priority: Minor
> Labels: ready-to-commit
> Fix For: 1.15.0
>
>
> Currently, query information is logged as
> INFO o.a.drill.exec.work.foreman.Foreman - Query text for query id _queryId_:
> explain plan for select * from dfs./tmp/customer where name like 'Jo%'
> In order to easily track user details username of user which issues the query
> could be included in a following format
> INFO o.a.drill.exec.work.foreman.Foreman - Query text for query with id
> _queryId_ *issued by _username_*: explain plan for select * from
> dfs./tmp/customer where name like 'Jo%'
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)