Skip to content

Conversation

@michaelmior
Copy link
Member

@michaelmior michaelmior commented May 25, 2018

This adds an option to event logging to include the long form of the callsite instead of the short form.

@kiszk
Copy link
Member

kiszk commented May 25, 2018

Could you please add the description for this PR?

@michaelmior
Copy link
Member Author

Done!

@srowen
Copy link
Member

srowen commented Jul 2, 2018

Although maybe not widely used, I could see allowing control of this via an undocumented param

@SparkQA
Copy link

SparkQA commented Jul 2, 2018

Test build #4200 has finished for PR 21433 at commit 9800d2e.

  • This patch fails Spark unit tests.
  • This patch does not merge cleanly.
  • This patch adds no public classes.

@michaelmior
Copy link
Member Author

Rebased on top of master. The failing test is unrelated.

@SparkQA
Copy link

SparkQA commented Jul 3, 2018

Test build #4203 has finished for PR 21433 at commit 245181a.

  • This patch fails PySpark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@michaelmior
Copy link
Member Author

@srowen Yes, I don't expect it will be widely used but I've personally found it helpful in some performance debugging and it's a fairly low impact change. I was just hoping to avoid having to keep applying this patch and doing my own build of Spark in the future :)

@SparkQA
Copy link

SparkQA commented Jul 4, 2018

Test build #4205 has finished for PR 21433 at commit 245181a.

  • This patch fails PySpark unit tests.
  • This patch does not merge cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jul 4, 2018

Test build #4206 has finished for PR 21433 at commit 245181a.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@srowen
Copy link
Member

srowen commented Jul 5, 2018

Merged to master

@asfgit asfgit closed this in e58dadb Jul 5, 2018
@michaelmior
Copy link
Member Author

Thanks @srowen!

@michaelmior michaelmior deleted the long-callsite branch July 5, 2018 13:54
val parentIds = rdd.dependencies.map(_.rdd.id)
val callSite = callsiteForm match {
case "short" => rdd.creationSite.shortForm
case "long" => rdd.creationSite.longForm
Copy link
Member

Choose a reason for hiding this comment

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

If the users input is neither short nor long, we will get an exception, right?

cc @jiangxb1987 @cloud-fan

Copy link
Contributor

Choose a reason for hiding this comment

The 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: spark.eventLog.callsite.longForm.enabled.

ConfigBuilder("spark.eventLog.overwrite").booleanConf.createWithDefault(false)

private[spark] val EVENT_LOG_CALLSITE_FORM =
ConfigBuilder("spark.eventLog.callsite").stringConf.createWithDefault("short")
Copy link
Member

@gatorsmile gatorsmile Sep 10, 2018

Choose a reason for hiding this comment

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

short is defined? Where is the test case? Why this is not documented?

Copy link
Member

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

Copy link
Member

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"

}
new RDDInfo(rdd.id, rddName, rdd.partitions.length,
rdd.getStorageLevel, parentIds, rdd.creationSite.shortForm, rdd.scope)
rdd.getStorageLevel, parentIds, callSite, rdd.scope)
Copy link
Member

Choose a reason for hiding this comment

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

This sounds a general issue. Why we only apply it in RDDInfo?

Copy link
Member Author

Choose a reason for hiding this comment

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

@gatorsmile As far as I am aware, RDDInfo is the only place the call site is included in the event log.

@michaelmior
Copy link
Member Author

@gatorsmile @cloud-fan I'll just go with a boolean config as there really is no need for more than two options and this simplifies things quite a bit.

@gatorsmile
Copy link
Member

@michaelmior Since Spark 2.4 is branch cut, this PR still needs more review. I would revert this PR from branch 2.4 and master first. We can discuss the conf and implementation in the master branch. The preferred conf name is spark.eventLog.callsite.longForm.enabled. Thanks!

Copy link
Member

@srowen srowen left a comment

Choose a reason for hiding this comment

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

I think it's easy enough to update this to a boolean and add a doc and pick it into branch-2.4; it's not imminent as there are still about 30-40 open issues. Still, it's not vital enough that it must be included.

ConfigBuilder("spark.eventLog.overwrite").booleanConf.createWithDefault(false)

private[spark] val EVENT_LOG_CALLSITE_FORM =
ConfigBuilder("spark.eventLog.callsite").stringConf.createWithDefault("short")
Copy link
Member

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"

@srowen
Copy link
Member

srowen commented Sep 11, 2018

Given lack of certainty, and that's this is small and easy to add back in a different form, and the fact that 2.4 is quickly teeing up, let me revert this for now. We can proceed with a different approach in a new PR.

@rxin
Copy link
Contributor

rxin commented Sep 11, 2018 via email

asfgit pushed a commit that referenced this pull request Sep 13, 2018
This is a rework of #21433 to address some concerns there.

Closes #22398 from michaelmior/long-callsite2.

Authored-by: Michael Mior <[email protected]>
Signed-off-by: Wenchen Fan <[email protected]>
(cherry picked from commit ab25c96)
Signed-off-by: Wenchen Fan <[email protected]>
asfgit pushed a commit that referenced this pull request Sep 13, 2018
This is a rework of #21433 to address some concerns there.

Closes #22398 from michaelmior/long-callsite2.

Authored-by: Michael Mior <[email protected]>
Signed-off-by: Wenchen Fan <[email protected]>
fjh100456 pushed a commit to fjh100456/spark that referenced this pull request Sep 13, 2018
This is a rework of apache#21433 to address some concerns there.

Closes apache#22398 from michaelmior/long-callsite2.

Authored-by: Michael Mior <[email protected]>
Signed-off-by: Wenchen Fan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants