You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tez.apache.org by ss...@apache.org on 2015/05/06 09:41:07 UTC

[05/50] [abbrv] tez git commit: TEZ-2395. Tez UI: Minimum/Maximum Duration show a empty bracket next to 0 secs when you purposefully failed a job. (pramachandran)

TEZ-2395. Tez UI: Minimum/Maximum Duration show a empty bracket next to 0 secs when you purposefully failed a job. (pramachandran)


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

Branch: refs/heads/TEZ-2003
Commit: fcd6bb686750b21ea35696312088e1f4bbedce1a
Parents: 96efae0
Author: Prakash Ramachandran <pr...@hortonworks.com>
Authored: Fri May 1 13:59:22 2015 +0530
Committer: Prakash Ramachandran <pr...@hortonworks.com>
Committed: Fri May 1 13:59:22 2015 +0530

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 .../controllers/vertex_index_controller.js      | 35 +++++++++++++++-----
 .../main/webapp/app/templates/vertex/index.hbs  |  8 ++---
 3 files changed, 32 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/fcd6bb68/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index e7079bf..c8f8a3a 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -9,6 +9,7 @@ INCOMPATIBLE CHANGES
   TEZ-1993. Implement a pluggable InputSizeEstimator for grouping fairly
 
 ALL CHANGES:
+  TEZ-2395. Tez UI: Minimum/Maximum Duration show a empty bracket next to 0 secs when you purposefully failed a job.
   TEZ-2360. per-io counters flag should generate both overall and per-edge counters
   TEZ-2389. Tez UI: Sort by attempt-no is incorrect in attempts pages.
   TEZ-2383. Cleanup input/output/processor contexts in LogicalIOProcessorRuntimeTask.

http://git-wip-us.apache.org/repos/asf/tez/blob/fcd6bb68/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 f104c11..ebddf53 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
@@ -38,7 +38,7 @@ App.VertexIndexController = Em.ObjectController.extend(App.ModelRefreshMixin, {
   //TODO: TEZ-1705 : Create a parent class and move this function there to avoid duplication.
   iconStatus: function() {
     return App.Helpers.misc.getStatusClassForEntity(this.get('model.status'));
-  }.property('id', 'status', 'counterGroups'),
+  }.property('id', 'model.status'),
 
   progressStr: function() {
     var pct;
@@ -46,25 +46,44 @@ App.VertexIndexController = Em.ObjectController.extend(App.ModelRefreshMixin, {
       pct = App.Helpers.number.fractionToPercentage(this.get('progress'));
     }
     return pct;
-  }.property('id', 'status', 'progress'),
+  }.property('id', 'status', 'progress', 'model.status'),
 
   hasFailedTasks: function() {
     return this.get('failedTasks') > 0;
-  }.property('id', 'counterGroups'),
+  }.property('failedTasks'),
   
   failedTasksLink: function() {
     return '#tasks?status=FAILED&parentType=TEZ_VERTEX_ID&parentID=' + this.get('id');
-  }.property(),
+  }.property('id'),
 
   hasFirstTaskStarted: function() {
     return !!this.get('firstTaskStartTime') && !!this.get('firstTasksToStart');
-  }.property(),
+  }.property('firstTaskStartTime', 'firstTasksToStart'),
 
   hasLastTaskFinished: function() {
     return !!this.get('lastTaskFinishTime') && !!this.get('lastTasksToFinish');
-  }.property(),
+  }.property('lastTaskFinishTime', 'lastTasksToFinish'),
 
   hasStats: function() {
-    return !!this.get('avgTaskDuration') || !!this.get('minTaskDuration') || !!this.get('maxTaskDuration');
-  }.property()
+    return (this.get('numTasks') || 0) > 0 ||
+           (this.get('sucessfulTasks') || 0) > 0 ||
+           (this.get('failedTasks') || 0 ) > 0 ||
+           (this.get('killedTasks') || 0) > 0 ||
+           this.get('showAvgTaskDuration') ||
+           this.get('showMinTaskDuration') ||
+           this.get('showMaxTaskDuration');
+  }.property('numTasks', 'sucessfulTasks', 'failedTasks', 'killedTasks', 'showAvgTaskDuration',
+    'showMinTaskDuration', 'showMaxTaskDuration'),
+
+  showAvgTaskDuration: function() {
+    return (this.get('avgTaskDuration') || 0) > 0;
+  }.property('avgTaskDuration'),
+
+  showMinTaskDuration: function() {
+    return (this.get('minTaskDuration') || 0) > 0;
+  }.property('minTaskDuration'),
+
+  showMaxTaskDuration: function() {
+    return (this.get('maxTaskDuration') || 0) > 0;
+  }.property('maxTaskDuration'),
 });
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tez/blob/fcd6bb68/tez-ui/src/main/webapp/app/templates/vertex/index.hbs
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/templates/vertex/index.hbs b/tez-ui/src/main/webapp/app/templates/vertex/index.hbs
index 2f2eeda..acdce99 100644
--- a/tez-ui/src/main/webapp/app/templates/vertex/index.hbs
+++ b/tez-ui/src/main/webapp/app/templates/vertex/index.hbs
@@ -130,23 +130,23 @@
             <td>Failed Tasks</td>
             <td>
               {{failedTasks}}
-            </td>
               {{#if hasFailedTasks}}
                 <a href='{{unbound failedTasksLink}}'>FailedTasks</a>
               {{/if}}
+            </td>
           </tr>
           <tr>
             <td>Killed Tasks</td>
             <td>{{killedTasks}}</td>
           </tr>
 
-          {{#if avgTaskDuration}}
+          {{#if showAvgTaskDuration}}
             <tr>
               <td>Average Duration</td>
               <td>{{formatTimeMillis avgTaskDuration}}</td>
             </tr>
           {{/if}}
-          {{#if minTaskDuration}}
+          {{#if showMinTaskDuration}}
             <tr>
               <td>Minimum Duration</td>
               <td>{{formatTimeMillis minTaskDuration}}
@@ -159,7 +159,7 @@
               </td>
             </tr>
           {{/if}}
-          {{#if maxTaskDuration}}
+          {{#if showMaxTaskDuration}}
             <tr>
               <td>Maximum Duration</td>
               <td>{{formatTimeMillis maxTaskDuration}}