incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject svn commit: r1418939 - in /incubator/ambari/branches/AMBARI-666: ./ ambari-web/app/ ambari-web/app/assets/data/services/metrics/hdfs/ ambari-web/app/views/main/service/info/ ambari-web/app/views/main/service/info/metrics/hdfs/ ambari-web/app/views/main...
Date Sun, 09 Dec 2012 13:26:01 GMT
Author: yusaku
Date: Sun Dec  9 13:25:59 2012
New Revision: 1418939

URL: http://svn.apache.org/viewvc?rev=1418939&view=rev
Log:
AMBARI-1011. Create 2 missing HDFS service graphs. (Srimanth Gunturi via yusaku)

Added:
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/services/metrics/hdfs/block_status.json
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/services/metrics/hdfs/space_utilization.json
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/hdfs/block_status.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/hdfs/space_utilization.js
Modified:
    incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/hdfs/file_operations.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/hdfs/gc.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/hdfs/jvm_heap.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/hdfs/jvm_threads.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/hdfs/rpc.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/mapreduce/gc.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/mapreduce/jobs_running_waiting.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/mapreduce/jvm_heap.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/mapreduce/jvm_threads.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/mapreduce/rpc.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/summary.js

Modified: incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt?rev=1418939&r1=1418938&r2=1418939&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt (original)
+++ incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt Sun Dec  9 13:25:59 2012
@@ -411,6 +411,9 @@ AMBARI-666 branch (unreleased changes)
 
   IMPROVEMENTS
 
