You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tez.apache.org by sr...@apache.org on 2015/11/17 11:22:20 UTC

tez git commit: TEZ-2908. Tez UI: Errors are logged, but not displayed in the UI when AM fetch fails (sree)

Repository: tez
Updated Branches:
  refs/heads/master abfc8bfb0 -> 77dfdc0dd


TEZ-2908. Tez UI: Errors are logged, but not displayed in the UI when AM fetch fails (sree)


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

Branch: refs/heads/master
Commit: 77dfdc0ddaa294622e54c8e2ef7f1dea1e1bdc6d
Parents: abfc8bf
Author: Sreenath Somarajapuram <sr...@apache.org>
Authored: Tue Nov 17 15:51:52 2015 +0530
Committer: Sreenath Somarajapuram <sr...@apache.org>
Committed: Tue Nov 17 15:51:52 2015 +0530

----------------------------------------------------------------------
 CHANGES.txt                                             |  1 +
 .../webapp/app/scripts/controllers/dag_controller.js    |  6 +++++-
 .../app/scripts/controllers/dag_index_controller.js     |  6 +++++-
 .../main/webapp/app/scripts/controllers/dag_vertices.js |  6 +++++-
 .../webapp/app/scripts/controllers/dags_controller.js   |  8 ++++++--
 .../app/scripts/controllers/polling-controller.js       |  2 +-
 .../app/scripts/controllers/tez-app-controller.js       |  2 +-
 .../app/scripts/controllers/tez-app-dags-controller.js  | 12 ++++++++++--
 .../app/scripts/controllers/tez-app-index-controller.js |  2 +-
 .../webapp/app/scripts/controllers/vertex_controller.js |  6 +++++-
 .../app/scripts/controllers/vertex_index_controller.js  |  2 +-
 tez-ui/src/main/webapp/app/scripts/helpers/misc.js      |  2 +-
 .../app/scripts/mixins/data-array-loader-minxin.js      |  2 +-
 13 files changed, 43 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/77dfdc0d/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 0e14fa2..6be2b99 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -7,6 +7,7 @@ INCOMPATIBLE CHANGES
   TEZ-2679. Admin forms of launch env settings
 
 ALL CHANGES:
+  TEZ-2908. Tez UI: Errors are logged, but not displayed in the UI when AM fetch fails
   TEZ-2923. Tez Live UI counters view empty for vertices, tasks, attempts
   TEZ-2924. Framework for Hadoop shims.
   TEZ-2935. Add MR slow start translation for ShuffleVertexManager

http://git-wip-us.apache.org/repos/asf/tez/blob/77dfdc0d/tez-ui/src/main/webapp/app/scripts/controllers/dag_controller.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/dag_controller.js b/tez-ui/src/main/webapp/app/scripts/controllers/dag_controller.js
index 5d7e33a..384a8d3 100644
--- a/tez-ui/src/main/webapp/app/scripts/controllers/dag_controller.js
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/dag_controller.js
@@ -123,7 +123,11 @@ App.DagController = App.PollingController.extend(App.Helpers.DisplayHelper, {
     }).then(function(dagProgressInfo) {
       that.set('progress', dagProgressInfo.get('progress'));
     }).catch(function (error) {
-      Em.Logger.error("Failed to fetch dagProgress" + error);
+      error.message = "Failed to fetch dagProgress. 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);
     });
   },
 

http://git-wip-us.apache.org/repos/asf/tez/blob/77dfdc0d/tez-ui/src/main/webapp/app/scripts/controllers/dag_index_controller.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/dag_index_controller.js b/tez-ui/src/main/webapp/app/scripts/controllers/dag_index_controller.js
index d7a176a..847b6a6 100644
--- a/tez-ui/src/main/webapp/app/scripts/controllers/dag_index_controller.js
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/dag_index_controller.js
@@ -198,7 +198,11 @@ App.DagIndexController = App.TablePageController.extend({
             ['progress']
           );
       }).catch(function(error) {
-        Em.Logger.debug("failed to fetch vertex progress")
+        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);
       });
     }
   },

