Repository: tez Updated Branches: refs/heads/master 09679bdfd -> 0033da85d
TEZ-3832. TEZ DAG status shows SUCCEEDED for SUCCEEDED_WITH_FAILURES final status (Jonathan Eagles via kshukla) Project: http://git-wip-us.apache.org/repos/asf/tez/repo Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/0033da85 Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/0033da85 Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/0033da85 Branch: refs/heads/master Commit: 0033da85d4ccc856c699935d13dd617cf817d955 Parents: 09679bd Author: Kuhu Shukla <[email protected]> Authored: Thu Sep 14 16:07:51 2017 -0500 Committer: Kuhu Shukla <[email protected]> Committed: Thu Sep 14 16:07:51 2017 -0500 ---------------------------------------------------------------------- .../src/main/webapp/app/controllers/app/dags.js | 2 +- .../src/main/webapp/app/controllers/home/index.js | 2 +- tez-ui/src/main/webapp/app/models/dag.js | 9 +++++++++ tez-ui/src/main/webapp/app/serializers/dag.js | 1 + .../src/main/webapp/app/templates/dag/index.hbs | 2 +- .../src/main/webapp/tests/unit/models/dag-test.js | 18 +++++++++++++++++- .../webapp/tests/unit/serializers/dag-test.js | 2 +- 7 files changed, 31 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tez/blob/0033da85/tez-ui/src/main/webapp/app/controllers/app/dags.js ---------------------------------------------------------------------- diff --git a/tez-ui/src/main/webapp/app/controllers/app/dags.js b/tez-ui/src/main/webapp/app/controllers/app/dags.js index e0c5e68..bb4502a 100644 --- a/tez-ui/src/main/webapp/app/controllers/app/dags.js +++ b/tez-ui/src/main/webapp/app/controllers/app/dags.js @@ -48,7 +48,7 @@ export default MultiTableController.extend({ },{ id: 'status', headerTitle: 'Status', - contentPath: 'status', + contentPath: 'finalStatus', cellComponentName: 'em-table-status-cell', observePath: true },{ http://git-wip-us.apache.org/repos/asf/tez/blob/0033da85/tez-ui/src/main/webapp/app/controllers/home/index.js ---------------------------------------------------------------------- diff --git a/tez-ui/src/main/webapp/app/controllers/home/index.js b/tez-ui/src/main/webapp/app/controllers/home/index.js index 5d8b290..754e5e6 100644 --- a/tez-ui/src/main/webapp/app/controllers/home/index.js +++ b/tez-ui/src/main/webapp/app/controllers/home/index.js @@ -120,7 +120,7 @@ export default TableController.extend({ },{ id: 'status', headerTitle: 'Status', - contentPath: 'status', + contentPath: 'finalStatus', cellComponentName: 'em-table-status-cell', observePath: true },{ http://git-wip-us.apache.org/repos/asf/tez/blob/0033da85/tez-ui/src/main/webapp/app/models/dag.js ---------------------------------------------------------------------- diff --git a/tez-ui/src/main/webapp/app/models/dag.js b/tez-ui/src/main/webapp/app/models/dag.js index 4ddec74..d03b14c 100644 --- a/tez-ui/src/main/webapp/app/models/dag.js +++ b/tez-ui/src/main/webapp/app/models/dag.js @@ -83,6 +83,15 @@ export default DAGInfoModel.extend({ callerType: Ember.computed.or("callerData.callerType", "info.callerData.callerType"), amWsVersion: DS.attr("string"), + failedTaskAttempts: DS.attr("number"), + + finalStatus: Ember.computed("status", "failedTaskAttempts", function () { + var status = this.get("status"); + if(status === "SUCCEEDED" && this.get("failedTaskAttempts")) { + status = "SUCCEEDED_WITH_FAILURES"; + } + return status; + }), info: DS.attr("object"), http://git-wip-us.apache.org/repos/asf/tez/blob/0033da85/tez-ui/src/main/webapp/app/serializers/dag.js ---------------------------------------------------------------------- diff --git a/tez-ui/src/main/webapp/app/serializers/dag.js b/tez-ui/src/main/webapp/app/serializers/dag.js index 9b3edfc..de60985 100644 --- a/tez-ui/src/main/webapp/app/serializers/dag.js +++ b/tez-ui/src/main/webapp/app/serializers/dag.js @@ -128,5 +128,6 @@ export default DAGInfoSerializer.extend({ vertexNameIdMap: 'otherinfo.vertexNameIdMapping', amWsVersion: 'otherinfo.amWebServiceVersion', + failedTaskAttempts: 'otherinfo.numFailedTaskAttempts', } }); http://git-wip-us.apache.org/repos/asf/tez/blob/0033da85/tez-ui/src/main/webapp/app/templates/dag/index.hbs ---------------------------------------------------------------------- diff --git a/tez-ui/src/main/webapp/app/templates/dag/index.hbs b/tez-ui/src/main/webapp/app/templates/dag/index.hbs index ad1e093..ae14802 100644 --- a/tez-ui/src/main/webapp/app/templates/dag/index.hbs +++ b/tez-ui/src/main/webapp/app/templates/dag/index.hbs @@ -51,7 +51,7 @@ </tr> <tr> <td>Status</td> - <td>{{em-table-status-cell content=model.status}}</td> + <td>{{em-table-status-cell content=model.finalStatus}}</td> </tr> <tr> <td>Progress</td> http://git-wip-us.apache.org/repos/asf/tez/blob/0033da85/tez-ui/src/main/webapp/tests/unit/models/dag-test.js ---------------------------------------------------------------------- diff --git a/tez-ui/src/main/webapp/tests/unit/models/dag-test.js b/tez-ui/src/main/webapp/tests/unit/models/dag-test.js index 468c87f..7be7def 100644 --- a/tez-ui/src/main/webapp/tests/unit/models/dag-test.js +++ b/tez-ui/src/main/webapp/tests/unit/models/dag-test.js @@ -62,6 +62,8 @@ test('Basic creation test', function(assert) { assert.ok(model.info); assert.ok(model.amWsVersion); + assert.ok(model.failedTaskAttempts); + assert.ok(model.finalStatus); }); test('app loadType test', function(assert) { @@ -83,6 +85,20 @@ test('app loadType test', function(assert) { assert.equal(loadType(record), undefined); }); +test('status test', function(assert) { + let model = this.subject(); + + Ember.run(function () { + model.set("status", "SUCCEEDED"); + assert.equal(model.get("status"), "SUCCEEDED"); + assert.equal(model.get("finalStatus"), "SUCCEEDED"); + + model.set("failedTaskAttempts", 1); + assert.equal(model.get("status"), "SUCCEEDED"); + assert.equal(model.get("finalStatus"), "SUCCEEDED_WITH_FAILURES"); + }); +}); + test('queue test', function(assert) { let model = this.subject(), queueName = "queueName", @@ -138,4 +154,4 @@ test('vertices, edges & vertexGroups test', function(assert) { assert.equal(model.get("edges"), testEdges); assert.equal(model.get("vertexGroups"), testVertexGroups); }); -}); \ No newline at end of file +}); http://git-wip-us.apache.org/repos/asf/tez/blob/0033da85/tez-ui/src/main/webapp/tests/unit/serializers/dag-test.js ---------------------------------------------------------------------- diff --git a/tez-ui/src/main/webapp/tests/unit/serializers/dag-test.js b/tez-ui/src/main/webapp/tests/unit/serializers/dag-test.js index f57d1af..6334569 100644 --- a/tez-ui/src/main/webapp/tests/unit/serializers/dag-test.js +++ b/tez-ui/src/main/webapp/tests/unit/serializers/dag-test.js @@ -36,7 +36,7 @@ test('Basic creation test', function(assert) { assert.ok(serializer.maps.containerLogs); assert.ok(serializer.maps.vertexIdNameMap); - assert.equal(Object.keys(serializer.get("maps")).length, 12 + 7); //12 own & 9 inherited (2 overwritten) + assert.equal(Object.keys(serializer.get("maps")).length, 13 + 7); //13 own & 9 inherited (2 overwritten) }); test('atsStatus test', function(assert) {
