Bläddra i källkod

AMBARI-1022. Integrate Heatmap UI to backend API. (Srimanth Gunturi via yusaku)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/branches/AMBARI-666@1418957 13f79535-47bb-0310-9956-ffa450edef68
Yusaku Sako 12 år sedan
förälder
incheckning
d1ad27f934
25 ändrade filer med 1535 tillägg och 136 borttagningar
  1. 3 0
      AMBARI-666-CHANGES.txt
  2. 159 9
      ambari-web/app/assets/data/hosts/hosts.json
  3. 756 0
      ambari-web/app/assets/data/hosts/hosts70.json
  4. 1 42
      ambari-web/app/assets/data/racks/racks.json
  5. 4 1
      ambari-web/app/controllers.js
  6. 49 31
      ambari-web/app/controllers/main/charts/heatmap.js
  7. 212 0
      ambari-web/app/controllers/main/charts/heatmap_metrics/heatmap_metric.js
  8. 59 0
      ambari-web/app/controllers/main/charts/heatmap_metrics/heatmap_metric_diskspaceused.js
  9. 59 0
      ambari-web/app/controllers/main/charts/heatmap_metrics/heatmap_metric_memoryfree.js
  10. 37 0
      ambari-web/app/controllers/main/charts/heatmap_metrics/heatmap_metric_processrun.js
  11. 2 2
      ambari-web/app/mappers/cluster_mapper.js
  12. 1 1
      ambari-web/app/mappers/hosts_mapper.js
  13. 19 20
      ambari-web/app/mappers/racks_mapper.js
  14. 5 0
      ambari-web/app/messages.js
  15. 13 3
      ambari-web/app/models/rack.js
  16. 31 9
      ambari-web/app/styles/application.less
  17. 0 3
      ambari-web/app/templates/main/charts.hbs
  18. 56 4
      ambari-web/app/templates/main/charts/heatmap.hbs
  19. 1 1
      ambari-web/app/templates/main/charts/heatmap/heatmap_host.hbs
  20. 6 1
      ambari-web/app/templates/main/charts/heatmap/heatmap_host_detail.hbs
  21. 3 1
      ambari-web/app/templates/main/charts/heatmap/heatmap_rack.hbs
  22. 5 1
      ambari-web/app/views/main/charts/heatmap.js
  23. 32 5
      ambari-web/app/views/main/charts/heatmap/heatmap_host.js
  24. 5 1
      ambari-web/app/views/main/charts/heatmap/heatmap_host_detail.js
  25. 17 1
      ambari-web/app/views/main/charts/heatmap/heatmap_rack.js

+ 3 - 0
AMBARI-666-CHANGES.txt

@@ -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)
 

+ 159 - 9
ambari-web/app/assets/data/hosts/hosts.json

@@ -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"
           }
         }
       ]

+ 756 - 0
ambari-web/app/assets/data/hosts/hosts70.json

@@ -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" : []
+    }
+  ]
+}

+ 1 - 42
ambari-web/app/assets/data/racks/racks.json

@@ -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"
       }
     }
   ]

+ 4 - 1
ambari-web/app/controllers.js

@@ -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');

+ 49 - 31
ambari-web/app/controllers/main/charts/heatmap.js

@@ -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')
 })

+ 212 - 0
ambari-web/app/controllers/main/charts/heatmap_metrics/heatmap_metric.js

@@ -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;
+  }
+})

+ 59 - 0
ambari-web/app/controllers/main/charts/heatmap_metrics/heatmap_metric_diskspaceused.js

@@ -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;
+  }
+})

+ 59 - 0
ambari-web/app/controllers/main/charts/heatmap_metrics/heatmap_metric_memoryfree.js

@@ -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;
+  }
+})

+ 37 - 0
ambari-web/app/controllers/main/charts/heatmap_metrics/heatmap_metric_processrun.js

@@ -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'
+})

+ 2 - 2
ambari-web/app/mappers/cluster_mapper.js