http://git-wip-us.apache.org/repos/asf/tez/blob/77dfdc0d/tez-ui/src/main/webapp/app/scripts/controllers/dag_vertices.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/dag_vertices.js b/tez-ui/src/main/webapp/app/scripts/controllers/dag_vertices.js
index d0740a9..2f5e8e3 100644
--- a/tez-ui/src/main/webapp/app/scripts/controllers/dag_vertices.js
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/dag_vertices.js
@@ -110,7 +110,11 @@ App.DagVerticesController = App.TablePageController.extend({
             ['progress']
           );
       }).catch(function(error) {
-        Em.Logger.debug("failed to fetch vertex progress")
+        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);
       });
     }
   },

http://git-wip-us.apache.org/repos/asf/tez/blob/77dfdc0d/tez-ui/src/main/webapp/app/scripts/controllers/dags_controller.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/dags_controller.js b/tez-ui/src/main/webapp/app/scripts/controllers/dags_controller.js
index 457c5d8..3d48e37 100644
--- a/tez-ui/src/main/webapp/app/scripts/controllers/dags_controller.js
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/dags_controller.js
@@ -97,7 +97,7 @@ App.DagsController = Em.ObjectController.extend(App.PaginatedContentMixin, App.C
     childEntityType = this.get('childEntityType'),
     finder,
     record;
-    var defaultErrMsg = 'Error while loading dag info.';
+    var defaultErrMsg = 'Error while loading DAGs. Either Timeline Server is down, or CORS might not be enabled.';
 
     that.set('loading', true);
     store.unloadAll(childEntityType);
@@ -156,7 +156,11 @@ App.DagsController = Em.ObjectController.extend(App.PaginatedContentMixin, App.C
               dag.set('progress', dagProgressInfo.get('progress'));
             })
             .catch(function(error) {
-              Em.Logger.error('Failed to fetch dagProgress' + error);
+              error.message = "Failed to fetch dagProgress. 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);
             });
           }
         }

http://git-wip-us.apache.org/repos/asf/tez/blob/77dfdc0d/tez-ui/src/main/webapp/app/scripts/controllers/polling-controller.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/polling-controller.js b/tez-ui/src/main/webapp/app/scripts/controllers/polling-controller.js
index a31381b..5a4d060 100644
--- a/tez-ui/src/main/webapp/app/scripts/controllers/polling-controller.js
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/polling-controller.js
@@ -84,7 +84,7 @@ App.PollingController = App.BaseController.extend({
         that.applicationComplete();
       }
       else {
-        error.message = "Application Master (AM) is out of reach. Either it's down, or CORS is not enabled.";
+        error.message = "Application Master (AM) is out of reach. Either it's down, or CORS is not enabled for YARN ResourceManager.";
         that.applicationFailed(error);
       }
     }).catch(function (error) {

http://git-wip-us.apache.org/repos/asf/tez/blob/77dfdc0d/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-controller.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-controller.js b/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-controller.js
index 394807d..cf9b619 100644
--- a/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-controller.js
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-controller.js
@@ -63,7 +63,7 @@ App.TezAppController = App.BaseController.extend(App.Helpers.DisplayHelper, App.
         });
       }).catch(function (error) {
         Em.Logger.error(error);
-        var err = App.Helpers.misc.formatError(error, defaultErrMsg);
+        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);
       });

http://git-wip-us.apache.org/repos/asf/tez/blob/77dfdc0d/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-dags-controller.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-dags-controller.js b/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-dags-controller.js
index 5112745..af9da7d 100644
--- a/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-dags-controller.js
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-dags-controller.js
@@ -49,7 +49,11 @@ App.TezAppDagsController = App.TablePageController.extend({
             dag.set('progress', dagProgressInfo.get('progress'));
           })
           .catch(function(error) {
-            Em.Logger.error('Failed to fetch dagProgress' + error);
+            error.message = "Failed to fetch dagProgress. 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(fetcher);
         }
@@ -111,7 +115,11 @@ App.TezAppDagsController = App.TablePageController.extend({
               content.set('progress', dagProgressInfo.get('progress'));
             })
             .catch(function(error) {
-              Em.Logger.error('Failed to fetch dagProgress' + error);
+              error.message = "Failed to fetch dagProgress. 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);
             });
           }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/77dfdc0d/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-index-controller.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-index-controller.js b/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-index-controller.js
