Patch does the following:
1. changed reportTaskFinished code to ensure release slot happens always by calling releaseSlot in finally block.
2. Have undone the changes to do with throwing exception when arguments to debug-script could not be constructed, as it was already initializing them to empty String.
3. Modified the testcase to use new api.
In test case can we verify the correct number of the map slot is actually reported back to JobTracker after the failing job completes, this would test the actual slot management.
4. Added asserts for slot management. Verified the test passes with the patch and fails without the patch.
Can we check if the workDir is non-null in the run-debug script and throw an exception if the same is null? Would prevent launch of task-controller code.
If workdDir is null or if it doesnt exists, the current code already throws IOException.
Wouldn't it be much better that we add a check to figure out if the taskJVM was launched or not and then run debug script accordingly.
This may need more discussion, since it changes the feature in a way that debug script will be launched only when taskJvm is launched properly.