Browse Source

AMBARI-927. Provide metrics graphs on the MapReduce services page. (Srimanth Gunturi via yusaku)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/branches/AMBARI-666@1402403 13f79535-47bb-0310-9956-ffa450edef68
Yusaku Sako 12 năm trước cách đây
mục cha
commit
bb88f13beb
21 tập tin đã thay đổi với 754 bổ sung2 xóa
  1. 3 0
      AMBARI-666-CHANGES.txt
  2. 16 0
      ambari-web/app/assets/data/services/metrics/mapreduce/gc.json
  3. 18 0
      ambari-web/app/assets/data/services/metrics/mapreduce/jobs_running_waiting.json
  4. 19 0
      ambari-web/app/assets/data/services/metrics/mapreduce/jobs_status.json
  5. 19 0
      ambari-web/app/assets/data/services/metrics/mapreduce/jvm_heap.json
  6. 19 0
      ambari-web/app/assets/data/services/metrics/mapreduce/jvm_threads.json
  7. 16 0
      ambari-web/app/assets/data/services/metrics/mapreduce/map_slots.json
  8. 16 0
      ambari-web/app/assets/data/services/metrics/mapreduce/reduce_slots.json
  9. 16 0
      ambari-web/app/assets/data/services/metrics/mapreduce/rpc.json
  10. 3 1
      ambari-web/app/templates/main/service/info/summary.hbs
  11. 8 0
      ambari-web/app/views.js
  12. 1 1
      ambari-web/app/views/main/service/info/metrics/hdfs/jvm_heap.js
  13. 69 0
      ambari-web/app/views/main/service/info/metrics/mapreduce/gc.js
  14. 77 0
      ambari-web/app/views/main/service/info/metrics/mapreduce/jobs_running_waiting.js
  15. 80 0
      ambari-web/app/views/main/service/info/metrics/mapreduce/jobs_status.js
  16. 78 0
      ambari-web/app/views/main/service/info/metrics/mapreduce/jvm_heap.js
  17. 77 0
      ambari-web/app/views/main/service/info/metrics/mapreduce/jvm_threads.js
  18. 71 0
      ambari-web/app/views/main/service/info/metrics/mapreduce/map_slots.js
  19. 71 0
      ambari-web/app/views/main/service/info/metrics/mapreduce/reduce_slots.js
  20. 69 0
      ambari-web/app/views/main/service/info/metrics/mapreduce/rpc.js
  21. 8 0
      ambari-web/app/views/main/service/info/summary.js

+ 3 - 0
AMBARI-666-CHANGES.txt

@@ -12,6 +12,9 @@ AMBARI-666 branch (unreleased changes)
 
   NEW FEATURES
 
+  AMBARI-927. Provide metrics graphs on the MapReduce services page. 
+  (Srimanth Gunturi via yusaku)
+
   AMBARI-916. Provide metrics graphs in HDFS services page. (Srimanth
   Gunturi via yusaku)
 

+ 16 - 0
ambari-web/app/assets/data/services/metrics/mapreduce/gc.json

@@ -0,0 +1,16 @@
+{
+  "href" : "http://ec2-23-22-183-40.compute-1.amazonaws.com:9998/clusters/SrimanthAmbari/hosts/ip-10-224-3-23.ec2.internal/host_components/JOBTRACKER?fields=metrics/jvm/gcTimeMillis[1351213550,1351217148,60]",
+  "HostRoles" : {
+    "cluster_name" : "SrimanthAmbari",
+    "component_name" : "JOBTRACKER",
+    "host_name" : "ip-10-224-3-23.ec2.internal"
+  },
+  "host" : {
+    "href" : "http://ec2-23-22-183-40.compute-1.amazonaws.com:9998/clusters/SrimanthAmbari/hosts/ip-10-224-3-23.ec2.internal"
+  },
+  "metrics" : {
+    "jvm" : {
+      "gcTimeMillis" : "[[0.0,1351213560],[0.0,1351213920],[0.0,1351214280],[0.0,1351214640],[0.0,1351215000],[0.0,1351215360],[0.011111111111,1351215720],[0.0,1351216080],[0.0,1351216440],[1.1930462189E7,1351216800],[0.069444444444,1351217160]]"
+    }
+  }
+}

+ 18 - 0
ambari-web/app/assets/data/services/metrics/mapreduce/jobs_running_waiting.json

