|
Attached the patch with the following changes:
1) Added a new Job Status - KILLED. Some comments:
1. There is some commented code in the testcase. 2. I think private methods killJob and failJob are not needed. terminateJob(boolean) can be called inplace of them directly, though it makes sense to have public methods kill() and fail(). 3. Should this change JobSubmissionProtocol version number for the change in JobStatus? 4. Change in JobTracker is not needed in this patch. Attaching the updated file based on Amareshwari's comments:
1) Removed commented code from TC +1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12390190/patch-3924_v3.txt against trunk revision 696149. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 6 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3281/testReport/ This message is automatically generated. Minor comments:
1. In terminateJob method, two if-else checks can be collapsed into one if-else. 2. There are lines exceeding 80 characters in JobTracker.java and JobHistory.java. And JobClient has unnecessary java.util.Date and DateFormat imports added. Otherthan that, the patch looks good. Will upload a updated patch that incorporates Amareshwari's comments.
Thanks Amareshwari for the comments. +1 Patch looks good
Ran test-patch on behalf of Subramaniam. Here is the result:
[exec] +1 overall.
[exec]
[exec] +1 @author. The patch does not contain any @author tags.
[exec]
[exec] +1 tests included. The patch appears to include 6 new or modified tests.
[exec]
[exec] +1 javadoc. The javadoc tool did not generate any warning messages.
[exec]
[exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings.
[exec]
[exec] +1 findbugs. The patch does not introduce any new Findbugs warnings.
I noticed that there is a contrib class org.apache.hadoop.eclipse.server.HadoopJob which uses JobStatus. Should we add Killed status to JobState enum as well, to be consistent ? Also getState() and update(JobStatus status) needs to be taken care of for the possible impact.
minor: TestJobKillAndFail doesn't need to have reducer defined, as it is never used. just set the no of reducers to 0. also there is some duplicate code in runJobFail and runJobKill which becomes the candidate to move to a single method, something like: Since this patch forks the FAILED status into FAILED and KILLED, there may be potential impact at places where FAILED is currently being used, so doing a grep on JobStatus.FAILED on trunk reveals some more places which needs to be aware of KILLED status:
FairScheduler.update() TestFairScheduler.testNonRunningJobsAreIgnored() Some comments:
1. As Sharad pointed out, this still has to fix the FairScheduler. Updated with Arun's & Sharad's comments..thanks. Not updating JobStatus to enum right now as it affects too many files, have raised a separate JIRA ([Hadoop-4214]) for the same. Fixed ctrl-c, ctrl-v errors in the Test Case.
All the TCs passed and the Output of test-patch is: I just committed this. Thanks Subramaniam!
This commit has broken trunk! I am going to revert it.
All the patches waiting to be tested have failed due to the eclipse plugin compilation failing. Patch has been reverted.
When you make changes to a contrib component, please ensure you compile it! The eclipse-plugin requires eclipse.home to be defined otherwise it doesn't get compiled: ant -Declipse.home=/path/to/eclipse tar The patch isn't there yet:
1. JobInProgress.terminateJob should only be a private method, and JIP.kill and JIP.fail (new method) should use it. 4. It doesn't bump the JobSubmissionProtocol version, although there is a comment for that.
Unfortunately this patch conflicts horribly with recent changes to trunk too... sigh.
I'm sorry, I've been looking at the wrong version of this patch! I take back my comments here:
http://issues.apache.org/jira/browse/HADOOP-3924?focusedCommentId=12632825#action_12632825 But this patch doesn't apply to trunk... Updated to reflect recent changes to trunk, I believe Amareshwari has run 'ant test test-patch' on this.
Subramaniam's patch without changes to eclipse plugin.
I just committed this. Thanks, Subramaniam!
Integrated in Hadoop-trunk #611 (See http://hudson.zones.apache.org/hudson/job/Hadoop-trunk/611/
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RunnningJob should expose either the JobStatus or a new method isKilled
Maybe making JobStatus and enum and exposing that via the RunningJob would be a more elegant solution.