Repository: tez Updated Branches: refs/heads/master 38b21094c -> 21bce958e
TEZ-2017. TEZ UI - Dag view throwing error whild re-displaying additionals in some dags. (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/21bce958 Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/21bce958 Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/21bce958 Branch: refs/heads/master Commit: 21bce958e4174d7fa2e746fd3c474d52234dae1d Parents: 38b2109 Author: Hitesh Shah <[email protected]> Authored: Fri Jan 30 11:58:39 2015 -0800 Committer: Hitesh Shah <[email protected]> Committed: Fri Jan 30 11:58:39 2015 -0800 ---------------------------------------------------------------------- CHANGES.txt | 1 + .../components/dag-view/data-processor.js | 22 +++++++++++++------- .../app/scripts/models/TimelineRestAdapter.js | 2 +- 3 files changed, 17 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tez/blob/21bce958/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 89b33cc..3414adc 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -55,6 +55,7 @@ Release 0.6.1: Unreleased INCOMPATIBLE CHANGES ALL CHANGES: + TEZ-2017. TEZ UI - Dag view throwing error whild re-displaying additionals in some dags. TEZ-2013. TEZ UI - App Details Page UI Nits TEZ-2014. Tez UI: Nits : All tables, Vertices Page UI. TEZ-2012. TEZ UI: Show page number in all tables, and display more readable task/attempt ids. http://git-wip-us.apache.org/repos/asf/tez/blob/21bce958/tez-ui/src/main/webapp/app/scripts/components/dag-view/data-processor.js ---------------------------------------------------------------------- diff --git a/tez-ui/src/main/webapp/app/scripts/components/dag-view/data-processor.js b/tez-ui/src/main/webapp/app/scripts/components/dag-view/data-processor.js index fbbaec1..fae5a38 100644 --- a/tez-ui/src/main/webapp/app/scripts/components/dag-view/data-processor.js +++ b/tez-ui/src/main/webapp/app/scripts/components/dag-view/data-processor.js @@ -201,9 +201,12 @@ App.DagViewComponent.dataProcessor = (function (){ * @param children {Array} Array of DataNodes to be set */ setChildren: function (children) { - this._setChildren(this.get('allChildren').filter(function (child) { - return children.indexOf(child) != -1; // true if child is in children - })); + var allChildren = this.get('allChildren'); + if(allChildren) { + this._setChildren(allChildren.filter(function (child) { + return children.indexOf(child) != -1; // true if child is in children + })); + } }, /** * Filter out the given children from the children array. @@ -423,6 +426,7 @@ App.DagViewComponent.dataProcessor = (function (){ */ function _treefyData(vertex, depth) { var children = [], + parentChildren, inputDepth; depth++; @@ -432,7 +436,10 @@ App.DagViewComponent.dataProcessor = (function (){ if(!child.isSelfOrAncestor(vertex)) { if(child.depth) { if(child.depth < depth) { - child.get('treeParent.children').removeObject(child); + parentChildren = child.get('treeParent.children'); + if(parentChildren) { + parentChildren.removeObject(child); + } } else { return; @@ -524,9 +531,10 @@ App.DagViewComponent.dataProcessor = (function (){ * @param node {DataNode} */ function _cacheChildren(node) { - if(node.get('children')) { - node.set('allChildren', node.get('children') || []); - node.get('children').forEach(_cacheChildren); + var children = node.get('children'); + if(children) { + node.set('allChildren', children); + children.forEach(_cacheChildren); } } http://git-wip-us.apache.org/repos/asf/tez/blob/21bce958/tez-ui/src/main/webapp/app/scripts/models/TimelineRestAdapter.js ---------------------------------------------------------------------- diff --git a/tez-ui/src/main/webapp/app/scripts/models/TimelineRestAdapter.js b/tez-ui/src/main/webapp/app/scripts/models/TimelineRestAdapter.js index d2854df..a0943e2 100644 --- a/tez-ui/src/main/webapp/app/scripts/models/TimelineRestAdapter.js +++ b/tez-ui/src/main/webapp/app/scripts/models/TimelineRestAdapter.js @@ -313,7 +313,7 @@ App.VertexSerializer = App.TimelineSerializer.extend({ _normalizeSingleVertexPayload: function(vertex) { var normalizedCounterGroupData = this.normalizeCounterGroupsHelper('vertex', vertex.entity, vertex), - processorClassName = Ember.get(vertex, 'otherinfo.processorClassName'), + processorClassName = Ember.get(vertex, 'otherinfo.processorClassName') || "", inputs = [], inputIds = [], outputs = [],
