Updated Branches:
  refs/heads/trunk 66ce099f5 -> e0e751451

AMBARI-3137. Provide YARN application state graphs. (srimanth)


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

Branch: refs/heads/trunk
Commit: e0e7514518683272c3c40198324851f617b413e4
Parents: 66ce099
Author: Srimanth Gunturi <[email protected]>
Authored: Fri Sep 6 14:18:47 2013 -0700
Committer: Srimanth Gunturi <[email protected]>
Committed: Fri Sep 6 14:18:58 2013 -0700

----------------------------------------------------------------------
 .../main/resources/ganglia_properties_2.json    | 61 +++++++++++++++++-
 ambari-web/app/messages.js                      |  8 +++
 ambari-web/app/utils/ajax.js                    | 10 +++
 ambari-web/app/views.js                         |  6 +-
 .../info/metrics/yarn/apps_current_states.js    | 58 +++++++++++++++++
 .../info/metrics/yarn/apps_finished_states.js   | 66 +++++++++++++++++++
 .../service/info/metrics/yarn/jobs_status.js    | 68 --------------------
 .../main/service/info/metrics/yarn/map_slots.js | 59 -----------------
 .../service/info/metrics/yarn/reduce_slots.js   | 59 -----------------
 .../info/metrics/yarn/tasks_running_waiting.js  | 65 -------------------
 .../app/views/main/service/info/summary.js      | 17 +++--
 11 files changed, 212 insertions(+), 265 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/e0e75145/ambari-server/src/main/resources/ganglia_properties_2.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/ganglia_properties_2.json 
b/ambari-server/src/main/resources/ganglia_properties_2.json
index 0e73a19..98019bc 100644
--- a/ambari-server/src/main/resources/ganglia_properties_2.json
+++ b/ambari-server/src/main/resources/ganglia_properties_2.json
@@ -3746,8 +3746,37 @@
         "metric":"yarn.QueueMetrics.Queue=(.+).PendingContainers",
         "pointInTime" : false,
         "temporal" : true
+      },
+      "metrics/yarn/Queue/$1.replaceAll(\"([.])\",\"/\")/AppsCompleted":{
+        "metric":"yarn.QueueMetrics.Queue=(.+).AppsCompleted",
+        "pointInTime" : false,
+        "temporal" : true
+      },
+      "metrics/yarn/Queue/$1.replaceAll(\"([.])\",\"/\")/AppsFailed":{
+        "metric":"yarn.QueueMetrics.Queue=(.+).AppsFailed",
+        "pointInTime" : false,
+        "temporal" : true
+      },
+      "metrics/yarn/Queue/$1.replaceAll(\"([.])\",\"/\")/AppsKilled":{
+        "metric":"yarn.QueueMetrics.Queue=(.+).AppsKilled",
+        "pointInTime" : false,
+        "temporal" : true
+      },
+      "metrics/yarn/Queue/$1.replaceAll(\"([.])\",\"/\")/AppsPending":{
+        "metric":"yarn.QueueMetrics.Queue=(.+).AppsPending",
+        "pointInTime" : false,
+        "temporal" : true
+      },
+      "metrics/yarn/Queue/$1.replaceAll(\"([.])\",\"/\")/AppsRunning":{
+        "metric":"yarn.QueueMetrics.Queue=(.+).AppsRunning",
+        "pointInTime" : false,
+        "temporal" : true
+      },
+      "metrics/yarn/Queue/$1.replaceAll(\"([.])\",\"/\")/AppsSubmitted":{
+        "metric":"yarn.QueueMetrics.Queue=(.+).AppsSubmitted",
+        "pointInTime" : false,
+        "temporal" : true
       }
