You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by vi...@apache.org on 2012/06/07 03:41:52 UTC
svn commit: r1347278 - in /incubator/ambari/branches/ambari-186: ./ hmc/css/
hmc/html/ hmc/js/ hmc/puppet/modules/
hmc/puppet/modules/hdp-ganglia/manifests/
hmc/puppet/modules/hdp-hadoop/manifests/
hmc/puppet/modules/hdp-hbase/manifests/ hmc/puppet/mod...
Author: vikram
Date: Thu Jun 7 01:41:52 2012
New Revision: 1347278
URL: http://svn.apache.org/viewvc?rev=1347278&view=rev
Log:
AMBARI-463. Redesign cluster management pages and navigation (Contributed by Yusaku)
Added:
incubator/ambari/branches/ambari-186/hmc/html/subnav.htmli
Modified:
incubator/ambari/branches/ambari-186/CHANGES.txt
incubator/ambari/branches/ambari-186/hmc/css/clusters.css
incubator/ambari/branches/ambari-186/hmc/css/common.css
incubator/ambari/branches/ambari-186/hmc/css/manageServices.css
incubator/ambari/branches/ambari-186/hmc/html/addNodesWizard.php
incubator/ambari/branches/ambari-186/hmc/html/index.php
incubator/ambari/branches/ambari-186/hmc/html/manageServices.php
incubator/ambari/branches/ambari-186/hmc/html/uninstallWizard.php
incubator/ambari/branches/ambari-186/hmc/js/clustersList.js
incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-ganglia/manifests/monitor.pp
incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hadoop/manifests/client.pp
incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hadoop/manifests/init.pp
incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hbase/manifests/init.pp
incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hive/manifests/service.pp
incubator/ambari/branches/ambari-186/hmc/puppet/modules/puppetApply.sh
Modified: incubator/ambari/branches/ambari-186/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/CHANGES.txt?rev=1347278&r1=1347277&r2=1347278&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/CHANGES.txt (original)
+++ incubator/ambari/branches/ambari-186/CHANGES.txt Thu Jun 7 01:41:52 2012
@@ -6,6 +6,10 @@ characters wide.
Release 0.1.x - unreleased
+ AMBARI-463. Redesign cluster management pages and navigation (Yusaku via Vikram)
+
+ AMBARI-462. when hive is being stopped, it stops the hive nagios checks (Ramya via Vikram)
+
AMBARI-460. Ganglia shows four hosts on a single node installation (Suhas via Vikram)
AMBARI-459. Race conditions in fetch transaction progress (Vikram)
Modified: incubator/ambari/branches/ambari-186/hmc/css/clusters.css
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/css/clusters.css?rev=1347278&r1=1347277&r2=1347278&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/css/clusters.css (original)
+++ incubator/ambari/branches/ambari-186/hmc/css/clusters.css Thu Jun 7 01:41:52 2012
@@ -26,12 +26,4 @@
width: 300px;
}
-#clusterHostRoleMappingDivId {
- margin-top:40px;
-}
-#clusterHostRoleMappingDivId h2 {
- font-size:16px;
- float:left;
- margin-bottom:10px;
-}
Modified: incubator/ambari/branches/ambari-186/hmc/css/common.css
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/css/common.css?rev=1347278&r1=1347277&r2=1347278&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/css/common.css (original)
+++ incubator/ambari/branches/ambari-186/hmc/css/common.css Thu Jun 7 01:41:52 2012
@@ -302,68 +302,6 @@ a.btn {
color:#333;
}
-.subnav {
- width: 100%;
- height: 36px;
- background-color: #eeeeee; /* Old browsers */
- background-repeat: repeat-x; /* Repeat the gradient */
- background-image: -moz-linear-gradient(top, #f5f5f5 0%, #eeeeee 100%); /* FF3.6+ */
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f5f5f5), color-stop(100%,#eeeeee)); /* Chrome,Safari4+ */
- background-image: -webkit-linear-gradient(top, #f5f5f5 0%,#eeeeee 100%); /* Chrome 10+,Safari 5.1+ */
- background-image: -ms-linear-gradient(top, #f5f5f5 0%,#eeeeee 100%); /* IE10+ */
- background-image: -o-linear-gradient(top, #f5f5f5 0%,#eeeeee 100%); /* Opera 11.10+ */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f5f5f5', endColorstr='#eeeeee',GradientType=0 ); /* IE6-9 */
- background-image: linear-gradient(top, #f5f5f5 0%,#eeeeee 100%); /* W3C */
- border: 1px solid #e5e5e5;
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- border-radius: 4px;
-}
-.subnav .nav {
- margin-bottom: 0;
-}
-.subnav .nav > li > a {
- margin: 0;
- padding-top: 11px;
- padding-bottom: 11px;
- border-left: 1px solid #f5f5f5;
- border-right: 1px solid #e5e5e5;
- -webkit-border-radius: 0;
- -moz-border-radius: 0;
- border-radius: 0;
-}
-.subnav .nav > .active > a,
-.subnav .nav > .active > a:hover {
- padding-left: 13px;
- color: #777;
- background-color: #e9e9e9;
- border-right-color: #ddd;
- border-left: 0;
- -webkit-box-shadow: inset 0 3px 5px rgba(0,0,0,.05);
- -moz-box-shadow: inset 0 3px 5px rgba(0,0,0,.05);
- box-shadow: inset 0 3px 5px rgba(0,0,0,.05);
-}
-.subnav .nav > .active > a .caret,
-.subnav .nav > .active > a:hover .caret {
- border-top-color: #777;
-}
-.subnav .nav > li:first-child > a,
-.subnav .nav > li:first-child > a:hover {
- border-left: 0;
- padding-left: 12px;
- -webkit-border-radius: 4px 0 0 4px;
- -moz-border-radius: 4px 0 0 4px;
- border-radius: 4px 0 0 4px;
-}
-.subnav .nav > li:last-child > a {
- border-right: 0;
-}
-.subnav .dropdown-menu {
- -webkit-border-radius: 0 0 4px 4px;
- -moz-border-radius: 0 0 4px 4px;
- border-radius: 0 0 4px 4px;
-}
-
.btn-large .iconic-stop:before {
margin-top: -1px;
}
@@ -383,7 +321,6 @@ div.separator {
#selectServicesCoreDivId ul {
list-style:none outside none;
}
-
#masterServices {
margin-top:40px;
}
@@ -448,13 +385,16 @@ div.separator {
width:360px;
}
.hostToServices {
- width:50%;
+ width:auto;
}
.hostToMasterServices > h3, .hostToServices > h3 {
font-size:14px;
margin-bottom:4px!important;
line-height:14px;
}
+.hostToServices > h3 {
+ font-weight:normal;
+}
.hostToMasterServices ul, .hostToServices ul {
margin-left:0;
margin-bottom:0;
@@ -477,10 +417,22 @@ div.separator {
.hostToServices li.client, .clientLegend {
background-color:#0088CC;
}
-.serviceLegend {
- float:left;
+#serviceLegend {
+ float:right;
+}
+#clusterHostRoleMappingDivId {
+ margin-top:20px;
+ width:500px;
margin-left:20px;
}
+
+#clusterHostRoleMappingDivId h2 {
+ font-size:16px;
+ float:left;
+ margin-bottom:10px;
+ font-weight:normal;
+}
+/* BEGIN TOP NAV */
.navbar {
font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;
}
@@ -537,6 +489,17 @@ div.separator {
float:left;
padding-top:7px;
}
+/* END TOPNAV */
+/* BEGIN SUBNAV */
+#subnav a {
+ color:#666;
+ font-size:13px;
+}
+#subnav a:active, #subnav .active a {
+ color:#65B642;
+ font-size:13px;
+}
+/* END SUBNAV */
/* BEGIN progress box styles */
#txnProgressBox {
width:auto;
@@ -672,5 +635,4 @@ div.separator {
height:12px;
float:left;
}
-
/* END progress popup styles */
\ No newline at end of file
Modified: incubator/ambari/branches/ambari-186/hmc/css/manageServices.css
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/css/manageServices.css?rev=1347278&r1=1347277&r2=1347278&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/css/manageServices.css (original)
+++ incubator/ambari/branches/ambari-186/hmc/css/manageServices.css Thu Jun 7 01:41:52 2012
@@ -1,7 +1,6 @@
#serviceManagementCoreDivId {
width: 400px;
- margin-left: auto;
- margin-right: auto;
+ margin-left:20px;
}
.serviceManagementGroup {
@@ -131,7 +130,6 @@ a.serviceManagementEntryName {
#serviceManagementGlobalActionsDivId {
- margin-top:40px;
margin-left:90px;
}
Modified: incubator/ambari/branches/ambari-186/hmc/html/addNodesWizard.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/html/addNodesWizard.php?rev=1347278&r1=1347277&r2=1347278&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/html/addNodesWizard.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/html/addNodesWizard.php Thu Jun 7 01:41:52 2012
@@ -18,12 +18,8 @@
<?php require "./topnav.htmli"; ?>
<div id="ContentDivId">
-
- <!-- List of clusters
- <div name="clustersListDiv" id="clustersListDivId">
- </div>
- -->
-
+ <?php require "./subnav.htmli"; ?>
+
<!-- Installation Wizard -->
<div name="installationWizardDiv" id="installationWizardDivId" style="display:block">
<div name="installationWizardProgressBarDiv" id="installationWizardProgressBarDivId">
Modified: incubator/ambari/branches/ambari-186/hmc/html/index.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/html/index.php?rev=1347278&r1=1347277&r2=1347278&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/html/index.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/html/index.php Thu Jun 7 01:41:52 2012
@@ -15,24 +15,16 @@
<body class="yui3-skin-sam">
<?php require "./topnav.htmli"; ?>
-
+
<div id="ContentDivId">
+ <?php require "./subnav.htmli"; ?>
+ <?php require "./utils.htmli"; ?>
- <?php require "./utils.htmli"; ?>
-
- <div id="welcomeDivId" style="display:none">
- <?php require "./welcome.inc" ?>
- </div>
<!-- List of clusters -->
<div id="clustersListDivId" style="display:none">
</div>
<div id="clusterHostRoleMappingDivId" style="display:none">
- <h2>Service Mapping</h2>
- <div class="serviceLegend">
- <span class="masterLegend">Master Service</span><span class="clientLegend">Client Service</span>
- </div>
- <div style="clear:both"></div>
<div id="clusterHostRoleMappingDynamicRenderDivId">
</div>
</div>
Modified: incubator/ambari/branches/ambari-186/hmc/html/manageServices.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/html/manageServices.php?rev=1347278&r1=1347277&r2=1347278&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/html/manageServices.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/html/manageServices.php Thu Jun 7 01:41:52 2012
@@ -17,8 +17,8 @@
<body class="yui3-skin-sam">
<?php require "./topnav.htmli"; ?>
- <div id="ContentDivId">
-
+ <div id="ContentDivId">
+ <?php require "./subnav.htmli"; ?>
<?php require "./utils.htmli"; ?>
<!-- Service Management: The Main Event -->
Added: incubator/ambari/branches/ambari-186/hmc/html/subnav.htmli
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/html/subnav.htmli?rev=1347278&view=auto
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/html/subnav.htmli (added)
+++ incubator/ambari/branches/ambari-186/hmc/html/subnav.htmli Thu Jun 7 01:41:52 2012
@@ -0,0 +1,26 @@
+<?php
+switch ($requestPage) {
+case 'index.php':
+ $activeTab = 'SUMMARY';
+ break;
+case 'manageServices.php':
+ $activeTab = 'SERVICES';
+ break;
+case 'addNodesWizard.php':
+ $activeTab = 'ADD_NODES';
+ break;
+case 'uninstallWizard.php':
+ $activeTab = 'UNINSTALL';
+ break;
+default:
+ $activeTab = '';
+}
+?>
+<div id="subnav">
+ <ul class="nav nav-tabs">
+ <li class="<?php echo ($activeTab == 'SUMMARY') ? 'active' : '' ?>"><a id="subNavSummaryLink" href="index.php">Cluster Summary</a></li>
+ <li class="<?php echo ($activeTab == 'SERVICES') ? 'active' : '' ?>"><a id="subNavServicesLink" href="manageServices.php?clusterName=<?php echo $clusterName ?>">Manage Services</a></li>
+ <li class="<?php echo ($activeTab == 'ADD_NODES') ? 'active' : '' ?>"><a id="subAddNodesLink" href="addNodesWizard.php?clusterName=<?php echo $clusterName ?>">Add Nodes</a></li>
+ <li class="<?php echo ($activeTab == 'UNINSTALL') ? 'active' : '' ?>"><a id="subNavUninstallLink" href="uninstallWizard.php?clusterName=<?php echo $clusterName ?>">Uninstall</a></li>
+ </ul>
+</div>
Modified: incubator/ambari/branches/ambari-186/hmc/html/uninstallWizard.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/html/uninstallWizard.php?rev=1347278&r1=1347277&r2=1347278&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/html/uninstallWizard.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/html/uninstallWizard.php Thu Jun 7 01:41:52 2012
@@ -23,11 +23,12 @@
?>
<div id="ContentDivId">
+ <?php require "./subnav.htmli"; ?>
<!-- Uninstallation Wizard -->
<div id="installationWizardDivId" style="display:block">
<?php require "./utils.htmli"; ?>
- <div class="pageSummary">
+ <div class="pageSummary" style="margin-top:0px">
<h2><?php echo $RES['uninstallWizard.pageSummary.header'] ?></h2>
<p><?php echo $RES['uninstallWizard.pageSummary.body'] ?></p>
</div>
Modified: incubator/ambari/branches/ambari-186/hmc/js/clustersList.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/js/clustersList.js?rev=1347278&r1=1347277&r2=1347278&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/js/clustersList.js (original)
+++ incubator/ambari/branches/ambari-186/hmc/js/clustersList.js Thu Jun 7 01:41:52 2012
@@ -1,233 +1,227 @@
-function populateHostToMasterRoleMapping(clusterServices, hostMap) {
+function ClustersList() {
+ function populateHostToMasterRoleMapping(clusterServices, hostMap) {
+
+ for (var serviceName in clusterServices) {
+ if (clusterServices.hasOwnProperty(serviceName)) {
- for (var serviceName in clusterServices) {
- if (clusterServices.hasOwnProperty(serviceName)) {
-
- if (clusterServices[serviceName].isEnabled == "1" &&
- clusterServices[serviceName].attributes.runnable &&
- !clusterServices[serviceName].attributes.noDisplay) {
-
- globalYui.Array.each( clusterServices[serviceName].components, function (serviceComponent) {
- if (serviceComponent.isMaster) {
- // just add the master to the hostname object
- for (var i in serviceComponent.hostNames) {
- var hostName = serviceComponent.hostNames[i];
- if ( !( hostName in hostMap ) ) {
- hostMap[hostName] = new Array();
- hostMap[hostName].push({ serviceName: serviceComponent.displayName, isMaster: true });
- } else {
- hostMap[hostName].push({ serviceName: serviceComponent.displayName, isMaster: true });
+ if (clusterServices[serviceName].isEnabled == "1" &&
+ clusterServices[serviceName].attributes.runnable &&
+ !clusterServices[serviceName].attributes.noDisplay) {
+
+ globalYui.Array.each( clusterServices[serviceName].components, function (serviceComponent) {
+ if (serviceComponent.isMaster) {
+ // just add the master to the hostname object
+ for (var i in serviceComponent.hostNames) {
+ var hostName = serviceComponent.hostNames[i];
+ if ( !( hostName in hostMap ) ) {
+ hostMap[hostName] = new Array();
+ hostMap[hostName].push({ serviceName: serviceComponent.displayName, isMaster: true });
+ } else {
+ hostMap[hostName].push({ serviceName: serviceComponent.displayName, isMaster: true });
+ }
}
}
- }
- });
+ });
+ }
}
}
}
-}
-
-function populateHostToClientRoleMapping(clusterServices, hostMap) {
-
- for (var serviceName in clusterServices) {
- if (clusterServices.hasOwnProperty(serviceName)) {
-
- if (clusterServices[serviceName].isEnabled == "1" &&
- !clusterServices[serviceName].attributes.noDisplay) {
-
- globalYui.Array.each( clusterServices[serviceName].components, function (serviceComponent) {
- if (serviceComponent.isClient) {
- // just add the client to the hostname object
- for (var i in serviceComponent.hostNames) {
- var hostName = serviceComponent.hostNames[i];
- if ( !( hostName in hostMap ) ) {
- hostMap[hostName] = new Array();
- hostMap[hostName].push({ serviceName: serviceComponent.displayName, isMaster: false });
- } else {
- hostMap[hostName].push({ serviceName: serviceComponent.displayName, isMaster: false });
+
+ function populateHostToClientRoleMapping(clusterServices, hostMap) {
+
+ for (var serviceName in clusterServices) {
+ if (clusterServices.hasOwnProperty(serviceName)) {
+
+ if (clusterServices[serviceName].isEnabled == "1" &&
+ !clusterServices[serviceName].attributes.noDisplay) {
+
+ globalYui.Array.each( clusterServices[serviceName].components, function (serviceComponent) {
+ if (serviceComponent.isClient) {
+ // just add the client to the hostname object
+ for (var i in serviceComponent.hostNames) {
+ var hostName = serviceComponent.hostNames[i];
+ if ( !( hostName in hostMap ) ) {
+ hostMap[hostName] = new Array();
+ hostMap[hostName].push({ serviceName: serviceComponent.displayName, isMaster: false });
+ } else {
+ hostMap[hostName].push({ serviceName: serviceComponent.displayName, isMaster: false });
+ }
}
}
- }
- });
+ });
+ }
}
}
}
-}
-
-function generateHostRoleMappingMarkup( clusterServices ) {
-
- var hostMap = {};
- var markup = '';
- populateHostToMasterRoleMapping(clusterServices, hostMap);
- populateHostToClientRoleMapping(clusterServices, hostMap);
+ function generateHostRoleMappingMarkup( clusterServices ) {
- markup = '<div>';
- for (var hostName in hostMap) {
- markup += '<div class="hostToServices"><h3>' + hostName + '</h3>' + '<ul>';
- for (var service in hostMap[hostName]) {
- markup += '<li class="' + ((hostMap[hostName][service].isMaster) ? 'master' : 'client') + '">' + hostMap[hostName][service].serviceName + '</li>';
+ var hostMap = {};
+ var markup = '';
+
+ populateHostToMasterRoleMapping(clusterServices, hostMap);
+ populateHostToClientRoleMapping(clusterServices, hostMap);
+
+ markup += '<div>';
+ for (var hostName in hostMap) {
+ markup += '<div class="hostToServices"><h3>' + hostName + '</h3>' + '<ul>';
+ for (var service in hostMap[hostName]) {
+ markup += '<li class="' + ((hostMap[hostName][service].isMaster) ? 'master' : 'client') + '">' + hostMap[hostName][service].serviceName + '</li>';
+ }
+ markup += '</ul><div style="clear:both"></div></div>';
}
- markup += '</ul><div style="clear:both"></div></div>';
+ markup += '</div>';
+
+ return markup;
}
- markup += '</div>';
-
- return markup;
-}
-
-function renderClusterList() {
- globalYui.io("../php/frontend/listClusters.php", {
- method: 'GET',
- timeout : 10000,
- on: {
- success: function (x,o) {
- globalYui.log("RAW JSON DATA: " + o.responseText);
-
- // Process the JSON data returned from the server
- try {
- clusterListInfoJson = globalYui.JSON.parse(o.responseText);
- }
- catch (e) {
- alert("JSON Parse failed!");
- return;
- }
-
- globalYui.log("PARSED DATA: " + globalYui.Lang.dump(clusterListInfoJson));
-
- if (clusterListInfoJson.result != 0) {
- // Error!
- alert("Got error!" + clusterListInfoJson.error);
- return;
- }
-
- clusterListInfoJson = clusterListInfoJson.response;
-
- var numClusters = clusterListInfoJson.length;
- var clustersListMarkup;
- var clusterId;
- var multipleClustersSupported = false;
-
- if (numClusters == 0) {
- clustersListMarkup = "";
- } else {
- if (multipleClustersSupported) {
- clustersListMarkup = "<table>" +
- "<caption>List of clusters</caption>" +
- "<thead><tr><th>Name of the cluster</th><th>Cluster status</th><th>Actions</th></tr></thead>";
- var i = 0;
- for (clusterId in clusterListInfoJson) {
- clustersListMarkup += "<tr><td><a href='manageServices.php?clusterId=" + clusterId + "' id='existingClusterLinkDivId'>" + clusterId + "</a></td><td>" + clusterListInfoJson[clusterId] + "</td><td>Uninstall</td></tr>" ;
- }
- clustersListMarkup += "</table>";
+
+ this.render = function() {
+
+ globalYui.io("../php/frontend/listClusters.php", {
+ method: 'GET',
+ timeout : 10000,
+ on: {
+ success: function (x,o) {
+ globalYui.log("RAW JSON DATA: " + o.responseText);
+
+ // Process the JSON data returned from the server
+ try {
+ clusterListInfoJson = globalYui.JSON.parse(o.responseText);
+ }
+ catch (e) {
+ alert("JSON Parse failed!");
+ return;
+ }
+
+ globalYui.log("PARSED DATA: " + globalYui.Lang.dump(clusterListInfoJson));
+
+ if (clusterListInfoJson.result != 0) {
+ // Error!
+ alert("Got error!" + clusterListInfoJson.error);
+ return;
+ }
+
+ clusterListInfoJson = clusterListInfoJson.response;
+
+ var numClusters = clusterListInfoJson.length;
+ var clustersListMarkup;
+ var clusterId;
+ var multipleClustersSupported = false;
+
+ if (numClusters == 0) {
+ clustersListMarkup = "";
} else {
- var clusterName; var clusterInfo;
- for (clusterId in clusterListInfoJson) {
- clusterName = clusterId;
- clusterInfo = globalYui.JSON.parse(clusterListInfoJson[clusterName]);
- globalYui.log( "Cluster Info: " + globalYui.Lang.dump(clusterInfo.displayName));
+ if (multipleClustersSupported) {
+ clustersListMarkup = "<table>" +
+ "<caption>List of clusters</caption>" +
+ "<thead><tr><th>Name of the cluster</th><th>Cluster status</th><th>Actions</th></tr></thead>";
+ var i = 0;
+ for (clusterId in clusterListInfoJson) {
+ clustersListMarkup += "<tr><td><a href='manageServices.php?clusterId=" + clusterId + "' id='existingClusterLinkDivId'>" + clusterId + "</a></td><td>" + clusterListInfoJson[clusterId] + "</td><td>Uninstall</td></tr>" ;
+ }
+ clustersListMarkup += "</table>";
+ } else {
+ var clusterName; var clusterInfo;
+ for (clusterId in clusterListInfoJson) {
+ clusterName = clusterId;
+ clusterInfo = globalYui.JSON.parse(clusterListInfoJson[clusterName]);
+ globalYui.log( "Cluster Info: " + globalYui.Lang.dump(clusterInfo.displayName));
+ }
}
- clustersListMarkup = '<h3>Cluster information</h3>';
- clustersListMarkup += '<div class="clusterDiv">' +
- '<div class="formElement">' +
- '<label>Cluster Name</label>' +
- '<input type=text readonly=readonly value="' + clusterName + '">' +
- '</div>' +
- '<div class="formElement">' +
- '<label>State</label>' +
- '<input type=text readonly=readonly value="' + clusterInfo['displayName'] + '">' +
- '</div>' +
- '<div class="formElement">' +
- '<a class="btn" href="/hdp/dashboard/ui/home.html">Monitoring Dashboard</a>' +
- '<a class="btn" style="margin-left:10px" href="manageServices.php?clusterName=' + clusterName + '" id="existingClusterLinkDivId">Manage Services</a>' +
- '<a class="btn" style="margin-left:10px" href="addNodesWizard.php?clusterName=' + clusterName + '">Add Nodes</a>' +
- '<a class="btn" style="margin-left:10px" href="uninstallWizard.php?clusterName=' + clusterName + '">Uninstall</a>' +
- '</div>' +
- '</div>';
}
- }
-
- var newClusterLinkHTML = "";
- if (multipleClustersSupported || numClusters == 0) {
- document.location.href = "/hmc/html/welcome.php";
- return;
- }
-
- /* Beginning of adding Role Topology information. */
- globalYui.io( "../php/frontend/fetchClusterServices.php?clusterName=" + clusterName + "&getConfigs=true&getComponents=true", {
- timeout: 10000,
- on: {
- success: function(x1, o1) {
-
- hideLoadingImg();
-
- globalYui.log("RAW JSON DATA: " + o1.responseText);
-
- var clusterServicesResponseJson;
-
- try {
- clusterServicesResponseJson = globalYui.JSON.parse(o1.responseText);
- }
- catch (e) {
- alert("JSON Parse failed");
- return;
- }
-
- globalYui.log(globalYui.Lang.dump(clusterServicesResponseJson));
-
- /* Check that clusterServicesResponseJson actually indicates success. */
- if( clusterServicesResponseJson.result == 0 ) {
-
- var clusterServices = clusterServicesResponseJson.response.services;
-
- /* Link the newly-generated markup into the DOM. */
- globalYui.one("#clusterHostRoleMappingDynamicRenderDivId").setContent(
- generateHostRoleMappingMarkup(clusterServices) );
- globalYui.one("#clusterHostRoleMappingDivId").show();
- }
- else {
- alert("Fetching Cluster Services failed");
+
+ var newClusterLinkHTML = "";
+ if (multipleClustersSupported || numClusters == 0) {
+ document.location.href = "/hmc/html/welcome.php";
+ return;
+ }
+
+ /* Beginning of adding Role Topology information. */
+ globalYui.io( "../php/frontend/fetchClusterServices.php?clusterName=" + clusterName + "&getConfigs=true&getComponents=true", {
+ timeout: 10000,
+ on: {
+ success: function(x1, o1) {
+
+ hideLoadingImg();
+
+ globalYui.log("RAW JSON DATA: " + o1.responseText);
+
+ var clusterServicesResponseJson;
+
+ try {
+ clusterServicesResponseJson = globalYui.JSON.parse(o1.responseText);
+ }
+ catch (e) {
+ alert("JSON Parse failed");
+ return;
+ }
+
+ globalYui.log(globalYui.Lang.dump(clusterServicesResponseJson));
+
+ /* Check that clusterServicesResponseJson actually indicates success. */
+ if( clusterServicesResponseJson.result == 0 ) {
+
+ var clusterServices = clusterServicesResponseJson.response.services;
+
+ var markup =
+ '<div class="clearfix">' +
+ '<h2>Cluster: ' + clusterName + '</h2>' +
+ '<div id="serviceLegend">' +
+ '<span class="masterLegend">Master</span><span class="clientLegend" style="margin-right:0">Client</span>' +
+ '</div>' +
+ '</div>' +
+ '</div>';
+
+ /* Link the newly-generated markup into the DOM. */
+ globalYui.one("#clusterHostRoleMappingDynamicRenderDivId").setContent(
+ markup + generateHostRoleMappingMarkup(clusterServices) );
+ globalYui.one("#clusterHostRoleMappingDivId").show();
+ }
+ else {
+ alert("Fetching Cluster Services failed");
+ }
+ },
+ failure: function(x1, o1) {
+ hideLoadingImg();
+ alert("Async call failed");
}
- },
- failure: function(x1, o1) {
- hideLoadingImg();
- alert("Async call failed");
}
+ });
+ /* End of adding Role Topology information. */
+
+ globalYui.one("#clustersListDivId").setContent( clustersListMarkup );
+ globalYui.one("#clustersListDivId").setStyle('display', 'block');
+
+ if (globalYui.one('#newClusterLinkDivId') != null) {
+ globalYui.one('#newClusterLinkDivId').on('click',function (e) {
+ /* Done with this stage, hide it. */
+ globalYui.one("#clustersListDivId").setStyle('display','none');
+ // globalYui.one("#installationWizardDivId").setStyle('display','block');
+ });
}
- });
- /* End of adding Role Topology information. */
-
- globalYui.one("#clustersListDivId").setContent( clustersListMarkup );
- globalYui.one("#clustersListDivId").setStyle('display', 'block');
-
- if (globalYui.one('#newClusterLinkDivId') != null) {
- globalYui.one('#newClusterLinkDivId').on('click',function (e) {
- /* Done with this stage, hide it. */
- globalYui.one("#clustersListDivId").setStyle('display','none');
- // globalYui.one("#installationWizardDivId").setStyle('display','block');
- });
+
+ if(numClusters !=0) {
+ globalYui.one('#existingClusterLinkDivId').on('click',function (e) {
+
+ e.target.set('disabled', true);
+
+ /* Done with this stage, hide it. */
+ globalYui.one("#clustersListDivId").setStyle('display','none');
+
+ /* Show off our rendering. */
+ globalYui.one("#displayServiceStatusCoreDivId").setStyle('display','block');
+ });
+ }
+
+ },
+ failure: function (x,o) {
+ // e.target.set('disabled', false);
+ alert("Async call failed!");
}
-
- if(numClusters !=0) {
- globalYui.one('#existingClusterLinkDivId').on('click',function (e) {
-
- e.target.set('disabled', true);
-
- /* Done with this stage, hide it. */
- globalYui.one("#clustersListDivId").setStyle('display','none');
-
- /* Show off our rendering. */
- globalYui.one("#displayServiceStatusCoreDivId").setStyle('display','block');
- });
- }
-
- },
- failure: function (x,o) {
- // e.target.set('disabled', false);
- alert("Async call failed!");
}
- }
- });
-}
-
+ });
+ }
+};
-/* Main() */
-renderClusterList();
+var clustersList = new ClustersList();
+clustersList.render();
Modified: incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-ganglia/manifests/monitor.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-ganglia/manifests/monitor.pp?rev=1347278&r1=1347277&r2=1347278&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-ganglia/manifests/monitor.pp (original)
+++ incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-ganglia/manifests/monitor.pp Thu Jun 7 01:41:52 2012
@@ -25,7 +25,7 @@ class hdp-ganglia::monitor(
class { 'hdp-ganglia::config': ganglia_server_host => $ganglia_server_host}
}
- if ($hdp::params::component_exists['hdp-hadoop'] == true) {
+ if (($hdp::params::service_exists['hdp-hadoop::datanode'] == true) or ($hdp::params::service_exists['hdp-hadoop::namenode'] == true) or ($hdp::params::service_exists['hdp-hadoop::jobtracker'] == true) or ($hdp::params::service_exists['hdp-hadoop::tasktracker'] == true) or ($hdp::params::service_exists['hdp-hadoop::client'] == true) or ($hdp::params::service_exists['hdp-hadoop::snamenode'] == true)) {
class { 'hdp-hadoop::enable-ganglia': }
}
Modified: incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hadoop/manifests/client.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hadoop/manifests/client.pp?rev=1347278&r1=1347277&r2=1347278&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hadoop/manifests/client.pp (original)
+++ incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hadoop/manifests/client.pp Thu Jun 7 01:41:52 2012
@@ -2,6 +2,8 @@ class hdp-hadoop::client(
$service_state = $hdp::params::cluster_client_state
) inherits hdp::params
{
+ $hdp::params::service_exists['hdp-hadoop::client'] = true
+
Hdp-hadoop::Common<||>{service_states +> $service_state}
Hdp-hadoop::Package<||>{include_32_bit => true}
Hdp-hadoop::Configfile<||>{sizes +> 32}
Modified: incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hadoop/manifests/init.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hadoop/manifests/init.pp?rev=1347278&r1=1347277&r2=1347278&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hadoop/manifests/init.pp (original)
+++ incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hadoop/manifests/init.pp Thu Jun 7 01:41:52 2012
@@ -70,10 +70,10 @@ class hdp-hadoop(
owner => $hdfs_user
}
- hdp-hadoop::configfile { 'hadoop-metrics2.properties' :
- tag => 'common',
- owner => $hdfs_user,
- }
+# hdp-hadoop::configfile { 'hadoop-metrics2.properties' :
+# tag => 'common',
+# owner => $hdfs_user,
+# }
hdp-hadoop::configfile { 'mapred-site.xml':
tag => 'common',
Modified: incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hbase/manifests/init.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hbase/manifests/init.pp?rev=1347278&r1=1347277&r2=1347278&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hbase/manifests/init.pp (original)
+++ incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hbase/manifests/init.pp Thu Jun 7 01:41:52 2012
@@ -33,7 +33,8 @@ class hdp-hbase(
force => true
}
- hdp-hbase::configfile { ['hbase-env.sh','hbase-site.xml','hbase-policy.xml','log4j.properties','hadoop-metrics.properties']: }
+# hdp-hbase::configfile { ['hbase-env.sh','hbase-site.xml','hbase-policy.xml','log4j.properties','hadoop-metrics.properties']: }
+ hdp-hbase::configfile { ['hbase-env.sh','hbase-site.xml','hbase-policy.xml','log4j.properties']: }
hdp-hbase::configfile { 'regionservers':}
Anchor['hdp-hbase::begin'] -> Hdp::Package['hbase'] -> Hdp::User[$hbase_user] -> Hdp::Directory[$config_dir] ->
Hdp-hbase::Configfile<||> -> Anchor['hdp-hbase::end']
Modified: incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hive/manifests/service.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hive/manifests/service.pp?rev=1347278&r1=1347277&r2=1347278&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hive/manifests/service.pp (original)
+++ incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hive/manifests/service.pp Thu Jun 7 01:41:52 2012
@@ -15,7 +15,7 @@ class hdp-hive::service(
$no_op_test = "ls ${pid_file} >/dev/null 2>&1 && ps `cat ${pid_file}` >/dev/null 2>&1"
} elsif ($ensure == 'stopped') {
#TODO: this needs to be fixed
- $daemon_cmd = "ps aux | grep -i [h]ive | awk {'print \$2'} | xargs kill >/dev/null 2>&1"
+ $daemon_cmd = "ps aux | awk '{print $1,$2}' | grep ${user} | awk '{print $2}' | xargs kill >/dev/null 2>&1"
$no_op_test = "ps aux | grep -i [h]ive"
} else {
$daemon_cmd = undef
Modified: incubator/ambari/branches/ambari-186/hmc/puppet/modules/puppetApply.sh
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/puppet/modules/puppetApply.sh?rev=1347278&r1=1347277&r2=1347278&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/puppet/modules/puppetApply.sh (original)
+++ incubator/ambari/branches/ambari-186/hmc/puppet/modules/puppetApply.sh Thu Jun 7 01:41:52 2012
@@ -1,5 +1,5 @@
rm -f /var/log/puppet_apply.log
-puppet apply --confdir=/etc/puppet/agent --logdest=/var/log/puppet_apply.log --debug --autoflush --detailed-exitcodes /etc/puppet/agent/modules/catalog/files/site.pp
+puppet apply --confdir=/etc/puppet/agent --logdest=/var/log/puppet_apply.log --debug --autoflush --detailed-exitcodes /etc/puppet/agent/modules/catalog/files/site.pp >> /var/log/puppet_apply.log 2>&1
ret=$?
cat /var/log/puppet_apply.log
if [ "$ret" == "0" ] || [ "$ret" == "2" ]; then