Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YARN-11534. Fixed exception handling when container signalling is interrupted #5864

Merged
merged 4 commits into from
Jul 21, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
YARN-11534. Code improvements
Change-Id: Idce41dfff72f0f209683a75b5743672446288f91
p-szucs committed Jul 20, 2023
commit 6ed8f29c1501afd65a2439a40034fdcb79917aba
Original file line number Diff line number Diff line change
@@ -791,7 +791,7 @@ public boolean signalContainer(ContainerSignalContext ctx)

// In ContainerExecutionException -1 is the default value for the exit code.
// If it remained unset, we can treat the signalling as interrupted.
if (retCode == -1) {
if (retCode == ContainerExecutionException.getDefaultExitCode()) {
throw new InterruptedIOException("Signalling container " + pid + " with "
+ signal + " is interrupted; output: " + e.getOutput() + " and exitCode: "
+ retCode);
Original file line number Diff line number Diff line change
@@ -87,5 +87,9 @@ public String getOutput() {
public String getErrorOutput() {
return errorOutput;
}

public static int getDefaultExitCode() {
return EXIT_CODE_UNSET;
}

}