You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by ak...@apache.org on 2019/04/02 16:49:50 UTC

[incubator-pinot] branch master updated: [TE] Display preview running window; Show warning before preview (#4050)

This is an automated email from the ASF dual-hosted git repository.

akshayrai09 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new 501eeaf  [TE] Display preview running window; Show warning before preview (#4050)
501eeaf is described below

commit 501eeaf0208e4e4e0d253c2d7df46088ef117c0c
Author: Akshay Rai <ak...@gmail.com>
AuthorDate: Tue Apr 2 09:49:46 2019 -0700

    [TE] Display preview running window; Show warning before preview (#4050)
---
 .../app/pods/components/alert-details/template.hbs   | 20 ++++++++++++++------
 .../pinot/thirdeye/anomaly/task/TaskDriver.java      |  4 +++-
 2 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/thirdeye/thirdeye-frontend/app/pods/components/alert-details/template.hbs b/thirdeye/thirdeye-frontend/app/pods/components/alert-details/template.hbs
index c0f479d..061e34b 100644
--- a/thirdeye/thirdeye-frontend/app/pods/components/alert-details/template.hbs
+++ b/thirdeye/thirdeye-frontend/app/pods/components/alert-details/template.hbs
@@ -3,7 +3,7 @@
   <div class="pull-right">
     {{#if isPreviewMode}}
       {{bs-button
-        defaultText=(if showDetails "Refresh Preview" "Preview Alert")
+        defaultText=(if showDetails "Rerun Preview" "Preview Alert")
         disabled=disablePreviewButton
         type="outline-primary"
         buttonType="refresh"
@@ -15,9 +15,17 @@
   {{#unless errorAnomalies}}
     {{#if showDetails}}
       {{#if isLoading}}
-        {{ember-spinner scale=0.5 rotate=10 speed='1.1' color='#3498DB'}}Preview may take a long time if it is more than one week (for daily metrics) or one day (for hourly/minute metrics).
-        Please click "Refresh Preview" if you changed time window.
+        {{ember-spinner scale=0.5 rotate=10 speed='1.1' color='#3498DB'}}
+        <p>Running detection between <strong>{{pill.activeRangeStart}}</strong> and <strong>{{pill.activeRangeEnd}}</strong>.</p>
       {{else}}
+        {{#if isPreviewMode}}
+          <div class="diffcurrent-alert alert alert-warning fade in">
+            <h4><i class="glyphicon glyphicon-exclamation-sign"></i> Use with caution!</h4>
+            <p>Preview can take a long time to run. We recommend previewing for less than a week on
+              daily metrics and less than a day on hourly/minutely metrics.</p>
+            <p>Click on the "Rerun Preview" option if you updated the time window.</p>
+          </div>
+        {{/if}}
         {{#if dataIsCurrent}}
         {{range-pill-selectors
           title="Showing"
@@ -306,9 +314,9 @@
         {{/if}}
       {{/if}}
     {{else}}
-        {{#if disablePreviewButton}}
-          <p>Enter YAML configuration to enable preview.</p>
-        {{/if}}
+      {{#if disablePreviewButton}}
+        <p>Enter YAML configuration to enable preview.</p>
+      {{/if}}
     {{/if}}
   {{/unless}}
   <p>{{errorAnomalies}}</p>
diff --git a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/anomaly/task/TaskDriver.java b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/anomaly/task/TaskDriver.java
index 76e9309..73672b3 100644
--- a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/anomaly/task/TaskDriver.java
+++ b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/anomaly/task/TaskDriver.java
@@ -124,7 +124,9 @@ public class TaskDriver {
                 }
 
               } finally {
-                ThirdeyeMetricsUtil.taskDurationCounter.inc(System.nanoTime() - tStart);
+                long elapsedTime = System.nanoTime() - tStart;
+                LOG.info("Thread {} : Took {} nano seconds", Thread.currentThread().getId(), elapsedTime);
+                ThirdeyeMetricsUtil.taskDurationCounter.inc(elapsedTime);
               }
             }
           }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org