From 845f891517a2befccb73267c54fc08f8dc2c811a Mon Sep 17 00:00:00 2001 From: zombieJ Date: Fri, 12 May 2017 16:41:44 +0800 Subject: [PATCH 1/2] [EAGLE-1020] JPM UI overview page OPS unit error https://issues.apache.org/jira/browse/EAGLE-1020 Author: zombieJ Closes #931 from zombieJ/EAGLE-1020. --- .../src/main/webapp/app/apps/jpm/ctrl/overviewCtrl.js | 8 ++++++++ .../main/webapp/app/apps/jpm/partials/job/overview.html | 8 ++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/eagle-jpm/eagle-jpm-web/src/main/webapp/app/apps/jpm/ctrl/overviewCtrl.js b/eagle-jpm/eagle-jpm-web/src/main/webapp/app/apps/jpm/ctrl/overviewCtrl.js index 85c4547348..d50c4df911 100644 --- a/eagle-jpm/eagle-jpm-web/src/main/webapp/app/apps/jpm/ctrl/overviewCtrl.js +++ b/eagle-jpm/eagle-jpm-web/src/main/webapp/app/apps/jpm/ctrl/overviewCtrl.js @@ -58,6 +58,14 @@ }] }; + $scope.opsOption = $.extend({}, $scope.commonOption, { + yAxis: [{ + axisLabel: {formatter: function (value) { + return common.number.abbr(value); + }} + }] + }); + // ====================================================================== // = Refresh Overview = // ====================================================================== diff --git a/eagle-jpm/eagle-jpm-web/src/main/webapp/app/apps/jpm/partials/job/overview.html b/eagle-jpm/eagle-jpm-web/src/main/webapp/app/apps/jpm/partials/job/overview.html index 06e85ea568..fac0296207 100644 --- a/eagle-jpm/eagle-jpm-web/src/main/webapp/app/apps/jpm/partials/job/overview.html +++ b/eagle-jpm/eagle-jpm-web/src/main/webapp/app/apps/jpm/partials/job/overview.html @@ -105,7 +105,7 @@

Top HDFS Bytes Written

Top HDFS Read OPs

-
+
@@ -127,7 +127,7 @@

Top HDFS Read OPs

{{item.name}} - {{common.number.abbr(item.total, true)}} + {{common.number.abbr(item.total)}} @@ -140,7 +140,7 @@

Top HDFS Read OPs

Top HDFS Write OPs

-
+
@@ -162,7 +162,7 @@

Top HDFS Write OPs

{{item.name}} - {{common.number.abbr(item.total, true)}} + {{common.number.abbr(item.total)}} From 342df9974c91f845608c9ff3c65b8c1818d56884 Mon Sep 17 00:00:00 2001 From: zombieJ Date: Mon, 15 May 2017 15:22:21 +0800 Subject: [PATCH 2/2] [EAGLE-1021] JPM Overview OPS trend use max agg https://issues.apache.org/jira/browse/EAGLE-1021 Author: zombieJ Closes #932 from zombieJ/EAGLE-1021. --- .../src/main/webapp/app/apps/jpm/ctrl/overviewCtrl.js | 9 +++++---- .../main/webapp/app/apps/jpm/partials/job/detail.html | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/eagle-jpm/eagle-jpm-web/src/main/webapp/app/apps/jpm/ctrl/overviewCtrl.js b/eagle-jpm/eagle-jpm-web/src/main/webapp/app/apps/jpm/ctrl/overviewCtrl.js index d50c4df911..0e6275c60b 100644 --- a/eagle-jpm/eagle-jpm-web/src/main/webapp/app/apps/jpm/ctrl/overviewCtrl.js +++ b/eagle-jpm/eagle-jpm-web/src/main/webapp/app/apps/jpm/ctrl/overviewCtrl.js @@ -80,8 +80,9 @@ var endTime = Time.endTime(); var intervalMin = Time.diffInterval(startTime, endTime) / 1000 / 60; - function getTopList(metric, scopeVariable) { + function getTopList(metric, scopeVariable, aggType) { var deferred = $q.defer(); + aggType = aggType || 'avg'; metric = common.template(metric, { type: $scope.type.toLocaleLowerCase() @@ -96,7 +97,7 @@ var aggregation = $scope.aggregationMap[$scope.type]; var aggPromise = cache[metric] = cache[metric] || JPM.aggMetricsToEntities( - JPM.aggMetrics({site: $scope.site}, metric, [aggregation], "avg(value), sum(value) desc", intervalMin, startTime, endTime, 10) + JPM.aggMetrics({site: $scope.site}, metric, [aggregation], aggType + "(value), sum(value) desc", intervalMin, startTime, endTime, 10) , [0])._promise.then(function (list) { var series = $.map(list, function (metrics) { return JPM.metricsToSeries(metrics[0].tags[aggregation], metrics, { @@ -133,8 +134,8 @@ getTopList("hadoop.${type}.history.minute.virtual_memory_bytes", "virtualMemorySeries"); getTopList("hadoop.${type}.history.minute.hdfs_bytes_read", "hdfsBtyesReadSeries"); getTopList("hadoop.${type}.history.minute.hdfs_bytes_written", "hdfsBtyesWrittenSeries"); - getTopList("hadoop.${type}.history.minute.hdfs_read_ops", "hdfsReadOpsSeries"); - getTopList("hadoop.${type}.history.minute.hdfs_write_ops", "hdfsWriteOpsSeries"); + getTopList("hadoop.${type}.history.minute.hdfs_read_ops", "hdfsReadOpsSeries", 'max'); + getTopList("hadoop.${type}.history.minute.hdfs_write_ops", "hdfsWriteOpsSeries", 'max'); getTopList("hadoop.${type}.history.minute.file_bytes_read", "fileBytesReadSeries"); getTopList("hadoop.${type}.history.minute.file_bytes_written", "fileBytesWrittenSeries"); }; diff --git a/eagle-jpm/eagle-jpm-web/src/main/webapp/app/apps/jpm/partials/job/detail.html b/eagle-jpm/eagle-jpm-web/src/main/webapp/app/apps/jpm/partials/job/detail.html index eeb59765e5..573b09262d 100644 --- a/eagle-jpm/eagle-jpm-web/src/main/webapp/app/apps/jpm/partials/job/detail.html +++ b/eagle-jpm/eagle-jpm-web/src/main/webapp/app/apps/jpm/partials/job/detail.html @@ -136,7 +136,7 @@

Reduce vCores {{common.number.toFixed(job.jobCounters.counters["org.apache.hadoop.mapreduce.JobCounter"].VCORES_MILLIS_REDUCES)}} ms - Map CPU + Reduce CPU {{common.number.toFixed(job.jobCounters.counters.ReduceTaskAttemptCounter.CPU_MILLISECONDS)}} ms HDFS Write Bytes