[GitHub] drill pull request #551: DRILL-4792: Include session options used for a quer...

2016-11-02 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/drill/pull/551


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] drill pull request #551: DRILL-4792: Include session options used for a quer...

2016-11-01 Thread arina-ielchiieva
Github user arina-ielchiieva commented on a diff in the pull request:

https://github.com/apache/drill/pull/551#discussion_r85940221
  
--- Diff: exec/java-exec/src/main/resources/rest/profile/profile.ftl ---
@@ -107,6 +107,42 @@
   FOREMAN: ${model.getProfile().getForeman().getAddress()}
   TOTAL FRAGMENTS: ${model.getProfile().getTotalFragments()}
 
+  <#if (model.getOptionList()?size > 0)>
--- End diff --

For older version getOptionList returns empty list.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] drill pull request #551: DRILL-4792: Include session options used for a quer...

2016-11-01 Thread arina-ielchiieva
Github user arina-ielchiieva commented on a diff in the pull request:

https://github.com/apache/drill/pull/551#discussion_r85943937
  
--- Diff: exec/java-exec/src/main/resources/rest/profile/profile.ftl ---
@@ -107,6 +107,42 @@
   FOREMAN: ${model.getProfile().getForeman().getAddress()}
   TOTAL FRAGMENTS: ${model.getProfile().getTotalFragments()}
 
+  <#if (model.getOptionList()?size > 0)>
+
+Session Options
+
+  
+
+  
+
+  Overview
+
+  
+
+
+  
+
+  
+
+  Name
+  Value
+
+  
+  
+<#list model.getOptionList() as option>
+  
+${option.getName()}
+${option.getValue()?c}
--- End diff --

Since org.apache.drill.exec.server.options.OptionValue.getValue() returns 
Object, Freemarker built-in c is used to convert Object to string.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] drill pull request #551: DRILL-4792: Include session options used for a quer...

2016-10-25 Thread sudheeshkatkam
Github user sudheeshkatkam commented on a diff in the pull request:

https://github.com/apache/drill/pull/551#discussion_r84965675
  
--- Diff: exec/java-exec/src/main/resources/rest/profile/profile.ftl ---
@@ -107,6 +107,42 @@
   FOREMAN: ${model.getProfile().getForeman().getAddress()}
   TOTAL FRAGMENTS: ${model.getProfile().getTotalFragments()}
 
+  <#if (model.getOptionList()?size > 0)>
--- End diff --

For older profiles, I assume `model.getOptionList()` returns `null`. How is 
`null` handled? 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] drill pull request #551: DRILL-4792: Include session options used for a quer...

2016-10-25 Thread sudheeshkatkam
Github user sudheeshkatkam commented on a diff in the pull request:

https://github.com/apache/drill/pull/551#discussion_r84965750
  
--- Diff: exec/java-exec/src/main/resources/rest/profile/profile.ftl ---
@@ -107,6 +107,42 @@
   FOREMAN: ${model.getProfile().getForeman().getAddress()}
   TOTAL FRAGMENTS: ${model.getProfile().getTotalFragments()}
 
+  <#if (model.getOptionList()?size > 0)>
+
+Session Options
+
+  
+
+  
+
+  Overview
+
+  
+
+
+  
+
+  
+
+  Name
+  Value
+
+  
+  
+<#list model.getOptionList() as option>
+  
+${option.getName()}
+${option.getValue()?c}
--- End diff --

What does `?c` do?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] drill pull request #551: DRILL-4792: Include session options used for a quer...

2016-08-06 Thread arina-ielchiieva
Github user arina-ielchiieva commented on a diff in the pull request:

https://github.com/apache/drill/pull/551#discussion_r73786030
  
--- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryManager.java
 ---
@@ -338,7 +345,8 @@ private QueryProfile getQueryProfile(UserException ex) {
 .setStart(startTime)
 .setEnd(endTime)
 .setTotalFragments(fragmentDataSet.size())
-.setFinishedFragments(finishedFragments.get());
+.setFinishedFragments(finishedFragments.get())
+.addAllOptions(queryOptions);
--- End diff --

I have updated code to serialize and deserialize options as you suggested. 
Now they are added as json string (optionsJson, as in examples you mentioned). 
Though profile json representation contains escapes for such string, which is 
probably is not as nice as was before. But it's the only way to display json 
string inside of json.

![image](https://cloud.githubusercontent.com/assets/15086720/17456969/887cea94-5bf1-11e6-9846-25bbcba68154.png)
If you want, I can revert the changes back to using prototype buffer option 
object.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] drill pull request #551: DRILL-4792: Include session options used for a quer...

2016-08-06 Thread arina-ielchiieva
Github user arina-ielchiieva commented on a diff in the pull request:

https://github.com/apache/drill/pull/551#discussion_r73785925
  
--- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryManager.java
 ---
@@ -81,6 +85,7 @@
   private final String stringQueryId;
   private final RunQuery runQuery;
   private final Foreman foreman;
+  private final List queryOptions;
--- End diff --

Yes, updated PR.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] drill pull request #551: DRILL-4792: Include session options used for a quer...

