diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-app/logs.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-app/logs.js index 90ecc12f2f1..3b75f7696a0 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-app/logs.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-app/logs.js @@ -47,10 +47,14 @@ export default Ember.Controller.extend({ this.fetchContainersForAttemptId(attemptId) .then(hash => { let containers = null; + let containerIdArr = []; if ( hash.rmContainers.get("length") > 0 && hash.rmContainers.get("content") ) { + hash.rmContainers.get("content").forEach(function(o) { + containerIdArr.push(o.id); + }.bind(this)); containers = (containers || []).concat( hash.rmContainers.get("content") ); @@ -59,9 +63,14 @@ export default Ember.Controller.extend({ hash.tsContainers.get("length") > 0 && hash.tsContainers.get("content") ) { + let tscontainer = []; + hash.tsContainers.get("content").forEach(function(o) { + if(!containerIdArr.contains(o.id)) { + tscontainer.push(o); + } + }.bind(this)); containers = (containers || []).concat( - hash.tsContainers.get("content") - ); + tscontainer); } this.set("attemptContainerList", containers); this.initializeSelect(".js-fetch-logs-containers"); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-app/logs.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-app/logs.js index d92fc3c0c17..883750366f8 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-app/logs.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-app/logs.js @@ -36,6 +36,7 @@ export default AbstractRoute.extend(AppAttemptMixin, { activate() { const controller = this.controllerFor("yarn-app.logs"); + controller.resetAfterRefresh(); controller.initializeSelect(); },