-
     },
     "NODEMANAGER":{
       "metrics/boottime":{
@@ -7684,6 +7713,36 @@
         "metric":"yarn.QueueMetrics.Queue=(.+).PendingContainers",
         "pointInTime" : false,
         "temporal" : true
+      },
+      "metrics/yarn/Queue/$1.replaceAll(\"([.])\",\"/\")/AppsCompleted":{
+        "metric":"yarn.QueueMetrics.Queue=(.+).AppsCompleted",
+        "pointInTime" : false,
+        "temporal" : true
+      },
+      "metrics/yarn/Queue/$1.replaceAll(\"([.])\",\"/\")/AppsFailed":{
+        "metric":"yarn.QueueMetrics.Queue=(.+).AppsFailed",
+        "pointInTime" : false,
+        "temporal" : true
+      },
+      "metrics/yarn/Queue/$1.replaceAll(\"([.])\",\"/\")/AppsKilled":{
+        "metric":"yarn.QueueMetrics.Queue=(.+).AppsKilled",
+        "pointInTime" : false,
+        "temporal" : true
+      },
+      "metrics/yarn/Queue/$1.replaceAll(\"([.])\",\"/\")/AppsPending":{
+        "metric":"yarn.QueueMetrics.Queue=(.+).AppsPending",
+        "pointInTime" : false,
+        "temporal" : true
+      },
+      "metrics/yarn/Queue/$1.replaceAll(\"([.])\",\"/\")/AppsRunning":{
+        "metric":"yarn.QueueMetrics.Queue=(.+).AppsRunning",
+        "pointInTime" : false,
+        "temporal" : true
+      },
+      "metrics/yarn/Queue/$1.replaceAll(\"([.])\",\"/\")/AppsSubmitted":{
+        "metric":"yarn.QueueMetrics.Queue=(.+).AppsSubmitted",
+        "pointInTime" : false,
+        "temporal" : true
       }
     },
 

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/e0e75145/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 0c1093e..01fbfb1 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1012,6 +1012,14 @@ Em.I18n.translations = {
   
'services.service.info.metrics.yarn.queueMemoryResource.displayNames.allocated':'Allocated
 ({0})',
   
'services.service.info.metrics.yarn.queueMemoryResource.displayNames.available':'Available
 ({0})',
   'services.service.info.metrics.yarn.queueMemoryResource.displayName':'Queue: 
{0}',
+  'services.service.info.metrics.yarn.apps.states.current.title': 'Current 
Applications',
+  'services.service.info.metrics.yarn.apps.states.finished.title': 'Finished 
Applications',
+  'services.service.info.metrics.yarn.apps.states.completed': 'Completed',
+  'services.service.info.metrics.yarn.apps.states.failed': 'Failed',
+  'services.service.info.metrics.yarn.apps.states.killed': 'Killed',
+  'services.service.info.metrics.yarn.apps.states.pending': 'Pending',
+  'services.service.info.metrics.yarn.apps.states.running': 'Running',
+  'services.service.info.metrics.yarn.apps.states.submitted': 'Submitted',
 
   'services.service.info.menu.summary':'Summary',
   'services.service.info.menu.configs':'Configs',

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/e0e75145/ambari-web/app/utils/ajax.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/ajax.js b/ambari-web/app/utils/ajax.js
index b2fe390..1710bd8 100644
--- a/ambari-web/app/utils/ajax.js
+++ b/ambari-web/app/utils/ajax.js
@@ -457,6 +457,16 @@ var urls = {
     },
     'testInProduction': true
   },
