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 2016/07/21 09:10:11 UTC

tez git commit: TEZ-3333. Tez UI: Handle cases where Vertex/Task/Task Attempt data is missing (sree)

Repository: tez
Updated Branches:
  refs/heads/master 280a98ed4 -> e02e4f721


TEZ-3333. Tez UI: Handle cases where Vertex/Task/Task Attempt data is missing (sree)


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

Branch: refs/heads/master
Commit: e02e4f7213906a07fb04be7b0bb668fd24b23cf1
Parents: 280a98e
Author: Sreenath Somarajapuram <sr...@apache.org>
Authored: Thu Jul 21 14:41:26 2016 +0530
Committer: Sreenath Somarajapuram <sr...@apache.org>
Committed: Thu Jul 21 14:41:26 2016 +0530

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 .../webapp/app/controllers/dag/index/index.js   |  6 +++
 .../main/webapp/app/templates/dag/graphical.hbs | 15 ++++---
 .../webapp/app/templates/dag/index/index.hbs    | 42 ++++++++++----------
 .../main/webapp/app/templates/dag/swimlane.hbs  | 35 +++++++++-------
 tez-ui/src/main/webapp/package.json             |  2 +-
 .../unit/controllers/dag/index/index-test.js    | 13 ++++++
 7 files changed, 73 insertions(+), 41 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/e02e4f72/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index c400512..dd89640 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -77,6 +77,7 @@ ALL CHANGES:
   TEZ-3288. Tez UI: Display more details in the error bar
   TEZ-3318. Tez UI: Polling is not restarted after RM recovery
   TEZ-3329. Tez ATS data is incomplete for a vertex which fails or gets killed before initialization
+  TEZ-3333. Tez UI: Handle cases where Vertex/Task/Task Attempt data is missing
 
 Release 0.8.5: Unreleased
 

http://git-wip-us.apache.org/repos/asf/tez/blob/e02e4f72/tez-ui/src/main/webapp/app/controllers/dag/index/index.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/controllers/dag/index/index.js b/tez-ui/src/main/webapp/app/controllers/dag/index/index.js
index 2937a2b..eb4aa04 100644
--- a/tez-ui/src/main/webapp/app/controllers/dag/index/index.js
+++ b/tez-ui/src/main/webapp/app/controllers/dag/index/index.js
@@ -78,6 +78,12 @@ export default MultiTableController.extend({
     observePath: true
   }]),
 