@@ -0,0 +1,18 @@
+{
+  "href" : "http://ec2-23-22-183-40.compute-1.amazonaws.com:9998/clusters/SrimanthAmbari/services/MAPREDUCE/components/JOBTRACKER?fields=metrics/mapred/jobtracker/running_maps[1351213550,1351217148,60],metrics/mapred/jobtracker/running_reduces[1351213550,1351217148,60],metrics/mapred/jobtracker/waiting_maps[1351213550,1351217148,60],metrics/mapred/jobtracker/waiting_reduces[1351213550,1351217148,60]",
+  "metrics" : {
+    "mapred" : {
+      "jobtracker" : {
+        "running_maps" : "[[0.0,1351213560],[0.0,1351213920],[0.0,1351214280],[0.0,1351214640],[0.0,1351215000],[0.0,1351215360],[0.0,1351215720],[0.0,1351216080],[0.0,1351216440],[0.0,1351216800],[0.038888888889,1351217160]]",
+        "running_reduces" : "[[0.0,1351213560],[0.0,1351213920],[0.0,1351214280],[0.0,1351214640],[0.0,1351215000],[0.0,1351215360],[0.0,1351215720],[0.0,1351216080],[0.0,1351216440],[0.0,1351216800],[0.038888888889,1351217160]]",
+        "waiting_maps" : "[[0.0,1351213560],[0.0,1351213920],[0.0,1351214280],[0.0,1351214640],[0.0,1351215000],[0.0,1351215360],[0.0,1351215720],[0.0,1351216080],[0.0,1351216440],[0.0,1351216800],[0.0,1351217160]]",
+        "waiting_reduces" : "[[0.0,1351213560],[0.0,1351213920],[0.0,1351214280],[0.0,1351214640],[0.0,1351215000],[0.0,1351215360],[0.0,1351215720],[0.0,1351216080],[0.0,1351216440],[0.0,1351216800],[0.0,1351217160]]"
+      }
+    }
+  },
+  "ServiceComponentInfo" : {
+    "cluster_name" : "SrimanthAmbari",
+    "component_name" : "JOBTRACKER",
+    "service_name" : "MAPREDUCE"
+  }
+}

+ 19 - 0
ambari-web/app/assets/data/services/metrics/mapreduce/jobs_status.json

@@ -0,0 +1,19 @@
+{
+  "href" : "http://ec2-23-22-183-40.compute-1.amazonaws.com:9998/clusters/SrimanthAmbari/services/MAPREDUCE/components/JOBTRACKER?fields=metrics/mapred/jobtracker/jobs_completed[1351213550,1351217148,60],metrics/mapred/jobtracker/jobs_preparing[1351213550,1351217148,60],metrics/mapred/jobtracker/jobs_failed[1351213550,1351217148,60],metrics/mapred/jobtracker/jobs_submitted[1351213550,1351217148,60],metrics/mapred/jobtracker/jobs_failed[1351213550,1351217148,60],metrics/mapred/jobtracker/jobs_running[1351213550,1351217148,60]",
+  "metrics" : {
+    "mapred" : {
+      "jobtracker" : {
+        "jobs_running" : "[[0.0,1351213560],[0.0,1351213920],[0.0,1351214280],[0.0,1351214640],[0.0,1351215000],[0.0,1351215360],[0.0,1351215720],[0.0,1351216080],[0.0,1351216440],[0.0,1351216800],[0.077777777778,1351217160]]",
+        "jobs_failed" : "[[0.0,1351213560],[0.0,1351213920],[0.0,1351214280],[0.0,1351214640],[0.0,1351215000],[0.0,1351215360],[0.0,1351215720],[0.0,1351216080],[0.0,1351216440],[0.0,1351216800],[0.0,1351217160]]",
+        "jobs_completed" : "[[0.0,1351213560],[0.0,1351213920],[0.0,1351214280],[0.0,1351214640],[0.0,1351215000],[0.0,1351215360],[0.0,1351215720],[0.0,1351216080],[0.0,1351216440],[1.19304647E7,1351216800],[0.0083333333333,1351217160]]",
+        "jobs_preparing" : "[[0.0,1351213560],[0.0,1351213920],[0.0,1351214280],[0.0,1351214640],[0.0,1351215000],[0.0,1351215360],[0.0,1351215720],[0.0,1351216080],[0.0,1351216440],[0.0,1351216800],[0.086111111111,1351217160]]",
+        "jobs_submitted" : "[[0.0,1351213560],[0.0,1351213920],[0.0,1351214280],[0.0,1351214640],[0.0,1351215000],[0.0,1351215360],[0.0,1351215720],[0.0,1351216080],[0.0,1351216440],[1.19304647E7,1351216800],[0.0083333333333,1351217160]]"
+      }
+    }
+  },
+  "ServiceComponentInfo" : {
+    "cluster_name" : "SrimanthAmbari",
+    "component_name" : "JOBTRACKER",
+    "service_name" : "MAPREDUCE"
+  }
+}

+ 19 - 0
ambari-web/app/assets/data/services/metrics/mapreduce/jvm_heap.json

