You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2013/08/02 19:53:00 UTC
[1/2] git commit: Revert "AMBARI-2798. YARN specific graphs should be
created. (Andrii Babiichuk via onechiporenko)"
Updated Branches:
refs/heads/trunk 3728dedd6 -> 439046a1a
Revert "AMBARI-2798. YARN specific graphs should be created. (Andrii Babiichuk via onechiporenko)"
This reverts commit 92cceb87caaa8ed59a47295a6d03b16d6c739551.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/ebdab006
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/ebdab006
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/ebdab006
Branch: refs/heads/trunk
Commit: ebdab0068c22d9e98c7b2fc80a67802a7c22743e
Parents: 3728ded
Author: Yusaku Sako <yu...@hortonworks.com>
Authored: Fri Aug 2 10:51:25 2013 -0700
Committer: Yusaku Sako <yu...@hortonworks.com>
Committed: Fri Aug 2 10:51:25 2013 -0700
----------------------------------------------------------------------
.../main/service/info/metrics/yarn/allocated.js | 61 -----------------
.../info/metrics/yarn/allocated_container.js | 61 -----------------
.../views/main/service/info/metrics/yarn/nms.js | 67 ------------------
.../views/main/service/info/metrics/yarn/qmr.js | 71 --------------------
ambari-web/app/messages.js | 21 +-----
ambari-web/app/utils/ajax.js | 20 ------
ambari-web/app/views.js | 4 --
.../app/views/main/service/info/summary.js | 12 ++--
8 files changed, 5 insertions(+), 312 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/ebdab006/ambari-web/ambari-web/app/views/main/service/info/metrics/yarn/allocated.js
----------------------------------------------------------------------
diff --git a/ambari-web/ambari-web/app/views/main/service/info/metrics/yarn/allocated.js b/ambari-web/ambari-web/app/views/main/service/info/metrics/yarn/allocated.js
deleted file mode 100644
index 035f3ad..0000000
--- a/ambari-web/ambari-web/app/views/main/service/info/metrics/yarn/allocated.js
+++ /dev/null
@@ -1,61 +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_AllocatedMemory = App.ChartLinearTimeView.extend({
- id: "service-metrics-yarn-queue-allocated",
- title: Em.I18n.t('services.service.info.metrics.yarn.allocated.memory'),
- renderer: 'line',
- ajaxIndex: 'service.metrics.yarn.queue.allocated',
-
- transformToSeries: function (jsonData) {
- var seriesArray = [];
- if (jsonData && jsonData.metrics && jsonData.metrics.yarn.Queue) {
- for (var name in jsonData.metrics.yarn.Queue) {
- var displayName;
- var seriesData = jsonData.metrics.yarn.Queue[name];
- switch (name) {
- case "AvailableMB":
- displayName = Em.I18n.t('services.service.info.metrics.yarn.allocated.memory.displayNames.available');
- break;
- case "PendingMB":
- displayName = Em.I18n.t('services.service.info.metrics.yarn.allocated.memory.displayNames.pending');
- break;
- case "AllocatedMB":
- displayName = Em.I18n.t('services.service.info.metrics.yarn.allocated.memory.displayNames.allocated');
- break;
- default:
- break;
- }
- if (seriesData) {
- seriesArray.push(this.transformData(seriesData, displayName));
- }
- }
- }
- return seriesArray;
- }
-});
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/ebdab006/ambari-web/ambari-web/app/views/main/service/info/metrics/yarn/allocated_container.js
----------------------------------------------------------------------
diff --git a/ambari-web/ambari-web/app/views/main/service/info/metrics/yarn/allocated_container.js b/ambari-web/ambari-web/app/views/main/service/info/metrics/yarn/allocated_container.js
deleted file mode 100644
index cfdef64..0000000
--- a/ambari-web/ambari-web/app/views/main/service/info/metrics/yarn/allocated_container.js
+++ /dev/null
@@ -1,61 +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_AllocatedContainer = App.ChartLinearTimeView.extend({
- id: "service-metrics-yarn-queue-allocated-container",
- title: Em.I18n.t('services.service.info.metrics.yarn.allocated.container'),
- renderer: 'line',
- ajaxIndex: 'service.metrics.yarn.queue.allocated.container',
-
- transformToSeries: function (jsonData) {
- var seriesArray = [];
- if (jsonData && jsonData.metrics && jsonData.metrics.yarn.Queue.root) {
- for (var name in jsonData.metrics.yarn.Queue.root) {
- var displayName;
- var seriesData = jsonData.metrics.yarn.Queue.root[name];
- switch (name) {
- case "ReservedContainers":
- displayName = Em.I18n.t('services.service.info.metrics.yarn.allocated.container.displayNames.reserved');
- break;
- case "PendingContainers":
- displayName = Em.I18n.t('services.service.info.metrics.yarn.allocated.container.displayNames.pending');
- break;
- case "AllocatedContainers":
- displayName = Em.I18n.t('services.service.info.metrics.yarn.allocated.container.displayNames.allocated');
- break;
- default:
- break;
- }
- if (seriesData) {
- seriesArray.push(this.transformData(seriesData, displayName));
- }
- }
- }
- return seriesArray;
- }
-});
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/ebdab006/ambari-web/ambari-web/app/views/main/service/info/metrics/yarn/nms.js
----------------------------------------------------------------------
diff --git a/ambari-web/ambari-web/app/views/main/service/info/metrics/yarn/nms.js b/ambari-web/ambari-web/app/views/main/service/info/metrics/yarn/nms.js
deleted file mode 100644
index 4421570..0000000
--- a/ambari-web/ambari-web/app/views/main/service/info/metrics/yarn/nms.js
+++ /dev/null
@@ -1,67 +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_NMS = App.ChartLinearTimeView.extend({
- id: "service-metrics-yarn-node-manager-statuses",
- title: Em.I18n.t('services.service.info.metrics.yarn.nodemanager.statuses'),
- renderer: 'line',
- ajaxIndex: 'service.metrics.yarn.node.manager.statuses',
-
- transformToSeries: function (jsonData) {
- var seriesArray = [];
- if (jsonData && jsonData.metrics && jsonData.metrics.yarn && jsonData.metrics.yarn.ClusterMetrics) {
- for (var name in jsonData.metrics.yarn.ClusterMetrics) {
- var displayName;
- var seriesData = jsonData.metrics.yarn.ClusterMetrics[name];
- switch (name) {
- case "NumActiveNMs":
- displayName = Em.I18n.t('services.service.info.metrics.yarn.nodemanager.statuses.displayNames.active');
- break;
- case "NumDecommissionedNMs":
- displayName = Em.I18n.t('services.service.info.metrics.yarn.nodemanager.statuses.displayNames.decommissioned');
- break;
- case "NumLostNMs":
- displayName = Em.I18n.t('services.service.info.metrics.yarn.nodemanager.statuses.displayNames.lost');
- break;
- case "NumRebootedNMs":
- displayName = Em.I18n.t('services.service.info.metrics.yarn.nodemanager.statuses.displayNames.rebooted');
- break;
- case "NumUnhealthyNMs":
- displayName = Em.I18n.t('services.service.info.metrics.yarn.nodemanager.statuses.displayNames.unhealthy');
- break;
- default:
- break;
- }
- if (seriesData) {
- seriesArray.push(this.transformData(seriesData, displayName));
- }
- }
- }
- return seriesArray;
- }
-});
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/ebdab006/ambari-web/ambari-web/app/views/main/service/info/metrics/yarn/qmr.js
----------------------------------------------------------------------
diff --git a/ambari-web/ambari-web/app/views/main/service/info/metrics/yarn/qmr.js b/ambari-web/ambari-web/app/views/main/service/info/metrics/yarn/qmr.js
deleted file mode 100644
index 3dfe929..0000000
--- a/ambari-web/ambari-web/app/views/main/service/info/metrics/yarn/qmr.js
+++ /dev/null
@@ -1,71 +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_QMR = App.ChartLinearTimeView.extend({
- id: "service-metrics-yarn-queue-memory-resource",
- title: Em.I18n.t('services.service.info.metrics.yarn.queueMemoryResource'),
- renderer: 'line',
- ajaxIndex: 'service.metrics.yarn.queue.memory.resource',
-
- transformToSeries: function (jsonData) {
- var seriesArray = [];
- if (jsonData && jsonData.metrics && jsonData.metrics.yarn.Queue.root) {
- for (var name in jsonData.metrics.yarn.Queue.root) {
- var displayName;
- var seriesData = jsonData.metrics.yarn.Queue.root[name];
- switch (name) {
- case "AllocatedMB":
- displayName = Em.I18n.t('services.service.info.metrics.yarn.queueMemoryResource.displayNames.allocated');
- break;
- case "AvailableMB":
- displayName = Em.I18n.t('services.service.info.metrics.yarn.queueMemoryResource.displayNames.available');
- break;
- default:
- for (var name in jsonData.metrics.yarn.Queue.root.default) {
- seriesData = jsonData.metrics.yarn.Queue.root.default[name];
- switch (name) {
- case "AllocatedMB":
- displayName = Em.I18n.t('services.service.info.metrics.yarn.queueMemoryResource.displayNames.allocated.default');
- break;
- case "AvailableMB":
- displayName = Em.I18n.t('services.service.info.metrics.yarn.queueMemoryResource.displayNames.available.default');
- break;
- default:
- break;
- }
- }
- break;
- }
- if (seriesData) {
- seriesArray.push(this.transformData(seriesData, displayName));
- }
- }
- }
- return seriesArray;
- }
-});
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/ebdab006/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 4f24640..0eca365 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -902,26 +902,7 @@ Em.I18n.translations = {
'services.service.info.metrics.yarn.gc': 'Garbage Collection',
'services.service.info.metrics.yarn.gc.displayNames.gcTimeMillis':'Time',
- 'services.service.info.metrics.yarn.allocated.memory': 'Allocated Memory',
- 'services.service.info.metrics.yarn.allocated.memory.displayNames.allocated': 'Allocated',
- 'services.service.info.metrics.yarn.allocated.memory.displayNames.available': 'Available',
- 'services.service.info.metrics.yarn.allocated.memory.displayNames.pending': 'Pending',
- 'services.service.info.metrics.yarn.allocated.container': 'Allocated Container',
- 'services.service.info.metrics.yarn.allocated.container.displayNames.allocated': 'Allocated',
- 'services.service.info.metrics.yarn.allocated.container.displayNames.reserved': 'Reserved',
- 'services.service.info.metrics.yarn.allocated.container.displayNames.pending': 'Pending',
- 'services.service.info.metrics.yarn.nodemanager.statuses':'Nodemanager statuses',
- 'services.service.info.metrics.yarn.nodemanager.statuses.displayNames.active':'Active Nodemanagers',
- 'services.service.info.metrics.yarn.nodemanager.statuses.displayNames.decommissioned':'Decommissioned Nodemanagers',
- 'services.service.info.metrics.yarn.nodemanager.statuses.displayNames.lost':'Lost Nodemanagers',
- 'services.service.info.metrics.yarn.nodemanager.statuses.displayNames.rebooted':'Rebooted Nodemanagers',
- 'services.service.info.metrics.yarn.nodemanager.statuses.displayNames.unhealthy':'Unhealthy Nodemanagers',
- 'services.service.info.metrics.yarn.queueMemoryResource':'Queue memory resource',
- 'services.service.info.metrics.yarn.queueMemoryResource.displayNames.allocated':'Allocated',
- 'services.service.info.metrics.yarn.queueMemoryResource.displayNames.available':'Available',
- 'services.service.info.metrics.yarn.queueMemoryResource.displayNames.allocated.default':'Allocated default',
- 'services.service.info.metrics.yarn.queueMemoryResource.displayNames.available.default':'Available default',
-
+
'services.service.info.menu.summary':'Summary',
'services.service.info.menu.configs':'Configs',
'services.service.info.summary.hostsRunningMonitor':'{0}/{1}',
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/ebdab006/ambari-web/app/utils/ajax.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/ajax.js b/ambari-web/app/utils/ajax.js
index b36343a..d52acc9 100644
--- a/ambari-web/app/utils/ajax.js
+++ b/ambari-web/app/utils/ajax.js
@@ -426,26 +426,6 @@ var urls = {
'mock': '/data/services/metrics/yarn/jvm_heap.json',
'testInProduction': true
},
- 'service.metrics.yarn.queue.allocated': {
- 'real': '/clusters/{clusterName}/hosts/{resourceManager}/host_components/RESOURCEMANAGER?fields=metrics/yarn/Queue/AvailableMB[{fromSeconds},{toSeconds},{stepSeconds}],metrics/yarn/Queue/PendingMB[{fromSeconds},{toSeconds},{stepSeconds}],metrics/yarn/Queue/AllocatedMB[{fromSeconds},{toSeconds},{stepSeconds}]',
- 'mock': '',
- 'testInProduction': true
- },
- 'service.metrics.yarn.queue.allocated.container': {
- 'real': '/clusters/{clusterName}/hosts/{resourceManager}/host_components/RESOURCEMANAGER?fields=metrics/yarn/Queue/AllocatedContainers[{fromSeconds},{toSeconds},{stepSeconds}],metrics/yarn/Queue/ReservedContainers[{fromSeconds},{toSeconds},{stepSeconds}],metrics/yarn/Queue/PendingContainers[{fromSeconds},{toSeconds},{stepSeconds}]',
- 'mock': '',
- 'testInProduction': true
- },
- 'service.metrics.yarn.node.manager.statuses': {
- 'real': '/clusters/{clusterName}/hosts/{resourceManager}/host_components/RESOURCEMANAGER?fields=metrics/yarn/ClusterMetrics/NumActiveNMs[{fromSeconds},{toSeconds},{stepSeconds}],metrics/yarn/ClusterMetrics/NumDecommissionedNMs[{fromSeconds},{toSeconds},{stepSeconds}],metrics/yarn/ClusterMetrics/NumLostNMs[{fromSeconds},{toSeconds},{stepSeconds}],metrics/yarn/ClusterMetrics/NumRebootedNMs[{fromSeconds},{toSeconds},{stepSeconds}],metrics/yarn/ClusterMetrics/NumUnhealthyNMs[{fromSeconds},{toSeconds},{stepSeconds}]',
- 'mock': '',
- 'testInProduction': true
- },
- 'service.metrics.yarn.queue.memory.resource': {
- 'real': '/clusters/{clusterName}/hosts/{resourceManager}/host_components/RESOURCEMANAGER?fields=metrics/yarn/Queue/root/AllocatedMB[{fromSeconds},{toSeconds},{stepSeconds}],metrics/yarn/Queue/root/AvailableMB[{fromSeconds},{toSeconds},{stepSeconds}],metrics/yarn/Queue/root/default/AllocatedMB[{fromSeconds},{toSeconds},{stepSeconds}],metrics/yarn/Queue/root/default/AvailableMB[{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/ebdab006/ambari-web/app/views.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views.js b/ambari-web/app/views.js
index 9fd247f..12b52f0 100644
--- a/ambari-web/app/views.js
+++ b/ambari-web/app/views.js
@@ -146,10 +146,6 @@ 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/nms');
-require('views/main/service/info/metrics/yarn/qmr');
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');
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/ebdab006/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 4c7beae..34a776c 100644
--- a/ambari-web/app/views/main/service/info/summary.js
+++ b/ambari-web/app/views/main/service/info/summary.js
@@ -330,18 +330,14 @@ App.MainServiceInfoSummaryView = Em.View.extend({
App.ChartServiceMetricsHDFS_JVMThreads.extend()]];
break;
case 'yarn':
- graphs = /*[[App.ChartServiceMetricsYARN_JobsStatus.extend(),
+ graphs = [ /*[App.ChartServiceMetricsYARN_JobsStatus.extend(),
App.ChartServiceMetricsYARN_TasksRunningWaiting.extend(),
App.ChartServiceMetricsYARN_MapSlots.extend(),
- App.ChartServiceMetricsYARN_ReduceSlots.extend()]*/
- [[App.ChartServiceMetricsYARN_RPC.extend(),
+ App.ChartServiceMetricsYARN_ReduceSlots.extend()],*/
+ [App.ChartServiceMetricsYARN_RPC.extend(),
App.ChartServiceMetricsYARN_GC.extend(),
App.ChartServiceMetricsYARN_JVMHeap.extend(),
- App.ChartServiceMetricsYARN_JVMThreads.extend()],
- [App.ChartServiceMetricsYARN_AllocatedMemory.extend(),
- App.ChartServiceMetricsYARN_AllocatedContainer.extend(),
- App.ChartServiceMetricsYARN_NMS.extend(),
- App.ChartServiceMetricsYARN_QMR.extend()]];
+ App.ChartServiceMetricsYARN_JVMThreads.extend()]];
break;
case 'mapreduce':
graphs = [ [App.ChartServiceMetricsMapReduce_JobsStatus.extend(),
[2/2] git commit: AMBARI-2798. YARN specific graphs should be
created. (Andrii Babiichuk via yusaku)
Posted by yu...@apache.org.
AMBARI-2798. YARN specific graphs should be created. (Andrii Babiichuk via yusaku)
Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/439046a1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/439046a1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/439046a1
Branch: refs/heads/trunk
Commit: 439046a1a68b45f122b5fe88276aab04ce24f711
Parents: ebdab00
Author: Yusaku Sako <yu...@hortonworks.com>
Authored: Fri Aug 2 10:52:45 2013 -0700
Committer: Yusaku Sako <yu...@hortonworks.com>
Committed: Fri Aug 2 10:52:45 2013 -0700
----------------------------------------------------------------------
ambari-web/app/messages.js | 21 +++++-
ambari-web/app/utils/ajax.js | 20 ++++++
ambari-web/app/views.js | 4 ++
.../main/service/info/metrics/yarn/allocated.js | 61 +++++++++++++++++
.../info/metrics/yarn/allocated_container.js | 61 +++++++++++++++++
.../views/main/service/info/metrics/yarn/nms.js | 67 ++++++++++++++++++
.../views/main/service/info/metrics/yarn/qmr.js | 71 ++++++++++++++++++++
.../app/views/main/service/info/summary.js | 12 ++--
8 files changed, 312 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/439046a1/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 0eca365..4f24640 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -902,7 +902,26 @@ Em.I18n.translations = {
'services.service.info.metrics.yarn.gc': 'Garbage Collection',
'services.service.info.metrics.yarn.gc.displayNames.gcTimeMillis':'Time',
-
+ 'services.service.info.metrics.yarn.allocated.memory': 'Allocated Memory',
+ 'services.service.info.metrics.yarn.allocated.memory.displayNames.allocated': 'Allocated',
+ 'services.service.info.metrics.yarn.allocated.memory.displayNames.available': 'Available',
+ 'services.service.info.metrics.yarn.allocated.memory.displayNames.pending': 'Pending',
+ 'services.service.info.metrics.yarn.allocated.container': 'Allocated Container',
+ 'services.service.info.metrics.yarn.allocated.container.displayNames.allocated': 'Allocated',
+ 'services.service.info.metrics.yarn.allocated.container.displayNames.reserved': 'Reserved',
+ 'services.service.info.metrics.yarn.allocated.container.displayNames.pending': 'Pending',
+ 'services.service.info.metrics.yarn.nodemanager.statuses':'Nodemanager statuses',
+ 'services.service.info.metrics.yarn.nodemanager.statuses.displayNames.active':'Active Nodemanagers',
+ 'services.service.info.metrics.yarn.nodemanager.statuses.displayNames.decommissioned':'Decommissioned Nodemanagers',
+ 'services.service.info.metrics.yarn.nodemanager.statuses.displayNames.lost':'Lost Nodemanagers',
+ 'services.service.info.metrics.yarn.nodemanager.statuses.displayNames.rebooted':'Rebooted Nodemanagers',
+ 'services.service.info.metrics.yarn.nodemanager.statuses.displayNames.unhealthy':'Unhealthy Nodemanagers',
+ 'services.service.info.metrics.yarn.queueMemoryResource':'Queue memory resource',
+ 'services.service.info.metrics.yarn.queueMemoryResource.displayNames.allocated':'Allocated',
+ 'services.service.info.metrics.yarn.queueMemoryResource.displayNames.available':'Available',
+ 'services.service.info.metrics.yarn.queueMemoryResource.displayNames.allocated.default':'Allocated default',
+ 'services.service.info.metrics.yarn.queueMemoryResource.displayNames.available.default':'Available default',
+
'services.service.info.menu.summary':'Summary',
'services.service.info.menu.configs':'Configs',
'services.service.info.summary.hostsRunningMonitor':'{0}/{1}',
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/439046a1/ambari-web/app/utils/ajax.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/ajax.js b/ambari-web/app/utils/ajax.js
index d52acc9..b36343a 100644
--- a/ambari-web/app/utils/ajax.js
+++ b/ambari-web/app/utils/ajax.js
@@ -426,6 +426,26 @@ var urls = {
'mock': '/data/services/metrics/yarn/jvm_heap.json',
'testInProduction': true
},
+ 'service.metrics.yarn.queue.allocated': {
+ 'real': '/clusters/{clusterName}/hosts/{resourceManager}/host_components/RESOURCEMANAGER?fields=metrics/yarn/Queue/AvailableMB[{fromSeconds},{toSeconds},{stepSeconds}],metrics/yarn/Queue/PendingMB[{fromSeconds},{toSeconds},{stepSeconds}],metrics/yarn/Queue/AllocatedMB[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '',
+ 'testInProduction': true
+ },
+ 'service.metrics.yarn.queue.allocated.container': {
+ 'real': '/clusters/{clusterName}/hosts/{resourceManager}/host_components/RESOURCEMANAGER?fields=metrics/yarn/Queue/AllocatedContainers[{fromSeconds},{toSeconds},{stepSeconds}],metrics/yarn/Queue/ReservedContainers[{fromSeconds},{toSeconds},{stepSeconds}],metrics/yarn/Queue/PendingContainers[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '',
+ 'testInProduction': true
+ },
+ 'service.metrics.yarn.node.manager.statuses': {
+ 'real': '/clusters/{clusterName}/hosts/{resourceManager}/host_components/RESOURCEMANAGER?fields=metrics/yarn/ClusterMetrics/NumActiveNMs[{fromSeconds},{toSeconds},{stepSeconds}],metrics/yarn/ClusterMetrics/NumDecommissionedNMs[{fromSeconds},{toSeconds},{stepSeconds}],metrics/yarn/ClusterMetrics/NumLostNMs[{fromSeconds},{toSeconds},{stepSeconds}],metrics/yarn/ClusterMetrics/NumRebootedNMs[{fromSeconds},{toSeconds},{stepSeconds}],metrics/yarn/ClusterMetrics/NumUnhealthyNMs[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '',
+ 'testInProduction': true
+ },
+ 'service.metrics.yarn.queue.memory.resource': {
+ 'real': '/clusters/{clusterName}/hosts/{resourceManager}/host_components/RESOURCEMANAGER?fields=metrics/yarn/Queue/root/AllocatedMB[{fromSeconds},{toSeconds},{stepSeconds}],metrics/yarn/Queue/root/AvailableMB[{fromSeconds},{toSeconds},{stepSeconds}],metrics/yarn/Queue/root/default/AllocatedMB[{fromSeconds},{toSeconds},{stepSeconds}],metrics/yarn/Queue/root/default/AvailableMB[{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/439046a1/ambari-web/app/views.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views.js b/ambari-web/app/views.js
index 12b52f0..9fd247f 100644
--- a/ambari-web/app/views.js
+++ b/ambari-web/app/views.js
@@ -146,6 +146,10 @@ 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/nms');
+require('views/main/service/info/metrics/yarn/qmr');
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');
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/439046a1/ambari-web/app/views/main/service/info/metrics/yarn/allocated.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/yarn/allocated.js b/ambari-web/app/views/main/service/info/metrics/yarn/allocated.js
new file mode 100644
index 0000000..1f11699
--- /dev/null
+++ b/ambari-web/app/views/main/service/info/metrics/yarn/allocated.js
@@ -0,0 +1,61 @@
+/**
+ * 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_AllocatedMemory = App.ChartLinearTimeView.extend({
+ id: "service-metrics-yarn-queue-allocated",
+ title: Em.I18n.t('services.service.info.metrics.yarn.allocated.memory'),
+ renderer: 'line',
+ ajaxIndex: 'service.metrics.yarn.queue.allocated',
+
+ transformToSeries: function (jsonData) {
+ var seriesArray = [];
+ if (jsonData && jsonData.metrics && jsonData.metrics.yarn.Queue) {
+ for (var name in jsonData.metrics.yarn.Queue) {
+ var displayName;
+ var seriesData = jsonData.metrics.yarn.Queue[name];
+ switch (name) {
+ case "AvailableMB":
+ displayName = Em.I18n.t('services.service.info.metrics.yarn.allocated.memory.displayNames.available');
+ break;
+ case "PendingMB":
+ displayName = Em.I18n.t('services.service.info.metrics.yarn.allocated.memory.displayNames.pending');
+ break;
+ case "AllocatedMB":
+ displayName = Em.I18n.t('services.service.info.metrics.yarn.allocated.memory.displayNames.allocated');
+ 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/439046a1/ambari-web/app/views/main/service/info/metrics/yarn/allocated_container.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/yarn/allocated_container.js b/ambari-web/app/views/main/service/info/metrics/yarn/allocated_container.js
new file mode 100644
index 0000000..16bf089
--- /dev/null
+++ b/ambari-web/app/views/main/service/info/metrics/yarn/allocated_container.js
@@ -0,0 +1,61 @@
+/**
+ * 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_AllocatedContainer = App.ChartLinearTimeView.extend({
+ id: "service-metrics-yarn-queue-allocated-container",
+ title: Em.I18n.t('services.service.info.metrics.yarn.allocated.container'),
+ renderer: 'line',
+ ajaxIndex: 'service.metrics.yarn.queue.allocated.container',
+
+ transformToSeries: function (jsonData) {
+ var seriesArray = [];
+ if (jsonData && jsonData.metrics && jsonData.metrics.yarn.Queue.root) {
+ for (var name in jsonData.metrics.yarn.Queue.root) {
+ var displayName;
+ var seriesData = jsonData.metrics.yarn.Queue.root[name];
+ switch (name) {
+ case "ReservedContainers":
+ displayName = Em.I18n.t('services.service.info.metrics.yarn.allocated.container.displayNames.reserved');
+ break;
+ case "PendingContainers":
+ displayName = Em.I18n.t('services.service.info.metrics.yarn.allocated.container.displayNames.pending');
+ break;
+ case "AllocatedContainers":
+ displayName = Em.I18n.t('services.service.info.metrics.yarn.allocated.container.displayNames.allocated');
+ 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/439046a1/ambari-web/app/views/main/service/info/metrics/yarn/nms.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/yarn/nms.js b/ambari-web/app/views/main/service/info/metrics/yarn/nms.js
new file mode 100644
index 0000000..a2129be
--- /dev/null
+++ b/ambari-web/app/views/main/service/info/metrics/yarn/nms.js
@@ -0,0 +1,67 @@
+/**
+ * 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_NMS = App.ChartLinearTimeView.extend({
+ id: "service-metrics-yarn-node-manager-statuses",
+ title: Em.I18n.t('services.service.info.metrics.yarn.nodemanager.statuses'),
+ renderer: 'line',
+ ajaxIndex: 'service.metrics.yarn.node.manager.statuses',
+
+ transformToSeries: function (jsonData) {
+ var seriesArray = [];
+ if (jsonData && jsonData.metrics && jsonData.metrics.yarn && jsonData.metrics.yarn.ClusterMetrics) {
+ for (var name in jsonData.metrics.yarn.ClusterMetrics) {
+ var displayName;
+ var seriesData = jsonData.metrics.yarn.ClusterMetrics[name];
+ switch (name) {
+ case "NumActiveNMs":
+ displayName = Em.I18n.t('services.service.info.metrics.yarn.nodemanager.statuses.displayNames.active');
+ break;
+ case "NumDecommissionedNMs":
+ displayName = Em.I18n.t('services.service.info.metrics.yarn.nodemanager.statuses.displayNames.decommissioned');
+ break;
+ case "NumLostNMs":
+ displayName = Em.I18n.t('services.service.info.metrics.yarn.nodemanager.statuses.displayNames.lost');
+ break;
+ case "NumRebootedNMs":
+ displayName = Em.I18n.t('services.service.info.metrics.yarn.nodemanager.statuses.displayNames.rebooted');
+ break;
+ case "NumUnhealthyNMs":
+ displayName = Em.I18n.t('services.service.info.metrics.yarn.nodemanager.statuses.displayNames.unhealthy');
+ 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/439046a1/ambari-web/app/views/main/service/info/metrics/yarn/qmr.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/yarn/qmr.js b/ambari-web/app/views/main/service/info/metrics/yarn/qmr.js
new file mode 100644
index 0000000..39a7166
--- /dev/null
+++ b/ambari-web/app/views/main/service/info/metrics/yarn/qmr.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.ChartServiceMetricsYARN_QMR = App.ChartLinearTimeView.extend({
+ id: "service-metrics-yarn-queue-memory-resource",
+ title: Em.I18n.t('services.service.info.metrics.yarn.queueMemoryResource'),
+ renderer: 'line',
+ ajaxIndex: 'service.metrics.yarn.queue.memory.resource',
+
+ transformToSeries: function (jsonData) {
+ var seriesArray = [];
+ if (jsonData && jsonData.metrics && jsonData.metrics.yarn.Queue.root) {
+ for (var name in jsonData.metrics.yarn.Queue.root) {
+ var displayName;
+ var seriesData = jsonData.metrics.yarn.Queue.root[name];
+ switch (name) {
+ case "AllocatedMB":
+ displayName = Em.I18n.t('services.service.info.metrics.yarn.queueMemoryResource.displayNames.allocated');
+ break;
+ case "AvailableMB":
+ displayName = Em.I18n.t('services.service.info.metrics.yarn.queueMemoryResource.displayNames.available');
+ break;
+ default:
+ for (var name in jsonData.metrics.yarn.Queue.root.default) {
+ seriesData = jsonData.metrics.yarn.Queue.root.default[name];
+ switch (name) {
+ case "AllocatedMB":
+ displayName = Em.I18n.t('services.service.info.metrics.yarn.queueMemoryResource.displayNames.allocated.default');
+ break;
+ case "AvailableMB":
+ displayName = Em.I18n.t('services.service.info.metrics.yarn.queueMemoryResource.displayNames.available.default');
+ break;
+ default:
+ break;
+ }
+ }
+ 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/439046a1/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 34a776c..4c7beae 100644
--- a/ambari-web/app/views/main/service/info/summary.js
+++ b/ambari-web/app/views/main/service/info/summary.js
@@ -330,14 +330,18 @@ App.MainServiceInfoSummaryView = Em.View.extend({
App.ChartServiceMetricsHDFS_JVMThreads.extend()]];
break;
case 'yarn':
- graphs = [ /*[App.ChartServiceMetricsYARN_JobsStatus.extend(),
+ graphs = /*[[App.ChartServiceMetricsYARN_JobsStatus.extend(),
App.ChartServiceMetricsYARN_TasksRunningWaiting.extend(),
App.ChartServiceMetricsYARN_MapSlots.extend(),
- App.ChartServiceMetricsYARN_ReduceSlots.extend()],*/
- [App.ChartServiceMetricsYARN_RPC.extend(),
+ App.ChartServiceMetricsYARN_ReduceSlots.extend()]*/
+ [[App.ChartServiceMetricsYARN_RPC.extend(),
App.ChartServiceMetricsYARN_GC.extend(),
App.ChartServiceMetricsYARN_JVMHeap.extend(),
- App.ChartServiceMetricsYARN_JVMThreads.extend()]];
+ App.ChartServiceMetricsYARN_JVMThreads.extend()],
+ [App.ChartServiceMetricsYARN_AllocatedMemory.extend(),
+ App.ChartServiceMetricsYARN_AllocatedContainer.extend(),
+ App.ChartServiceMetricsYARN_NMS.extend(),
+ App.ChartServiceMetricsYARN_QMR.extend()]];
break;
case 'mapreduce':
graphs = [ [App.ChartServiceMetricsMapReduce_JobsStatus.extend(),