hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rkan...@apache.org
Subject hadoop git commit: YARN-6535. Program needs to exit when SLS finishes. (yufeigu via rkanter)
Date Wed, 17 May 2017 00:52:46 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk b415c6fe7 -> 101852ca1


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


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/101852ca
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/101852ca
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/101852ca

Branch: refs/heads/trunk
Commit: 101852ca11ed4a9c4d4664c6c797fa7173dc59ae
Parents: b415c6f
Author: Robert Kanter <rkanter@apache.org>
Authored: Tue May 16 17:52:17 2017 -0700
Committer: Robert Kanter <rkanter@apache.org>
Committed: Tue May 16 17:52:17 2017 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/hadoop/yarn/sls/SLSRunner.java    | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/101852ca/hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/SLSRunner.java
----------------------------------------------------------------------
diff --git a/hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/SLSRunner.java
b/hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/SLSRunner.java
index 03281a5..f66d2d0 100644
--- a/hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/SLSRunner.java
+++ b/hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/SLSRunner.java
@@ -124,6 +124,8 @@ public class SLSRunner extends Configured implements Tool {
   private final static int DEFAULT_MAPPER_PRIORITY = 20;
   private final static int DEFAULT_REDUCER_PRIORITY = 10;
 
+  private static boolean exitAtTheFinish = false;
+
   /**
    * The type of trace in input.
    */
@@ -761,6 +763,9 @@ public class SLSRunner extends Configured implements Tool {
 
     if (remainingApps == 0) {
       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 {
+    exitAtTheFinish = true;
     ToolRunner.run(new Configuration(), new SLSRunner(), argv);
   }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message