+  definition: Ember.computed("model", function () {
+    var definition = this._super();
+    definition.set("recordType", "vertex");
+    return definition;
+  }),
+
   stats: Ember.computed("model.@each.loadTime", function () {
     var vertices = this.get("model");
 

http://git-wip-us.apache.org/repos/asf/tez/blob/e02e4f72/tez-ui/src/main/webapp/app/templates/dag/graphical.hbs
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/templates/dag/graphical.hbs b/tez-ui/src/main/webapp/app/templates/dag/graphical.hbs
index 8286ac7..6482f43 100644
--- a/tez-ui/src/main/webapp/app/templates/dag/graphical.hbs
+++ b/tez-ui/src/main/webapp/app/templates/dag/graphical.hbs
@@ -17,15 +17,20 @@
 }}
 
 {{#if loaded}}
-  <div id="graphical-view-component-container">
-    {{em-tgraph
+  {{#if model.length}}
+    <div id="graphical-view-component-container">
+      {{em-tgraph
       data=viewData
       vertexProperties=visibleColumns
       entityClicked='entityClicked'
       configure='openColumnSelector'
-    }}
-    <div class="dag-view-legend">Refresh updates only the tooltip values. When sources & sinks are hidden, double click green bubble to toggle visibility locally.</div>
-  </div>
+      }}
+      <div class="dag-view-legend">Refresh updates only the tooltip values. When sources & sinks are hidden, double click green bubble to toggle visibility locally.</div>
+    </div>
+  {{else}}
+    <h2>Data not available to display graphical view!</h2>
+    <h4>No vertex data found in YARN Timeline Server.</h4>
+  {{/if}}
 {{else}}
   {{partial "loading"}}
 {{/if}}

http://git-wip-us.apache.org/repos/asf/tez/blob/e02e4f72/tez-ui/src/main/webapp/app/templates/dag/index/index.hbs
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/templates/dag/index/index.hbs b/tez-ui/src/main/webapp/app/templates/dag/index/index.hbs
index c6864fb..e39b514 100644
--- a/tez-ui/src/main/webapp/app/templates/dag/index/index.hbs
+++ b/tez-ui/src/main/webapp/app/templates/dag/index/index.hbs
@@ -17,13 +17,14 @@
 }}
 
 {{#if loaded}}
-  <table class='detail-list'>
-    <thead>
-    <tr>
-      <th colspan=2>Stats</th>
-    </tr>
-    </thead>
-    <tbody>
+  {{#if model.length}}
+    <table class='detail-list'>
+      <thead>
+      <tr>
+        <th colspan=2>Stats</th>
+      </tr>
+      </thead>
+      <tbody>
       <tr>
         <td>Succeeded Vertices</td>
         <td>{{stats-link value=stats.succeededVertices routeName="dag.vertices" statsType="SUCCEEDED"}}</td>
@@ -56,25 +57,26 @@
         <td>Killed Task Attempts</td>
         <td>{{stats-link value=stats.killedTaskAttempts routeName="dag.attempts" statsType="KILLED"}}</td>
       </tr>
-    </tbody>
-  </table>
+      </tbody>
+    </table>
+  {{/if}}
 
   {{em-table
-  columns=visibleColumns
-  rows=model
+    columns=visibleColumns
+    rows=model
 
-  definition=definition
+    definition=definition
 
-  enableSearch=false
-  enablePagination=false
+    enableSearch=false
+    enablePagination=false
 
-  rowCount=model.length
-  searchAction="searchChanged"
-  sortAction="sortChanged"
-  rowAction="rowCountChanged"
-  pageAction="pageChanged"
+    rowCount=model.length
+    searchAction="searchChanged"
+    sortAction="sortChanged"
+    rowAction="rowCountChanged"
+    pageAction="pageChanged"
 
-  rowsChanged="rowsChanged"
+    rowsChanged="rowsChanged"
   }}
 {{else}}
   {{partial "loading"}}

http://git-wip-us.apache.org/repos/asf/tez/blob/e02e4f72/tez-ui/src/main/webapp/app/templates/dag/swimlane.hbs
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/templates/dag/swimlane.hbs b/tez-ui/src/main/webapp/app/templates/dag/swimlane.hbs
index dbbe23fc..1f126d3 100644
--- a/tez-ui/src/main/webapp/app/templates/dag/swimlane.hbs
+++ b/tez-ui/src/main/webapp/app/templates/dag/swimlane.hbs
@@ -17,30 +17,35 @@
 }}
 
 {{#if loaded}}
-  {{#if dataAvailable}}
-    <div class="swimlane-page">
-      <div class="button-panel">
-        <div class="zoom-range">
-          {{zoom}}%
-          {{input type="range" value=zoom min=100 max=1000}}
+  {{#if model.length}}
+    {{#if dataAvailable}}
+      <div class="swimlane-page">
+        <div class="button-panel">
+          <div class="zoom-range">
+            {{zoom}}%
+            {{input type="range" value=zoom min=100 max=1000}}
+          </div>
+          <i class='fa fa-cog fa-border' {{action 'openColumnSelector'}} title="Customize vertex tooltip"></i>
+          <i class='fa fa-expand fa-border' {{action 'toggleFullscreen'}} title="Toggle fullscreen"></i>
+          <i class='fa fa-compress fa-border' {{action 'toggleFullscreen'}} title="Toggle fullscreen"></i>
         </div>
-        <i class='fa fa-cog fa-border' {{action 'openColumnSelector'}} title="Customize vertex tooltip"></i>
-        <i class='fa fa-expand fa-border' {{action 'toggleFullscreen'}} title="Toggle fullscreen"></i>
-        <i class='fa fa-compress fa-border' {{action 'toggleFullscreen'}} title="Toggle fullscreen"></i>
-      </div>
 
-      {{em-swimlane
+        {{em-swimlane
         columns=visibleColumns
         processes=processes
         nameComponent="em-swimlane-vertex-name"
         zoom=zoom
         click="click"
         consolidate=true
-      }}
-    </div>
+        }}
+      </div>
+    {{else}}
+      <h2>Data not available to display swimlane for a running DAG!</h2>
+      <h4>You may be using an older version of Tez. Vertex Swimlanes are not supported for DAGs that have not yet completed in older versions of Tez.<br/> Please check back later to look at the Swimlane after the DAG has completed.</h4>
+    {{/if}}
   {{else}}
-    <h2>Data not available to display swimlane for a running DAG!</h2>
-    <h4>You might be using an older version of Tez. Please get back after DAG completion.</h4>
+    <h2>Data not available to display swimlane!</h2>
+    <h4>No vertex data found in YARN Timeline Server.</h4>
   {{/if}}
 {{else}}
   {{partial "loading"}}

http://git-wip-us.apache.org/repos/asf/tez/blob/e02e4f72/tez-ui/src/main/webapp/package.json
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/package.json b/tez-ui/src/main/webapp/package.json
index e5c3279..785812b 100644
--- a/tez-ui/src/main/webapp/package.json
+++ b/tez-ui/src/main/webapp/package.json
@@ -58,7 +58,7 @@
   },
   "dependencies": {
     "em-helpers": "0.5.13",
-    "em-table": "0.3.14",
+    "em-table": "0.3.16",
     "em-tgraph": "0.0.5"
   }
 }

http://git-wip-us.apache.org/repos/asf/tez/blob/e02e4f72/tez-ui/src/main/webapp/tests/unit/controllers/dag/index/index-test.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/tests/unit/controllers/dag/index/index-test.js b/tez-ui/src/main/webapp/tests/unit/controllers/dag/index/index-test.js
index 166ee6b..4426039 100644
--- a/tez-ui/src/main/webapp/tests/unit/controllers/dag/index/index-test.js
+++ b/tez-ui/src/main/webapp/tests/unit/controllers/dag/index/index-test.js
@@ -38,3 +38,16 @@ test('Basic creation test', function(assert) {
   assert.ok(controller);
   assert.ok(controller.columns);
 });
+
+test('definition test', function(assert) {
+  let controller = this.subject({
+    send: Ember.K,
+    beforeSort: {bind: Ember.K},
+    initVisibleColumns: Ember.K,
+    getCounterColumns: function () {
+      return [];
+    }
+  });
+
+  assert.ok(controller.get("definition.recordType"), "vertex");
+});