[
https://issues.apache.org/jira/browse/HBASE-8681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13675371#comment-13675371
]
Nick Dimiduk commented on HBASE-8681:
-------------------------------------
ProgramDriver on branch hadoop-2 contains the following:
{noformat}
/**
* API compatible with Hadoop 1.x
*/
public void driver(String[] argv) throws Throwable {
if (run(argv) == -1) {
System.exit(-1);
}
}
{noformat}
{noformat}
public int run(String[] args)
throws Throwable
{
// Make sure they gave us a program name.
if (args.length == 0) {
System.out.println("An example program must be given as the" +
" first argument.");
printUsage(programs);
return -1;
}
...
{noformat}
It will work on a future hadoop-2 release, just not on 2.0.2-alpha. The
compatibility fix was brought in via
{noformat}
281f9a2 * MAPREDUCE-5156. Change hadoop examples ProgramDriver to be able to
run 1.x examples jar on top of YARN. This change breaks 0.23.x direct usages of
ProgramDriver. Contributed by Zhijie Shen. svn merge --ignore-ancestry -c
1485085 ../../trunk/
{noformat}
> TestDriver#testDriver fails on hadoop 2.0
> -----------------------------------------
>
> Key: HBASE-8681
> URL: https://issues.apache.org/jira/browse/HBASE-8681
> Project: HBase
> Issue Type: Test
> Reporter: Ted Yu
> Assignee: Ted Yu
> Attachments: 8681-v1.txt
>
>
> TestDriver#testDriver relies on System.exit() call from
> ProgramDriver#driver() because LauncherSecurityManager latches onto
> checkExit().
> In hadoop 2.0, ProgramDriver#driver() has the following code:
> {code}
> public void driver(String[] argv) throws Throwable {
> if (run(argv) == -1) {
> System.exit(-1);
> }
> }
> {code}
> Meaning, if the execution is successful, System.exit() call would be bypassed.
> This leads to test failure such as the following:
> https://builds.apache.org/job/HBase-TRUNK-on-Hadoop-2.0.0/552/testReport/org.apache.hadoop.hbase.mapreduce/TestDriver/testDriver/
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira