Parcourir la source

Merged -r 694434:694435 from trunk to branch-0.18 to fix HADOOP-4161

git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/branches/branch-0.18@694439 13f79535-47bb-0310-9956-ffa450edef68
Nigel Daley il y a 16 ans
Parent
commit
ad862def4b
2 fichiers modifiés avec 15 ajouts et 4 suppressions
  1. 5 0
      src/contrib/hod/CHANGES.txt
  2. 10 4
      src/contrib/hod/bin/hod

+ 5 - 0
src/contrib/hod/CHANGES.txt

@@ -7,6 +7,11 @@ Release 0.18.1 - Unreleased
     HADOOP-4060. Modified HOD to rotate log files on the client side.
     (Vinod Kumar Vavilapalli via yhemanth)
 
+  BUG FIXES
+
+    HADOOP-4161. Fixed bug in HOD cleanup that had the potential to
+    hang clients. (Vinod Kumar Vavilapalli via nigel)
+
 Release 0.18.0 - 2008-08-19
 
   INCOMPATIBLE CHANGES

+ 10 - 4
src/contrib/hod/bin/hod

@@ -545,7 +545,13 @@ if __name__ == '__main__':
     print HOD_INTERRUPTED_MESG
     sys.exit(HOD_INTERRUPTED_CODE)
   
-  if hodConfig['hod'].has_key('script'):
-    sys.exit(hod.script())
-  else:  
-    sys.exit(hod.operation())
+  opCode = 0
+  try:
+    if hodConfig['hod'].has_key('script'):
+      opCode = hod.script()
+    else:  
+      opCode = hod.operation()
+  except Exception, e:
+    print "Uncaught Exception : %s" % e
+  finally:
+    sys.exit(opCode)