Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ private[spark] class YarnClientSchedulerBackend(

super.stop()
client.stop()
logInfo("Stopped")
logInfo("YarnClientSchedulerBackend Stopped")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Isn't YarnClientSchedulerBackend added to full of log message, as in most case the format contains the logger name (mostly same as class name)?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Current log message is

2019-12-27 20:23:26,613 | INFO | [main] | Stopped | org.apache.spark.internal.Logging$class.logInfo(Logging.scala:54)

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Member

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?

Copy link
Copy Markdown
Contributor

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,

ShutdownHookManager.addShutdownHook { () =>
logInfo("Shutting down shuffle service.")
server.stop()

Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Member

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.

because by default you get:

19/12/31 10:47:28 INFO YarnClientSchedulerBackend: Stopped

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.

Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The 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.) YARN client scheduler backend stopped.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@jobitmathew please update the log message.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@amanomer
@HyukjinKwon
@srowen
@tgravescs
changes done as per HyukjinKwon's suggestion.Could you please check.

}

override protected def updateDelegationTokens(tokens: Array[Byte]): Unit = {
Expand Down