incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject svn commit: r1418957 [1/2] - in /incubator/ambari/branches/AMBARI-666: ./ ambari-web/app/ ambari-web/app/assets/data/hosts/ ambari-web/app/assets/data/racks/ ambari-web/app/controllers/main/charts/ ambari-web/app/controllers/main/charts/heatmap_metrics...
Date Sun, 09 Dec 2012 13:52:35 GMT
Author: yusaku
Date: Sun Dec  9 13:52:32 2012
New Revision: 1418957

URL: http://svn.apache.org/viewvc?rev=1418957&view=rev
Log:
AMBARI-1022. Integrate Heatmap UI to backend API. (Srimanth Gunturi via yusaku)

Added:
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/hosts/hosts70.json
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts/heatmap_metrics/
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts/heatmap_metrics/heatmap_metric.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts/heatmap_metrics/heatmap_metric_diskspaceused.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts/heatmap_metrics/heatmap_metric_memoryfree.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts/heatmap_metrics/heatmap_metric_processrun.js
Modified:
    incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/hosts/hosts.json
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/racks/racks.json
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts/heatmap.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/cluster_mapper.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/hosts_mapper.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/racks_mapper.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/messages.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/models/rack.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts.hbs
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts/heatmap.hbs
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts/heatmap/heatmap_host.hbs
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts/heatmap/heatmap_host_detail.hbs
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/charts/heatmap/heatmap_rack.hbs
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/charts/heatmap.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/charts/heatmap/heatmap_host.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/charts/heatmap/heatmap_host_detail.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/charts/heatmap/heatmap_rack.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=1418957&r1=1418956&r2=1418957&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:52:32 2012
@@ -12,6 +12,9 @@ AMBARI-666 branch (unreleased changes)
 
   NEW FEATURES
 