+  AMBARI-1011. Create 2 missing HDFS service graphs. (Srimanth Gunturi via
+  yusaku)
+
   AMBARI-1003. Nagios sections should use backend API to populate. (Srimanth
   Gunturi via yusaku)
 

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/services/metrics/hdfs/block_status.json
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/services/metrics/hdfs/block_status.json?rev=1418939&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/services/metrics/hdfs/block_status.json
(added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/services/metrics/hdfs/block_status.json
Sun Dec  9 13:25:59 2012
@@ -0,0 +1,19 @@
+{
+  "href" : "http://ambari/api/clusters/vmc/hosts/hostname/host_components/NAMENODE?fields=metrics/dfs/FSNamesystem/PendingReplicationBlocks[1352828598,1352832198,15],metrics/dfs/FSNamesystem/UnderReplicatedBlocks[1352828598,1352832198,15]",
+  "HostRoles" : {
+    "cluster_name" : "vmc",
+    "component_name" : "NAMENODE",
+    "host_name" : "hostname"
+  },
+  "host" : {
+    "href" : "http://ambari/api/clusters/vmc/hosts/hostname"
+  },
+  "metrics" : {
+    "dfs" : {
+      "FSNamesystem" : {
+        "PendingReplicationBlocks" : "[[0.0,1352768040],[0.0,1352768400],[0.0,1352768760],[0.0,1352769120],[0.0,1352769480],[0.0,1352769840],[0.0,1352770200],[0.0,1352770560],[0.0,1352770920],[0.0,1352771280],[0.0,1352771640],[0.0,1352772000],[0.0,1352772360],[0.0,1352772720],[0.0,1352773080],[0.0,1352773440],[0.0,1352773800],[0.0,1352774160],[0.0,1352774520],[0.0,1352774880],[0.0,1352775240],[0.0,1352775600],[0.0,1352775960],[0.0,1352776320],[0.0,1352776680],[0.0,1352777040],[0.0,1352777400],[0.0,1352777760],[0.0,1352778120],[0.0,1352778480],[0.0,1352778840],[0.0,1352779200],[0.0,1352779560],[0.0,1352779920],[0.0,1352780280],[0.0,1352780640],[0.0,1352781000],[0.0,1352781360],[0.0,1352781720],[0.0,1352782080],[0.0,1352782440],[0.0,1352785680],[0.0,1352786040],[0.0,1352786400],[0.0,1352790360],[0.0,1352790720],[0.0,1352791080],[0.0,1352791440],[0.0,1352791800],[0.0,1352792160],[0.0,1352792520],[0.0,1352792880],[0.0,1352793240],[0.0,1352793600],[0.0,1352793960],[0.0,1352794320
 ],[0.0,1352794680],[0.0,1352795040],[0.0,1352795400],[0.0,1352795760],[0.0,1352796120],[0.0,1352796480],[0.0,1352796840],[0.0,1352797200],[0.0,1352797560],[0.0,1352797920],[0.0,1352798280],[0.0,1352798640],[0.0,1352799000],[0.0,1352822400],[0.0,1352822760],[0.0,1352823120],[0.0,1352823480],[0.0,1352823840],[0.0,1352824200],[0.0,1352824560],[0.0,1352824920],[0.0,1352825280],[0.0,1352825640],[0.0,1352826000],[0.0,1352826360],[0.0,1352826720],[0.0,1352827080],[0.0,1352827440],[0.0,1352830320],[0.0,1352830680],[0.0,1352831040],[0.0,1352831400]]",
+        "UnderReplicatedBlocks" : "[[5.96388888889,1352768040],[6.0,1352768400],[6.0,1352768760],[6.0,1352769120],[6.0,1352769480],[6.0,1352769840],[6.0,1352770200],[6.0,1352770560],[6.0,1352770920],[6.0,1352771280],[6.0,1352771640],[7.69722222222,1352772000],[7.0,1352772360],[7.0,1352772720],[7.0,1352773080],[7.0,1352773440],[7.0,1352773800],[7.0,1352774160],[8.59722222222,1352774520],[8.0,1352774880],[8.0,1352775240],[8.0,1352775600],[8.0,1352775960],[8.0,1352776320],[8.0,1352776680],[8.0,1352777040],[9.35,1352777400],[9.0,1352777760],[9.0,1352778120],[10.2833333333,1352778480],[10.0,1352778840],[10.0,1352779200],[10.0,1352779560],[10.25,1352779920],[12.2083333333,1352780280],[11.0,1352780640],[11.0,1352781000],[12.3361111111,1352781360],[12.1583333333,1352781720],[12.0,1352782080],[12.0,1352782440],[12.0,1352785680],[12.2055555556,1352786040],[13.8555555556,1352786400],[13.0,1352790360],[13.0,1352790720],[13.0,1352791080],[13.0,1352791440],[13.0,1352791800],[13.0,13527921
 60],[13.0,1352792520],[13.0,1352792880],[13.0,1352793240],[13.0,1352793600],[13.0,1352793960],[13.0,1352794320],[13.0,1352794680],[13.0,1352795040],[13.0,1352795400],[13.0,1352795760],[13.0,1352796120],[13.0,1352796480],[13.0,1352796840],[13.0,1352797200],[13.0,1352797560],[13.0,1352797920],[13.0,1352798280],[13.0,1352798640],[13.0,1352799000],[13.0,1352822400],[13.0,1352822760],[13.0,1352823120],[13.0,1352823480],[13.0,1352823840],[13.0,1352824200],[13.0,1352824560],[13.0,1352824920],[13.0,1352825280],[13.0,1352825640],[13.0,1352826000],[13.0,1352826360],[13.0,1352826720],[13.0,1352827080],[13.0,1352827440],[13.0,1352830320],[13.0,1352830680],[13.0,1352831040],[13.0,1352831400]]"
+      }
+    }
+  }
+}
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/services/metrics/hdfs/space_utilization.json
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/services/metrics/hdfs/space_utilization.json?rev=1418939&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/services/metrics/hdfs/space_utilization.json
(added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/services/metrics/hdfs/space_utilization.json
Sun Dec  9 13:25:59 2012
@@ -0,0 +1,20 @@
+{
+  "href" : "http://ambari/api/clusters/vmc/hosts/hostname/host_components/NAMENODE?fields=metrics/dfs/FSNamesystem/CapacityRemainingGB[1352828598,1352832198,15],metrics/dfs/FSNamesystem/CapacityUsedGB[1352828598,1352832198,15],metrics/dfs/FSNamesystem/CapacityTotalGB[1352828598,1352832198,15]",
+  "HostRoles" : {
+    "cluster_name" : "vmc",
+    "component_name" : "NAMENODE",
+    "host_name" : "hostname"
+  },
+  "host" : {
+    "href" : "http://ambari/api/clusters/vmc/hosts/hostname"
+  },
+  "metrics" : {
+    "dfs" : {
+      "FSNamesystem" : {
+        "CapacityTotalGB" : "[[49.0,1352768040],[49.0,1352768400],[49.0,1352768760],[49.0,1352769120],[49.0,1352769480],[49.0,1352769840],[49.0,1352770200],[49.0,1352770560],[49.0,1352770920],[49.0,1352771280],[49.0,1352771640],[49.0,1352772000],[49.0,1352772360],[49.0,1352772720],[49.0,1352773080],[49.0,1352773440],[49.0,1352773800],[49.0,1352774160],[49.0,1352774520],[49.0,1352774880],[49.0,1352775240],[49.0,1352775600],[49.0,1352775960],[49.0,1352776320],[49.0,1352776680],[49.0,1352777040],[49.0,1352777400],[49.0,1352777760],[49.0,1352778120],[49.0,1352778480],[49.0,1352778840],[49.0,1352779200],[49.0,1352779560],[49.0,1352779920],[49.0,1352780280],[49.0,1352780640],[49.0,1352781000],[49.0,1352781360],[49.0,1352781720],[49.0,1352782080],[49.0,1352782440],[49.0,1352785680],[49.0,1352786040],[49.0,1352786400],[49.0,1352790360],[49.0,1352790720],[49.0,1352791080],[49.0,1352791440],[49.0,1352791800],[49.0,1352792160],[49.0,1352792520],[49.0,1352792880],[49.0,1352793240],[49.0
 ,1352793600],[49.0,1352793960],[49.0,1352794320],[49.0,1352794680],[49.0,1352795040],[49.0,1352795400],[49.0,1352795760],[49.0,1352796120],[49.0,1352796480],[49.0,1352796840],[49.0,1352797200],[49.0,1352797560],[49.0,1352797920],[49.0,1352798280],[49.0,1352798640],[49.0,1352799000],[49.0,1352822400],[49.0,1352822760],[49.0,1352823120],[49.0,1352823480],[49.0,1352823840],[49.0,1352824200],[49.0,1352824560],[49.0,1352824920],[49.0,1352825280],[49.0,1352825640],[49.0,1352826000],[49.0,1352826360],[49.0,1352826720],[49.0,1352827080],[49.0,1352827440],[49.0,1352830320],[49.0,1352830680],[49.0,1352831040],[49.0,1352831400]]",
+        "CapacityUsedGB" : "[[0.0,1352768040],[0.0,1352768400],[0.0,1352768760],[0.0,1352769120],[0.0,1352769480],[0.0,1352769840],[0.0,1352770200],[0.0,1352770560],[0.0,1352770920],[0.0,1352771280],[0.0,1352771640],[0.0,1352772000],[0.0,1352772360],[0.0,1352772720],[0.0,1352773080],[0.0,1352773440],[0.0,1352773800],[0.0,1352774160],[0.0,1352774520],[0.0,1352774880],[0.0,1352775240],[0.0,1352775600],[0.0,1352775960],[0.0,1352776320],[0.0,1352776680],[0.0,1352777040],[0.0,1352777400],[0.0,1352777760],[0.0,1352778120],[0.0,1352778480],[0.0,1352778840],[0.0,1352779200],[0.0,1352779560],[0.0,1352779920],[0.0,1352780280],[0.0,1352780640],[0.0,1352781000],[0.0,1352781360],[0.0,1352781720],[0.0,1352782080],[0.0,1352782440],[0.0,1352785680],[0.0,1352786040],[0.0,1352786400],[0.0,1352790360],[0.0,1352790720],[0.0,1352791080],[0.0,1352791440],[0.0,1352791800],[0.0,1352792160],[0.0,1352792520],[0.0,1352792880],[0.0,1352793240],[0.0,1352793600],[0.0,1352793960],[0.0,1352794320],[0.0,135
 2794680],[0.0,1352795040],[0.0,1352795400],[0.0,1352795760],[0.0,1352796120],[0.0,1352796480],[0.0,1352796840],[0.0,1352797200],[0.0,1352797560],[0.0,1352797920],[0.0,1352798280],[0.0,1352798640],[0.0,1352799000],[0.0,1352822400],[0.0,1352822760],[0.0,1352823120],[0.0,1352823480],[0.0,1352823840],[0.0,1352824200],[0.0,1352824560],[0.0,1352824920],[0.0,1352825280],[0.0,1352825640],[0.0,1352826000],[0.0,1352826360],[0.0,1352826720],[0.0,1352827080],[0.0,1352827440],[0.0,1352830320],[0.0,1352830680],[0.0,1352831040],[0.0,1352831400]]",
+        "CapacityRemainingGB" : "[[45.0,1352768040],[45.0,1352768400],[45.0,1352768760],[45.0,1352769120],[45.0,1352769480],[45.0,1352769840],[45.0,1352770200],[45.0,1352770560],[45.0,1352770920],[45.0,1352771280],[45.0,1352771640],[45.0,1352772000],[45.0,1352772360],[45.0,1352772720],[45.0,1352773080],[45.0,1352773440],[45.0,1352773800],[45.0,1352774160],[45.0,1352774520],[45.0,1352774880],[45.0,1352775240],[45.0,1352775600],[45.0,1352775960],[45.0,1352776320],[45.0,1352776680],[45.0,1352777040],[45.0,1352777400],[44.9166666667,1352777760],[44.1277777778,1352778120],[44.0,1352778480],[44.0,1352778840],[44.0,1352779200],[44.2527777778,1352779560],[44.0,1352779920],[44.0,1352780280],[44.0,1352780640],[44.25,1352781000],[44.0,1352781360],[44.0,1352781720],[44.0,1352782080],[44.0,1352782440],[44.0861111111,1352785680],[44.0,1352786040],[44.0,1352786400],[44.0,1352790360],[44.0,1352790720],[44.0,1352791080],[44.0,1352791440],[44.0,1352791800],[44.0,1352792160],[44.0,1352792520],
 [44.0,1352792880],[44.0,1352793240],[44.0,1352793600],[44.0,1352793960],[44.0,1352794320],[44.0,1352794680],[44.0,1352795040],[44.0,1352795400],[44.0,1352795760],[44.0,1352796120],[44.0,1352796480],[44.0,1352796840],[44.0,1352797200],[44.0,1352797560],[44.0,1352797920],[44.0,1352798280],[44.0,1352798640],[44.0,1352799000],[44.0,1352822400],[44.0,1352822760],[44.0,1352823120],[44.0,1352823480],[44.0,1352823840],[44.0,1352824200],[44.0,1352824560],[44.0,1352824920],[44.0,1352825280],[44.0,1352825640],[44.0,1352826000],[44.0,1352826360],[44.0,1352826720],[44.0,1352827080],[44.0,1352827440],[44.0,1352830320],[44.0,1352830680],[44.0,1352831040],[44.0,1352831400]]"
