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-8057 Inadequate information for handling catch clauses #362

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -124,11 +124,11 @@ protected synchronized void cleanupRunningContainers() {
} catch (YarnException e) {
LOG.error("Failed to stop Container " +
startedContainer.getContainerId() +
"when stopping NMClientImpl");
"when stopping NMClientImpl", e);
Copy link
Contributor

@lqjack lqjack Apr 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what’s the e use for in log?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there's no "e", the log here will only show the message "Failed to stop Container ### when stopping NMClientImpl". People will only know there's something wrong here, but will not know what's wrong here. (YarnException? IOException?)
If add an "e" here, the exception type and position where this exception happens will also be generated to the log, so that people will know what's wrong here.

} catch (IOException e) {
LOG.error("Failed to stop Container " +
startedContainer.getContainerId() +
"when stopping NMClientImpl");
"when stopping NMClientImpl", e);
}
}
}
Expand Down