drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kkhatua <...@git.apache.org>
Subject [GitHub] drill pull request #742: DRILL-5242: The UI breaks when rendering profiles h...
Date Fri, 10 Feb 2017 19:58:35 GMT
Github user kkhatua commented on a diff in the pull request:

    https://github.com/apache/drill/pull/742#discussion_r100612470
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/OperatorWrapper.java
---
    @@ -163,11 +165,18 @@ public String getMetricsTable() {
               null);
     
           final Number[] values = new Number[metricNames.length];
    +      //Track new/Unknown Metrics
    +      final Set<Integer> unknownMetrics = new TreeSet<Integer>();
           for (final MetricValue metric : op.getMetricList()) {
    -        if (metric.hasLongValue()) {
    -          values[metric.getMetricId()] = metric.getLongValue();
    -        } else if (metric.hasDoubleValue()) {
    -          values[metric.getMetricId()] = metric.getDoubleValue();
    +        if (metric.getMetricId() < metricNames.length) {
    +          if (metric.hasLongValue()) {
    +            values[metric.getMetricId()] = metric.getLongValue();
    +          } else if (metric.hasDoubleValue()) {
    +            values[metric.getMetricId()] = metric.getDoubleValue();
    +          }
    +        } else {
    +          //Tracking unknown metric IDs
    +          unknownMetrics.add(metric.getMetricId());
    --- End diff --
    
    @paul-rogers Can we bless this? :)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message