@@ -32,8 +32,8 @@ App.clusterMapper = App.QuickDataMapper.create({
       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'
     }
 

+ 1 - 1
ambari-web/app/mappers/hosts_mapper.js

@@ -37,7 +37,7 @@ App.hostsMapper = App.QuickDataMapper.create({
     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,

+ 19 - 20
ambari-web/app/mappers/racks_mapper.js

@@ -1,19 +1,18 @@
 /**
- * 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.
  */
 
 
@@ -21,11 +20,11 @@ App.racksMapper = App.QuickDataMapper.create({
   model: App.Rack,
   config: {
     id: "Racks.id",
-    name: "Racks.name",
-    $hosts: ["host01", "host06", "host05"],
-    status: "Racks.status",
-    live_hosts_count: "Racks.live_hosts_count",
-    critical_hosts_count: "Racks.critical_hosts_count",
-    dead_hosts_count: "Racks.dead_hosts_count"
+    name: "Racks.name"
+    //$hosts: ["host01", "host06", "host05"],
+    //status: "Racks.status",
+    //live_hosts_count: "Racks.live_hosts_count",
+    //critical_hosts_count: "Racks.critical_hosts_count",
+    //dead_hosts_count: "Racks.dead_hosts_count"
   }
 });

+ 5 - 0
ambari-web/app/messages.js

@@ -261,6 +261,11 @@ Em.I18n.translations = {
   'charts.horizon.chart.attributes.memory':'Memory',
   'charts.horizon.chart.attributes.network':'Network',
   'charts.horizon.chart.attributes.io':'I/O',
+  
+  'charts.heatmap.category.host':'Host',
+  'charts.heatmap.item.host.memory':'Memory Free',
+  'charts.heatmap.item.host.disk':'Disk Space Used',
+  'charts.heatmap.item.host.process':'Total Running Processes',
 
   'metric.default':'combined',
   'metric.cpu':'cpu',

+ 13 - 3
ambari-web/app/models/rack.js

@@ -21,11 +21,21 @@ var App = require('app');
 
 App.Rack = DS.Model.extend({
   name: DS.attr('string'),
-  hosts: DS.hasMany('App.Host'),
   status: DS.attr('string'),
-  liveHostsCount: DS.attr('number'),
   criticalHostsCount: DS.attr('number'),
-  deadHostsCount: DS.attr('number')
+  deadHostsCount: DS.attr('number'),
+  hosts: function(){
+    return App.Host.find();
+  }.property('name'),
+  liveHostsCount: function(){
+    var count = 0;
+    this.get('hosts').forEach(function(host){
+      if(host.get('healthStatus')=="HEALTHY"){
+        count++;
+      }
+    });
+    return count;
+  }.property('hosts')
 });
 
 App.Rack.FIXTURES = [

+ 31 - 9
ambari-web/app/styles/application.less

@@ -1210,7 +1210,7 @@ ul.filter {
 
 /*start charts rack*/
 .rack {
-  width: 224px;
+  width: 98%;
   display: inline-block;
   vertical-align: top;
   border: 1px solid #D4D4D4;
@@ -1320,23 +1320,23 @@ ul.filter {
 
     .ember-view {
       float: left;
-      width: 43px;
+      width: 100%;
       height: 43px;
 
       .hostBlock {
-        margin: 4px;
-        width: 35px;
-        height: 35px;
+        height: 38px;
         position: relative;
+        border: 1px solid #D4D4D4;
+        margin-right: 3px;
       }
     }
     .hostBlock {
       border-radius: 4px;
     }
-    .hostBlock.LIVE {
+    .hostBlock.HEALTHY {
       background-color: #87BE73;
     }
-    .hostBlock.DEAD {
+    .hostBlock.UNHEALTHY {
       background-color: #E40024;
     }
     .hostBlock.CRITICAL {
@@ -1395,12 +1395,34 @@ ul.filter {
     line-height: 1.6em;
     border: 1px solid #D9D9D9;
     background: #f9f9f9;
-    width: 100px;
-    height: 100px;
+    width: 280px;
+    height: 170px;
     padding: 10px 10px;
     position: absolute;
     z-index: 1000;
   }
+  .container-fluid{
+    padding: 0px;
+  }
+  .row-fluid [class*="span"]{
+    margin-left: 0px;
+  }
+  .legend{
+    margin-top: 20px;
+    margin-bottom: 20px;
+    .tile{
+      width: 50px;
+      height: 1em;
+      padding: 4px;
+      border: 1px solid #D4D4D4;
+      border-radius: 5px;
+      margin-right: 10px;
+    }
+  }
+  
+  h4{
+    color: #777;
+  }
 }
 
 /*End Heatmap*/

+ 0 - 3
ambari-web/app/templates/main/charts.hbs

@@ -16,7 +16,4 @@
 * limitations under the License.
 }}
 
-{{view App.MetricFilteringWidget controllerBinding="App.router.mainChartsController"}}
-{{view App.TimeRangeWidget controllerBinding="App.router.mainChartsController"}}
-{{view App.MainChartsMenuView}}
 {{outlet}}

+ 56 - 4
ambari-web/app/templates/main/charts/heatmap.hbs

@@ -17,8 +17,60 @@
 }}
 
 <div class="heatmap">
-  {{#each rack in controller.cluster.racks}}
-    {{view App.MainChartsHeatmapRackView rackBinding="rack" visualSchemaBinding="controller.visualSchema"}}
-  {{/each}}
-  {{view App.MainChartsHeatmapHostDetailView}}
+
+  <div class="container-fluid">
+	  <div class="row-fluid">
+	    <div class="span2">
+		     <div class="btn-group">
+				  <button class="btn">Select Metric...</button>
+				  <button class="btn dropdown-toggle" data-toggle="dropdown">
+				    <span class="caret"></span>
+				  </button>
+				  <ul class="dropdown-menu">
+				    {{#each category in controller.allMetrics}}
+               <li class="dropdown-submenu">
+                <a tabindex="-1" href="#">{{category.label}}</a>
+                <ul class="dropdown-menu">
+                  {{#each metric in category.items}}
+                    <li>
+                      <a tabindex="-1" {{action showHeatMapMetric metric target="controller"}}>{{metric.name}}</a>
+                    </li>
+                  {{/each}}
+                </ul>
+               </li>
+            {{/each}}
+				  </ul>
+				</div>
+        {{#if controller.selectedMetric}}
+					<table class="legend">
+					  {{#each slot in controller.selectedMetric.slotDefinitions}}
+					    <tr>
+					      <td>
+					        <div class="tile" {{bindAttr style="slot.cssStyle"}}></div>
+					      </td>
+					      <td>{{slot.label}}</td>
+					    </tr>
+					  {{/each}}
+					</table>
+	        Maximum:
+	        <div>
+	          {{view Ember.TextField type="text" valueBinding="controller.selectedMetric.maximumValue" class="span6"}}
+	          {{controller.selectedMetric.units}}
+	        </div>
+        {{/if}}
+	    </div>
+	    <div class="span10">
+	      <h4>{{controller.selectedMetric.name}}</h4>
+	      <div class="row-fluid">
+				  {{#each rack in controller.cluster.racks}}
+				    <div {{bindAttr class="controller.rackClass"}}>
+				      {{view App.MainChartsHeatmapRackView rackBinding="rack" }}
+				    </div>
+				  {{/each}}
+			  </div>
+			  {{view App.MainChartsHeatmapHostDetailView}}
+	    </div>
+	  </div>
+  </div>
+
 </div>

+ 1 - 1
ambari-web/app/templates/main/charts/heatmap/heatmap_host.hbs

@@ -16,4 +16,4 @@
 * limitations under the License.
 }}
 
-<div {{bindAttr class="view.content.healthStatus view.hostClass"}}></div>
+<div {{bindAttr class="view.content.healthStatus view.hostClass"}} {{bindAttr style="view.hostTemperatureStyle"}}></div>

+ 6 - 1
ambari-web/app/templates/main/charts/heatmap/heatmap_host_detail.hbs

@@ -16,7 +16,12 @@
 * limitations under the License.
 }}
 
-<h6>{{view.details.name}}</h6>
+<b>{{view.details.hostName}}</b><br/>
+OS: {{view.details.osType}}<br/>
+IP: {{view.details.ip}}<br/>
+{{#if view.details.metricName}}
+{{view.details.metricName}}: {{view.details.metricValue}}<br/>
+{{/if}}
 CPU: {{view.details.cpuUsage}}%<br/>
 Memory: {{view.details.memoryUsage}}%<br/>
 Network: {{view.details.networkUsage}}%<br/>

+ 3 - 1
ambari-web/app/templates/main/charts/heatmap/heatmap_rack.hbs

@@ -44,6 +44,8 @@
 <!--</div>-->
 <div {{bindAttr class="view.heatmapTogglerClass view.hostsBlockClass"}}>
   {{#each rack.hosts}}
-    {{view App.MainChartsHeatmapHostView contentBinding="this"}}
+    <div {{bindAttr style="view.hostCssStyle"}}>
+      {{view App.MainChartsHeatmapHostView contentBinding="this"}}
+    </div>
   {{/each}}
 </div>

+ 5 - 1
ambari-web/app/views/main/charts/heatmap.js

@@ -19,5 +19,9 @@
 var App = require('app');
 
 App.MainChartsHeatmapView = Em.View.extend({
-    templateName: require('templates/main/charts/heatmap')
+    templateName: require('templates/main/charts/heatmap'),
+    didInsertElement: function(){
+      this._super();
+      $("#heatmapDetailsBlock").hide();
+    }
 });

+ 32 - 5
ambari-web/app/views/main/charts/heatmap/heatmap_host.js

@@ -33,10 +33,19 @@ App.MainChartsHeatmapHostView = Em.View.extend({
     $.each(view.get('details'), function (i) {
       view.set('details.' + i, host.get(i));
     });
-    $("#heatmapDetailsBlock").css('top', e.pageY + 10);
-    $("#heatmapDetailsBlock").css('left', e.pageX + 10);
-
-    $("#heatmapDetailsBlock").show();
+    var selectedMetric = this.get('controller.selectedMetric');
+    if(selectedMetric){
+      var metricName = selectedMetric.get('name');
+      var h2vMap = selectedMetric.get('hostToValueMap');
+      if(h2vMap && metricName){
+        view.set('details.metricName', metricName);
+        view.set('details.metricValue', h2vMap[host.get('hostName')]+selectedMetric.get('units'));
+      }
+    }
+    var detailsBlock = $("#heatmapDetailsBlock");
+    detailsBlock.css('top', e.pageY + 10);
+    detailsBlock.css('left', e.pageX + 10);
+    detailsBlock.show();
   },
 
   /**
@@ -46,5 +55,23 @@ App.MainChartsHeatmapHostView = Em.View.extend({
    */
   mouseLeave:function (e) {
     $("#heatmapDetailsBlock").hide();
-  }
+  },
+  
+  hostTemperatureStyle: function(){
+    var controller = this.get('controller');
+    var h2sMap = controller.get('hostToSlotMap');
+    if(h2sMap){
+      var hostname = this.get('content.hostName');
+      if(hostname){
+        var slot = h2sMap[hostname];
+        if(slot>-1){
+          var slotDefs = controller.get('selectedMetric.slotDefinitions');
+          if(slotDefs && slotDefs.length>slot){
+            return slotDefs[slot].get('cssStyle');
+          }
+        }
+      }
+    }
+    return '';
+  }.property('controller.hostToSlotMap')
 });

+ 5 - 1
ambari-web/app/views/main/charts/heatmap/heatmap_host_detail.js

@@ -20,10 +20,14 @@ var App = require('app');
 
 App.MainChartsHeatmapHostDetailView = Em.View.extend({
   templateName: require('templates/main/charts/heatmap/heatmap_host_detail'),
-  /** @private */ classNames:['heatmap_host_details', 'hide'],
+  /** @private */ classNames:['heatmap_host_details'],
   /** @private */ elementId:'heatmapDetailsBlock',
   /** @private */ details:{
     hostName:'test node',
+    osType: 'OS',
+    ip: '192.168.0.0',
+    metricName: 'metric-name',
+    metricValue: 'metric-value',
     cpuUsage: '10',
     memoryUsage: '10',
     networkUsage: '30',

+ 17 - 1
ambari-web/app/views/main/charts/heatmap/heatmap_rack.js

@@ -46,5 +46,21 @@ App.MainChartsHeatmapRackView = Em.View.extend({
       return "isActive"
     }
     return "";
-  }.property("heatmapIsOpened")
+  }.property("heatmapIsOpened"),
+  
+  /**
+   * Provides the CSS style for an individual host.
+   * This can be used as the 'style' attribute of element.
+   */
+  hostCssStyle: function(){
+    var rack = this.get('rack');
+    var widthPercent = 100;
+    var hostCount = rack.get('hosts.length');
+    if(hostCount<11){
+      widthPercent = (100/hostCount)-0.5;
+    }else{
+      widthPercent = 10; // max out at 10%
+    }
+    return "width:"+widthPercent+"%;float:left;";
+  }.property('rack')
 });