@@ -0,0 +1,19 @@
+{
+  "href" : "http://ec2-23-22-183-40.compute-1.amazonaws.com:9998/clusters/SrimanthAmbari/hosts/ip-10-224-3-23.ec2.internal/host_components/JOBTRACKER?fields=metrics/jvm/memNonHeapUsedM[1351213550,1351217148,60],metrics/jvm/memNonHeapCommittedM[1351213550,1351217148,60],metrics/jvm/memHeapUsedM[1351213550,1351217148,60],metrics/jvm/memHeapCommittedM[1351213550,1351217148,60]",
+  "HostRoles" : {
+    "cluster_name" : "SrimanthAmbari",
+    "component_name" : "JOBTRACKER",
+    "host_name" : "ip-10-224-3-23.ec2.internal"
+  },
+  "host" : {
+    "href" : "http://ec2-23-22-183-40.compute-1.amazonaws.com:9998/clusters/SrimanthAmbari/hosts/ip-10-224-3-23.ec2.internal"
+  },
+  "metrics" : {
+    "jvm" : {
+      "memHeapCommittedM" : "[[185.1875,1351213560],[185.1875,1351213920],[185.1875,1351214280],[185.1875,1351214640],[185.1875,1351215000],[185.1875,1351215360],[185.1875,1351215720],[185.1875,1351216080],[185.1875,1351216440],[185.1875,1351216800],[185.1875,1351217160]]",
+      "memNonHeapUsedM" : "[[24.856247,1351213560],[24.856247,1351213920],[24.856247,1351214280],[24.856247,1351214640],[24.856247,1351215000],[24.856247,1351215360],[24.856247,1351215720],[24.856247,1351216080],[24.856247,1351216440],[23.964379333,1351216800],[21.711374106,1351217160]]",
+      "memHeapUsedM" : "[[58.635102042,1351213560],[76.2040755,1351213920],[93.246927389,1351214280],[110.45160614,1351214640],[127.54546414,1351215000],[144.66363658,1351215360],[96.690545511,1351215720],[20.528702175,1351216080],[38.275298164,1351216440],[59.513269842,1351216800],[127.88187832,1351217160]]",
+      "memNonHeapCommittedM" : "[[39.08203,1351213560],[39.08203,1351213920],[39.08203,1351214280],[39.08203,1351214640],[39.08203,1351215000],[39.08203,1351215360],[39.08203,1351215720],[39.08203,1351216080],[39.08203,1351216440],[36.653699028,1351216800],[23.404166667,1351217160]]"
+    }
+  }
+}

+ 19 - 0
ambari-web/app/assets/data/services/metrics/mapreduce/jvm_threads.json

@@ -0,0 +1,19 @@
+{
+  "href" : "http://ec2-23-22-183-40.compute-1.amazonaws.com:9998/clusters/SrimanthAmbari/hosts/ip-10-224-3-23.ec2.internal/host_components/JOBTRACKER?fields=metrics/jvm/threadsRunnable[1351213550,1351217148,60],metrics/jvm/threadsBlocked[1351213550,1351217148,60],metrics/jvm/threadsWaiting[1351213550,1351217148,60],metrics/jvm/threadsTimedWaiting[1351213550,1351217148,60]",
+  "HostRoles" : {
+    "cluster_name" : "SrimanthAmbari",
+    "component_name" : "JOBTRACKER",
+    "host_name" : "ip-10-224-3-23.ec2.internal"
+  },
+  "host" : {
+    "href" : "http://ec2-23-22-183-40.compute-1.amazonaws.com:9998/clusters/SrimanthAmbari/hosts/ip-10-224-3-23.ec2.internal"
+  },
+  "metrics" : {
+    "jvm" : {
+      "threadsBlocked" : "[[0.0,1351213560],[0.0,1351213920],[0.0,1351214280],[0.0,1351214640],[0.0,1351215000],[0.0,1351215360],[0.0,1351215720],[0.0,1351216080],[0.0,1351216440],[0.0,1351216800],[0.0,1351217160]]",
+      "threadsWaiting" : "[[59.0,1351213560],[59.0,1351213920],[59.0,1351214280],[59.0,1351214640],[59.0,1351215000],[59.0,1351215360],[59.0,1351215720],[59.0,1351216080],[59.0,1351216440],[58.388888889,1351216800],[58.627777778,1351217160]]",
+      "threadsTimedWaiting" : "[[10.0,1351213560],[10.0,1351213920],[10.0,1351214280],[10.0,1351214640],[10.0,1351215000],[10.0,1351215360],[10.0,1351215720],[10.0,1351216080],[10.0,1351216440],[10.161111111,1351216800],[10.830555556,1351217160]]",
+      "threadsRunnable" : "[[6.0,1351213560],[6.0,1351213920],[6.0,1351214280],[6.0,1351214640],[6.0,1351215000],[6.0,1351215360],[6.0,1351215720],[6.0,1351216080],[6.0,1351216440],[6.0,1351216800],[6.0,1351217160]]"
+    }
+  }
+}

