Github user paul-rogers commented on a diff in the pull request:
https://github.com/apache/drill/pull/1085#discussion_r162512667
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/ops/OperatorStats.java ---
@@ -278,22 +273,62 @@ public void addDoubleMetrics(OperatorProfile.Builder
builder) {
}
}
- @Override
+ /**
+ * Set a stat to the specified long value. Creates the stat
+ * if the stat does not yet exist.
+ *
+ * @param metric the metric to update
+ * @param value the value to set
+ */
+
public void addLongStat(MetricDef metric, long value){
longMetrics.putOrAdd(metric.metricId(), value, value);
}
- @Override
+ @VisibleForTesting
+ public long getLongStat(MetricDef metric) {
+ return longMetrics.get(metric.metricId());
--- End diff --
Presumably fail. But, since this used in testing to ensure that a long
metric was, in fact, written, failure is actually a useful result.
---