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/09 03:42:41 UTC

[03/43] tez git commit: TEZ-2417. Tez UI: Counters are blank in the Attempts page if all attempts failed (Sreenath Somarajapuram via pramachandran)

TEZ-2417. Tez UI: Counters are blank in the Attempts page if all attempts failed (Sreenath Somarajapuram via pramachandran)


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

Branch: refs/heads/TEZ-2003
Commit: da3fecd53df56b96e29c8608068bf46a1995d611
Parents: 6a04fa4
Author: Prakash Ramachandran <pr...@hortonworks.com>
Authored: Wed May 6 19:27:39 2015 +0530
Committer: Prakash Ramachandran <pr...@hortonworks.com>
Committed: Wed May 6 19:27:39 2015 +0530

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 .../scripts/controllers/shared-controllers.js   |  1 -
 .../controllers/task-counters-controller.js     | 28 ++++++++++++++++++++
 .../app/scripts/models/TimelineRestAdapter.js   |  2 +-
 .../webapp/app/templates/common/counters.hbs    | 18 ++++++++-----
 5 files changed, 42 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/da3fecd5/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 91dd9c4..f95e626 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -15,6 +15,7 @@ INCOMPATIBLE CHANGES
   TEZ-1993. Implement a pluggable InputSizeEstimator for grouping fairly
 
 ALL CHANGES:
+  TEZ-2417. Tez UI: Counters are blank in the Attempts page if all attempts failed
   TEZ-2366. Pig tez MiniTezCluster unit tests fail intermittently after TEZ-2333
   TEZ-2406. Tez UI: Display per-io counter columns in task and attempt pages under vertex
   TEZ-2384. Add warning message in the case of prewarn under non-session mode.

http://git-wip-us.apache.org/repos/asf/tez/blob/da3fecd5/tez-ui/src/main/webapp/app/scripts/controllers/shared-controllers.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/shared-controllers.js b/tez-ui/src/main/webapp/app/scripts/controllers/shared-controllers.js
index 70d5e8c..e63fcf5 100644
--- a/tez-ui/src/main/webapp/app/scripts/controllers/shared-controllers.js
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/shared-controllers.js
@@ -18,7 +18,6 @@
 
 App.DagCountersController =
     App.VertexCountersController =
-    App.TaskCountersController =
     App.TaskAttemptCountersController =
 
     Em.ObjectController.extend(App.ModelRefreshMixin);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tez/blob/da3fecd5/tez-ui/src/main/webapp/app/scripts/controllers/task-counters-controller.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/task-counters-controller.js b/tez-ui/src/main/webapp/app/scripts/controllers/task-counters-controller.js
new file mode 100644
index 0000000..5d514bd
--- /dev/null
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/task-counters-controller.js
@@ -0,0 +1,28 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+App.TaskCountersController = Em.ObjectController.extend(App.ModelRefreshMixin, {
+  message: function () {
+    var status = this.get('content.status');
+    if(!this.get('content.counterGroups.length')) {
+      if(status == 'KILLED' || status == 'FAILED') {
+        return 'Task %@, please check the counters of individual task attempts.'.fmt(status);
+      }
+    }
+  }.property('content.status', 'content.counterGroups.length')
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tez/blob/da3fecd5/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 5db0990..704ba2f 100644
--- a/tez-ui/src/main/webapp/app/scripts/models/TimelineRestAdapter.js
+++ b/tez-ui/src/main/webapp/app/scripts/models/TimelineRestAdapter.js
@@ -93,7 +93,7 @@ var timelineJsonToDagMap = {
   endTime: 'otherinfo.endTime',
   name: 'primaryfilters.dagName.0',
   user: 'primaryfilters.user.0',
-  applicationId: 'otherinfo.applicationId',
+  applicationId: 'primaryfilters.applicationId.0',
   status: 'otherinfo.status',
   hasFailedTaskAttempts: {
     custom: function(source) {

http://git-wip-us.apache.org/repos/asf/tez/blob/da3fecd5/tez-ui/src/main/webapp/app/templates/common/counters.hbs
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/templates/common/counters.hbs b/tez-ui/src/main/webapp/app/templates/common/counters.hbs
index 30419e1..44d0b2c 100644
--- a/tez-ui/src/main/webapp/app/templates/common/counters.hbs
+++ b/tez-ui/src/main/webapp/app/templates/common/counters.hbs
@@ -21,9 +21,15 @@
   time=timeStamp
   refresh='refresh'
 }}
-<div class='table-container margin-small-vertical'>
-  {{counter-table-component
-    data=counterGroups
-    timeStamp=timeStamp
-  }}
-</div>
+{{#if counterGroups.length}}
+  <div class='table-container margin-small-vertical'>
+    {{counter-table-component
+      data=counterGroups
+      timeStamp=timeStamp
+    }}
+  </div>
+{{else}}
+  <h4>Counters not available!</h4>
+{{/if}}
+<h6>{{message}}</h6>
+