This is an automated email from the ASF dual-hosted git repository.
xhsun 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 a9a075c [TE] Expose last exception when early terminate (#4178)
a9a075c is described below
commit a9a075c0212df6e5250ccf242757fe8852428b2b
Author: Xiaohui Sun <[email protected]>
AuthorDate: Tue Apr 30 15:20:32 2019 -0700
[TE] Expose last exception when early terminate (#4178)
---
.../apache/pinot/thirdeye/detection/algorithm/DimensionWrapper.java | 6 +++---
.../pinot/thirdeye/detection/wrapper/AnomalyDetectorWrapper.java | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git
a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/algorithm/DimensionWrapper.java
b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/algorithm/DimensionWrapper.java
index 51bdaf5..fa31288 100644
---
a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/algorithm/DimensionWrapper.java
+++
b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/algorithm/DimensionWrapper.java
@@ -230,7 +230,7 @@ public class DimensionWrapper extends DetectionPipeline {
Exception lastException = null;
LOG.info("Run detection for {} metrics", totalNestedMetrics);
for (int i = 0; i < totalNestedMetrics; i++) {
- checkEarlyStop(totalNestedMetrics, successNestedMetrics, i);
+ checkEarlyStop(totalNestedMetrics, successNestedMetrics, i,
lastException);
MetricEntity metric = nestedMetrics.get(i);
try {
LOG.info("running detection for metric urn {}. {}/{}",
metric.getUrn(), i + 1, totalNestedMetrics);
@@ -253,12 +253,12 @@ public class DimensionWrapper extends DetectionPipeline {
.setDiagnostics(diagnostics);
}
- private void checkEarlyStop(long totalNestedMetrics, long
successNestedMetrics, int i) throws DetectionPipelineException {
+ private void checkEarlyStop(long totalNestedMetrics, long
successNestedMetrics, int i, Exception lastException) throws
DetectionPipelineException {
// if the first certain number of dimensions all failed, throw an exception
if (i == EARLY_STOP_THRESHOLD && successNestedMetrics == 0) {
throw new DetectionPipelineException(String.format(
"Detection failed for first %d out of %d metric dimensions for
monitoring window %d to %d, stop processing.",
- i, totalNestedMetrics, this.getStartTime(), this.getEndTime()));
+ i, totalNestedMetrics, this.getStartTime(), this.getEndTime()),
lastException);
}
}
diff --git
a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/wrapper/AnomalyDetectorWrapper.java
b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/wrapper/AnomalyDetectorWrapper.java
index 55eb92e..283dd35 100644
---
a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/wrapper/AnomalyDetectorWrapper.java
+++
b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/wrapper/AnomalyDetectorWrapper.java
@@ -164,7 +164,7 @@ public class AnomalyDetectorWrapper extends
DetectionPipeline {
// The last exception of the detection windows. It will be thrown out to
upper level.
Exception lastException = null;
for (int i = 0; i < totalWindows; i++) {
- checkEarlyStop(totalWindows, successWindows, i);
+ checkEarlyStop(totalWindows, successWindows, i, lastException);
// run detection
Interval window = monitoringWindows.get(i);
@@ -205,12 +205,12 @@ public class AnomalyDetectorWrapper extends
DetectionPipeline {
Collectors.toList()), lastTimeStamp);
}
- private void checkEarlyStop(int totalWindows, int successWindows, int i)
throws DetectionPipelineException {
+ private void checkEarlyStop(int totalWindows, int successWindows, int i,
Exception lastException) throws DetectionPipelineException {
// if the first certain number of windows all failed, throw an exception
if (i == EARLY_TERMINATE_WINDOW && successWindows == 0) {
throw new DetectionPipelineException(String.format(
"Successive first %d/%d detection windows failed for config %d
metricUrn %s for monitoring window %d to %d. Discard remaining windows",
- EARLY_TERMINATE_WINDOW, totalWindows, config.getId(), metricUrn,
this.getStartTime(), this.getEndTime()));
+ EARLY_TERMINATE_WINDOW, totalWindows, config.getId(), metricUrn,
this.getStartTime(), this.getEndTime()), lastException);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]