[jira] [Commented] (NIFI-2309) AmbariReportingTask misleading metric name

2016-07-19 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-2309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15384435#comment-15384435
 ] 

ASF GitHub Bot commented on NIFI-2309:
--

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.


> AmbariReportingTask misleading metric name
> --
>
> Key: NIFI-2309
> URL: https://issues.apache.org/jira/browse/NIFI-2309
> Project: Apache NiFi
>  Issue Type: Bug
>Reporter: Bryan Bende
>Assignee: Bryan Bende
>Priority: Minor
> Fix For: 1.0.0
>
>
> The AmbariReportingTask reports "TotalTaskDurationSeconds" but sends the 
> value as nano-seconds. Sending nano-seconds is fine, but we should rename the 
> metric so it doesn't imply seconds. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (NIFI-2309) AmbariReportingTask misleading metric name

2016-07-19 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-2309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15384342#comment-15384342
 ] 

ASF GitHub Bot commented on NIFI-2309:
--

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


> AmbariReportingTask misleading metric name
> --
>
> Key: NIFI-2309
> URL: https://issues.apache.org/jira/browse/NIFI-2309
> Project: Apache NiFi
>  Issue Type: Bug
>Reporter: Bryan Bende
>Assignee: Bryan Bende
>Priority: Minor
> Fix For: 1.0.0
>
>
> The AmbariReportingTask reports "TotalTaskDurationSeconds" but sends the 
> value as nano-seconds. Sending nano-seconds is fine, but we should rename the 
> metric so it doesn't imply seconds. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (NIFI-2309) AmbariReportingTask misleading metric name

2016-07-19 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-2309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15384332#comment-15384332
 ] 

ASF GitHub Bot commented on NIFI-2309:
--

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


> AmbariReportingTask misleading metric name
> --
>
> Key: NIFI-2309
> URL: https://issues.apache.org/jira/browse/NIFI-2309
> Project: Apache NiFi
>  Issue Type: Bug
>Reporter: Bryan Bende
>Assignee: Bryan Bende
>Priority: Minor
> Fix For: 1.0.0
>
>
> The AmbariReportingTask reports "TotalTaskDurationSeconds" but sends the 
> value as nano-seconds. Sending nano-seconds is fine, but we should rename the 
> metric so it doesn't imply seconds. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (NIFI-2309) AmbariReportingTask misleading metric name

2016-07-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-2309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15383123#comment-15383123
 ] 

ASF GitHub Bot commented on NIFI-2309:
--

GitHub user bbende opened a pull request:

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

NIFI-2309 Correcting AmbariReportingTask so it reports total task dur…

…ation 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 
Date:   2016-07-18T21:32:44Z

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




> AmbariReportingTask misleading metric name
> --
>
> Key: NIFI-2309
> URL: https://issues.apache.org/jira/browse/NIFI-2309
> Project: Apache NiFi
>  Issue Type: Bug
>Reporter: Bryan Bende
>Assignee: Bryan Bende
>Priority: Minor
> Fix For: 1.0.0
>
>
> The AmbariReportingTask reports "TotalTaskDurationSeconds" but sends the 
> value as nano-seconds. Sending nano-seconds is fine, but we should rename the 
> metric so it doesn't imply seconds. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)