-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-23820][CORE] Enable use of long form of callsite in logs #21433
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 all commits
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 |
|---|---|---|
|
|
@@ -17,7 +17,9 @@ | |
|
|
||
| package org.apache.spark.storage | ||
|
|
||
| import org.apache.spark.SparkEnv | ||
| import org.apache.spark.annotation.DeveloperApi | ||
| import org.apache.spark.internal.config._ | ||
| import org.apache.spark.rdd.{RDD, RDDOperationScope} | ||
| import org.apache.spark.util.Utils | ||
|
|
||
|
|
@@ -53,10 +55,16 @@ class RDDInfo( | |
| } | ||
|
|
||
| private[spark] object RDDInfo { | ||
| private val callsiteForm = SparkEnv.get.conf.get(EVENT_LOG_CALLSITE_FORM) | ||
|
|
||
| def fromRdd(rdd: RDD[_]): RDDInfo = { | ||
| val rddName = Option(rdd.name).getOrElse(Utils.getFormattedClassName(rdd)) | ||
| val parentIds = rdd.dependencies.map(_.rdd.id) | ||
| val callSite = callsiteForm match { | ||
| case "short" => rdd.creationSite.shortForm | ||
| case "long" => rdd.creationSite.longForm | ||
|
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. If the users input is neither
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. yea, usually we will define an enum and verify the given config value is valid or not. For this particular case, I think we can just define a boolean flag: |
||
| } | ||
| new RDDInfo(rdd.id, rddName, rdd.partitions.length, | ||
| rdd.getStorageLevel, parentIds, rdd.creationSite.shortForm, rdd.scope) | ||
| rdd.getStorageLevel, parentIds, callSite, rdd.scope) | ||
|
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. This sounds a general issue. Why we only apply it in RDDInfo?
Member
Author
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. @gatorsmile As far as I am aware, |
||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.
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.
shortis defined? Where is the test case? Why this is not documented?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.
Not sure whether we should introduce a conf here. cc @rxin
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.
Ah yeah this should have been documented, that is a good point. I should have looked more carefully at the configs. The other eventLog configs aren't internal either.
I agree this could also be a boolean, or simply handle anything but "short" or "long" as "short"