This is an automated email from the ASF dual-hosted git repository.
ethanfeng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/celeborn.git
The following commit(s) were added to refs/heads/main by this push:
new 22b68cd83 [CELEBORN-1420] Fix mapreduce job will throw an exit
exception after it succeeded
22b68cd83 is described below
commit 22b68cd835efa98a47cec5f9b2d50ee2fd33045f
Author: mingji <[email protected]>
AuthorDate: Mon May 13 19:53:19 2024 +0800
[CELEBORN-1420] Fix mapreduce job will throw an exit exception after it
succeeded
### What changes were proposed in this pull request?
Set the correct flag to remove a redundant exception.
### Why are the changes needed?
To remove a redundant exception.
### Does this PR introduce _any_ user-facing change?
NO.
### How was this patch tested?
Manually test.
Closes #2505 from FMX/b1420.
Authored-by: mingji <[email protected]>
Signed-off-by: mingji <[email protected]>
---
.../celeborn/mapreduce/v2/app/MRAppMasterWithCeleborn.java | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git
a/client-mr/mr/src/main/java/org/apache/celeborn/mapreduce/v2/app/MRAppMasterWithCeleborn.java
b/client-mr/mr/src/main/java/org/apache/celeborn/mapreduce/v2/app/MRAppMasterWithCeleborn.java
index 43958e680..12483e562 100644
---
a/client-mr/mr/src/main/java/org/apache/celeborn/mapreduce/v2/app/MRAppMasterWithCeleborn.java
+++
b/client-mr/mr/src/main/java/org/apache/celeborn/mapreduce/v2/app/MRAppMasterWithCeleborn.java
@@ -18,6 +18,7 @@
package org.apache.celeborn.mapreduce.v2.app;
import java.io.IOException;
+import java.lang.reflect.Field;
import org.apache.hadoop.fs.FSDataOutputStream;
import org.apache.hadoop.fs.FileStatus;
@@ -149,6 +150,17 @@ public class MRAppMasterWithCeleborn extends MRAppMaster {
Integer.parseInt(nodeHttpPortString),
appSubmitTime,
rmAppConf);
+
+ // set this flag to avoid exit exception
+ try {
+ Field field = MRAppMaster.class.getDeclaredField("mainStarted");
+ field.setAccessible(true);
+ field.setBoolean(null, true);
+ field.setAccessible(false);
+ } catch (NoSuchFieldException e) {
+ // ignore it for compatibility
+ }
+
ShutdownHookManager.get()
.addShutdownHook(
() -> {