YARN-6535. Program needs to exit when SLS finishes. (yufeigu via rkanter)

This commit is contained in:
Robert Kanter 2017-05-16 17:52:17 -07:00
parent b415c6fe74
commit 101852ca11
1 changed files with 6 additions and 0 deletions

View File

@ -124,6 +124,8 @@ public class SLSRunner extends Configured implements Tool {
private final static int DEFAULT_MAPPER_PRIORITY = 20; private final static int DEFAULT_MAPPER_PRIORITY = 20;
private final static int DEFAULT_REDUCER_PRIORITY = 10; private final static int DEFAULT_REDUCER_PRIORITY = 10;
private static boolean exitAtTheFinish = false;
/** /**
* The type of trace in input. * The type of trace in input.
*/ */
@ -761,6 +763,9 @@ public class SLSRunner extends Configured implements Tool {
if (remainingApps == 0) { if (remainingApps == 0) {
LOG.info("SLSRunner tears down."); LOG.info("SLSRunner tears down.");
if (exitAtTheFinish) {
System.exit(0);
}
} }
} }
@ -857,6 +862,7 @@ public class SLSRunner extends Configured implements Tool {
} }
public static void main(String[] argv) throws Exception { public static void main(String[] argv) throws Exception {
exitAtTheFinish = true;
ToolRunner.run(new Configuration(), new SLSRunner(), argv); ToolRunner.run(new Configuration(), new SLSRunner(), argv);
} }