+ 16 - 0
ambari-web/app/assets/data/services/metrics/mapreduce/map_slots.json

@@ -0,0 +1,16 @@
+{
+  "href" : "http://ec2-23-22-183-40.compute-1.amazonaws.com:9998/clusters/SrimanthAmbari/services/MAPREDUCE/components/JOBTRACKER?fields=metrics/mapred/jobtracker/occupied_map_slots[1351213550,1351217148,60],metrics/mapred/jobtracker/reserved_map_slots[1351213550,1351217148,60]",
+  "metrics" : {
+    "mapred" : {
+      "jobtracker" : {
+        "reserved_map_slots" : "[[0.0,1351213560],[0.0,1351213920],[0.0,1351214280],[0.0,1351214640],[0.0,1351215000],[0.0,1351215360],[0.0,1351215720],[0.0,1351216080],[0.0,1351216440],[0.0,1351216800],[0.0,1351217160]]",
+        "occupied_map_slots" : "[[0.0,1351213560],[0.0,1351213920],[0.0,1351214280],[0.0,1351214640],[0.0,1351215000],[0.0,1351215360],[0.0,1351215720],[0.0,1351216080],[0.0,1351216440],[0.0,1351216800],[0.038888888889,1351217160]]"
+      }
+    }
+  },
+  "ServiceComponentInfo" : {
+    "cluster_name" : "SrimanthAmbari",
+    "component_name" : "JOBTRACKER",
+    "service_name" : "MAPREDUCE"
+  }
+}

+ 16 - 0
ambari-web/app/assets/data/services/metrics/mapreduce/reduce_slots.json

@@ -0,0 +1,16 @@
+{
+  "href" : "http://ec2-23-22-183-40.compute-1.amazonaws.com:9998/clusters/SrimanthAmbari/services/MAPREDUCE/components/JOBTRACKER?fields=metrics/mapred/jobtracker/occupied_reduce_slots[1351213550,1351217148,60],metrics/mapred/jobtracker/reserved_reduce_slots[1351213550,1351217148,60]",
+  "metrics" : {
+    "mapred" : {
+      "jobtracker" : {
+        "reserved_reduce_slots" : "[[0.0,1351213560],[0.0,1351213920],[0.0,1351214280],[0.0,1351214640],[0.0,1351215000],[0.0,1351215360],[0.0,1351215720],[0.0,1351216080],[0.0,1351216440],[0.0,1351216800],[0.0,1351217160]]",
+        "occupied_reduce_slots" : "[[0.0,1351213560],[0.0,1351213920],[0.0,1351214280],[0.0,1351214640],[0.0,1351215000],[0.0,1351215360],[0.0,1351215720],[0.0,1351216080],[0.0,1351216440],[0.0,1351216800],[0.038888888889,1351217160]]"
+      }
+    }
+  },
+  "ServiceComponentInfo" : {
+    "cluster_name" : "SrimanthAmbari",
+    "component_name" : "JOBTRACKER",
+    "service_name" : "MAPREDUCE"
+  }
+}

+ 16 - 0
ambari-web/app/assets/data/services/metrics/mapreduce/rpc.json

@@ -0,0 +1,16 @@
+{
+  "href" : "http://ec2-23-22-183-40.compute-1.amazonaws.com:9998/clusters/SrimanthAmbari/hosts/ip-10-224-3-23.ec2.internal/host_components/JOBTRACKER?fields=metrics/rpc/RpcQueueTime_avg_time[1351213550,1351217148,60]",
+  "HostRoles" : {
+    "cluster_name" : "SrimanthAmbari",
+    "component_name" : "JOBTRACKER",
+    "host_name" : "ip-10-224-3-23.ec2.internal"
+  },
+  "host" : {
+    "href" : "http://ec2-23-22-183-40.compute-1.amazonaws.com:9998/clusters/SrimanthAmbari/hosts/ip-10-224-3-23.ec2.internal"
+  },
+  "metrics" : {
+    "rpc" : {
+      "RpcQueueTime_avg_time" : "[[0.069553376906,1351213560],[0.08265993266,1351213920],[0.096717171717,1351214280],[0.07859724698,1351214640],[0.093248663102,1351215000],[0.084630619925,1351215360],[0.09087443058,1351215720],[0.075108932462,1351216080],[0.086007130125,1351216440],[0.42323904309,1351216800],[0.14756856477,1351217160]]"
+    }
+  }
+}

+ 3 - 1
ambari-web/app/templates/main/service/info/summary.hbs

@@ -231,7 +231,9 @@
 	<div class="box">
 		<div class="box-header">
 			<h4>Alerts</h4>
