You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sw...@apache.org on 2013/05/14 22:52:15 UTC

svn commit: r1482583 - in /incubator/ambari/trunk: CHANGES.txt ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/hdfs/directory.pp

Author: swagle
Date: Tue May 14 20:52:15 2013
New Revision: 1482583

URL: http://svn.apache.org/r1482583
Log:
AMBARI-2132. Error during HDFS service starting. (swagle)

Modified:
    incubator/ambari/trunk/CHANGES.txt
    incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/hdfs/directory.pp

Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1482583&r1=1482582&r2=1482583&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Tue May 14 20:52:15 2013
@@ -850,6 +850,8 @@ Trunk (unreleased changes):
 
  BUG FIXES
 
+ AMBARI-2132. Error during "HDFS" service starting. (swagle)
+
  AMBARI-2116. Add parameters to improve HIVE performance. With decriptions. 
  (swagle)
 

Modified: incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/hdfs/directory.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/hdfs/directory.pp?rev=1482583&r1=1482582&r2=1482583&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/hdfs/directory.pp (original)
+++ incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/hdfs/directory.pp Tue May 14 20:52:15 2013
@@ -28,6 +28,9 @@ define hdp-hadoop::hdfs::directory(
   $recursive_chmod = false
 ) 
 {
+  $unless_cmd = "hadoop fs -ls ${name} >/dev/null 2>&1"
+  $tries = 30
+  $try_sleep = 10
  
   if ($service_state == 'running') {
   
@@ -38,8 +41,10 @@ define hdp-hadoop::hdfs::directory(
       $mkdir_cmd = "fs -mkdir ${name}"
     }
     hdp-hadoop::exec-hadoop { $mkdir_cmd:
-      command => $mkdir_cmd,
-      unless => "hadoop fs -ls ${name} >/dev/null 2>&1"
+      command   => $mkdir_cmd,
+      unless    => $unless_cmd,
+      try_sleep => $try_sleep,
+      tries     => $tries
     }
     if ($owner == unset) {
       $chown = ""
@@ -59,7 +64,10 @@ define hdp-hadoop::hdfs::directory(
         $chown_cmd = "fs -chown ${chown} ${name}"
       }
       hdp-hadoop::exec-hadoop {$chown_cmd :
-        command => $chown_cmd
+        command   => $chown_cmd,
+        unless    => $unless_cmd,
+        try_sleep => $try_sleep,
+        tries     => $tries
       }
       Hdp-hadoop::Exec-hadoop[$mkdir_cmd] -> Hdp-hadoop::Exec-hadoop[$chown_cmd]
     }
@@ -72,7 +80,10 @@ define hdp-hadoop::hdfs::directory(
         $chmod_cmd = "fs -chmod ${mode} ${name}"
       }
       hdp-hadoop::exec-hadoop {$chmod_cmd :
-        command => $chmod_cmd
+        command   => $chmod_cmd,
+        unless    => $unless_cmd,
+        try_sleep => $try_sleep,
+        tries     => $tries
       }
       Hdp-hadoop::Exec-hadoop[$mkdir_cmd] -> Hdp-hadoop::Exec-hadoop[$chmod_cmd]
     }