-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
[FLINK-9196][flip6, yarn] Cleanup application files when deregistering YARN AM #5938
Conversation
|
||
/** | ||
* Tests for {@link Utils}. | ||
*/ | ||
public class UtilsTest extends TestLogger { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed class to YarnFlinkResourceManagerTest
.
|
||
/** | ||
* Tests for {@link Utils}. | ||
*/ | ||
public class UtilsTest extends TestLogger { | ||
public class UtilsTest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TestLogger
missing.
LOG.info("Sending shutdown request to the Application Master"); | ||
try { | ||
final Future<Object> response = Patterns.ask(applicationClient.get(), | ||
new YarnMessages.LocalStopYarnSession(ApplicationStatus.SUCCEEDED, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Always SUCCEEDED
because previous logic in 1.4.2 used
YarnApplicationState appState = lastReport.getYarnApplicationState();
ApplicationStatus status =
(appState == YarnApplicationState.FAILED || appState == YarnApplicationState.KILLED) ?
ApplicationStatus.FAILED : ApplicationStatus.SUCCEEDED;
if (status != ApplicationStatus.SUCCEEDED) {
LOG.warn("YARN reported application state {}", appState);
LOG.warn("Diagnostics: {}", lastReport.getDiagnostics());
}
return status;
which does not make sense imo.
Test was misnamed.
…g YARN AM Enable graceful cluster shut down via HTTP. Remove Flink application files from remote file system when the YarnResourceManager deregisters the YARN ApplicationMaster.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good to me, with on minor minor comment.
} catch (InterruptedException e) { | ||
Thread.currentThread().interrupt(); | ||
} catch (ExecutionException e) { | ||
log.error("Error while shutting down cluster", e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Throw the cause of the ExecutionException
?
Merging this... |
…ng YARN AM Enable graceful cluster shut down via HTTP. Remove Flink application files from remote file system when the YarnResourceManager deregisters the YARN ApplicationMaster. This closes apache#5938
…ng YARN AM Enable graceful cluster shut down via HTTP. Remove Flink application files from remote file system when the YarnResourceManager deregisters the YARN ApplicationMaster. This closes apache#5938
What is the purpose of the change
Ensure that YARN application files are removed if cluster is shutdown.
cc: @StephanEwen @tillrohrmann
Brief change log
Verifying this change
This change added tests and can be verified as follows:
Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: (yes / no)Documentation