You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by yh...@apache.org on 2008/06/20 18:44:47 UTC
svn commit: r669986 - in /hadoop/core/trunk/src/contrib/hod: CHANGES.txt
hodlib/Hod/hod.py
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( \