Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3BBE5200BCA for ; Mon, 21 Nov 2016 19:46:30 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 3A367160AF9; Mon, 21 Nov 2016 18:46:30 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 82A81160AEF for ; Mon, 21 Nov 2016 19:46:29 +0100 (CET) Received: (qmail 8620 invoked by uid 500); 21 Nov 2016 18:46:28 -0000 Mailing-List: contact commits-help@tez.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tez.apache.org Delivered-To: mailing list commits@tez.apache.org Received: (qmail 8611 invoked by uid 99); 21 Nov 2016 18:46:28 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Nov 2016 18:46:28 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 9ED3AE0999; Mon, 21 Nov 2016 18:46:28 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sree@apache.org To: commits@tez.apache.org Message-Id: <17be7a0634b4439eaa5316f659a800be@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: tez git commit: TEZ-3347. Tez UI: Vertex UI throws an error while getting vertexProgress for a killed Vertex (Kuhu Shukla via sree) Date: Mon, 21 Nov 2016 18:46:28 +0000 (UTC) archived-at: Mon, 21 Nov 2016 18:46:30 -0000 Repository: tez Updated Branches: refs/heads/branch-0.8 1f22fc0fb -> 72cf6e41d TEZ-3347. Tez UI: Vertex UI throws an error while getting vertexProgress for a killed Vertex (Kuhu Shukla via sree) (cherry picked from commit 3ccd6b34d1c660773eb32d9e062a0c1e86474fad) Project: http://git-wip-us.apache.org/repos/asf/tez/repo Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/72cf6e41 Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/72cf6e41 Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/72cf6e41 Branch: refs/heads/branch-0.8 Commit: 72cf6e41db334c58cd44be63c80d6580cf50329c Parents: 1f22fc0 Author: Sreenath Somarajapuram Authored: Tue Nov 22 00:09:27 2016 +0530 Committer: Sreenath Somarajapuram Committed: Tue Nov 22 00:15:48 2016 +0530 ---------------------------------------------------------------------- CHANGES.txt | 1 + .../scripts/controllers/vertex_controller.js | 43 ++++++++++---------- 2 files changed, 22 insertions(+), 22 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tez/blob/72cf6e41/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 70a3436..537fd78 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -53,6 +53,7 @@ ALL CHANGES: TEZ-3398. Tez UI: Bread crumb link to Application from Application details dag/configuration tab is broken TEZ-3433. Tez UI: Searching using wrong ID causes error in all DAGs page TEZ-3419. Tez UI: Applications page shows error, for users with only DAG level ACL permission + TEZ-3347. Tez UI: Vertex UI throws an error while getting vertexProgress for a killed Vertex Release 0.8.4: 2016-07-08 http://git-wip-us.apache.org/repos/asf/tez/blob/72cf6e41/tez-ui/src/main/webapp/app/scripts/controllers/vertex_controller.js ---------------------------------------------------------------------- diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/vertex_controller.js b/tez-ui/src/main/webapp/app/scripts/controllers/vertex_controller.js index e350ef3..e7d655b 100644 --- a/tez-ui/src/main/webapp/app/scripts/controllers/vertex_controller.js +++ b/tez-ui/src/main/webapp/app/scripts/controllers/vertex_controller.js @@ -61,27 +61,6 @@ App.VertexController = App.PollingController.extend(App.Helpers.DisplayHelper, A vertex.set('progress', undefined); - // Irrespective of am version this will get the progress first. - if (vertex.get('status') == 'RUNNING') { - var vertexIdx = vertex.get('id').split('_').splice(-1).pop(); - App.Helpers.misc.removeRecord(this.store, 'vertexProgress', vertexIdx); - var progressLoader = this.store.find('vertexProgress', vertexIdx, { - appId: applicationId, - dagIdx: vertex.get('dagIdx') - }).then(function(vertexProgressInfo) { - if (vertexProgressInfo) { - vertex.set('progress', vertexProgressInfo.get('progress')); - } - }).catch(function(error) { - error.message = "Failed to fetch vertexProgress. Application Master (AM) is out of reach. Either it's down, or CORS is not enabled for YARN ResourceManager."; - Em.Logger.error(error); - var err = App.Helpers.misc.formatError(error); - var msg = 'Error code: %@, message: %@'.fmt(err.errCode, err.msg); - App.Helpers.ErrorBar.getInstance().show(msg, err.details); - }); - loaders.push(progressLoader); - } - var appDetailFetcher = App.Helpers.misc.loadApp(that.store, applicationId).then(function(appDetail) { var status = appDetail.get('status'); if (status) { @@ -89,7 +68,27 @@ App.VertexController = App.PollingController.extend(App.Helpers.DisplayHelper, A } vertex.set('status', App.Helpers.misc.getRealStatus(vertex.get('status'), appDetail.get('status'), appDetail.get('finalStatus'))); - }).catch(function(){}); + }).catch(function(){}).then(function() { + // Irrespective of am version this will get the progress first. + if (vertex.get('status') == 'RUNNING') { + var vertexIdx = vertex.get('id').split('_').splice(-1).pop(); + App.Helpers.misc.removeRecord(that.store, 'vertexProgress', vertexIdx); + return that.store.find('vertexProgress', vertexIdx, { + appId: applicationId, + dagIdx: vertex.get('dagIdx') + }); + } + }).then(function(vertexProgressInfo) { + if (vertexProgressInfo) { + vertex.set('progress', vertexProgressInfo.get('progress')); + } + }).catch(function(error) { + error.message = "Failed to fetch vertexProgress. Application Master (AM) is out of reach. Either it's down, or CORS is not enabled for YARN ResourceManager."; + Em.Logger.error(error); + var err = App.Helpers.misc.formatError(error); + var msg = 'Error code: %@, message: %@'.fmt(err.errCode, err.msg); + App.Helpers.ErrorBar.getInstance().show(msg, err.details); + }); loaders.push(appDetailFetcher); var tezAppLoader = this.store.find('tezApp', 'tez_' + applicationId)