+  AMBARI-1022. Integrate Heatmap UI to backend API. (Srimanth
+  Gunturi via yusaku)
+
   AMBARI-1015. Create HBase summary section in Dashboard & Service
   pages. (Srimanth Gunturi via yusaku)
 

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/hosts/hosts.json
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/hosts/hosts.json?rev=1418957&r1=1418956&r2=1418957&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/hosts/hosts.json (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/hosts/hosts.json Sun Dec  9 13:52:32 2012
@@ -2,7 +2,7 @@
   "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts?fields=*",
   "items" : [
     {
-      "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev.hortonworks.com",
+      "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev1.hortonworks.com",
       "Hosts" : {
         "cpu_count" : 1,
         "cluster_name" : "mycluster",
@@ -10,7 +10,7 @@
         "rack_info" : "/default-rack",
         "total_mem" : 3082813,
         "os_arch" : "x86_64",
-        "host_name" : "dev.hortonworks.com",
+        "host_name" : "dev1.hortonworks.com",
         "disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
         "last_heartbeat_time" : 1352461939047,
         "os_type" : "centos6",
@@ -22,7 +22,7 @@
           "HostRoles" : {
             "cluster_name" : "mycluster",
             "component_name" : "SECONDARY_NAMENODE",
-            "host_name" : "dev.hortonworks.com"
+            "host_name" : "dev1.hortonworks.com"
           }
         },
         {
@@ -30,7 +30,7 @@
           "HostRoles" : {
             "cluster_name" : "mycluster",
             "component_name" : "JOBTRACKER",
-            "host_name" : "dev.hortonworks.com"
+            "host_name" : "dev1.hortonworks.com"
           }
         },
         {
@@ -38,7 +38,7 @@
           "HostRoles" : {
             "cluster_name" : "mycluster",
             "component_name" : "DATANODE",
-            "host_name" : "dev.hortonworks.com"
+            "host_name" : "dev1.hortonworks.com"
           }
         },
         {
@@ -46,7 +46,7 @@
           "HostRoles" : {
             "cluster_name" : "mycluster",
             "component_name" : "HDFS_CLIENT",
-            "host_name" : "dev.hortonworks.com"
+            "host_name" : "dev1.hortonworks.com"
           }
         },
         {
@@ -54,7 +54,7 @@
           "HostRoles" : {
             "cluster_name" : "mycluster",
             "component_name" : "TASKTRACKER",
-            "host_name" : "dev.hortonworks.com"
+            "host_name" : "dev1.hortonworks.com"
           }
         },
         {
@@ -62,7 +62,7 @@
           "HostRoles" : {
             "cluster_name" : "mycluster",
             "component_name" : "NAMENODE",
-            "host_name" : "dev.hortonworks.com"
+            "host_name" : "dev1.hortonworks.com"
           }
         },
         {
@@ -70,7 +70,157 @@
           "HostRoles" : {
             "cluster_name" : "mycluster",
             "component_name" : "MAPREDUCE_CLIENT",
-            "host_name" : "dev.hortonworks.com"
+            "host_name" : "dev1.hortonworks.com"
+          }
+        }
+      ]
+    }, 
+    {
+      
+      "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev2.hortonworks.com",
+      "Hosts" : {
+        "cpu_count" : 1,
+        "cluster_name" : "mycluster",
+        "last_registration_time" : 1352386560520,
+        "rack_info" : "/default-rack",
+        "total_mem" : 3082813,
+        "os_arch" : "x86_64",
+        "host_name" : "dev2.hortonworks.com",
+        "disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
+        "last_heartbeat_time" : 1352461939047,
+        "os_type" : "centos6",
+        "ip" : "10.0.2.15"
+      },
+      "host_components" : [
+        {
+          "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev.hortonworks.com/host_components/SECONDARY_NAMENODE",
+          "HostRoles" : {
+            "cluster_name" : "mycluster",
+            "component_name" : "SECONDARY_NAMENODE",
+            "host_name" : "dev2.hortonworks.com"
+          }
+        },
+        {
+          "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev.hortonworks.com/host_components/JOBTRACKER",
+          "HostRoles" : {
+            "cluster_name" : "mycluster",
+            "component_name" : "JOBTRACKER",
+            "host_name" : "dev2.hortonworks.com"
+          }
+        },
+        {
+          "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev.hortonworks.com/host_components/DATANODE",
+          "HostRoles" : {
+            "cluster_name" : "mycluster",
+            "component_name" : "DATANODE",
+            "host_name" : "dev2.hortonworks.com"
+          }
+        },
+        {
+          "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev.hortonworks.com/host_components/HDFS_CLIENT",
+          "HostRoles" : {
+            "cluster_name" : "mycluster",
+            "component_name" : "HDFS_CLIENT",
+            "host_name" : "dev2.hortonworks.com"
+          }
+        },
+        {
+          "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev.hortonworks.com/host_components/TASKTRACKER",
+          "HostRoles" : {
+            "cluster_name" : "mycluster",
+            "component_name" : "TASKTRACKER",
+            "host_name" : "dev2.hortonworks.com"
+          }
+        },
+        {
+          "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev.hortonworks.com/host_components/NAMENODE",
+          "HostRoles" : {
+            "cluster_name" : "mycluster",
+            "component_name" : "NAMENODE",
+            "host_name" : "dev2.hortonworks.com"
+          }
+        },
+        {
+          "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev.hortonworks.com/host_components/MAPREDUCE_CLIENT",
+          "HostRoles" : {
+            "cluster_name" : "mycluster",
+            "component_name" : "MAPREDUCE_CLIENT",
+            "host_name" : "dev2.hortonworks.com"
+          }
+        }
+      ]
+    },
+    {
+      
+      "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev3.hortonworks.com",
+      "Hosts" : {
+        "cpu_count" : 1,
+        "cluster_name" : "mycluster",
+        "last_registration_time" : 1352386560520,
+        "rack_info" : "/default-rack",
+        "total_mem" : 3082813,
+        "os_arch" : "x86_64",
+        "host_name" : "dev3.hortonworks.com",
+        "disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
+        "last_heartbeat_time" : 1352461939047,
+        "os_type" : "centos6",
+        "ip" : "10.0.2.15"
+      },
+      "host_components" : [
+        {
+          "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev.hortonworks.com/host_components/SECONDARY_NAMENODE",
+          "HostRoles" : {
+            "cluster_name" : "mycluster",
+            "component_name" : "SECONDARY_NAMENODE",
+            "host_name" : "dev3.hortonworks.com"
+          }
+        },
+        {
+          "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev.hortonworks.com/host_components/JOBTRACKER",
+          "HostRoles" : {
+            "cluster_name" : "mycluster",
+            "component_name" : "JOBTRACKER",
+            "host_name" : "dev3.hortonworks.com"
+          }
+        },
+        {
+          "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev.hortonworks.com/host_components/DATANODE",
+          "HostRoles" : {
+            "cluster_name" : "mycluster",
+            "component_name" : "DATANODE",
+            "host_name" : "dev3.hortonworks.com"
+          }
+        },
+        {
+          "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev.hortonworks.com/host_components/HDFS_CLIENT",
+          "HostRoles" : {
+            "cluster_name" : "mycluster",
+            "component_name" : "HDFS_CLIENT",
+            "host_name" : "dev3.hortonworks.com"
+          }
+        },
+        {
+          "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev.hortonworks.com/host_components/TASKTRACKER",
+          "HostRoles" : {
+            "cluster_name" : "mycluster",
+            "component_name" : "TASKTRACKER",
+            "host_name" : "dev3.hortonworks.com"
+          }
+        },
+        {
+          "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev.hortonworks.com/host_components/NAMENODE",
+          "HostRoles" : {
+            "cluster_name" : "mycluster",
+            "component_name" : "NAMENODE",
+            "host_name" : "dev3.hortonworks.com"
+          }
+        },
+        {
+          "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev.hortonworks.com/host_components/MAPREDUCE_CLIENT",
+          "HostRoles" : {
+            "cluster_name" : "mycluster",
+            "component_name" : "MAPREDUCE_CLIENT",
+            "host_name" : "dev3.hortonworks.com"
           }
         }
       ]

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/hosts/hosts70.json
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/hosts/hosts70.json?rev=1418957&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/hosts/hosts70.json (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/hosts/hosts70.json Sun Dec  9 13:52:32 2012
@@ -0,0 +1,756 @@
+{
+  "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts?fields=*",
+  "items" : [
+    {
+      "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev1.hortonworks.com",
+      "Hosts" : {
+        "cpu_count" : 1,
+        "cluster_name" : "mycluster",
+        "last_registration_time" : 1352386560520,
+        "rack_info" : "/default-rack",
+        "total_mem" : 3082813,
+        "os_arch" : "x86_64",
+        "host_name" : "dev1.hortonworks.com",
+        "disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
+        "last_heartbeat_time" : 1352461939047,
+        "os_type" : "centos6",
+        "ip" : "10.0.2.15"
+      },
+      "host_components" : [
+        {
+          "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev.hortonworks.com/host_components/SECONDARY_NAMENODE",
+          "HostRoles" : {
+            "cluster_name" : "mycluster",
+            "component_name" : "SECONDARY_NAMENODE",
+            "host_name" : "dev1.hortonworks.com"
+          }
+        },
+        {
+          "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev.hortonworks.com/host_components/JOBTRACKER",
+          "HostRoles" : {
+            "cluster_name" : "mycluster",
+            "component_name" : "JOBTRACKER",
+            "host_name" : "dev1.hortonworks.com"
+          }
+        },
+        {
+          "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev.hortonworks.com/host_components/DATANODE",
+          "HostRoles" : {
+            "cluster_name" : "mycluster",
+            "component_name" : "DATANODE",
+            "host_name" : "dev1.hortonworks.com"
+          }
+        },
+        {
+          "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev.hortonworks.com/host_components/HDFS_CLIENT",
+          "HostRoles" : {
+            "cluster_name" : "mycluster",
+            "component_name" : "HDFS_CLIENT",
+            "host_name" : "dev1.hortonworks.com"
+          }
+        },
+        {
+          "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev.hortonworks.com/host_components/TASKTRACKER",
+          "HostRoles" : {
+            "cluster_name" : "mycluster",
+            "component_name" : "TASKTRACKER",
+            "host_name" : "dev1.hortonworks.com"
+          }
+        },
+        {
+          "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev.hortonworks.com/host_components/NAMENODE",
+          "HostRoles" : {
+            "cluster_name" : "mycluster",
+            "component_name" : "NAMENODE",
+            "host_name" : "dev1.hortonworks.com"
+          }
+        },
+        {
+          "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev.hortonworks.com/host_components/MAPREDUCE_CLIENT",
+          "HostRoles" : {
+            "cluster_name" : "mycluster",
+            "component_name" : "MAPREDUCE_CLIENT",
+            "host_name" : "dev1.hortonworks.com"
+          }
+        }
+      ]
+    }, 
+    {
+      
+      "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev2.hortonworks.com",
+      "Hosts" : {
+        "cpu_count" : 1,
+        "cluster_name" : "mycluster",
+        "last_registration_time" : 1352386560520,
+        "rack_info" : "/default-rack",
+        "total_mem" : 3082813,
+        "os_arch" : "x86_64",
+        "host_name" : "dev2.hortonworks.com",
+        "disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
+        "last_heartbeat_time" : 1352461939047,
+        "os_type" : "centos6",
+        "ip" : "10.0.2.15"
+      },
+      "host_components" : [
+        {
+          "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev.hortonworks.com/host_components/SECONDARY_NAMENODE",
+          "HostRoles" : {
+            "cluster_name" : "mycluster",
+            "component_name" : "SECONDARY_NAMENODE",
+            "host_name" : "dev2.hortonworks.com"
+          }
+        },
+        {
+          "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev.hortonworks.com/host_components/JOBTRACKER",
+          "HostRoles" : {
+            "cluster_name" : "mycluster",
+            "component_name" : "JOBTRACKER",
+            "host_name" : "dev2.hortonworks.com"
+          }
+        },
+        {
+          "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev.hortonworks.com/host_components/DATANODE",
+          "HostRoles" : {
+            "cluster_name" : "mycluster",
+            "component_name" : "DATANODE",
+            "host_name" : "dev2.hortonworks.com"
+          }
+        },
+        {
+          "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev.hortonworks.com/host_components/HDFS_CLIENT",
+          "HostRoles" : {
+            "cluster_name" : "mycluster",
+            "component_name" : "HDFS_CLIENT",
+            "host_name" : "dev2.hortonworks.com"
+          }
+        },
+        {
+          "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev.hortonworks.com/host_components/TASKTRACKER",
+          "HostRoles" : {
+            "cluster_name" : "mycluster",
+            "component_name" : "TASKTRACKER",
+            "host_name" : "dev2.hortonworks.com"
+          }
+        },
+        {
+          "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev.hortonworks.com/host_components/NAMENODE",
+          "HostRoles" : {
+            "cluster_name" : "mycluster",
+            "component_name" : "NAMENODE",
+            "host_name" : "dev2.hortonworks.com"
+          }
+        },
+        {
+          "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev.hortonworks.com/host_components/MAPREDUCE_CLIENT",
+          "HostRoles" : {
+            "cluster_name" : "mycluster",
+            "component_name" : "MAPREDUCE_CLIENT",
+            "host_name" : "dev2.hortonworks.com"
+          }
+        }
+      ]
+    },
+    {
+      
+      "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev3.hortonworks.com",
+      "Hosts" : {
+        "cpu_count" : 1,
+        "cluster_name" : "mycluster",
+        "last_registration_time" : 1352386560520,
+        "rack_info" : "/default-rack",
+        "total_mem" : 3082813,
+        "os_arch" : "x86_64",
+        "host_name" : "dev3.hortonworks.com",
+        "disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
+        "last_heartbeat_time" : 1352461939047,
+        "os_type" : "centos6",
+        "ip" : "10.0.2.15"
+      },
+      "host_components" : [
+        {
+          "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev.hortonworks.com/host_components/SECONDARY_NAMENODE",
+          "HostRoles" : {
+            "cluster_name" : "mycluster",
+            "component_name" : "SECONDARY_NAMENODE",
+            "host_name" : "dev3.hortonworks.com"
+          }
+        },
+        {
+          "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev.hortonworks.com/host_components/JOBTRACKER",
+          "HostRoles" : {
+            "cluster_name" : "mycluster",
+            "component_name" : "JOBTRACKER",
+            "host_name" : "dev3.hortonworks.com"
+          }
+        },
+        {
+          "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev.hortonworks.com/host_components/DATANODE",
+          "HostRoles" : {
+            "cluster_name" : "mycluster",
+            "component_name" : "DATANODE",
+            "host_name" : "dev3.hortonworks.com"
+          }
+        },
+        {
+          "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev.hortonworks.com/host_components/HDFS_CLIENT",
+          "HostRoles" : {
+            "cluster_name" : "mycluster",
+            "component_name" : "HDFS_CLIENT",
+            "host_name" : "dev3.hortonworks.com"
+          }
+        },
+        {
+          "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev.hortonworks.com/host_components/TASKTRACKER",
+          "HostRoles" : {
+            "cluster_name" : "mycluster",
+            "component_name" : "TASKTRACKER",
+            "host_name" : "dev3.hortonworks.com"
+          }
+        },
+        {
+          "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev.hortonworks.com/host_components/NAMENODE",
+          "HostRoles" : {
+            "cluster_name" : "mycluster",
+            "component_name" : "NAMENODE",
+            "host_name" : "dev3.hortonworks.com"
+          }
+        },
+        {
+          "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev.hortonworks.com/host_components/MAPREDUCE_CLIENT",
+          "HostRoles" : {
+            "cluster_name" : "mycluster",
+            "component_name" : "MAPREDUCE_CLIENT",
+            "host_name" : "dev3.hortonworks.com"
+          }
+        }
+      ]
+    },
+    {
+      "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev4.hortonworks.com",
+      "Hosts" : {
+        "cpu_count" : 1,
+        "cluster_name" : "mycluster",
+        "last_registration_time" : 1352386560520,
+        "rack_info" : "/default-rack",
+        "total_mem" : 3082813,
+        "os_arch" : "x86_64",
+        "host_name" : "dev4.hortonworks.com",
+        "disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
+        "last_heartbeat_time" : 1352461939047,
+        "os_type" : "centos6",
+        "ip" : "10.0.2.15"
+      },
+      "host_components" : []
+    },
+    {
+      "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev5.hortonworks.com",
+      "Hosts" : {
+        "cpu_count" : 1,
+        "cluster_name" : "mycluster",
+        "last_registration_time" : 1352386560520,
+        "rack_info" : "/default-rack",
+        "total_mem" : 3082813,
+        "os_arch" : "x86_64",
+        "host_name" : "dev5.hortonworks.com",
+        "disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
+        "last_heartbeat_time" : 1352461939047,
+        "os_type" : "centos6",
+        "ip" : "10.0.2.15"
+      },
+      "host_components" : []
+    },
+    {
+      "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev6.hortonworks.com",
+      "Hosts" : {
+        "cpu_count" : 1,
+        "cluster_name" : "mycluster",
+        "last_registration_time" : 1352386560520,
+        "rack_info" : "/default-rack",
+        "total_mem" : 3082813,
+        "os_arch" : "x86_64",
+        "host_name" : "dev6.hortonworks.com",
+        "disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
+        "last_heartbeat_time" : 1352461939047,
+        "os_type" : "centos6",
+        "ip" : "10.0.2.15"
+      },
+      "host_components" : []
+    },
+    {
+      "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev7.hortonworks.com",
+      "Hosts" : {
+        "cpu_count" : 1,
+        "cluster_name" : "mycluster",
+        "last_registration_time" : 1352386560520,
+        "rack_info" : "/default-rack",
+        "total_mem" : 3082813,
+        "os_arch" : "x86_64",
+        "host_name" : "dev7.hortonworks.com",
+        "disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
+        "last_heartbeat_time" : 1352461939047,
+        "os_type" : "centos6",
+        "ip" : "10.0.2.15"
+      },
+      "host_components" : []
+    },
+    {
+      "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev8.hortonworks.com",
+      "Hosts" : {
+        "cpu_count" : 1,
+        "cluster_name" : "mycluster",
+        "last_registration_time" : 1352386560520,
+        "rack_info" : "/default-rack",
+        "total_mem" : 3082813,
+        "os_arch" : "x86_64",
+        "host_name" : "dev8.hortonworks.com",
+        "disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
+        "last_heartbeat_time" : 1352461939047,
+        "os_type" : "centos6",
+        "ip" : "10.0.2.15"
+      },
+      "host_components" : []
+    },
+    {
+      "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev9.hortonworks.com",
+      "Hosts" : {
+        "cpu_count" : 1,
+        "cluster_name" : "mycluster",
+        "last_registration_time" : 1352386560520,
+        "rack_info" : "/default-rack",
+        "total_mem" : 3082813,
+        "os_arch" : "x86_64",
+        "host_name" : "dev9.hortonworks.com",
+        "disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
+        "last_heartbeat_time" : 1352461939047,
+        "os_type" : "centos6",
+        "ip" : "10.0.2.15"
+      },
+      "host_components" : []
+    },
+    {
+      "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev10.hortonworks.com",
+      "Hosts" : {
+        "cpu_count" : 1,
+        "cluster_name" : "mycluster",
+        "last_registration_time" : 1352386560520,
+        "rack_info" : "/default-rack",
+        "total_mem" : 3082813,
+        "os_arch" : "x86_64",
+        "host_name" : "dev10.hortonworks.com",
+        "disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
+        "last_heartbeat_time" : 1352461939047,
+        "os_type" : "centos6",
+        "ip" : "10.0.2.15"
+      },
+      "host_components" : []
+    },
+    {
+      "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev11.hortonworks.com",
+      "Hosts" : {
+        "cpu_count" : 1,
+        "cluster_name" : "mycluster",
+        "last_registration_time" : 1352386560520,
+        "rack_info" : "/default-rack",
+        "total_mem" : 3082813,
+        "os_arch" : "x86_64",
+        "host_name" : "dev11.hortonworks.com",
+        "disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
+        "last_heartbeat_time" : 1352461939047,
+        "os_type" : "centos6",
+        "ip" : "10.0.2.15"
+      },
+      "host_components" : []
+    },
+    {
+      "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev11.hortonworks.com",
+      "Hosts" : {
+        "cpu_count" : 1,
+        "cluster_name" : "mycluster",
+        "last_registration_time" : 1352386560520,
+        "rack_info" : "/default-rack",
+        "total_mem" : 3082813,
+        "os_arch" : "x86_64",
+        "host_name" : "dev12.hortonworks.com",
+        "disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
+        "last_heartbeat_time" : 1352461939047,
+        "os_type" : "centos6",
+        "ip" : "10.0.2.15"
+      },
+      "host_components" : []
+    },
+    {
+      "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev11.hortonworks.com",
+      "Hosts" : {
+        "cpu_count" : 1,
+        "cluster_name" : "mycluster",
+        "last_registration_time" : 1352386560520,
+        "rack_info" : "/default-rack",
+        "total_mem" : 3082813,
+        "os_arch" : "x86_64",
+        "host_name" : "dev13.hortonworks.com",
+        "disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
+        "last_heartbeat_time" : 1352461939047,
+        "os_type" : "centos6",
+        "ip" : "10.0.2.15"
+      },
+      "host_components" : []
+    },
+    {
+      "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev11.hortonworks.com",
+      "Hosts" : {
+        "cpu_count" : 1,
+        "cluster_name" : "mycluster",
+        "last_registration_time" : 1352386560520,
+        "rack_info" : "/default-rack",
+        "total_mem" : 3082813,
+        "os_arch" : "x86_64",
+        "host_name" : "dev14.hortonworks.com",
+        "disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
+        "last_heartbeat_time" : 1352461939047,
+        "os_type" : "centos6",
+        "ip" : "10.0.2.15"
+      },
+      "host_components" : []
+    },
+    {
+      "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev11.hortonworks.com",
+      "Hosts" : {
+        "cpu_count" : 1,
+        "cluster_name" : "mycluster",
+        "last_registration_time" : 1352386560520,
+        "rack_info" : "/default-rack",
+        "total_mem" : 3082813,
+        "os_arch" : "x86_64",
+        "host_name" : "dev15.hortonworks.com",
+        "disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
+        "last_heartbeat_time" : 1352461939047,
+        "os_type" : "centos6",
+        "ip" : "10.0.2.15"
+      },
+      "host_components" : []
+    },
+    {
+      "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev11.hortonworks.com",
+      "Hosts" : {
+        "cpu_count" : 1,
+        "cluster_name" : "mycluster",
+        "last_registration_time" : 1352386560520,
+        "rack_info" : "/default-rack",
+        "total_mem" : 3082813,
+        "os_arch" : "x86_64",
+        "host_name" : "dev16.hortonworks.com",
+        "disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
+        "last_heartbeat_time" : 1352461939047,
+        "os_type" : "centos6",
+        "ip" : "10.0.2.15"
+      },
+      "host_components" : []
+    },
+    {
+      "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev11.hortonworks.com",
+      "Hosts" : {
+        "cpu_count" : 1,
+        "cluster_name" : "mycluster",
+        "last_registration_time" : 1352386560520,
+        "rack_info" : "/default-rack",
+        "total_mem" : 3082813,
+        "os_arch" : "x86_64",
+        "host_name" : "dev17.hortonworks.com",
+        "disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
+        "last_heartbeat_time" : 1352461939047,
+        "os_type" : "centos6",
+        "ip" : "10.0.2.15"
+      },
+      "host_components" : []
+    },
+    {
+      "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev11.hortonworks.com",
+      "Hosts" : {
+        "cpu_count" : 1,
+        "cluster_name" : "mycluster",
+        "last_registration_time" : 1352386560520,
+        "rack_info" : "/default-rack",
+        "total_mem" : 3082813,
+        "os_arch" : "x86_64",
+        "host_name" : "dev18.hortonworks.com",
+        "disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
+        "last_heartbeat_time" : 1352461939047,
+        "os_type" : "centos6",
+        "ip" : "10.0.2.15"
+      },
+      "host_components" : []
+    },
+    {
+      "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev11.hortonworks.com",
+      "Hosts" : {
+        "cpu_count" : 1,
+        "cluster_name" : "mycluster",
+        "last_registration_time" : 1352386560520,
+        "rack_info" : "/default-rack",
+        "total_mem" : 3082813,
+        "os_arch" : "x86_64",
+        "host_name" : "dev18.hortonworks.com",
+        "disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
+        "last_heartbeat_time" : 1352461939047,
+        "os_type" : "centos6",
+        "ip" : "10.0.2.15"
+      },
+      "host_components" : []
+    },
+    {
+      "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev11.hortonworks.com",
+      "Hosts" : {
+        "cpu_count" : 1,
+        "cluster_name" : "mycluster",
+        "last_registration_time" : 1352386560520,
+        "rack_info" : "/default-rack",
+        "total_mem" : 3082813,
+        "os_arch" : "x86_64",
+        "host_name" : "dev19.hortonworks.com",
+        "disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
+        "last_heartbeat_time" : 1352461939047,
+        "os_type" : "centos6",
+        "ip" : "10.0.2.15"
+      },
+      "host_components" : []
+    },
+    {
+      "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev11.hortonworks.com",
+      "Hosts" : {
+        "cpu_count" : 1,
+        "cluster_name" : "mycluster",
+        "last_registration_time" : 1352386560520,
+        "rack_info" : "/default-rack",
+        "total_mem" : 3082813,
+        "os_arch" : "x86_64",
+        "host_name" : "dev20.hortonworks.com",
+        "disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
+        "last_heartbeat_time" : 1352461939047,
+        "os_type" : "centos6",
+        "ip" : "10.0.2.15"
+      },
+      "host_components" : []
+    },
+    {
+      "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev11.hortonworks.com",
+      "Hosts" : {
+        "cpu_count" : 1,
+        "cluster_name" : "mycluster",
+        "last_registration_time" : 1352386560520,
+        "rack_info" : "/default-rack",
+        "total_mem" : 3082813,
+        "os_arch" : "x86_64",
+        "host_name" : "dev21.hortonworks.com",
+        "disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
+        "last_heartbeat_time" : 1352461939047,
+        "os_type" : "centos6",
+        "ip" : "10.0.2.15"
+      },
+      "host_components" : []
+    },
+    {
+      "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev11.hortonworks.com",
+      "Hosts" : {
+        "cpu_count" : 1,
+        "cluster_name" : "mycluster",
+        "last_registration_time" : 1352386560520,
+        "rack_info" : "/default-rack",
+        "total_mem" : 3082813,
+        "os_arch" : "x86_64",
+        "host_name" : "dev22.hortonworks.com",
+        "disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
+        "last_heartbeat_time" : 1352461939047,
+        "os_type" : "centos6",
+        "ip" : "10.0.2.15"
+      },
+      "host_components" : []
+    },
+    {
+      "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev11.hortonworks.com",
+      "Hosts" : {
+        "cpu_count" : 1,
+        "cluster_name" : "mycluster",
+        "last_registration_time" : 1352386560520,
+        "rack_info" : "/default-rack",
+        "total_mem" : 3082813,
+        "os_arch" : "x86_64",
+        "host_name" : "dev23.hortonworks.com",
+        "disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
+        "last_heartbeat_time" : 1352461939047,
+        "os_type" : "centos6",
+        "ip" : "10.0.2.15"
+      },
+      "host_components" : []
+    },
+    {
+      "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev11.hortonworks.com",
+      "Hosts" : {
+        "cpu_count" : 1,
+        "cluster_name" : "mycluster",
+        "last_registration_time" : 1352386560520,
+        "rack_info" : "/default-rack",
+        "total_mem" : 3082813,
+        "os_arch" : "x86_64",
+        "host_name" : "dev24.hortonworks.com",
+        "disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
+        "last_heartbeat_time" : 1352461939047,
+        "os_type" : "centos6",
+        "ip" : "10.0.2.15"
+      },
+      "host_components" : []
+    },
+    {
+      "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev11.hortonworks.com",
+      "Hosts" : {
+        "cpu_count" : 1,
+        "cluster_name" : "mycluster",
+        "last_registration_time" : 1352386560520,
+        "rack_info" : "/default-rack",
+        "total_mem" : 3082813,
+        "os_arch" : "x86_64",
+        "host_name" : "dev25.hortonworks.com",
+        "disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
+        "last_heartbeat_time" : 1352461939047,
+        "os_type" : "centos6",
+        "ip" : "10.0.2.15"
+      },
+      "host_components" : []
+    },
+    {
+      "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev11.hortonworks.com",
+      "Hosts" : {
+        "cpu_count" : 1,
+        "cluster_name" : "mycluster",
+        "last_registration_time" : 1352386560520,
+        "rack_info" : "/default-rack",
+        "total_mem" : 3082813,
+        "os_arch" : "x86_64",
+        "host_name" : "dev26.hortonworks.com",
+        "disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
+        "last_heartbeat_time" : 1352461939047,
+        "os_type" : "centos6",
+        "ip" : "10.0.2.15"
+      },
+      "host_components" : []
+    },
+    {
+      "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev11.hortonworks.com",
+      "Hosts" : {
+        "cpu_count" : 1,
+        "cluster_name" : "mycluster",
+        "last_registration_time" : 1352386560520,
+        "rack_info" : "/default-rack",
+        "total_mem" : 3082813,
+        "os_arch" : "x86_64",
+        "host_name" : "dev27.hortonworks.com",
+        "disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
+        "last_heartbeat_time" : 1352461939047,
+        "os_type" : "centos6",
+        "ip" : "10.0.2.15"
+      },
+      "host_components" : []
+    },
+    {
+      "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev11.hortonworks.com",
+      "Hosts" : {
+        "cpu_count" : 1,
+        "cluster_name" : "mycluster",
+        "last_registration_time" : 1352386560520,
+        "rack_info" : "/default-rack",
+        "total_mem" : 3082813,
+        "os_arch" : "x86_64",
+        "host_name" : "dev28.hortonworks.com",
+        "disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
+        "last_heartbeat_time" : 1352461939047,
+        "os_type" : "centos6",
+        "ip" : "10.0.2.15"
+      },
+      "host_components" : []
+    },
+    {
+      "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev11.hortonworks.com",
+      "Hosts" : {
+        "cpu_count" : 1,
+        "cluster_name" : "mycluster",
+        "last_registration_time" : 1352386560520,
+        "rack_info" : "/default-rack",
+        "total_mem" : 3082813,
+        "os_arch" : "x86_64",
+        "host_name" : "dev29.hortonworks.com",
+        "disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
+        "last_heartbeat_time" : 1352461939047,
+        "os_type" : "centos6",
+        "ip" : "10.0.2.15"
+      },
+      "host_components" : []
+    },
+    {
+      "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev11.hortonworks.com",
+      "Hosts" : {
+        "cpu_count" : 1,
+        "cluster_name" : "mycluster",
+        "last_registration_time" : 1352386560520,
+        "rack_info" : "/default-rack",
+        "total_mem" : 3082813,
+        "os_arch" : "x86_64",
+        "host_name" : "dev30.hortonworks.com",
+        "disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
+        "last_heartbeat_time" : 1352461939047,
+        "os_type" : "centos6",
+        "ip" : "10.0.2.15"
+      },
+      "host_components" : []
+    },
+    {
+      "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev11.hortonworks.com",
+      "Hosts" : {
+        "cpu_count" : 1,
+        "cluster_name" : "mycluster",
+        "last_registration_time" : 1352386560520,
+        "rack_info" : "/default-rack",
+        "total_mem" : 3082813,
+        "os_arch" : "x86_64",
+        "host_name" : "dev31.hortonworks.com",
+        "disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
+        "last_heartbeat_time" : 1352461939047,
+        "os_type" : "centos6",
+        "ip" : "10.0.2.15"
+      },
+      "host_components" : []
+    },
+    {
+      "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev11.hortonworks.com",
+      "Hosts" : {
+        "cpu_count" : 1,
+        "cluster_name" : "mycluster",
+        "last_registration_time" : 1352386560520,
+        "rack_info" : "/default-rack",
+        "total_mem" : 3082813,
+        "os_arch" : "x86_64",
+        "host_name" : "dev32.hortonworks.com",
+        "disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
+        "last_heartbeat_time" : 1352461939047,
+        "os_type" : "centos6",
+        "ip" : "10.0.2.15"
+      },
+      "host_components" : []
+    },
+    {
+      "href" : "http://dev.hortonworks.com:8080/api/clusters/mycluster/hosts/dev11.hortonworks.com",
+      "Hosts" : {
+        "cpu_count" : 1,
+        "cluster_name" : "mycluster",
+        "last_registration_time" : 1352386560520,
+        "rack_info" : "/default-rack",
+        "total_mem" : 3082813,
+        "os_arch" : "x86_64",
+        "host_name" : "dev33.hortonworks.com",
+        "disk_info" : "[{\"available\":\"47295056\",\"mountpoint\":\"/\",\"used\":\"3786948\",\"percent\":\"8%\",\"size\":\"51606140\",\"type\":\"ext4\"},{\"available\":\"1542800\",\"mountpoint\":\"/dev/shm\",\"used\":\"248\",\"percent\":\"1%\",\"size\":\"1543048\",\"type\":\"tmpfs\"},{\"available\":\"432210\",\"mountpoint\":\"/boot\",\"used\":\"38034\",\"percent\":\"9%\",\"size\":\"495844\",\"type\":\"ext4\"},{\"available\":\"44459872\",\"mountpoint\":\"/home\",\"used\":\"184220\",\"percent\":\"1%\",\"size\":\"47033288\",\"type\":\"ext4\"},{\"available\":\"902105496\",\"mountpoint\":\"/media/sf_ambari\",\"used\":\"74551908\",\"percent\":\"8%\",\"size\":\"976657404\",\"type\":\"vboxsf\"}]",
+        "last_heartbeat_time" : 1352461939047,
+        "os_type" : "centos6",
+        "ip" : "10.0.2.15"
+      },
+      "host_components" : []
+    }
+  ]
+}
\ No newline at end of file

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/racks/racks.json
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/racks/racks.json?rev=1418957&r1=1418956&r2=1418957&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/racks/racks.json (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/racks/racks.json Sun Dec  9 13:52:32 2012
@@ -5,48 +5,7 @@
       "href": "http://localhost:8080/api/racks/1",
       "Racks": {
         "id": 1,
-        "name": "Rack-0",
-        "hosts": ["host01", "host06", "host05"],
-        "status": "LIVE",
-        "live_hosts_count": 5,
-        "critical_hosts_count": 0,
-        "dead_hosts_count": 2
-      }
-    },
-    {
-      "href": "http://localhost:8080/api/racks/2",
-      "Racks": {
-        "id": 2,
-        "name": "Rack-0",
-        "hosts": ["host02", "host02", "host04"],
-        "status": "LIVE",
-        "live_hosts_count": 5,
-        "critical_hosts_count": 0,
-        "dead_hosts_count": 2
-      }
-    },
-    {
-      "href": "http://localhost:8080/api/racks/3",
-      "Racks": {
-        "id": 3,
-        "name": "Rack-0",
-        "hosts": ["host05", "host01", "host02"],
-        "status": "LIVE",
-        "live_hosts_count": 5,
-        "critical_hosts_count": 0,
-        "dead_hosts_count": 2
-      }
-    },
-    {
-      "href": "http://localhost:8080/api/racks/4",
-      "Racks": {
-        "id": 4,
-        "name": "Rack-0",
-        "hosts": ["host01", "host06", "host05"],
-        "status": "LIVE",
-        "live_hosts_count": 5,
-        "critical_hosts_count": 0,
-        "dead_hosts_count": 2
+        "name": "Default Rack"
       }
     }
   ]

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers.js?rev=1418957&r1=1418956&r2=1418957&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers.js Sun Dec  9 13:52:32 2012
@@ -44,9 +44,12 @@ require('controllers/main/host/details')
 require('controllers/main/host/add_controller');
 require('controllers/main/dashboard');
 require('controllers/main/charts');
+require('controllers/main/charts/heatmap_metrics/heatmap_metric');
+require('controllers/main/charts/heatmap_metrics/heatmap_metric_processrun');
+require('controllers/main/charts/heatmap_metrics/heatmap_metric_diskspaceused');
+require('controllers/main/charts/heatmap_metrics/heatmap_metric_memoryfree');
 require('controllers/main/charts/heatmap');
 require('controllers/main/charts/horizon_chart');
-require('controllers/main/charts/horizon_chart');
 require('controllers/main/rack');
 require('controllers/main/apps_controller');
 require('controllers/main/apps/item_controller');

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts/heatmap.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts/heatmap.js?rev=1418957&r1=1418956&r2=1418957&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts/heatmap.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts/heatmap.js Sun Dec  9 13:52:32 2012
@@ -1,46 +1,64 @@
 /**
- * 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
- *
+ * 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.
+ * 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');
 
 App.MainChartsHeatmapController = Em.Controller.extend({
-  name:'mainChartsHeatmapController',
+  name: 'mainChartsHeatmapController',
   cluster: App.Cluster.find(1),
+  allMetrics: [ Em.Object.create({
+    label: Em.I18n.t('charts.heatmap.category.host'),
+    category: 'host',
+    items: [ App.MainChartHeatmapProcessRunMetric.create(), App.MainChartHeatmapDiskSpaceUsedMetric.create(), App.MainChartHeatmapMemoryFreeMetric.create() ]
+  }) ],
+
+  selectedMetric: null,
+
+  showHeatMapMetric: function (event) {
+    var metricItem = event.context;
+    if (metricItem) {
+      this.set('selectedMetric', metricItem);
+    }
+  },
+
+  hostToSlotMap: function () {
+    return this.get('selectedMetric.hostToSlotMap');
+  }.property('selectedMetric.hostToSlotMap'),
+
+  loadMetrics: function () {
+    var selectedMetric = this.get('selectedMetric');
+    if (selectedMetric) {
+      selectedMetric.refreshHostSlots();
+    }
+  }.observes('selectedMetric'),
 
   /**
-   * return class name for build rack visual schema
+   * return class name for to be used for containing each rack.
+   * 
    * @this App.MainChartsHeatmapController
    */
-  visualSchema: function() {
-    var maxHostsPerRack = this.get('cluster.maxHostsPerRack');
-    switch(maxHostsPerRack) {
-      case 10:
-        return 'rack-5-2'
-      case 20:
-        return 'rack-5-4'
-      case 30:
-        return 'rack-5-6'
-      case 40:
-        return 'rack-5-8'
-      case 50:
-        return 'rack-5-10'
-      default:
-        return 'rack-5-10'
+  rackClass: function () {
+    var rackCount = this.get('cluster.racks.length');
+    if (rackCount < 2) {
+      return "span12";
+    } else if (rackCount == 2) {
+      return "span6";
+    } else {
+      return "span4";
     }
   }.property('cluster')
 })
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts/heatmap_metrics/heatmap_metric.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts/heatmap_metrics/heatmap_metric.js?rev=1418957&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts/heatmap_metrics/heatmap_metric.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts/heatmap_metrics/heatmap_metric.js Sun Dec  9 13:52:32 2012
@@ -0,0 +1,212 @@
+/**
+ * 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');
+
+/**
+ * Base class for any heatmap metric.
+ * 
+ * This class basically provides the following for each heatmap metric.
+ * <ul>
+ * <li> Provides number of slots in which temperature can fall.
+ * <li> Maintains the maximum value so as to scale slot ranges.
+ * <li> Gets JSON data from server and maps response for all hosts into above
+ * slots.
+ * </ul>
+ * 
+ */
+App.MainChartHeatmapMetric = Em.Object.extend({
+  /**
+   * Name of this metric
+   */
+  name: null,
+
+  /**
+   * Number of slots this metric will be mapped into.
+   */
+  numberOfSlots: 5,
+
+  /**
+   * Minimum value of this metric. Default is 0.
+   */
+  minimumValue: 0,
+
+  /**
+   * Maximum value of this metric. This has to be specified by extending classes
+   * so that the range from 'minimumValue' to 'maximumValue' can be split among
+   * 'numberOfSlots'. It is recommended that this value be a multiple of
+   * 'numberOfSlots'.
+   */
+  maximumValue: 100,
+  
+  /**
+   * Units of the maximum value which is shown in UI
+   * {String}
+   */
+  units: '',
+
+  /**
+   * Provides following information about slots in an array of objects.
+   * <ul>
+   * <li> from: {number} Slot starts from this value
+   * <li> to: {number} Slot ends at this value (inclusive)
+   * <li> label: {String} Slot name to be shown
+   * <li> cssStyle: {String} style to be embedded on hosts which fall into this slot.
+   * </ul>
+   * 
+   * Slot count will be the same as specified in 'numberOfSlots'. Slot
+   * definitions will be given in increasing temperature from 'minimumValue' to
+   * 'maximumValue'.
+   * 
+   */
+  slotDefinitions: function () {
+    var min = this.get('minimumValue');
+    var max = this.get('maximumValue');
+    var slotCount = this.get('numberOfSlots');
+    var labelSuffix = this.get('slotDefinitionLabelSuffix');
+    var delta = (max - min) / slotCount;
+    var defs = [];
+    var fractions = max < 5;
+    var red = 0;
+    var green = 255;
+    for ( var c = 0; c < slotCount - 1; c++) {
+      var from = this.formatLegendNumber(c * delta);
+      var to = this.formatLegendNumber((c + 1) * delta);
+      var label = from + labelSuffix + " - " + to + labelSuffix
+      defs.push(Em.Object.create({
+        from: from,
+        to: to,
+        label: label,
+        cssStyle: "background-color:rgb(" + red + "," + green + ",0)"
+      }));
+      red += 51;
+      green -= 51;
+    }
+    var from = this.formatLegendNumber((slotCount - 1) * delta);
+    var to = this.formatLegendNumber(max);
+    var label = from + labelSuffix + " - " + to + labelSuffix
+    defs.push(Em.Object.create({
+      from: from,
+      to: to,
+      label: label,
+      cssStyle: "background-color:rgb(" + red + "," + green + ",0)"
+    }));
+    return defs;
+  }.property('minimumValue', 'maximumValue', 'numberOfSlots'),
+
+  /**
+   * In slot definitions this value is used to construct the label by appending
+   * it to slot min-max values. For example giving '%' here would result in slot
+   * definition label being '0% - 10%'.
+   */
+  slotDefinitionLabelSuffix: '',
+
+  /**
+   * URL from which data for this metric can be gotten from. This should be
+   * extended by classes to provide correct value.
+   */
+  metricUrl: function () {
+    var clusterName = App.router.get('clusterController.clusterName');
+    var fixedMetricName = this.get('defaultMetric');
+    fixedMetricName = fixedMetricName.replace(/\./g, "/");
+    return App.formatUrl("/api/clusters/{clusterName}/hosts?fields={metricName}", {
+      clusterName: App.router.get('clusterController.clusterName'),
+      metricName: fixedMetricName
+    }, "/data/cluster_metrics/cpu_1hr.json");
+  }.property('App.router.clusterController.clusterName', 'defaultMetric'),
+
+  defaultMetric: '',
+
+  /**
+   * Maps server JSON into an object where keys are hostnames and values are the
+   * true metric values. This function by default will map 'defaultMetric' into
+   * its corresponding value.
+   * 
+   * @type Function
+   */
+  metricMapper: function (json) {
+    var hostToValueMap = {};
+    var metricName = this.get('defaultMetric');
+    if (json.items) {
+      var props = metricName.split('.');
+      json.items.forEach(function (item) {
+        var value = item;
+        props.forEach(function (prop) {
+          value = value[prop];
+        });
+        var hostName = item.Hosts.host_name;
+        hostToValueMap[hostName] = value;
+      });
+    }
+    return hostToValueMap;
+  },
+
+  hostToValueMap: null,
+  
+  hostToSlotMap: function(){
+    var hostToValueMap = this.get('hostToValueMap');
+    var slotDefs = this.get('slotDefinitions');
+    var hostToSlotMap = {}
+    for (key in hostToValueMap) {
+      var value = hostToValueMap[key];
+      var slot = -1;
+      for ( var slotIndex = 0; slotIndex < slotDefs.length; slotIndex++) {
+        var slotDef = slotDefs[slotIndex];
+        if (value >= slotDef.from && value <= slotDef.to) {
+          slot = slotIndex;
+        }
+      }
+      if (slot < 0) {
+        slot = slotDefs.length - 1;
+      }
+      if (slot > -1) {
+        hostToSlotMap[key] = slot;
+      }
+    }
+    return hostToSlotMap;
+  }.property('hostToValueMap', 'slotDefinitions'),
+
+  /**
+   * Determines which slot each host falls into. This information is given to
+   * the callback's #map(hostnameToSlotObject) method. The
+   * 'hostnameToSlotObject' has key as hostname, and the slot index as value.
+   */
+  refreshHostSlots: function () {
+    jQuery.ajax({
+      url: this.get('metricUrl'),
+      dataType: 'json',
+      success: jQuery.proxy(function (data) {
+        var hostToValueMap = this.metricMapper(data);
+        this.set('hostToValueMap', hostToValueMap);
+      }, this)
+    });
+  }.observes('slotDefinitions'),
+
+  /**
+   * Turns numbers into displayable values. For example 24.345432425 into 24.3
+   * etc.
+   * 
+   * @private
+   */
+  formatLegendNumber: function (num) {
+    var fraction = num % 1;
+    if (fraction > 0) {
+      return num.toFixed(1);
+    }
+    return num;
+  }
+})
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts/heatmap_metrics/heatmap_metric_diskspaceused.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts/heatmap_metrics/heatmap_metric_diskspaceused.js?rev=1418957&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts/heatmap_metrics/heatmap_metric_diskspaceused.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts/heatmap_metrics/heatmap_metric_diskspaceused.js Sun Dec  9 13:52:32 2012
@@ -0,0 +1,59 @@
+/**
+ * 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');
+
+/**
+ * Base class for any heatmap metric.
+ * 
+ * This class basically provides the following for each heatmap metric.
+ * <ul>
+ * <li> Provides number of slots in which temperature can fall.
+ * <li> Maintains the maximum value so as to scale slot ranges.
+ * <li> Gets JSON data from server and maps response for all hosts into above
+ * slots.
+ * </ul>
+ * 
+ */
+App.MainChartHeatmapDiskSpaceUsedMetric = App.MainChartHeatmapMetric.extend({
+  name: 'Disk Space Used %',
+  maximumValue: 100,
+  defaultMetric: 'metrics.disk',
+  units: '%',
+  slotDefinitionLabelSuffix: '%',
+  metricMapper: function (json) {
+    var hostToValueMap = {};
+    var metricName = this.get('defaultMetric');
+    if (json.items) {
+      var props = metricName.split('.');
+      json.items.forEach(function (item) {
+        var value = item;
+        props.forEach(function (prop) {
+          value = value[prop];
+        });
+        
+        var total = value.disk_total;
+        var free = value.disk_free;
+        value = (((total-free)*100)/total).toFixed(1);
+        
+        var hostName = item.Hosts.host_name;
+        hostToValueMap[hostName] = value;
+      });
+    }
+    return hostToValueMap;
+  }
+})
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts/heatmap_metrics/heatmap_metric_memoryfree.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts/heatmap_metrics/heatmap_metric_memoryfree.js?rev=1418957&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts/heatmap_metrics/heatmap_metric_memoryfree.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts/heatmap_metrics/heatmap_metric_memoryfree.js Sun Dec  9 13:52:32 2012
@@ -0,0 +1,59 @@
+/**
+ * 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');
+
+/**
+ * Base class for any heatmap metric.
+ * 
+ * This class basically provides the following for each heatmap metric.
+ * <ul>
+ * <li> Provides number of slots in which temperature can fall.
+ * <li> Maintains the maximum value so as to scale slot ranges.
+ * <li> Gets JSON data from server and maps response for all hosts into above
+ * slots.
+ * </ul>
+ * 
+ */
+App.MainChartHeatmapMemoryFreeMetric = App.MainChartHeatmapMetric.extend({
+  name: 'Memory Free %',
+  maximumValue: 100,
+  defaultMetric: 'metrics.memory',
+  units: '%',
+  slotDefinitionLabelSuffix: '%',
+  metricMapper: function (json) {
+    var hostToValueMap = {};
+    var metricName = this.get('defaultMetric');
+    if (json.items) {
+      var props = metricName.split('.');
+      json.items.forEach(function (item) {
+        var value = item;
+        props.forEach(function (prop) {
+          value = value[prop];
+        });
+
+        var total = value.mem_total;
+        var free = value.mem_free;
+        value = ((free * 100) / total).toFixed(1);
+
+        var hostName = item.Hosts.host_name;
+        hostToValueMap[hostName] = value;
+      });
+    }
+    return hostToValueMap;
+  }
+})
\ No newline at end of file

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts/heatmap_metrics/heatmap_metric_processrun.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts/heatmap_metrics/heatmap_metric_processrun.js?rev=1418957&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts/heatmap_metrics/heatmap_metric_processrun.js (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/charts/heatmap_metrics/heatmap_metric_processrun.js Sun Dec  9 13:52:32 2012
@@ -0,0 +1,37 @@
+/**
+ * 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');
+
+/**
+ * Base class for any heatmap metric.
+ * 
+ * This class basically provides the following for each heatmap metric.
+ * <ul>
+ * <li> Provides number of slots in which temperature can fall.
+ * <li> Maintains the maximum value so as to scale slot ranges.
+ * <li> Gets JSON data from server and maps response for all hosts into above
+ * slots.
+ * </ul>
+ * 
+ */
+App.MainChartHeatmapProcessRunMetric = App.MainChartHeatmapMetric.extend({
+  name: 'Total Running Processes',
+  maximumValue: 1,
+  defaultMetric: 'metrics.process.proc_run',
+  units: 'Processes'
+})
\ No newline at end of file

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/cluster_mapper.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/cluster_mapper.js?rev=1418957&r1=1418956&r2=1418957&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/cluster_mapper.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/cluster_mapper.js Sun Dec  9 13:52:32 2012
@@ -32,8 +32,8 @@ App.clusterMapper = App.QuickDataMapper.
       cluster_name: 'Clusters.cluster_name',
       stack_name: 'Clusters.stack_name',
       version: 'Clusters.version',
-      $hosts: [1, 2, 3, 4],
-      $racks: [1,2,3,4],
+      //$hosts: [1, 2, 3, 4],
+      $racks: [1],
       max_hosts_per_rack: 'Clusters.max_hosts_per_rack'
     }
 

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/hosts_mapper.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/hosts_mapper.js?rev=1418957&r1=1418956&r2=1418957&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/hosts_mapper.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/hosts_mapper.js Sun Dec  9 13:52:32 2012
@@ -37,7 +37,7 @@ App.hostsMapper = App.QuickDataMapper.cr
     memory : 'Hosts.total_mem',
     disk_info: 'Hosts.disk_info',
     $disk_usage: '-',
-    $health_status: 'LIVE',
+    health_status: 'Hosts.host_status',
     $load_avg: '-',
     $cpu_usage: 33,
     $memory_usage: 26,



Mime
View raw message