You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sr...@apache.org on 2013/06/12 21:07:31 UTC
svn commit: r1492375 - in
/incubator/ambari/branches/branch-1.4.0/ambari-web/app:
assets/data/apps/apps/mapreduce_201301280808_0003.json
mappers/apps_mapper.js utils/app_graph.js
Author: srimanth
Date: Wed Jun 12 19:07:31 2013
New Revision: 1492375
URL: http://svn.apache.org/r1492375
Log:
AMBARI-2336. Hadoop 2 jobs UI doesn't handle zero finish time. (billie via srimanth)
Modified:
incubator/ambari/branches/branch-1.4.0/ambari-web/app/assets/data/apps/apps/mapreduce_201301280808_0003.json
incubator/ambari/branches/branch-1.4.0/ambari-web/app/mappers/apps_mapper.js
incubator/ambari/branches/branch-1.4.0/ambari-web/app/utils/app_graph.js
Modified: incubator/ambari/branches/branch-1.4.0/ambari-web/app/assets/data/apps/apps/mapreduce_201301280808_0003.json
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-web/app/assets/data/apps/apps/mapreduce_201301280808_0003.json?rev=1492375&r1=1492374&r2=1492375&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-web/app/assets/data/apps/apps/mapreduce_201301280808_0003.json (original)
+++ incubator/ambari/branches/branch-1.4.0/ambari-web/app/assets/data/apps/apps/mapreduce_201301280808_0003.json Wed Jun 12 19:07:31 2013
@@ -4,10 +4,9 @@
"appId": "application_201301280808_0003",
"appName": "oozie:launcher:T\\=map-reduce:W\\=map-reduce-wf:A\\=mr-node:ID\\=0000000-130128081151371-oozie-oozi-W",
"appType": "MAPREDUCE",
- "status": "FINISHED",
"userName": "ambari_qa",
"submitTime": 1359378907927,
- "finishTime": 1359378927213,
+ "finishTime": 0,
"stages": [1,0],
"workflowId": "mapreduce_201301280808_0003",
"workflowEntityName": "3"
Modified: incubator/ambari/branches/branch-1.4.0/ambari-web/app/mappers/apps_mapper.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-web/app/mappers/apps_mapper.js?rev=1492375&r1=1492374&r2=1492375&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-web/app/mappers/apps_mapper.js (original)
+++ incubator/ambari/branches/branch-1.4.0/ambari-web/app/mappers/apps_mapper.js Wed Jun 12 19:07:31 2013
@@ -28,6 +28,9 @@ App.appsMapper = App.QuickDataMapper.cre
var result = [];
json.apps.forEach(function (item) {
var a = this.parseIt(item, this.config);
+ // assume a nonzero elapsed time (otherwise axis labels are blank)
+ if (a.finish_time < a.submit_time)
+ a.finish_time = a.submit_time + 1000;
a.elapsed_time = a.finish_time - a.submit_time;
a.num_stages = a.stages.length;
result.push(a);
Modified: incubator/ambari/branches/branch-1.4.0/ambari-web/app/utils/app_graph.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-web/app/utils/app_graph.js?rev=1492375&r1=1492374&r2=1492375&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-web/app/utils/app_graph.js (original)
+++ incubator/ambari/branches/branch-1.4.0/ambari-web/app/utils/app_graph.js Wed Jun 12 19:07:31 2013
@@ -430,7 +430,10 @@ console.log("info "+jobData[i].info);
},
formatDuration:function(d) {
if (d==0) { return "0" }
- var seconds = Math.floor(parseInt(d) / 1000);
+ var subseconds = parseInt(d) / 1000;
+ if (subseconds < 1)
+ return subseconds + "s";
+ var seconds = Math.floor(subseconds);
if ( seconds < 60 )
return seconds + "s";
var minutes = Math.floor(seconds / 60);