YARN-6535. Program needs to exit when SLS finishes. (yufeigu via rkanter)
This commit is contained in:
parent
b415c6fe74
commit
101852ca11
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue