arina-ielchiieva closed pull request #1583: DRILL-6922: Excluded options set on
query level from query profile
URL: https://github.com/apache/drill/pull/1583
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/QueryManager.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryManager.java
index a5c4d4291a9..6413523a329 100644
---
a/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryManager.java
+++
b/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryManager.java
@@ -330,7 +330,7 @@ private QueryInfo getQueryInfo() {
.setStart(startTime)
.setTotalCost(totalCost)
.setQueueName(queueName == null ? "-" : queueName)
- .setOptionsJson(getQueryOptionsAsJson());
+ .setOptionsJson(getSessionOptionsAsJson());
if (queryText != null) {
queryInfoBuilder.setQuery(queryText);
@@ -359,7 +359,7 @@ private QueryProfile getQueryProfile(UserException ex) {
.setFinishedFragments(finishedFragments.get())
.setTotalCost(totalCost)
.setQueueName(queueName == null ? "-" : queueName)
- .setOptionsJson(getQueryOptionsAsJson());
+ .setOptionsJson(getSessionOptionsAsJson());
if (ex != null) {
profileBuilder.setError(ex.getMessage(false));
@@ -384,9 +384,9 @@ private QueryProfile getQueryProfile(UserException ex) {
return profileBuilder.build();
}
- private String getQueryOptionsAsJson() {
+ private String getSessionOptionsAsJson() {
try {
- OptionList optionList =
foreman.getQueryContext().getOptions().getOptionList();
+ OptionList optionList =
foreman.getQueryContext().getOptions().getSessionOptionManager().getOptionList();
return
foreman.getQueryContext().getLpPersistence().getMapper().writeValueAsString(optionList);
} catch (JsonProcessingException e) {
throw new DrillRuntimeException("Error while trying to convert option
list to json string", e);
----------------------------------------------------------------
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]
With regards,
Apache Git Services