From 7b41e23cbbe55bb40a5a00128525af86e13591f1 Mon Sep 17 00:00:00 2001 From: David Lim Date: Thu, 15 Nov 2018 19:29:50 -0700 Subject: [PATCH] remove backpressure time from DefaultQueryMetrics pending on-going discussion (#6631) --- .../java/org/apache/druid/query/DefaultQueryMetrics.java | 3 ++- .../java/org/apache/druid/query/DefaultQueryMetricsTest.java | 5 ----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/processing/src/main/java/org/apache/druid/query/DefaultQueryMetrics.java b/processing/src/main/java/org/apache/druid/query/DefaultQueryMetrics.java index 5531614b71d..cc5ad5e0332 100644 --- a/processing/src/main/java/org/apache/druid/query/DefaultQueryMetrics.java +++ b/processing/src/main/java/org/apache/druid/query/DefaultQueryMetrics.java @@ -247,7 +247,8 @@ public class DefaultQueryMetrics> implements QueryMet @Override public QueryMetrics reportBackPressureTime(long timeNs) { - return reportMillisTimeMetric("query/node/backpressure", timeNs); + // Don't emit by default. + return this; } @Override diff --git a/processing/src/test/java/org/apache/druid/query/DefaultQueryMetricsTest.java b/processing/src/test/java/org/apache/druid/query/DefaultQueryMetricsTest.java index 6f837d90248..72121b2bff6 100644 --- a/processing/src/test/java/org/apache/druid/query/DefaultQueryMetricsTest.java +++ b/processing/src/test/java/org/apache/druid/query/DefaultQueryMetricsTest.java @@ -152,10 +152,5 @@ public class DefaultQueryMetricsTest actualEvent = cachingEmitter.getLastEmittedEvent().toMap(); Assert.assertEquals("query/node/bytes", actualEvent.get("metric")); Assert.assertEquals(10L, actualEvent.get("value")); - - queryMetrics.reportBackPressureTime(11000001).emit(serviceEmitter); - actualEvent = cachingEmitter.getLastEmittedEvent().toMap(); - Assert.assertEquals("query/node/backpressure", actualEvent.get("metric")); - Assert.assertEquals(11L, actualEvent.get("value")); } }