Browse Source

HADOOP-4161. Fixed bug in HOD cleanup that had the potential to hang clients. Contributed by Vinod Kumar Vavilapalli.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/trunk@694435 13f79535-47bb-0310-9956-ffa450edef68
Nigel Daley 16 years ago
parent
commit
45bfe50bad
2 changed files with 13 additions and 4 deletions
  1. 3 0
      src/contrib/hod/CHANGES.txt
  2. 10 4
      src/contrib/hod/bin/hod

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

@@ -15,6 +15,9 @@ Trunk (unreleased changes)
 
   BUG FIXES
 
+    HADOOP-4161. Fixed bug in HOD cleanup that had the potential to
+    hang clients. (Vinod Kumar Vavilapalli via nigel)
+
 Release 0.18.1 - Unreleased
 
   INCOMPATIBLE CHANGES

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

@@ -553,7 +553,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)