+      }
+    }
+  }
+}
\ No newline at end of file

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views.js?rev=1418939&r1=1418938&r2=1418939&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views.js Sun Dec  9 13:25:59 2012
@@ -86,6 +86,8 @@ require('views/main/service/info/metrics
 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/hdfs/space_utilization');
+require('views/main/service/info/metrics/hdfs/block_status');
 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');

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/hdfs/block_status.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/hdfs/block_status.js?rev=1418939&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/hdfs/block_status.js
(added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/hdfs/block_status.js
Sun Dec  9 13:25:59 2012
@@ -0,0 +1,79 @@
+/**
+ * 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.ChartServiceMetricsHDFS_BlockStatus = App.ChartLinearTimeView.extend({
+  id: "service-metrics-hdfs-block-status",
+  title: "Block Status",
+
+  url: function () {
+    var hdfsService = App.HDFSService.find().objectAt(0);
+    var nameNodeHostName = hdfsService.get('nameNode').get('hostName');
+    return App.formatUrl("/api/clusters/{clusterName}/hosts/{hostName}/host_components/NAMENODE?fields=metrics/dfs/FSNamesystem/PendingReplicationBlocks[{fromSeconds},{toSeconds},{stepSeconds}],metrics/dfs/FSNamesystem/UnderReplicatedBlocks[{fromSeconds},{toSeconds},{stepSeconds}]",
{
+      clusterName: App.router.get('clusterController.clusterName'),
+      hostName: nameNodeHostName
+    }, "/data/services/metrics/hdfs/block_status.json");
+  }.property('App.router.clusterController.clusterName'),
+
+  transformToSeries: function (jsonData) {
+    var seriesArray = [];
+    if (jsonData && jsonData.metrics && jsonData.metrics.dfs && jsonData.metrics.dfs.FSNamesystem)
{
+      for ( var name in jsonData.metrics.dfs.FSNamesystem) {
+        var displayName;
+        var seriesData = jsonData.metrics.dfs.FSNamesystem[name];
+        switch (name) {
+          case "PendingReplicationBlocks":
+            displayName = "Pending Replication Blocks";
+            break;
+          case "UnderReplicatedBlocks":
+            displayName = "Under Replicated Blocks";
+            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;
+  }
+});
\ No newline at end of file

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/hdfs/file_operations.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/hdfs/file_operations.js?rev=1418939&r1=1418938&r2=1418939&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/hdfs/file_operations.js
(original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/hdfs/file_operations.js
Sun Dec  9 13:25:59 2012
@@ -31,8 +31,11 @@ App.ChartServiceMetricsHDFS_FileOperatio
   title: "File Operations",
 
   url: function () {
+    var hdfsService = App.HDFSService.find().objectAt(0);
+    var nameNodeHostName = hdfsService.get('nameNode').get('hostName');
     return App.formatUrl("/api/clusters/{clusterName}/hosts/{hostName}/host_components/NAMENODE?fields=metrics/dfs/namenode/FileInfoOps[{fromSeconds},{toSeconds},{stepSeconds}],metrics/dfs/namenode/CreateFileOps[{fromSeconds},{toSeconds},{stepSeconds}]",
{
-      clusterName: App.router.get('clusterController.clusterName')
+      clusterName: App.router.get('clusterController.clusterName'),
+      hostName: nameNodeHostName
     }, "/data/services/metrics/hdfs/file_operations.json");
   }.property('App.router.clusterController.clusterName'),
 

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/hdfs/gc.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/hdfs/gc.js?rev=1418939&r1=1418938&r2=1418939&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/hdfs/gc.js
(original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/hdfs/gc.js
Sun Dec  9 13:25:59 2012
@@ -32,8 +32,11 @@ App.ChartServiceMetricsHDFS_GC = App.Cha
   yAxisFormatter: App.ChartLinearTimeView.TimeElapsedFormatter,
 
   url: function () {
+    var hdfsService = App.HDFSService.find().objectAt(0);
+    var nameNodeHostName = hdfsService.get('nameNode').get('hostName');
     return App.formatUrl("/api/clusters/{clusterName}/hosts/{hostName}/host_components/NAMENODE?fields=metrics/jvm/gcTimeMillis[{fromSeconds},{toSeconds},{stepSeconds}]",
{
-      clusterName: App.router.get('clusterController.clusterName')
+      clusterName: App.router.get('clusterController.clusterName'),
+      hostName: nameNodeHostName
     }, "/data/services/metrics/hdfs/gc.json");
   }.property('App.router.clusterController.clusterName'),
 

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/hdfs/jvm_heap.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/hdfs/jvm_heap.js?rev=1418939&r1=1418938&r2=1418939&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/hdfs/jvm_heap.js
(original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/hdfs/jvm_heap.js
Sun Dec  9 13:25:59 2012
@@ -32,8 +32,11 @@ App.ChartServiceMetricsHDFS_JVMHeap = Ap
   yAxisFormatter: App.ChartLinearTimeView.BytesFormatter,
 
   url: function () {
+    var hdfsService = App.HDFSService.find().objectAt(0);
+    var nameNodeHostName = hdfsService.get('nameNode').get('hostName');
     return App.formatUrl("/api/clusters/{clusterName}/hosts/{hostName}/host_components/NAMENODE?fields=metrics/jvm/memNonHeapUsedM[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/memNonHeapCommittedM[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/memHeapUsedM[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/memHeapCommittedM[{fromSeconds},{toSeconds},{stepSeconds}]",
{
-      clusterName: App.router.get('clusterController.clusterName')
+      clusterName: App.router.get('clusterController.clusterName'),
+      hostName: nameNodeHostName
     }, "/data/services/metrics/hdfs/jvm_heap.json");
   }.property('App.router.clusterController.clusterName'),
 

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/hdfs/jvm_threads.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/hdfs/jvm_threads.js?rev=1418939&r1=1418938&r2=1418939&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/hdfs/jvm_threads.js
(original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/hdfs/jvm_threads.js
Sun Dec  9 13:25:59 2012
@@ -31,8 +31,11 @@ App.ChartServiceMetricsHDFS_JVMThreads =
   title: "JVM Thread Status",
 
   url: function () {
+    var hdfsService = App.HDFSService.find().objectAt(0);
+    var nameNodeHostName = hdfsService.get('nameNode').get('hostName');
     return App.formatUrl("/api/clusters/{clusterName}/hosts/{hostName}/host_components/NAMENODE?fields=metrics/jvm/threadsRunnable[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/threadsBlocked[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/threadsWaiting[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/threadsTimedWaiting[{fromSeconds},{toSeconds},{stepSeconds}]",
{
-      clusterName: App.router.get('clusterController.clusterName')
+      clusterName: App.router.get('clusterController.clusterName'),
+      hostName: nameNodeHostName
     }, "/data/services/metrics/hdfs/jvm_threads.json");
   }.property('App.router.clusterController.clusterName'),
 

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/hdfs/rpc.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/hdfs/rpc.js?rev=1418939&r1=1418938&r2=1418939&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/hdfs/rpc.js
(original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/hdfs/rpc.js
Sun Dec  9 13:25:59 2012
@@ -32,8 +32,11 @@ App.ChartServiceMetricsHDFS_RPC = App.Ch
   yAxisFormatter: App.ChartLinearTimeView.TimeElapsedFormatter,
 
   url: function () {
+    var hdfsService = App.HDFSService.find().objectAt(0);
+    var nameNodeHostName = hdfsService.get('nameNode').get('hostName');
     return App.formatUrl("/api/clusters/{clusterName}/hosts/{hostName}/host_components/NAMENODE?fields=metrics/rpc/RpcQueueTime_avg_time[{fromSeconds},{toSeconds},{stepSeconds}]",
{
-      clusterName: App.router.get('clusterController.clusterName')
+      clusterName: App.router.get('clusterController.clusterName'),
+      hostName: nameNodeHostName
     }, "/data/services/metrics/hdfs/rpc.json");
   }.property('App.router.clusterController.clusterName'),
 

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/hdfs/space_utilization.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/hdfs/space_utilization.js?rev=1418939&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/hdfs/space_utilization.js
(added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/hdfs/space_utilization.js
Sun Dec  9 13:25:59 2012
@@ -0,0 +1,83 @@
+/**
+ * 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.ChartServiceMetricsHDFS_SpaceUtilization = App.ChartLinearTimeView.extend({
+  id: "service-metrics-hdfs-space-utilization",
+  title: "Total Space Utilization",
+  yAxisFormatter: App.ChartLinearTimeView.BytesFormatter,
+
+  url: function () {
+    var hdfsService = App.HDFSService.find().objectAt(0);
+    var nameNodeHostName = hdfsService.get('nameNode').get('hostName');
+    return App.formatUrl("/api/clusters/{clusterName}/hosts/{hostName}/host_components/NAMENODE?fields=metrics/dfs/FSNamesystem/CapacityRemainingGB[{fromSeconds},{toSeconds},{stepSeconds}],metrics/dfs/FSNamesystem/CapacityUsedGB[{fromSeconds},{toSeconds},{stepSeconds}],metrics/dfs/FSNamesystem/CapacityTotalGB[{fromSeconds},{toSeconds},{stepSeconds}]",
{
+      clusterName: App.router.get('clusterController.clusterName'),
+      hostName: nameNodeHostName
+    }, "/data/services/metrics/hdfs/space_utilization.json");
+  }.property('App.router.clusterController.clusterName'),
+
+  transformToSeries: function (jsonData) {
+    var seriesArray = [];
+    if (jsonData && jsonData.metrics && jsonData.metrics.dfs && jsonData.metrics.dfs.FSNamesystem)
{
+      for ( var name in jsonData.metrics.dfs.FSNamesystem) {
+        var displayName;
+        var seriesData = jsonData.metrics.dfs.FSNamesystem[name];
+        switch (name) {
+          case "CapacityRemainingGB":
+            displayName = "Capacity Remaining";
+            break;
+          case "CapacityUsedGB":
+            displayName = "Capacity Used";
+            break;
+          case "CapacityTotalGB":
+            displayName = "Capacity Total";
+            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]*1000000000
+            });
+          }
+          seriesArray.push(series);
+        }
+      }
+    }
+    return seriesArray;
+  }
+});
\ No newline at end of file

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/mapreduce/gc.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/mapreduce/gc.js?rev=1418939&r1=1418938&r2=1418939&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/mapreduce/gc.js
(original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/mapreduce/gc.js
Sun Dec  9 13:25:59 2012
@@ -32,8 +32,11 @@ App.ChartServiceMetricsMapReduce_GC = Ap
   yAxisFormatter: App.ChartLinearTimeView.TimeElapsedFormatter,
 
   url: function () {
+    var mrService = App.MapReduceService.find().objectAt(0);
+    var jtHostName = mrService.get('jobTracker').get('hostName');
     return App.formatUrl("/api/clusters/{clusterName}/hosts/{hostName}/host_components/JOBTRACKER?fields=metrics/jvm/gcTimeMillis[{fromSeconds},{toSeconds},{stepSeconds}]",
{
-      clusterName: App.router.get('clusterController.clusterName')
+      clusterName: App.router.get('clusterController.clusterName'),
+      hostName: jtHostName
     }, "/data/services/metrics/mapreduce/gc.json");
   }.property('App.router.clusterController.clusterName'),
 

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/mapreduce/jobs_running_waiting.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/mapreduce/jobs_running_waiting.js?rev=1418939&r1=1418938&r2=1418939&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/mapreduce/jobs_running_waiting.js
(original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/mapreduce/jobs_running_waiting.js
Sun Dec  9 13:25:59 2012
@@ -28,7 +28,7 @@ var App = require('app');
  */
 App.ChartServiceMetricsMapReduce_JobsRunningWaiting = App.ChartLinearTimeView.extend({
   id: "service-metrics-mapreduce-jobs-running-waiting",
-  title: "Jobs",
+  title: "Jobs (Running/Waiting)",
 
   url: function () {
     return App.formatUrl("/api/clusters/{clusterName}/services/MAPREDUCE/components/JOBTRACKER?fields=metrics/mapred/jobtracker/running_maps[{fromSeconds},{toSeconds},{stepSeconds}],metrics/mapred/jobtracker/running_reduces[{fromSeconds},{toSeconds},{stepSeconds}],metrics/mapred/jobtracker/waiting_maps[{fromSeconds},{toSeconds},{stepSeconds}],metrics/mapred/jobtracker/waiting_reduces[{fromSeconds},{toSeconds},{stepSeconds}]",
{

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/mapreduce/jvm_heap.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/mapreduce/jvm_heap.js?rev=1418939&r1=1418938&r2=1418939&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/mapreduce/jvm_heap.js
(original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/mapreduce/jvm_heap.js
Sun Dec  9 13:25:59 2012
@@ -32,8 +32,11 @@ App.ChartServiceMetricsMapReduce_JVMHeap
   yAxisFormatter: App.ChartLinearTimeView.BytesFormatter,
 
   url: function () {
+    var mrService = App.MapReduceService.find().objectAt(0);
+    var jtHostName = mrService.get('jobTracker').get('hostName');
     return App.formatUrl("/api/clusters/{clusterName}/hosts/{hostName}/host_components/JOBTRACKER?fields=metrics/jvm/memNonHeapUsedM[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/memNonHeapCommittedM[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/memHeapUsedM[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/memHeapCommittedM[{fromSeconds},{toSeconds},{stepSeconds}]",
{
-      clusterName: App.router.get('clusterController.clusterName')
+      clusterName: App.router.get('clusterController.clusterName'),
+      hostName: jtHostName
     }, "/data/services/metrics/mapreduce/jvm_heap.json");
   }.property('App.router.clusterController.clusterName'),
 

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/mapreduce/jvm_threads.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/mapreduce/jvm_threads.js?rev=1418939&r1=1418938&r2=1418939&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/mapreduce/jvm_threads.js
(original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/mapreduce/jvm_threads.js
Sun Dec  9 13:25:59 2012
@@ -31,8 +31,11 @@ App.ChartServiceMetricsMapReduce_JVMThre
   title: "JVM Thread Status",
 
   url: function () {
+    var mrService = App.MapReduceService.find().objectAt(0);
+    var jtHostName = mrService.get('jobTracker').get('hostName');
     return App.formatUrl("/api/clusters/{clusterName}/hosts/{hostName}/host_components/JOBTRACKER?fields=metrics/jvm/threadsRunnable[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/threadsBlocked[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/threadsWaiting[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/threadsTimedWaiting[{fromSeconds},{toSeconds},{stepSeconds}]",
{
-      clusterName: App.router.get('clusterController.clusterName')
+      clusterName: App.router.get('clusterController.clusterName'),
+      hostName: jtHostName
     }, "/data/services/metrics/mapreduce/jvm_threads.json");
   }.property('App.router.clusterController.clusterName'),
 

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/mapreduce/rpc.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/mapreduce/rpc.js?rev=1418939&r1=1418938&r2=1418939&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/mapreduce/rpc.js
(original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/metrics/mapreduce/rpc.js
Sun Dec  9 13:25:59 2012
@@ -32,8 +32,11 @@ App.ChartServiceMetricsMapReduce_RPC = A
   yAxisFormatter: App.ChartLinearTimeView.TimeElapsedFormatter,
 
   url: function () {
+    var mrService = App.MapReduceService.find().objectAt(0);
+    var jtHostName = mrService.get('jobTracker').get('hostName');
     return App.formatUrl("/api/clusters/{clusterName}/hosts/{hostName}/host_components/JOBTRACKER?fields=metrics/rpc/RpcQueueTime_avg_time[{fromSeconds},{toSeconds},{stepSeconds}]",
{
-      clusterName: App.router.get('clusterController.clusterName')
+      clusterName: App.router.get('clusterController.clusterName'),
+      hostName: jtHostName
     }, "/data/services/metrics/mapreduce/rpc.json");
   }.property('App.router.clusterController.clusterName'),
 

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/summary.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/summary.js?rev=1418939&r1=1418938&r2=1418939&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/summary.js
(original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/summary.js
Sun Dec  9 13:25:59 2012
@@ -95,12 +95,14 @@ App.MainServiceInfoSummaryView = Em.View
           summary['dfs_percent_disk_used'] = parseFloat((100 - summary['dfs_percent_remaining']).toFixed(2))
+ "%";
           summary['used_bytes'] = (summary['dfs_used_bytes'] + summary['nondfs_used_bytes']).bytesToSize(2,
'parseFloat');
           summary['dfs_total_bytes'] = summary['dfs_total_bytes'].bytesToSize(2, 'parseFloat');
-          summary['metric_graph_views'] = [ App.ChartServiceMetricsHDFS_JVMThreads.extend(),

-                                            App.ChartServiceMetricsHDFS_JVMHeap.extend(),

+          summary['metric_graph_views'] = [ App.ChartServiceMetricsHDFS_SpaceUtilization.extend(),
+                                            App.ChartServiceMetricsHDFS_FileOperations.extend(),

+                                            App.ChartServiceMetricsHDFS_BlockStatus.extend(),

                                             App.ChartServiceMetricsHDFS_IO.extend(), 
                                             App.ChartServiceMetricsHDFS_RPC.extend(), 
-                                            App.ChartServiceMetricsHDFS_FileOperations.extend(),

-                                            App.ChartServiceMetricsHDFS_GC.extend() ];
+                                            App.ChartServiceMetricsHDFS_GC.extend(), 
+                                            App.ChartServiceMetricsHDFS_JVMHeap.extend(),

+                                            App.ChartServiceMetricsHDFS_JVMThreads.extend()];
         } else if (serviceName == 'mapreduce') {
           summary['start_time'] = summary['start_time'].toDaysHoursMinutes();
           summary['memory_heap_percent_used'] = summary['memory_heap_used'].countPercentageRatio(summary['memory_heap_max']);
@@ -110,10 +112,10 @@ App.MainServiceInfoSummaryView = Em.View
                                             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()
];
+                                            App.ChartServiceMetricsMapReduce_RPC.extend(),

+                                            App.ChartServiceMetricsMapReduce_JVMHeap.extend(),

+                                            App.ChartServiceMetricsMapReduce_JVMThreads.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');



Mime
View raw message