Repository: tez
Updated Branches:
  refs/heads/branch-0.7 f28bb4b2c -> 3ccd6b34d


TEZ-3347. Tez UI: Vertex UI throws an error while getting vertexProgress for a 
killed Vertex (Kuhu Shukla via sree)


Project: http://git-wip-us.apache.org/repos/asf/tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/3ccd6b34
Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/3ccd6b34
Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/3ccd6b34

Branch: refs/heads/branch-0.7
Commit: 3ccd6b34d1c660773eb32d9e062a0c1e86474fad
Parents: f28bb4b
Author: Sreenath Somarajapuram <[email protected]>
Authored: Tue Nov 22 00:09:27 2016 +0530
Committer: Sreenath Somarajapuram <[email protected]>
Committed: Tue Nov 22 00:09:27 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/3ccd6b34/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index cad378e..1f520de 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -47,6 +47,7 @@ ALL CHANGES:
   TEZ-3256. [Backport HADOOP-11032] Remove Guava Stopwatch dependency
   TEZ-2342. Reduce bytearray copy with TezEvent Serialization and 
deserialization
   TEZ-3243. Output vertices are hidden for UI graph view
+  TEZ-3347. Tez UI: Vertex UI throws an error while getting vertexProgress for 
a killed Vertex
 
 Release 0.7.1: 2016-05-10
 

http://git-wip-us.apache.org/repos/asf/tez/blob/3ccd6b34/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)

Reply via email to