index 1f58c82..2a9f9ae 100644
--- a/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-index-controller.js
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-index-controller.js
@@ -39,7 +39,7 @@ App.TezAppIndexController = App.PollingController.extend(App.ModelRefreshMixin,
         });
       }).catch(function (error) {
         Em.Logger.error(error);
-        var err = App.Helpers.misc.formatError(error, defaultErrMsg);
+        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);
       });

http://git-wip-us.apache.org/repos/asf/tez/blob/77dfdc0d/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 e0f1203..f33eb99 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
@@ -73,7 +73,11 @@ App.VertexController = App.PollingController.extend(App.Helpers.DisplayHelper, A
           vertex.set('progress', vertexProgressInfo.get('progress'));
         }
       }).catch(function(error) {
-        Em.Logger.error("Failed to fetch vertexProgress" + 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);
     }

http://git-wip-us.apache.org/repos/asf/tez/blob/77dfdc0d/tez-ui/src/main/webapp/app/scripts/controllers/vertex_index_controller.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/vertex_index_controller.js b/tez-ui/src/main/webapp/app/scripts/controllers/vertex_index_controller.js
index fedadaf..76db92b 100644
--- a/tez-ui/src/main/webapp/app/scripts/controllers/vertex_index_controller.js
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/vertex_index_controller.js
@@ -29,7 +29,7 @@ App.VertexIndexController = App.PollingController.extend(App.ModelRefreshMixin,
       return controller.loadAdditional(vertex);
     }).catch(function(error){
       Em.Logger.error(error);
-      var err = App.Helpers.misc.formatError(error, defaultErrMsg);
+      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);
     });

http://git-wip-us.apache.org/repos/asf/tez/blob/77dfdc0d/tez-ui/src/main/webapp/app/scripts/helpers/misc.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/helpers/misc.js b/tez-ui/src/main/webapp/app/scripts/helpers/misc.js
index 65480e2..e0246f4 100644
--- a/tez-ui/src/main/webapp/app/scripts/helpers/misc.js
+++ b/tez-ui/src/main/webapp/app/scripts/helpers/misc.js
@@ -315,7 +315,7 @@ App.Helpers.misc = {
     // for cross domain requests, the error is not set if no access control headers were found.
     // this could be either because there was a n/w error or the cors headers being not set.
     if (error.status === 0 && error.statusText === 'error') {
-      msg = defaultErrorMessage ;
+      msg = defaultErrorMessage || error.message;
     } else {
       msg = error.statusText || error.message;
     }

http://git-wip-us.apache.org/repos/asf/tez/blob/77dfdc0d/tez-ui/src/main/webapp/app/scripts/mixins/data-array-loader-minxin.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/mixins/data-array-loader-minxin.js b/tez-ui/src/main/webapp/app/scripts/mixins/data-array-loader-minxin.js
index ce9831c..952ce74 100644
--- a/tez-ui/src/main/webapp/app/scripts/mixins/data-array-loader-minxin.js
+++ b/tez-ui/src/main/webapp/app/scripts/mixins/data-array-loader-minxin.js
@@ -114,7 +114,7 @@ App.DataArrayLoaderMixin = Em.Mixin.create({
 
   errorHandler: function (error) {
     Em.Logger.error(error);
-    var err = App.Helpers.misc.formatError(error, 'Error while loading ' + this.get('entityType'));
+    var err = App.Helpers.misc.formatError(error, 'Error while loading %@. CORS might not be enabled for YARN ResourceManager and/or Timeline Server.'.fmt(this.get('entityType')));
     var msg = 'Error code: %@, message: %@'.fmt(err.errCode, err.msg);
     App.Helpers.ErrorBar.getInstance().show(msg, err.details);
   },