This is an automated email from the ASF dual-hosted git repository.
nicholasjiang pushed a commit to branch branch-0.4
in repository https://gitbox.apache.org/repos/asf/celeborn.git
The following commit(s) were added to refs/heads/branch-0.4 by this push:
new 00ed104de [CELEBORN-1420] Fix mapreduce job will throw an exit
exception after it succeeded
00ed104de is described below
commit 00ed104debffdc6e4b18e457bd4d4516461430af
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(
() -> {