hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yhema...@apache.org
Subject svn commit: r669986 - in /hadoop/core/trunk/src/contrib/hod: CHANGES.txt hodlib/Hod/hod.py
Date Fri, 20 Jun 2008 16:44:47 GMT
Author: yhemanth
Date: Fri Jun 20 09:44:47 2008
New Revision: 669986

URL: http://svn.apache.org/viewvc?rev=669986&view=rev
Log:
HADOOP-3610. Modified HOD to create cluster directory if one does not exist when using the
script option. Contributed by Vinod Kumar Vavilapalli.

Modified:
    hadoop/core/trunk/src/contrib/hod/CHANGES.txt
    hadoop/core/trunk/src/contrib/hod/hodlib/Hod/hod.py

Modified: hadoop/core/trunk/src/contrib/hod/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/hod/CHANGES.txt?rev=669986&r1=669985&r2=669986&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/hod/CHANGES.txt (original)
+++ hadoop/core/trunk/src/contrib/hod/CHANGES.txt Fri Jun 20 09:44:47 2008
@@ -23,6 +23,8 @@
     HADOOP-3184. Modified HOD to handle master failures on bad nodes by trying 
     to bring them up on another node in the ring. (Hemanth Yamijala via ddas)
 
+    HADOOP-3610. Modified HOD to create cluster directory if one does not
+    exist when using the script option. (Vinod Kumar Vavilapalli via yhemanth)
 
   NEW FEATURES
 

Modified: hadoop/core/trunk/src/contrib/hod/hodlib/Hod/hod.py
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/hod/hodlib/Hod/hod.py?rev=669986&r1=669985&r2=669986&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/hod/hodlib/Hod/hod.py (original)
+++ hadoop/core/trunk/src/contrib/hod/hodlib/Hod/hod.py Fri Jun 20 09:44:47 2008
@@ -608,10 +608,11 @@
                          script + " : Not an executable.")
 
     if not os.path.exists(clusterDir):
-      errorFlag = True
-      errorMsgs.append( \
-                  "Invalid cluster directory (--hod.clusterdir or -d) : " + \
-                  clusterDir + " : No such directory")
+      try:
+        os.makedirs(clusterDir)
+      except OSError, err:
+        errorFlag = True
+        errorMsgs.append("Could not create cluster directory. %s" % (str(err)))
     elif not os.path.isdir(clusterDir):
       errorFlag = True
       errorMsgs.append( \



Mime
View raw message