You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by prasadns14 <gi...@git.apache.org> on 2017/12/15 10:30:42 UTC

[GitHub] drill pull request #1074: DRILL-6025: Display execution time of a query in R...

GitHub user prasadns14 opened a pull request:

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

    DRILL-6025: Display execution time of a query in RUNNING state

    For a query in 'RUNNING' state, rather than displaying execution duration as 'NOT AVAILABLE' this PR will display the duration till the current time.
    @paul-rogers , please review
    <img width="1154" alt="before" src="https://user-images.githubusercontent.com/4907022/34038089-e8643960-e13f-11e7-9e5c-bb8ba5cf0efd.png">
    <img width="1231" alt="now" src="https://user-images.githubusercontent.com/4907022/34038090-e8ac3166-e13f-11e7-870e-23c294800c06.png">
    


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

    $ git pull https://github.com/prasadns14/drill DRILL-6025

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

    https://github.com/apache/drill/pull/1074.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 #1074
    
----

----


---

[GitHub] drill pull request #1074: DRILL-6025: Display execution time of a query in R...

Posted by paul-rogers <gi...@git.apache.org>.
Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/1074#discussion_r158150927
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/ProfileWrapper.java ---
    @@ -195,23 +196,31 @@ public String getQueuedDuration() {
       }
     
       public String getExecutionDuration() {
    -    //Check if State is STARTING or RUNNING
    +    //Check if State is STARTING or ENQUEUED
         if (profile.getState() == QueryState.STARTING ||
    -        profile.getState() == QueryState.ENQUEUED ||
    -        profile.getState() == QueryState.RUNNING) {
    +        profile.getState() == QueryState.ENQUEUED) {
           return NOT_AVAILABLE_LABEL;
         }
     
    +    long queryEndTime;
    +
    +    // Check if State is RUNNING, set end time to current time
    +    if (profile.getState() == QueryState.RUNNING) {
    +      queryEndTime = Time.now();
    --- End diff --
    
    ```
    queryEndTime = System.currentTimeMillis();
    ```


---

[GitHub] drill pull request #1074: DRILL-6025: Display execution time of a query in R...

Posted by prasadns14 <gi...@git.apache.org>.
Github user prasadns14 commented on a diff in the pull request:

    https://github.com/apache/drill/pull/1074#discussion_r161012925
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/ProfileWrapper.java ---
    @@ -211,16 +211,25 @@ public String getExecutionDuration() {
           return NOT_AVAILABLE_LABEL;
         }
     
    +    long queryEndTime;
    +
    +    // Check if State is RUNNING, set end time to current time
    +    if (profile.getState() == QueryState.RUNNING) {
    --- End diff --
    
    @arina-ielchiieva, thank you for catching the mistake.
    Fixed it


---

[GitHub] drill pull request #1074: DRILL-6025: Display execution time of a query in R...

Posted by arina-ielchiieva <gi...@git.apache.org>.
Github user arina-ielchiieva commented on a diff in the pull request:

    https://github.com/apache/drill/pull/1074#discussion_r160982037
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/ProfileWrapper.java ---
    @@ -211,16 +211,25 @@ public String getExecutionDuration() {
           return NOT_AVAILABLE_LABEL;
         }
     
    +    long queryEndTime;
    +
    +    // Check if State is RUNNING, set end time to current time
    +    if (profile.getState() == QueryState.RUNNING) {
    --- End diff --
    
    @prasadns14  I think that after rebase you have lost one of the initial changes. Since you did not remove check in previous if statement for `profile.getState() == QueryState.RUNNING`, this if statement will never be executed.


---

[GitHub] drill issue #1074: DRILL-6025: Display execution time of a query in RUNNING ...

Posted by prasadns14 <gi...@git.apache.org>.
Github user prasadns14 commented on the issue:

    https://github.com/apache/drill/pull/1074
  
    @arina-ielchiieva, resolved merge conflicts


---

[GitHub] drill issue #1074: DRILL-6025: Display execution time of a query in RUNNING ...

Posted by arina-ielchiieva <gi...@git.apache.org>.
Github user arina-ielchiieva commented on the issue:

    https://github.com/apache/drill/pull/1074
  
    Thanks, +1.


---

[GitHub] drill pull request #1074: DRILL-6025: Display execution time of a query in R...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---

[GitHub] drill pull request #1074: DRILL-6025: Display execution time of a query in R...

Posted by prasadns14 <gi...@git.apache.org>.
Github user prasadns14 commented on a diff in the pull request:

    https://github.com/apache/drill/pull/1074#discussion_r159028202
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/ProfileWrapper.java ---
    @@ -195,23 +196,31 @@ public String getQueuedDuration() {
       }
     
       public String getExecutionDuration() {
    -    //Check if State is STARTING or RUNNING
    +    //Check if State is STARTING or ENQUEUED
         if (profile.getState() == QueryState.STARTING ||
    -        profile.getState() == QueryState.ENQUEUED ||
    -        profile.getState() == QueryState.RUNNING) {
    +        profile.getState() == QueryState.ENQUEUED) {
           return NOT_AVAILABLE_LABEL;
         }
     
    +    long queryEndTime;
    +
    +    // Check if State is RUNNING, set end time to current time
    +    if (profile.getState() == QueryState.RUNNING) {
    +      queryEndTime = Time.now();
    --- End diff --
    
    made changes
    @paul-rogers, please review


---

[GitHub] drill issue #1074: DRILL-6025: Display execution time of a query in RUNNING ...

Posted by arina-ielchiieva <gi...@git.apache.org>.
Github user arina-ielchiieva commented on the issue:

    https://github.com/apache/drill/pull/1074
  
    +1, LGTM.


---

[GitHub] drill issue #1074: DRILL-6025: Display execution time of a query in RUNNING ...

Posted by arina-ielchiieva <gi...@git.apache.org>.
Github user arina-ielchiieva commented on the issue:

    https://github.com/apache/drill/pull/1074
  
    @prasadns14 please resolve the conflicts.


---