-
Notifications
You must be signed in to change notification settings - Fork 29.3k
[SPARK-30387] Improving stop hook log message #27049
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -164,7 +164,7 @@ private[spark] class YarnClientSchedulerBackend( | |
|
|
||
| super.stop() | ||
| client.stop() | ||
| logInfo("Stopped") | ||
| logInfo("YarnClientSchedulerBackend Stopped") | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @amanomer, why don't you just make the log better just by not using class name directly like the reference you pointed out? e.g.)
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jobitmathew please update the log message. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @amanomer |
||
| } | ||
|
|
||
| override protected def updateDelegationTokens(tokens: Array[Byte]): Unit = { | ||
|
|
||
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.
Isn't
YarnClientSchedulerBackendadded to full of log message, as in most case the format contains the logger name (mostly same as class name)?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.
Current log message is
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.
You must be using a custom logging file because by default you get:
19/12/31 10:47:28 INFO YarnClientSchedulerBackend: Stopped
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.
Look at the spark conf/log4j.properties.template file for the format used there
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.
If true, and I suspect you're right, is there much harm in just adding to the log message anyway?
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.
Also on other places we are using descriptive log message. Like,
spark/core/src/main/scala/org/apache/spark/deploy/ExternalShuffleService.scala
Lines 169 to 171 in ce7a49f
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.
no harm, I'm ok with the change, there may just be other places in the code that aren't clear without it so you may want to look at your logging config anyway.
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.
Same as @tgravescs, I think log4j format matters, but agree no harm with this.
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.
I don't think we should necessarily add it.
Also, by default, seems showing the logs fine. Otherwise, we should fix so many places as @tgravescs pointed out. If class names should be shown, that should properly configured for such places.
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.
Yes. as @tgravescs pointed out, here logs can be improved by changing log4j conversion pattern.