FALCON-2289 Report final state of metrics into graphite before stopping metric notification service
Author: Pracheer Agarwal <[email protected]> Author: Pracheer Agarwal <[email protected]> Author: Pracheer Agarwal <[email protected]> Author: Pracheer <[email protected]> Reviewers: @adlakhapraveen, @pallavi-rao Closes #370 from PracheerAgarwal/FALCON-2289 and squashes the following commits: 1229de2 [Pracheer Agarwal] Reporting final state of metrics into graphite before stopping metric notification service 41da933 [Pracheer Agarwal] Merge branch 'master' of https://github.com/apache/falcon fc6ef2b [Pracheer] Merge branch 'master' of https://github.com/apache/falcon 7814fba [Pracheer Agarwal] Merge branch 'master' of https://github.com/apache/falcon ba60452 [Pracheer Agarwal] Merge branch 'master' of https://github.com/apache/falcon ed65aa0 [Pracheer Agarwal] Merge branch 'master' of https://github.com/apache/falcon 9ff05df [Pracheer Agarwal] Merge branch 'master' of https://github.com/apache/falcon 9c2f0a5 [Pracheer Agarwal] Merge branch 'master' of https://github.com/apache/falcon 9cd8c17 [Pracheer Agarwal] Merge branch 'master' of https://github.com/apache/falcon 778c579 [Pracheer Agarwal] Merge branch 'master' of https://github.com/PracheerAgarwal/falcon e39808d [Pracheer Agarwal] Merge branch 'master' of https://github.com/apache/falcon a932633 [Pracheer Agarwal] Merge branch 'master' of https://github.com/apache/falcon fda3b28 [Pracheer Agarwal] Merge branch 'master' of https://github.com/apache/falcon a93d71a [Pracheer Agarwal] Merge branch 'master' of https://github.com/PracheerAgarwal/falcon e3728d5 [Pracheer Agarwal] Merge branch 'master' of https://github.com/apache/falcon 066c8e2 [Pracheer Agarwal] Merge branch 'master' of https://github.com/apache/falcon b20f044 [Pracheer Agarwal] Merge branch 'master' of https://github.com/apache/falcon 7f572a1 [Pracheer Agarwal] Merge branch 'master' of https://github.com/apache/falcon 46042fd [Pracheer Agarwal] Merge branch 'master' of https://github.com/PracheerAgarwal/falcon daa3ffc [Pracheer Agarwal] FALCON-2225 extension owner added for trusted extensions 622cae4 [Pracheer Agarwal] FALCON-2225 extension owner added for trusted extensions (cherry picked from commit 9cdcbc01df821c9482b1a22c8af3c5b389c6eee1) Signed-off-by: Pallavi Rao <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/falcon/repo Commit: http://git-wip-us.apache.org/repos/asf/falcon/commit/12106afa Tree: http://git-wip-us.apache.org/repos/asf/falcon/tree/12106afa Diff: http://git-wip-us.apache.org/repos/asf/falcon/diff/12106afa Branch: refs/heads/master Commit: 12106afa8f64aca1b45651b1dac8ca8a686e1655 Parents: f0a6780 Author: Pracheer Agarwal <[email protected]> Authored: Tue Feb 28 11:15:49 2017 +0530 Committer: Pallavi Rao <[email protected]> Committed: Tue Feb 28 11:16:09 2017 +0530 ---------------------------------------------------------------------- .../org/apache/falcon/metrics/MetricNotificationService.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/falcon/blob/12106afa/common/src/main/java/org/apache/falcon/metrics/MetricNotificationService.java ---------------------------------------------------------------------- diff --git a/common/src/main/java/org/apache/falcon/metrics/MetricNotificationService.java b/common/src/main/java/org/apache/falcon/metrics/MetricNotificationService.java index 90fbfa9..67fa998 100644 --- a/common/src/main/java/org/apache/falcon/metrics/MetricNotificationService.java +++ b/common/src/main/java/org/apache/falcon/metrics/MetricNotificationService.java @@ -77,7 +77,12 @@ public class MetricNotificationService implements FalconService { @Override public void destroy() throws FalconException { - graphiteReporter.stop(); + try { + // reporting final metrics into graphite before stopping + graphiteReporter.report(); + } finally { + graphiteReporter.stop(); + } } private MetricGauge createMetric(final String metricName){
