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:25:12 UTC
svn commit: r1347259 - in /incubator/ambari/branches/ambari-186: CHANGES.txt
hmc/php/db/HMCDBAccessor.php hmc/php/frontend/createCluster.php
Author: vikram
Date: Thu Jun 7 01:25:12 2012
New Revision: 1347259
URL: http://svn.apache.org/viewvc?rev=1347259&view=rev
Log:
AMBARI-452. Create cluster should wipe out entire db (Contributed by Vikram)
Modified:
incubator/ambari/branches/ambari-186/CHANGES.txt
incubator/ambari/branches/ambari-186/hmc/php/db/HMCDBAccessor.php
incubator/ambari/branches/ambari-186/hmc/php/frontend/createCluster.php
Modified: incubator/ambari/branches/ambari-186/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/CHANGES.txt?rev=1347259&r1=1347258&r2=1347259&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/CHANGES.txt (original)
+++ incubator/ambari/branches/ambari-186/CHANGES.txt Thu Jun 7 01:25:12 2012
@@ -6,6 +6,8 @@ characters wide.
Release 0.1.x - unreleased
+ AMBARI-452. Create cluster should wipe out entire db (Vikram)
+
AMBARI-451. Add nodes has incorrect check on returned status (Vikram)
AMBARI-450. Boldify/Redify restart HMC message when nagios/ganglia is on the hmc host (Yusaku via Vikram)
Modified: incubator/ambari/branches/ambari-186/hmc/php/db/HMCDBAccessor.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/php/db/HMCDBAccessor.php?rev=1347259&r1=1347258&r2=1347259&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/php/db/HMCDBAccessor.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/php/db/HMCDBAccessor.php Thu Jun 7 01:25:12 2012
@@ -3311,10 +3311,19 @@ class HMCDBAccessor {
}
public function cleanupCluster ($clusterName) {
- $this->deleteAllInTable("Clusters");
+// $this->deleteAllInTable("Clusters");
$this->deleteClusterTable($clusterName, "ServiceComponentInfo");
$this->cleanupHosts($clusterName);
}
+ public function wipeOutClusters () {
+ $this->deleteAllInTable("Clusters");
+ $this->deleteAllInTable("ServiceComponentInfo");
+ $this->deleteAllInTable("Hosts");
+ $this->deleteAllInTable("HostRoles");
+ $this->deleteAllInTable("ServiceConfig");
+ $this->deleteAllInTable("ServiceInfo");
+ }
+
}
?>
Modified: incubator/ambari/branches/ambari-186/hmc/php/frontend/createCluster.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/php/frontend/createCluster.php?rev=1347259&r1=1347258&r2=1347259&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/php/frontend/createCluster.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/php/frontend/createCluster.php Thu Jun 7 01:25:12 2012
@@ -60,7 +60,7 @@ if ($fileHdl == false) {
fclose($fileHdl);
// if user re-enters this page, we need to delete and restart the cluster conf
-$dbAccessor->cleanupCluster($clusterName);
+$dbAccessor->wipeOutClusters($clusterName);
$logger->log_debug("Completed deletion of cluster: ".$clusterName);
$hdpVersion="1.0"; // TODO: hardcoded