You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by bbende <gi...@git.apache.org> on 2016/07/18 21:37:48 UTC

[GitHub] nifi pull request #672: NIFI-2309 Correcting AmbariReportingTask so it repor...

GitHub user bbende opened a pull request:

    https://github.com/apache/nifi/pull/672

    NIFI-2309 Correcting AmbariReportingTask so it reports total task dur\u2026

    \u2026ation as seconds and as nano-seconds

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/bbende/nifi NIFI-2309

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi/pull/672.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #672
    
----
commit a103b97139f3f998beeaad010bb9a57137f8170a
Author: Bryan Bende <bb...@apache.org>
Date:   2016-07-18T21:32:44Z

    NIFI-2309 Correcting AmbariReportingTask so it reports total task duration as seconds and as nano-seconds

----


---
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.
---

[GitHub] nifi pull request #672: NIFI-2309 Correcting AmbariReportingTask so it repor...

Posted by JPercivall <gi...@git.apache.org>.
Github user JPercivall commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/672#discussion_r71359806
  
    --- Diff: nifi-nar-bundles/nifi-ambari-bundle/nifi-ambari-reporting-task/src/main/java/org/apache/nifi/reporting/ambari/metrics/MetricsService.java ---
    @@ -46,7 +46,13 @@
             metrics.put(MetricNames.BYTES_READ, String.valueOf(status.getBytesRead()));
             metrics.put(MetricNames.BYTES_WRITTEN, String.valueOf(status.getBytesWritten()));
             metrics.put(MetricNames.ACTIVE_THREADS, String.valueOf(status.getActiveThreadCount()));
    -        metrics.put(MetricNames.TOTAL_TASK_DURATION, String.valueOf(calculateProcessingNanos(status)));
    +
    +        final long durationNanos = calculateProcessingNanos(status);
    +        metrics.put(MetricNames.TOTAL_TASK_DURATION_NANOS, String.valueOf(durationNanos));
    +
    +        final long durationSeconds = TimeUnit.SECONDS.convert(durationNanos, TimeUnit.NANOSECONDS);
    +        metrics.put(MetricNames.TOTAL_TASK_DURATION_SECONDS, String.valueOf(durationNanos));
    --- End diff --
    
    This uses durationNanos, not durationSeconds


---
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.
---

[GitHub] nifi issue #672: NIFI-2309 Correcting AmbariReportingTask so it reports tota...

Posted by JPercivall <gi...@git.apache.org>.
Github user JPercivall commented on the issue:

    https://github.com/apache/nifi/pull/672
  
    +1
    
    Visually verified code and ran a contrib check. Thanks @bbende, I will merge it in.


---
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.
---

[GitHub] nifi pull request #672: NIFI-2309 Correcting AmbariReportingTask so it repor...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/nifi/pull/672


---
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.
---

[GitHub] nifi issue #672: NIFI-2309 Correcting AmbariReportingTask so it reports tota...

Posted by bbende <gi...@git.apache.org>.
Github user bbende commented on the issue:

    https://github.com/apache/nifi/pull/672
  
    @JPercivall good catch, just pushed an update to correct the variable names


---
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.
---