Repository: tez Updated Branches: refs/heads/master c4817a76b -> ffa3d5208
TEZ-2812. Tez UI: Update task & attempt tables while in progress. (Sreenath Somarajapuram via hitesh) Project: http://git-wip-us.apache.org/repos/asf/tez/repo Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/ffa3d520 Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/ffa3d520 Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/ffa3d520 Branch: refs/heads/master Commit: ffa3d5208dcd37f990273799d1dd60176e303568 Parents: c4817a7 Author: Hitesh Shah <[email protected]> Authored: Mon Sep 14 18:20:53 2015 -0700 Committer: Hitesh Shah <[email protected]> Committed: Mon Sep 14 18:20:53 2015 -0700 ---------------------------------------------------------------------- CHANGES.txt | 2 + .../controllers/dag-task-attempts-controller.js | 53 +++++++++++++++++++ .../task_task_attempts_controller.js | 54 ++++++++++++++++++++ .../vertex_task_attempts_controller.js | 53 +++++++++++++++++++ .../controllers/vertex_tasks_controller.js | 51 ++++++++++++++++++ 5 files changed, 213 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tez/blob/ffa3d520/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index fd43abe..b45dc6b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,6 +7,7 @@ Release 0.8.1: Unreleased INCOMPATIBLE CHANGES ALL CHANGES: + TEZ-2812. Tez UI: Update task & attempt tables while in progress. TEZ-2786. Tez UI: Update vertex, task & attempt details page while in progress. TEZ-2612. Support for showing allocation delays due to internal preemption TEZ-2808. Race condition between preemption and container assignment @@ -177,6 +178,7 @@ Release 0.7.1: Unreleased INCOMPATIBLE CHANGES ALL CHANGES: + TEZ-2812. Tez UI: Update task & attempt tables while in progress. TEZ-2786. Tez UI: Update vertex, task & attempt details page while in progress. TEZ-2817. Tez UI: update in progress counter data for the dag vertices and tasks table TEZ-2813. Tez UI: add counter data for rest api calls to AM Web Services v2 http://git-wip-us.apache.org/repos/asf/tez/blob/ffa3d520/tez-ui/src/main/webapp/app/scripts/controllers/dag-task-attempts-controller.js ---------------------------------------------------------------------- diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/dag-task-attempts-controller.js b/tez-ui/src/main/webapp/app/scripts/controllers/dag-task-attempts-controller.js index 9c3301f..eeddcb0 100644 --- a/tez-ui/src/main/webapp/app/scripts/controllers/dag-task-attempts-controller.js +++ b/tez-ui/src/main/webapp/app/scripts/controllers/dag-task-attempts-controller.js @@ -27,6 +27,51 @@ App.DagTaskAttemptsController = App.TablePageController.extend({ cacheDomain: Ember.computed.alias('controllers.dag.id'), + pollster: App.Helpers.EntityArrayPollster.create(), + + init: function () { + this._super(); + this.get('pollster').setProperties({ + entityType: 'attemptInfo', + mergeProperties: ['status', 'progress'], + store: this.get('store') + }); + }, + + pollsterControl: function () { + if(this.get('status') == 'RUNNING' && + this.get('amWebServiceVersion') != '1' && + !this.get('loading') && + this.get('isActive') && + this. get('rowsDisplayed.length') > 0) { + this.get('pollster').start(); + } + else { + this.get('pollster').stop(); + } + }.observes('status', 'amWebServiceVersion', 'rowsDisplayed', 'loading', 'isActive'), + + pollsterOptionsObserver: function () { + var rows = this.get('rowsDisplayed'); + this.set('pollster.targetRecords', rows); + + this.set('pollster.options', (rows && rows.length) ? { + appID: this.get('applicationId'), + dagID: this.get('idx'), + counters: this.get('countersDisplayed'), + attemptID: rows.map(function (row) { + var attemptIndex = App.Helpers.misc.getIndexFromId(row.get('id')), + taskIndex = App.Helpers.misc.getIndexFromId(row.get('taskID')), + vertexIndex = App.Helpers.misc.getIndexFromId(row.get('vertexID')); + return '%@_%@_%@'.fmt(vertexIndex, taskIndex, attemptIndex); + }).join(',') + } : null); + }.observes('applicationId', 'idx', 'rowsDisplayed', 'counters'), + + countersDisplayed: function () { + return App.Helpers.misc.getCounterQueryParam(this.get('columns')); + }.property('columns'), + beforeLoad: function () { var dagController = this.get('controllers.dag'), model = dagController.get('model'); @@ -106,6 +151,7 @@ App.DagTaskAttemptsController = App.TablePageController.extend({ headerCellName: 'Status', templateName: 'components/basic-table/status-cell', contentPath: 'status', + observePath: true, getCellContent: function(row) { var status = App.Helpers.misc.getFixedupDisplayStatus(row.get('status')); return { @@ -115,6 +161,13 @@ App.DagTaskAttemptsController = App.TablePageController.extend({ } }, { + id: 'progress', + headerCellName: 'Progress', + contentPath: 'progress', + observePath: true, + templateName: 'components/basic-table/progress-cell' + }, + { id: 'vertexName', headerCellName: 'Vertex Name', contentPath: 'vertexID', http://git-wip-us.apache.org/repos/asf/tez/blob/ffa3d520/tez-ui/src/main/webapp/app/scripts/controllers/task_task_attempts_controller.js ---------------------------------------------------------------------- diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/task_task_attempts_controller.js b/tez-ui/src/main/webapp/app/scripts/controllers/task_task_attempts_controller.js index b3c8c76..a0eab4d 100644 --- a/tez-ui/src/main/webapp/app/scripts/controllers/task_task_attempts_controller.js +++ b/tez-ui/src/main/webapp/app/scripts/controllers/task_task_attempts_controller.js @@ -28,6 +28,52 @@ App.TaskAttemptsController = App.TablePageController.extend(App.AutoCounterColum cacheDomain: Ember.computed.alias('controllers.task.dagID'), + pollster: App.Helpers.EntityArrayPollster.create(), + + init: function () { + this._super(); + this.get('pollster').setProperties({ + entityType: 'attemptInfo', + mergeProperties: ['status', 'progress'], + store: this.get('store') + }); + }, + + pollsterControl: function () { + if(this.get('vertex.dag.status') == 'RUNNING' && + this.get('vertex.dag.amWebServiceVersion') != '1' && + !this.get('loading') && + this.get('isActive') && + this. get('rowsDisplayed.length') > 0) { + this.get('pollster').start(); + } + else { + this.get('pollster').stop(); + } + }.observes('vertex.dag.status', + 'vertex.dag.amWebServiceVersion', 'rowsDisplayed', 'loading', 'isActive'), + + pollsterOptionsObserver: function () { + var rows = this.get('rowsDisplayed'); + this.set('pollster.targetRecords', rows); + + this.set('pollster.options', (rows && rows.length) ? { + appID: this.get('vertex.dag.applicationId'), + dagID: this.get('vertex.dag.idx'), + counters: this.get('countersDisplayed'), + attemptID: rows.map(function (row) { + var attemptIndex = App.Helpers.misc.getIndexFromId(row.get('id')), + taskIndex = App.Helpers.misc.getIndexFromId(row.get('taskID')), + vertexIndex = App.Helpers.misc.getIndexFromId(row.get('vertexID')); + return '%@_%@_%@'.fmt(vertexIndex, taskIndex, attemptIndex); + }).join(',') + } : null); + }.observes('vertex.dag.applicationId', 'vertex.dag.idx', 'rowsDisplayed', 'counters'), + + countersDisplayed: function () { + return App.Helpers.misc.getCounterQueryParam(this.get('columns')); + }.property('columns'), + beforeLoad: function () { var taskController = this.get('controllers.task'), model = taskController.get('model'); @@ -88,6 +134,7 @@ App.TaskAttemptsController = App.TablePageController.extend(App.AutoCounterColum headerCellName: 'Status', templateName: 'components/basic-table/status-cell', contentPath: 'status', + observePath: true, getCellContent: function(row) { var status = App.Helpers.misc.getFixedupDisplayStatus(row.get('status')); return { @@ -97,6 +144,13 @@ App.TaskAttemptsController = App.TablePageController.extend(App.AutoCounterColum } }, { + id: 'progress', + headerCellName: 'Progress', + contentPath: 'progress', + observePath: true, + templateName: 'components/basic-table/progress-cell' + }, + { id: 'startTime', headerCellName: 'Start Time', contentPath: 'startTime', http://git-wip-us.apache.org/repos/asf/tez/blob/ffa3d520/tez-ui/src/main/webapp/app/scripts/controllers/vertex_task_attempts_controller.js ---------------------------------------------------------------------- diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/vertex_task_attempts_controller.js b/tez-ui/src/main/webapp/app/scripts/controllers/vertex_task_attempts_controller.js index 914cf6a..b6d659d 100644 --- a/tez-ui/src/main/webapp/app/scripts/controllers/vertex_task_attempts_controller.js +++ b/tez-ui/src/main/webapp/app/scripts/controllers/vertex_task_attempts_controller.js @@ -28,6 +28,51 @@ App.VertexTaskAttemptsController = App.TablePageController.extend(App.AutoCounte cacheDomain: Ember.computed.alias('controllers.vertex.dagID'), + pollster: App.Helpers.EntityArrayPollster.create(), + + init: function () { + this._super(); + this.get('pollster').setProperties({ + entityType: 'attemptInfo', + mergeProperties: ['status', 'progress'], + store: this.get('store') + }); + }, + + pollsterControl: function () { + if(this.get('dag.status') == 'RUNNING' && + this.get('dag.amWebServiceVersion') != '1' && + !this.get('loading') && + this.get('isActive') && + this. get('rowsDisplayed.length') > 0) { + this.get('pollster').start(); + } + else { + this.get('pollster').stop(); + } + }.observes('dag.status', 'dag.amWebServiceVersion', 'rowsDisplayed', 'loading', 'isActive'), + + pollsterOptionsObserver: function () { + var rows = this.get('rowsDisplayed'); + this.set('pollster.targetRecords', rows); + + this.set('pollster.options', (rows && rows.length) ? { + appID: this.get('dag.applicationId'), + dagID: this.get('dag.idx'), + counters: this.get('countersDisplayed'), + attemptID: rows.map(function (row) { + var attemptIndex = App.Helpers.misc.getIndexFromId(row.get('id')), + taskIndex = App.Helpers.misc.getIndexFromId(row.get('taskID')), + vertexIndex = App.Helpers.misc.getIndexFromId(row.get('vertexID')); + return '%@_%@_%@'.fmt(vertexIndex, taskIndex, attemptIndex); + }).join(',') + } : null); + }.observes('dag.applicationId', 'dag.idx', 'rowsDisplayed', 'counters'), + + countersDisplayed: function () { + return App.Helpers.misc.getCounterQueryParam(this.get('columns')); + }.property('columns'), + beforeLoad: function () { var controller = this.get('controllers.vertex'), model = controller.get('model'); @@ -106,6 +151,7 @@ App.VertexTaskAttemptsController = App.TablePageController.extend(App.AutoCounte headerCellName: 'Status', templateName: 'components/basic-table/status-cell', contentPath: 'status', + observePath: true, getCellContent: function(row) { var status = App.Helpers.misc.getFixedupDisplayStatus(row.get('status')); return { @@ -115,6 +161,13 @@ App.VertexTaskAttemptsController = App.TablePageController.extend(App.AutoCounte } }, { + id: 'progress', + headerCellName: 'Progress', + contentPath: 'progress', + observePath: true, + templateName: 'components/basic-table/progress-cell' + }, + { id: 'startTime', headerCellName: 'Start Time', contentPath: 'startTime', http://git-wip-us.apache.org/repos/asf/tez/blob/ffa3d520/tez-ui/src/main/webapp/app/scripts/controllers/vertex_tasks_controller.js ---------------------------------------------------------------------- diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/vertex_tasks_controller.js b/tez-ui/src/main/webapp/app/scripts/controllers/vertex_tasks_controller.js index 2709d64..c4d09f4 100644 --- a/tez-ui/src/main/webapp/app/scripts/controllers/vertex_tasks_controller.js +++ b/tez-ui/src/main/webapp/app/scripts/controllers/vertex_tasks_controller.js @@ -28,6 +28,49 @@ App.VertexTasksController = App.TablePageController.extend(App.AutoCounterColumn cacheDomain: Ember.computed.alias('controllers.vertex.dagID'), + pollster: App.Helpers.EntityArrayPollster.create(), + + init: function () { + this._super(); + this.get('pollster').setProperties({ + entityType: 'taskInfo', + mergeProperties: ['status', 'progress'], + store: this.get('store') + }); + }, + + pollsterControl: function () { + if(this.get('dag.status') == 'RUNNING' && + this.get('dag.amWebServiceVersion') != '1' && + !this.get('loading') && this.get('isActive') && + this. get('rowsDisplayed.length') > 0) { + this.get('pollster').start(); + } + else { + this.get('pollster').stop(); + } + }.observes('dag.status', 'dag.amWebServiceVersion', 'rowsDisplayed', 'loading', 'isActive'), + + pollsterOptionsObserver: function () { + var rows = this.get('rowsDisplayed'); + this.set('pollster.targetRecords', rows); + + this.set('pollster.options', (rows && rows.length) ? { + appID: this.get('dag.applicationId'), + dagID: this.get('dag.idx'), + counters: this.get('countersDisplayed'), + taskID: rows.map(function (row) { + var taskIndex = App.Helpers.misc.getIndexFromId(row.get('id')), + vertexIndex = App.Helpers.misc.getIndexFromId(row.get('vertexID')); + return '%@_%@'.fmt(vertexIndex, taskIndex); + }).join(',') + } : null); + }.observes('dag.applicationId', 'dag.idx', 'rowsDisplayed', 'counters'), + + countersDisplayed: function () { + return App.Helpers.misc.getCounterQueryParam(this.get('columns')); + }.property('columns'), + beforeLoad: function () { var controller = this.get('controllers.vertex'), model = controller.get('model'); @@ -96,6 +139,7 @@ App.VertexTasksController = App.TablePageController.extend(App.AutoCounterColumn headerCellName: 'Status', templateName: 'components/basic-table/status-cell', contentPath: 'status', + observePath: true, getCellContent: function(row) { var status = row.get('status'); return { @@ -106,6 +150,13 @@ App.VertexTasksController = App.TablePageController.extend(App.AutoCounterColumn } }, { + id: 'progress', + headerCellName: 'Progress', + contentPath: 'progress', + observePath: true, + templateName: 'components/basic-table/progress-cell' + }, + { id: 'startTime', headerCellName: 'Start Time', contentPath: 'startTime',