-			<a class="btn" href="http://nagiosserver/nagios" target="_blank" rel="tooltip" title="Go to Nagios"><i class="icon-link"></i></a>
+			<div class="btn-group">
+        <a class="btn" href="http://nagiosserver/nagios" target="_blank" rel="tooltip" title="Go to Nagios"><i class="icon-link"></i></a>
+			</div>
 		</div>
 		<ul class="alerts">
 			{{#each controller.content.alerts}}

+ 8 - 0
ambari-web/app/views.js

@@ -76,6 +76,14 @@ require('views/main/service/info/metrics/hdfs/io');
 require('views/main/service/info/metrics/hdfs/rpc');
 require('views/main/service/info/metrics/hdfs/file_operations');
 require('views/main/service/info/metrics/hdfs/gc');
+require('views/main/service/info/metrics/mapreduce/gc');
+require('views/main/service/info/metrics/mapreduce/jvm_threads');
+require('views/main/service/info/metrics/mapreduce/jvm_heap');
+require('views/main/service/info/metrics/mapreduce/rpc');
+require('views/main/service/info/metrics/mapreduce/jobs_running_waiting');
+require('views/main/service/info/metrics/mapreduce/jobs_status');
+require('views/main/service/info/metrics/mapreduce/map_slots');
+require('views/main/service/info/metrics/mapreduce/reduce_slots');
 require('views/main/charts/menu');
 require('views/main/charts/heatmap');
 require('views/main/charts/horizon');

+ 1 - 1
ambari-web/app/views/main/service/info/metrics/hdfs/jvm_heap.js

@@ -66,7 +66,7 @@ App.ChartServiceMetricsHDFS_JVMHeap = App.ChartLinearTimeView.extend({
           for ( var index = 0; index < seriesData.length; index++) {
             series.data.push({
               x: seriesData[index][1],
-              y: seriesData[index][0]
+              y: seriesData[index][0] * 1000000 // Data is in MB
             });
           }
           seriesArray.push(series);

+ 69 - 0
ambari-web/app/views/main/service/info/metrics/mapreduce/gc.js

@@ -0,0 +1,69 @@
+/**
+ * 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.
+ */
+
+var App = require('app');
+
+/**
+ * @class
+ * 
+ * This is a view for showing cluster CPU metrics
+ * 
+ * @extends App.ChartLinearTimeView
+ * @extends Ember.Object
+ * @extends Ember.View
+ */
+App.ChartServiceMetricsMapReduce_GC = App.ChartLinearTimeView.extend({
+  id: "service-metrics-mapreduce-gc",
+  url: "/data/services/metrics/mapreduce/gc.json",
+  title: "Garbage Collection",
+  yAxisFormatter: App.ChartLinearTimeView.TimeElapsedFormatter,
+  
+  transformToSeries: function (jsonData) {
+    var seriesArray = [];
+    if (jsonData && jsonData.metrics && jsonData.metrics.jvm) {
+      for (var name in jsonData.metrics.jvm){
+        var displayName;
+        var seriesData = jsonData.metrics.jvm[name];
+        switch (name) {
+          case "gcTimeMillis":
+            displayName = "Time";
+            break;
+          default:
+            break;
+        }
+        if(seriesData){
+          // Is it a string?
+          if("string" == typeof seriesData){
+            seriesData = JSON.parse(seriesData);
+          }
+          // We have valid data
+          var series = {};
+          series.name = displayName;
+          series.data = [];
+          for ( var index = 0; index < seriesData.length; index++) {
+            series.data.push({
+              x: seriesData[index][1],
+              y: seriesData[index][0]
+            });
+          }
+          seriesArray.push(series);
+        }
+      }
+    }
+    return seriesArray;
+  }
+});

+ 77 - 0
ambari-web/app/views/main/service/info/metrics/mapreduce/jobs_running_waiting.js

@@ -0,0 +1,77 @@
+/**
+ * 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.
+ */
+
+var App = require('app');
+
+/**
+ * @class
+ * 
+ * This is a view for showing cluster CPU metrics
+ * 
+ * @extends App.ChartLinearTimeView
+ * @extends Ember.Object
+ * @extends Ember.View
+ */
+App.ChartServiceMetricsMapReduce_JobsRunningWaiting = App.ChartLinearTimeView.extend({
+  id: "service-metrics-mapreduce-jobs-running-waiting",
+  url: "/data/services/metrics/mapreduce/jobs_running_waiting.json",
+  title: "Jobs",
+  
+  transformToSeries: function (jsonData) {
+    var seriesArray = [];
+    if (jsonData && jsonData.metrics && jsonData.metrics.mapred && jsonData.metrics.mapred.jobtracker) {
+      for (var name in jsonData.metrics.mapred.jobtracker){
+        var displayName;
+        var seriesData = jsonData.metrics.mapred.jobtracker[name];
+        switch (name) {
+          case "running_maps":
+            displayName = "Running Map Jobs";
+            break;
+          case "running_reduces":
+            displayName = "Running Reduce Jobs";
+            break;
+          case "waiting_maps":
+            displayName = "Waiting Map Jobs";
+            break;
+          case "waiting_reduces":
+            displayName = "Waiting Reduce Jobs";
+            break;
+          default:
+            break;
+        }
+        if(seriesData){
+          // Is it a string?
+          if("string" == typeof seriesData){
+            seriesData = JSON.parse(seriesData);
+          }
+          // We have valid data
+          var series = {};
+          series.name = displayName;
+          series.data = [];
+          for ( var index = 0; index < seriesData.length; index++) {
+            series.data.push({
+              x: seriesData[index][1],
+              y: seriesData[index][0]
+            });
+          }
+          seriesArray.push(series);
+        }
+      }
+    }
+    return seriesArray;
+  }
+});

+ 80 - 0
ambari-web/app/views/main/service/info/metrics/mapreduce/jobs_status.js

@@ -0,0 +1,80 @@
+/**
+ * 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.
+ */
+
+var App = require('app');
+
+/**
+ * @class
+ * 
+ * This is a view for showing cluster CPU metrics
+ * 
+ * @extends App.ChartLinearTimeView
+ * @extends Ember.Object
+ * @extends Ember.View
+ */
+App.ChartServiceMetricsMapReduce_JobsStatus = App.ChartLinearTimeView.extend({
+  id: "service-metrics-mapreduce-jobs-status",
+  url: "/data/services/metrics/mapreduce/jobs_status.json",
+  title: "Jobs Status",
+  
+  transformToSeries: function (jsonData) {
+    var seriesArray = [];
+    if (jsonData && jsonData.metrics && jsonData.metrics.mapred && jsonData.metrics.mapred.jobtracker) {
+      for (var name in jsonData.metrics.mapred.jobtracker){
+        var displayName;
+        var seriesData = jsonData.metrics.mapred.jobtracker[name];
+        switch (name) {
+          case "jobs_running":
+            displayName = "Running";
+            break;
+          case "jobs_failed":
+            displayName = "Failed";
+            break;
+          case "jobs_completed":
+            displayName = "Succeeded";
+            break;
+          case "jobs_preparing":
+            displayName = "Preparing";
+            break;
+          case "jobs_submitted":
+            displayName = "Submitted";
+            break;
+          default:
+            break;
+        }
+        if(seriesData){
+          // Is it a string?
+          if("string" == typeof seriesData){
+            seriesData = JSON.parse(seriesData);
+          }
+          // We have valid data
+          var series = {};
+          series.name = displayName;
+          series.data = [];
+          for ( var index = 0; index < seriesData.length; index++) {
+            series.data.push({
+              x: seriesData[index][1],
+              y: seriesData[index][0]
+            });
+          }
+          seriesArray.push(series);
+        }
+      }
+    }
+    return seriesArray;
+  }
+});

+ 78 - 0
ambari-web/app/views/main/service/info/metrics/mapreduce/jvm_heap.js

@@ -0,0 +1,78 @@
+/**
+ * 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.
+ */
+
+var App = require('app');
+
+/**
+ * @class
+ * 
+ * This is a view for showing cluster CPU metrics
+ * 
+ * @extends App.ChartLinearTimeView
+ * @extends Ember.Object
+ * @extends Ember.View
+ */
+App.ChartServiceMetricsMapReduce_JVMHeap = App.ChartLinearTimeView.extend({
+  id: "service-metrics-mapreduce-jvm-heap",
+  url: "/data/services/metrics/mapreduce/jvm_heap.json",
+  title: "JVM Memory Status",
+  yAxisFormatter: App.ChartLinearTimeView.BytesFormatter,
+  
+  transformToSeries: function (jsonData) {
+    var seriesArray = [];
+    if (jsonData && jsonData.metrics && jsonData.metrics.jvm) {
+      for (var name in jsonData.metrics.jvm){
+        var displayName;
+        var seriesData = jsonData.metrics.jvm[name];
+        switch (name) {
+          case "memHeapCommittedM":
+            displayName = "Heap Memory Committed";
+            break;
+          case "memNonHeapUsedM":
+            displayName = "Non Heap Memory Used";
+            break;
+          case "memHeapUsedM":
+            displayName = "Heap Memory Used";
+            break;
+          case "memNonHeapCommittedM":
+            displayName = "Non Heap Memory Committed";
+            break;
+          default:
+            break;
+        }
+        if(seriesData){
+          // Is it a string?
+          if("string" == typeof seriesData){
+            seriesData = JSON.parse(seriesData);
+          }
+          // We have valid data
+          var series = {};
+          series.name = displayName;
+          series.data = [];
+          for ( var index = 0; index < seriesData.length; index++) {
+            series.data.push({
+              x: seriesData[index][1],
+              y: seriesData[index][0] * 1000000 // Data is in MB
+            });
+          }
+          seriesArray.push(series);
+        }
+      }
+    }
+    return seriesArray;
+  }
+});

+ 77 - 0
ambari-web/app/views/main/service/info/metrics/mapreduce/jvm_threads.js

@@ -0,0 +1,77 @@
+/**
+ * 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.
+ */
+
+var App = require('app');
+
+/**
+ * @class
+ * 
+ * This is a view for showing cluster CPU metrics
+ * 
+ * @extends App.ChartLinearTimeView
+ * @extends Ember.Object
+ * @extends Ember.View
+ */
+App.ChartServiceMetricsMapReduce_JVMThreads = App.ChartLinearTimeView.extend({
+  id: "service-metrics-mapreduce-jvm-threads",
+  url: "/data/services/metrics/mapreduce/jvm_threads.json",
+  title: "JVM Thread Status",
+  
+  transformToSeries: function (jsonData) {
+    var seriesArray = [];
+    if (jsonData && jsonData.metrics && jsonData.metrics.jvm) {
+      for (var name in jsonData.metrics.jvm){
+        var displayName;
+        var seriesData = jsonData.metrics.jvm[name];
+        switch (name) {
+          case "threadsBlocked":
+            displayName = "Threads Blocked";
+            break;
+          case "threadsWaiting":
+            displayName = "Threads Waiting";
+            break;
+          case "threadsTimedWaiting":
+            displayName = "Threads Timed Waiting";
+            break;
+          case "threadsRunnable":
+            displayName = "Threads Runnable";
+            break;
+          default:
+            break;
+        }
+        if(seriesData){
+          // Is it a string?
+          if("string" == typeof seriesData){
+            seriesData = JSON.parse(seriesData);
+          }
+          // We have valid data
+          var series = {};
+          series.name = displayName;
+          series.data = [];
+          for ( var index = 0; index < seriesData.length; index++) {
+            series.data.push({
+              x: seriesData[index][1],
+              y: seriesData[index][0]
+            });
+          }
+          seriesArray.push(series);
+        }
+      }
+    }
+    return seriesArray;
+  }
+});

+ 71 - 0
ambari-web/app/views/main/service/info/metrics/mapreduce/map_slots.js

@@ -0,0 +1,71 @@
+/**
+ * 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.
+ */
+
+var App = require('app');
+
+/**
+ * @class
+ * 
+ * This is a view for showing cluster CPU metrics
+ * 
+ * @extends App.ChartLinearTimeView
+ * @extends Ember.Object
+ * @extends Ember.View
+ */
+App.ChartServiceMetricsMapReduce_MapSlots = App.ChartLinearTimeView.extend({
+  id: "service-metrics-mapreduce-map-slots",
+  url: "/data/services/metrics/mapreduce/map_slots.json",
+  title: "Map Slot Utilization",
+  
+  transformToSeries: function (jsonData) {
+    var seriesArray = [];
+    if (jsonData && jsonData.metrics && jsonData.metrics.mapred && jsonData.metrics.mapred.jobtracker) {
+      for (var name in jsonData.metrics.mapred.jobtracker){
+        var displayName;
+        var seriesData = jsonData.metrics.mapred.jobtracker[name];
+        switch (name) {
+          case "reserved_map_slots":
+            displayName = "Map Slots Occupied";
+            break;
+          case "occupied_map_slots":
+            displayName = "Map Slots Reserved";
+            break;
+          default:
+            break;
+        }
+        if(seriesData){
+          // Is it a string?
+          if("string" == typeof seriesData){
+            seriesData = JSON.parse(seriesData);
+          }
+          // We have valid data
+          var series = {};
+          series.name = displayName;
+          series.data = [];
+          for ( var index = 0; index < seriesData.length; index++) {
+            series.data.push({
+              x: seriesData[index][1],
+              y: seriesData[index][0]
+            });
+          }
+          seriesArray.push(series);
+        }
+      }
+    }
+    return seriesArray;
+  }
+});

+ 71 - 0
ambari-web/app/views/main/service/info/metrics/mapreduce/reduce_slots.js

@@ -0,0 +1,71 @@
+/**
+ * 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.
+ */
+
+var App = require('app');
+
+/**
+ * @class
+ * 
+ * This is a view for showing cluster CPU metrics
+ * 
+ * @extends App.ChartLinearTimeView
+ * @extends Ember.Object
+ * @extends Ember.View
+ */
+App.ChartServiceMetricsMapReduce_ReduceSlots = App.ChartLinearTimeView.extend({
+  id: "service-metrics-mapreduce-reduce-slots",
+  url: "/data/services/metrics/mapreduce/reduce_slots.json",
+  title: "Reduce Slots Utilization",
+  
+  transformToSeries: function (jsonData) {
+    var seriesArray = [];
+    if (jsonData && jsonData.metrics && jsonData.metrics.mapred && jsonData.metrics.mapred.jobtracker) {
+      for (var name in jsonData.metrics.mapred.jobtracker){
+        var displayName;
+        var seriesData = jsonData.metrics.mapred.jobtracker[name];
+        switch (name) {
+          case "reserved_reduce_slots":
+            displayName = "Reduce Slots Reserved";
+            break;
+          case "occupied_reduce_slots":
+            displayName = "Reduce Slots Occupied";
+            break;
+          default:
+            break;
+        }
+        if(seriesData){
+          // Is it a string?
+          if("string" == typeof seriesData){
+            seriesData = JSON.parse(seriesData);
+          }
+          // We have valid data
+          var series = {};
+          series.name = displayName;
+          series.data = [];
+          for ( var index = 0; index < seriesData.length; index++) {
+            series.data.push({
+              x: seriesData[index][1],
+              y: seriesData[index][0]
+            });
+          }
+          seriesArray.push(series);
+        }
+      }
+    }
+    return seriesArray;
+  }
+});

+ 69 - 0
ambari-web/app/views/main/service/info/metrics/mapreduce/rpc.js

@@ -0,0 +1,69 @@
+/**
+ * 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.
+ */
+
+var App = require('app');
+
+/**
+ * @class
+ * 
+ * This is a view for showing cluster CPU metrics
+ * 
+ * @extends App.ChartLinearTimeView
+ * @extends Ember.Object
+ * @extends Ember.View
+ */
+App.ChartServiceMetricsMapReduce_RPC = App.ChartLinearTimeView.extend({
+  id: "service-metrics-mapreduce-rpc",
+  url: "/data/services/metrics/mapreduce/rpc.json",
+  title: "RPC",
+  yAxisFormatter: App.ChartLinearTimeView.TimeElapsedFormatter,
+  
+  transformToSeries: function (jsonData) {
+    var seriesArray = [];
+    if (jsonData && jsonData.metrics && jsonData.metrics.rpc) {
+      for (var name in jsonData.metrics.rpc){
+        var displayName;
+        var seriesData = jsonData.metrics.rpc[name];
+        switch (name) {
+          case "RpcQueueTime_avg_time":
+            displayName = "Queue Average Wait Time";
+            break;
+          default:
+            break;
+        }
+        if(seriesData){
+          // Is it a string?
+          if("string" == typeof seriesData){
+            seriesData = JSON.parse(seriesData);
+          }
+          // We have valid data
+          var series = {};
+          series.name = displayName;
+          series.data = [];
+          for ( var index = 0; index < seriesData.length; index++) {
+            series.data.push({
+              x: seriesData[index][1],
+              y: seriesData[index][0]
+            });
+          }
+          seriesArray.push(series);
+        }
+      }
+    }
+    return seriesArray;
+  }
+});

+ 8 - 0
ambari-web/app/views/main/service/info/summary.js

@@ -98,6 +98,14 @@ App.MainServiceInfoSummaryView = Em.View.extend({
             summary['memory_heap_percent_used'] = summary['memory_heap_used'].countPercentageRatio(summary['memory_heap_max']);
             summary['memory_heap_used'] = summary['memory_heap_used'].bytesToSize(2, 'parseFloat');
             summary['memory_heap_max'] = summary['memory_heap_max'].bytesToSize(2, 'parseFloat');
+            summary['metricGraphViews'] = [App.ChartServiceMetricsMapReduce_JobsStatus.extend(), 
+                                           App.ChartServiceMetricsMapReduce_JobsRunningWaiting.extend(), 
+                                           App.ChartServiceMetricsMapReduce_MapSlots.extend(), 
+                                           App.ChartServiceMetricsMapReduce_ReduceSlots.extend(), 
+                                           App.ChartServiceMetricsMapReduce_JVMHeap.extend(), 
+                                           App.ChartServiceMetricsMapReduce_JVMThreads.extend(),
+                                           App.ChartServiceMetricsMapReduce_GC.extend(),
+                                           App.ChartServiceMetricsMapReduce_RPC.extend()];
           } else if (serviceName == 'hbase') {
             summary['memory_heap_percent_used'] = summary['memory_heap_used'].countPercentageRatio(summary['memory_heap_max']);
             summary['memory_heap_used'] = summary['memory_heap_used'].bytesToSize(2, 'parseFloat');