2016-08-03 Thread sudheeshkatkam
Github user sudheeshkatkam commented on a diff in the pull request:

https://github.com/apache/drill/pull/551#discussion_r73379632
  
--- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryManager.java
 ---
@@ -81,6 +85,7 @@
   private final String stringQueryId;
   private final RunQuery runQuery;
   private final Foreman foreman;
+  private final List queryOptions;
--- End diff --

Not required. Could use 
`foreman.getQueryContext().getOptionManager().getOptionList()`?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] drill pull request #551: DRILL-4792: Include session options used for a quer...

2016-08-03 Thread sudheeshkatkam
Github user sudheeshkatkam commented on a diff in the pull request:

https://github.com/apache/drill/pull/551#discussion_r73379414
  
--- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryManager.java
 ---
@@ -338,7 +345,8 @@ private QueryProfile getQueryProfile(UserException ex) {
 .setStart(startTime)
 .setEnd(endTime)
 .setTotalFragments(fragmentDataSet.size())
-.setFinishedFragments(finishedFragments.get());
+.setFinishedFragments(finishedFragments.get())
+.addAllOptions(queryOptions);
--- End diff --

We 
[serialize](https://github.com/apache/drill/blob/master/exec/java-exec/src/main/java/org/apache/drill/exec/planner/fragment/SimpleParallelizer.java#L292)
 and 
[deserialize](https://github.com/apache/drill/blob/master/exec/java-exec/src/main/java/org/apache/drill/exec/ops/FragmentContext.java#L149)
 options elsewhere. We should do something similar here as well.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] drill pull request #551: DRILL-4792: Include session options used for a quer...

2016-07-22 Thread arina-ielchiieva
Github user arina-ielchiieva commented on a diff in the pull request:

https://github.com/apache/drill/pull/551#discussion_r71869950
  
--- Diff: exec/java-exec/src/main/resources/rest/profile/profile.ftl ---
@@ -107,6 +107,42 @@
   FOREMAN: ${model.getProfile().getForeman().getAddress()}
   TOTAL FRAGMENTS: ${model.getProfile().getTotalFragments()}
 
+  <#if (model.getProfile().getOptionsList()?size > 0)>
--- End diff --

In this case getOptionList returns empty list.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] drill pull request #551: DRILL-4792: Include session options used for a quer...

2016-07-22 Thread arina-ielchiieva
Github user arina-ielchiieva commented on a diff in the pull request:

https://github.com/apache/drill/pull/551#discussion_r71869875
  
--- Diff: protocol/src/main/protobuf/UserBitShared.proto ---
@@ -176,12 +176,18 @@ message QueryData {
   optional RecordBatchDef def = 3;
 }
 
+message Option {
+  required string name = 1;
--- End diff --

Done.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] drill pull request #551: DRILL-4792: Include session options used for a quer...

2016-07-21 Thread sudheeshkatkam
Github user sudheeshkatkam commented on a diff in the pull request:

https://github.com/apache/drill/pull/551#discussion_r71811276
  
--- Diff: protocol/src/main/protobuf/UserBitShared.proto ---
@@ -176,12 +176,18 @@ message QueryData {
   optional RecordBatchDef def = 3;
 }
 
+message Option {
+  required string name = 1;
--- End diff --

Make these `optional`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] drill pull request #551: DRILL-4792: Include session options used for a quer...

2016-07-21 Thread sudheeshkatkam
Github user sudheeshkatkam commented on a diff in the pull request:

https://github.com/apache/drill/pull/551#discussion_r71810483
  
--- Diff: exec/java-exec/src/main/resources/rest/profile/profile.ftl ---
@@ -107,6 +107,42 @@
   FOREMAN: ${model.getProfile().getForeman().getAddress()}
   TOTAL FRAGMENTS: ${model.getProfile().getTotalFragments()}
 
+  <#if (model.getProfile().getOptionsList()?size > 0)>
--- End diff --

What happens when an old profile is viewed? Does `getOptionList` return 
`null`?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] drill pull request #551: DRILL-4792: Include session options used for a quer...

2016-07-21 Thread arina-ielchiieva
GitHub user arina-ielchiieva opened a pull request:

https://github.com/apache/drill/pull/551

DRILL-4792: Include session options used for a query as part of the p…

…rofile

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/arina-ielchiieva/drill DRILL-4792

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/drill/pull/551.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #551


commit 4f6ed57c41c7fbe9a6864fb118cd856f3727b6f9
Author: Arina Ielchiieva 
Date:   2016-07-19T16:54:18Z

DRILL-4792: Include session options used for a query as part of the profile




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---