You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by va...@apache.org on 2016/11/06 16:31:58 UTC
[41/50] [abbrv] hadoop git commit: YARN-5747. Application timeline
metric aggregation in timeline v2 will lose last round aggregation when an
application finishes (Li Lu via Varun Saxena)
YARN-5747. Application timeline metric aggregation in timeline v2 will lose last round aggregation when an application finishes (Li Lu via Varun Saxena)
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/7056e65d
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/7056e65d
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/7056e65d
Branch: refs/heads/YARN-5355-branch-2
Commit: 7056e65ddba43144068a5c115b19852c629fdfc1
Parents: 523ff36
Author: Varun Saxena <va...@apache.org>
Authored: Sat Oct 22 01:17:11 2016 +0530
Committer: Varun Saxena <va...@apache.org>
Committed: Sun Nov 6 21:47:54 2016 +0530
----------------------------------------------------------------------
.../collector/AppLevelTimelineCollector.java | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/7056e65d/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice/src/main/java/org/apache/hadoop/yarn/server/timelineservice/collector/AppLevelTimelineCollector.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice/src/main/java/org/apache/hadoop/yarn/server/timelineservice/collector/AppLevelTimelineCollector.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice/src/main/java/org/apache/hadoop/yarn/server/timelineservice/collector/AppLevelTimelineCollector.java
index d276269..e62a436 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice/src/main/java/org/apache/hadoop/yarn/server/timelineservice/collector/AppLevelTimelineCollector.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice/src/main/java/org/apache/hadoop/yarn/server/timelineservice/collector/AppLevelTimelineCollector.java
@@ -58,6 +58,7 @@ public class AppLevelTimelineCollector extends TimelineCollector {
private final ApplicationId appId;
private final TimelineCollectorContext context;
private ScheduledThreadPoolExecutor appAggregationExecutor;
+ private AppLevelAggregator appAggregator;
public AppLevelTimelineCollector(ApplicationId appId) {
super(AppLevelTimelineCollector.class.getName() + " - " + appId.toString());
@@ -94,7 +95,8 @@ public class AppLevelTimelineCollector extends TimelineCollector {
new ThreadFactoryBuilder()
.setNameFormat("TimelineCollector Aggregation thread #%d")
.build());
- appAggregationExecutor.scheduleAtFixedRate(new AppLevelAggregator(),
+ appAggregator = new AppLevelAggregator();
+ appAggregationExecutor.scheduleAtFixedRate(appAggregator,
AppLevelTimelineCollector.AGGREGATION_EXECUTOR_EXEC_INTERVAL_SECS,
AppLevelTimelineCollector.AGGREGATION_EXECUTOR_EXEC_INTERVAL_SECS,
TimeUnit.SECONDS);
@@ -108,6 +110,8 @@ public class AppLevelTimelineCollector extends TimelineCollector {
LOG.info("App-level aggregator shutdown timed out, shutdown now. ");
appAggregationExecutor.shutdownNow();
}
+ // Perform one round of aggregation after the aggregation executor is done.
+ appAggregator.aggregate();
super.serviceStop();
}
@@ -123,8 +127,7 @@ public class AppLevelTimelineCollector extends TimelineCollector {
private class AppLevelAggregator implements Runnable {
- @Override
- public void run() {
+ private void aggregate() {
if (LOG.isDebugEnabled()) {
LOG.debug("App-level real-time aggregating");
}
@@ -156,6 +159,11 @@ public class AppLevelTimelineCollector extends TimelineCollector {
LOG.debug("App-level real-time aggregation complete");
}
}
+
+ @Override
+ public void run() {
+ aggregate();
+ }
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org