+  'service.metrics.yarn.queue.apps.states.current': {
+    'real': 
'/clusters/{clusterName}/hosts/{resourceManager}/host_components/RESOURCEMANAGER?fields=metrics/yarn/Queue/root/AppsPending[{fromSeconds},{toSeconds},{stepSeconds}],metrics/yarn/Queue/root/AppsRunning[{fromSeconds},{toSeconds},{stepSeconds}]',
+    'mock': '',
+    'testInProduction': true
+  },
+  'service.metrics.yarn.queue.apps.states.finished': {
+    'real': 
'/clusters/{clusterName}/hosts/{resourceManager}/host_components/RESOURCEMANAGER?fields=metrics/yarn/Queue/root/AppsKilled[{fromSeconds},{toSeconds},{stepSeconds}],metrics/yarn/Queue/root/AppsFailed[{fromSeconds},{toSeconds},{stepSeconds}],metrics/yarn/Queue/root/AppsSubmitted[{fromSeconds},{toSeconds},{stepSeconds}],metrics/yarn/Queue/root/AppsCompleted[{fromSeconds},{toSeconds},{stepSeconds}]',
+    'mock': '',
+    'testInProduction': true
+  },
   'dashboard.cluster_metrics.cpu': {
     'real': 
'/clusters/{clusterName}/?fields=metrics/cpu[{fromSeconds},{toSeconds},{stepSeconds}]',
     'mock': '/data/cluster_metrics/cpu_1hr.json',

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/e0e75145/ambari-web/app/views.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views.js b/ambari-web/app/views.js
index 3e0c68a..9355612 100644
--- a/ambari-web/app/views.js
+++ b/ambari-web/app/views.js
@@ -155,12 +155,10 @@ require('views/main/service/info/metrics/yarn/gc');
 require('views/main/service/info/metrics/yarn/jvm_threads');
 require('views/main/service/info/metrics/yarn/jvm_heap');
 require('views/main/service/info/metrics/yarn/rpc');
-require('views/main/service/info/metrics/yarn/tasks_running_waiting');
-require('views/main/service/info/metrics/yarn/jobs_status');
-require('views/main/service/info/metrics/yarn/map_slots');
-require('views/main/service/info/metrics/yarn/reduce_slots');
 require('views/main/service/info/metrics/yarn/allocated');
 require('views/main/service/info/metrics/yarn/allocated_container');
+require('views/main/service/info/metrics/yarn/apps_current_states');
+require('views/main/service/info/metrics/yarn/apps_finished_states');
 require('views/main/service/info/metrics/yarn/nms');
 require('views/main/service/info/metrics/yarn/qmr');
 require('views/main/service/info/metrics/mapreduce/gc');

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/e0e75145/ambari-web/app/views/main/service/info/metrics/yarn/apps_current_states.js
----------------------------------------------------------------------
diff --git 
a/ambari-web/app/views/main/service/info/metrics/yarn/apps_current_states.js 
b/ambari-web/app/views/main/service/info/metrics/yarn/apps_current_states.js
new file mode 100644
index 0000000..cf97ebd
--- /dev/null
+++ b/ambari-web/app/views/main/service/info/metrics/yarn/apps_current_states.js
@@ -0,0 +1,58 @@
+/**
+ * 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.ChartServiceMetricsYARN_ApplicationCurrentStates = 
App.ChartLinearTimeView.extend({
+  id: "service-metrics-yarn-apps-current-states",
+  title: 
Em.I18n.t('services.service.info.metrics.yarn.apps.states.current.title'),
+  renderer: 'line',
+  ajaxIndex: 'service.metrics.yarn.queue.apps.states.current',
+      
+  transformToSeries: function (jsonData) {
+    var seriesArray = [];
+    if (jsonData && jsonData.metrics && jsonData.metrics.yarn.Queue && 
jsonData.metrics.yarn.Queue.root) {
+      for (var name in jsonData.metrics.yarn.Queue.root) {
+        var displayName = null;
+        var seriesData = jsonData.metrics.yarn.Queue.root[name];
+        switch (name) {
+          case "AppsPending":
+            displayName = 
Em.I18n.t('services.service.info.metrics.yarn.apps.states.pending');
+            break;
+          case "AppsRunning":
+            displayName = 
Em.I18n.t('services.service.info.metrics.yarn.apps.states.running');
+            break;
+          default:
+            break;
+        }
+        if (seriesData != null && displayName) {
+          seriesArray.push(this.transformData(seriesData, displayName));
+        }
+      }
+    }
+    return seriesArray;
+  }
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/e0e75145/ambari-web/app/views/main/service/info/metrics/yarn/apps_finished_states.js
----------------------------------------------------------------------
diff --git 
a/ambari-web/app/views/main/service/info/metrics/yarn/apps_finished_states.js 
b/ambari-web/app/views/main/service/info/metrics/yarn/apps_finished_states.js
new file mode 100644
index 0000000..9ac1146
--- /dev/null
+++ 
b/ambari-web/app/views/main/service/info/metrics/yarn/apps_finished_states.js
@@ -0,0 +1,66 @@
+/**
+ * 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.ChartServiceMetricsYARN_ApplicationFinishedStates = 
App.ChartLinearTimeView.extend({
+  id: "service-metrics-yarn-apps-finished-states",
+  title: 
Em.I18n.t('services.service.info.metrics.yarn.apps.states.finished.title'),
+  renderer: 'line',
+  ajaxIndex: 'service.metrics.yarn.queue.apps.states.finished',
+  yAxisFormatter: App.ChartLinearTimeView.CreateRateFormatter('apps', 
+      App.ChartLinearTimeView.DefaultFormatter),
+
+  transformToSeries: function (jsonData) {
+    var seriesArray = [];
+    if (jsonData && jsonData.metrics && jsonData.metrics.yarn.Queue && 
jsonData.metrics.yarn.Queue.root) {
+      for (var name in jsonData.metrics.yarn.Queue.root) {
+        var displayName = null;
+        var seriesData = jsonData.metrics.yarn.Queue.root[name];
+        switch (name) {
+          case "AppsCompleted":
+            displayName = 
Em.I18n.t('services.service.info.metrics.yarn.apps.states.completed');
+            break;
+          case "AppsFailed":
+            displayName = 
Em.I18n.t('services.service.info.metrics.yarn.apps.states.failed');
+            break;
+          case "AppsKilled":
+            displayName = 
Em.I18n.t('services.service.info.metrics.yarn.apps.states.killed');
+            break;
+          case "AppsSubmitted":
+            displayName = 
Em.I18n.t('services.service.info.metrics.yarn.apps.states.submitted');
+            break;
+          default:
+            break;
+        }
+        if (seriesData != null && displayName) {
+          seriesArray.push(this.transformData(seriesData, displayName));
+        }
+      }
+    }
+    return seriesArray;
+  }
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/e0e75145/ambari-web/app/views/main/service/info/metrics/yarn/jobs_status.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/yarn/jobs_status.js 
b/ambari-web/app/views/main/service/info/metrics/yarn/jobs_status.js
deleted file mode 100644
index 87d2a72..0000000
--- a/ambari-web/app/views/main/service/info/metrics/yarn/jobs_status.js
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * 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.ChartServiceMetricsYARN_JobsStatus = App.ChartLinearTimeView.extend({
-  id: "service-metrics-yarn-jobs-status",
-  title: Em.I18n.t('services.service.info.metrics.mapreduce.jobsStatus'),
-  renderer: 'line',
-
-  ajaxIndex: 'service.metrics.mapreduce.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 = 
Em.I18n.t('services.service.info.metrics.mapreduce.jobsStatus.displayNames.jobsRunning');
-            break;
-          case "jobs_failed":
-            displayName = 
Em.I18n.t('services.service.info.metrics.mapreduce.jobsStatus.displayNames.jobsFailed');
-            break;
-          case "jobs_completed":
-            displayName = 
Em.I18n.t('services.service.info.metrics.mapreduce.jobsStatus.displayNames.jobsCompleted');
-            break;
-          case "jobs_preparing":
-            displayName = 
Em.I18n.t('services.service.info.metrics.mapreduce.jobsStatus.displayNames.jobsPreparing');
-            break;
-          case "jobs_submitted":
-            displayName = 
Em.I18n.t('services.service.info.metrics.mapreduce.jobsStatus.displayNames.jobsSubmitted');
-            break;
-          default:
-            break;
-        }
-        if (seriesData) {
-          seriesArray.push(this.transformData(seriesData, displayName));
-        }
-      }
-    }
-    return seriesArray;
-  }
-});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/e0e75145/ambari-web/app/views/main/service/info/metrics/yarn/map_slots.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/yarn/map_slots.js 
b/ambari-web/app/views/main/service/info/metrics/yarn/map_slots.js
deleted file mode 100644
index 291a0ce..0000000
--- a/ambari-web/app/views/main/service/info/metrics/yarn/map_slots.js
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * 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.ChartServiceMetricsYARN_MapSlots = App.ChartLinearTimeView.extend({
-  id: "service-metrics-yarn-map-slots",
-  title: Em.I18n.t('services.service.info.metrics.mapreduce.mapSlots'),
-  renderer: 'line',
-
-  ajaxIndex: 'service.metrics.mapreduce.map_slots',
-
-  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 = 
Em.I18n.t('services.service.info.metrics.mapreduce.mapSlots.displayNames.reservedMapSlots');
-            break;
-          case "occupied_map_slots":
-            displayName = 
Em.I18n.t('services.service.info.metrics.mapreduce.mapSlots.displayNames.occupiedMapSlots');
-            break;
-          default:
-            break;
-        }
-        if (seriesData) {
-          seriesArray.push(this.transformData(seriesData, displayName));
-        }
-      }
-    }
-    return seriesArray;
-  }
-});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/e0e75145/ambari-web/app/views/main/service/info/metrics/yarn/reduce_slots.js
----------------------------------------------------------------------
diff --git 
a/ambari-web/app/views/main/service/info/metrics/yarn/reduce_slots.js 
b/ambari-web/app/views/main/service/info/metrics/yarn/reduce_slots.js
deleted file mode 100644
index f6a9b02..0000000
--- a/ambari-web/app/views/main/service/info/metrics/yarn/reduce_slots.js
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * 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.ChartServiceMetricsYARN_ReduceSlots = App.ChartLinearTimeView.extend({
-  id: "service-metrics-yarn-reduce-slots",
-  title: Em.I18n.t('services.service.info.metrics.mapreduce.reduceSlots'),
-  renderer: 'line',
-
-  ajaxIndex: 'service.metrics.mapreduce.reduce_slots',
-
-  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 = 
Em.I18n.t('services.service.info.metrics.mapreduce.reduceSlots.displayNames.reservedReduceSlots');
-            break;
-          case "occupied_reduce_slots":
-            displayName = 
Em.I18n.t('services.service.info.metrics.mapreduce.reduceSlots.displayNames.occupiedReduceSlots');
-            break;
-          default:
-            break;
-        }
-        if (seriesData) {
-          seriesArray.push(this.transformData(seriesData, displayName));
-        }
-      }
-    }
-    return seriesArray;
-  }
-});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/e0e75145/ambari-web/app/views/main/service/info/metrics/yarn/tasks_running_waiting.js
----------------------------------------------------------------------
diff --git 
a/ambari-web/app/views/main/service/info/metrics/yarn/tasks_running_waiting.js 
b/ambari-web/app/views/main/service/info/metrics/yarn/tasks_running_waiting.js
deleted file mode 100644
index f1fc6dc..0000000
--- 
a/ambari-web/app/views/main/service/info/metrics/yarn/tasks_running_waiting.js
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * 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.ChartServiceMetricsYARN_TasksRunningWaiting = 
App.ChartLinearTimeView.extend({
-  id: "service-metrics-yarn-tasks-running-waiting",
-  title: 
Em.I18n.t('services.service.info.metrics.mapreduce.tasksRunningWaiting'),
-  renderer: 'line',
-
-  ajaxIndex: 'service.metrics.mapreduce.tasks_running_waiting',
-
-  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 = 
Em.I18n.t('services.service.info.metrics.mapreduce.tasksRunningWaiting.displayNames.runningMaps');
-            break;
-          case "running_reduces":
-            displayName = 
Em.I18n.t('services.service.info.metrics.mapreduce.tasksRunningWaiting.displayNames.runningReduces');
-            break;
-          case "waiting_maps":
-            displayName = 
Em.I18n.t('services.service.info.metrics.mapreduce.tasksRunningWaiting.displayNames.waitingMaps');
-            break;
-          case "waiting_reduces":
-            displayName = 
Em.I18n.t('services.service.info.metrics.mapreduce.tasksRunningWaiting.displayNames.waitingReduces');
-            break;
-          default:
-            break;
-        }
-        if (seriesData) {
-          seriesArray.push(this.transformData(seriesData, displayName));
-        }
-      }
-    }
-    return seriesArray;
-  }
-});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/e0e75145/ambari-web/app/views/main/service/info/summary.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/summary.js 
b/ambari-web/app/views/main/service/info/summary.js
index 03f3d42..3aa39e0 100644
--- a/ambari-web/app/views/main/service/info/summary.js
+++ b/ambari-web/app/views/main/service/info/summary.js
@@ -354,18 +354,17 @@ App.MainServiceInfoSummaryView = Em.View.extend({
             App.ChartServiceMetricsHDFS_JVMThreads.extend()]];
           break;
         case 'yarn':
-          graphs = /*[[App.ChartServiceMetricsYARN_JobsStatus.extend(),
-            App.ChartServiceMetricsYARN_TasksRunningWaiting.extend(),
-            App.ChartServiceMetricsYARN_MapSlots.extend(),
-            App.ChartServiceMetricsYARN_ReduceSlots.extend()]*/
-            [[App.ChartServiceMetricsYARN_AllocatedMemory.extend(),
+          graphs = [[App.ChartServiceMetricsYARN_AllocatedMemory.extend(),
               App.ChartServiceMetricsYARN_QMR.extend(),
               App.ChartServiceMetricsYARN_AllocatedContainer.extend(),
               App.ChartServiceMetricsYARN_NMS.extend()],
-            [App.ChartServiceMetricsYARN_RPC.extend(),
-            App.ChartServiceMetricsYARN_GC.extend(),
-            App.ChartServiceMetricsYARN_JVMHeap.extend(),
-            App.ChartServiceMetricsYARN_JVMThreads.extend()]];
+            [App.ChartServiceMetricsYARN_ApplicationCurrentStates.extend(),
+             App.ChartServiceMetricsYARN_ApplicationFinishedStates.extend(),
+             App.ChartServiceMetricsYARN_RPC.extend(),
+            App.ChartServiceMetricsYARN_GC.extend()
+            ],
+            [App.ChartServiceMetricsYARN_JVMThreads.extend(),
+             App.ChartServiceMetricsYARN_JVMHeap.extend()]];
           break;
         case 'mapreduce':
           graphs = [ [App.ChartServiceMetricsMapReduce_JobsStatus.extend(),

Reply via email to