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

SPARK-12637 Print stage info of finished stages properly #10585

Closed
wants to merge 1 commit into from

Conversation

navis
Copy link
Contributor

@navis navis commented Jan 5, 2016

Currently it prints hashcode of stage info, which seemed not that useful.

INFO scheduler.StatsReportListener: Finished stage: org.apache.spark.scheduler.StageInfo@2eb47d79

@SparkQA
Copy link

SparkQA commented Jan 5, 2016

Test build #48714 has finished for PR 10585 at commit 8680034.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jan 5, 2016

Test build #48718 has finished for PR 10585 at commit cdf7027.

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

@@ -61,6 +61,21 @@ class StageInfo(
"running"
}
}

private[spark] def getStatusDetail: String = {
Copy link
Member

Choose a reason for hiding this comment

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

Is this used elsewhere or can it just go into SparkListener?

I think this is confusing as one big format string. I'd make vals for the pieces that need some computation and return one big interpolated string. Also this is verbose:

foo match {
  Some(x) => f(x)
  case _ => ""
}

compared to just foo.map(x => f(x)).getOrElse("")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh, thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

And, I've searched spark codes but that's the sole case logging StageInfo.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I mean I wonder if it's worth exposing this pretty specific logging string as an internal API method? you can just create this string in the one place it's used

@SparkQA
Copy link

SparkQA commented Jan 6, 2016

Test build #48803 has finished for PR 10585 at commit 696f884.

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

@srowen
Copy link
Member

srowen commented Jan 10, 2016

I think this still needs the changes I've mentioned above, or at least, that's what I'd prefer to see before merging

@navis
Copy link
Contributor Author

navis commented Jan 11, 2016

@srowen moved it to StatsReportListener. sorry for delay.

@SparkQA
Copy link

SparkQA commented Jan 11, 2016

Test build #49078 has finished for PR 10585 at commit 7875a49.

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

@srowen
Copy link
Member

srowen commented Jan 11, 2016

It's looking good though I still sort of think string interpolation would make this clearer. I'll leave open for a bit to see if anyone cares either way on that one

@@ -293,6 +293,15 @@ class StatsReportListener extends SparkListener with Logging {
taskInfoMetrics.clear()
}

private[spark] def getStatusDetail(stageInfo: StageInfo): String = {
Copy link
Contributor

Choose a reason for hiding this comment

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

This could even be fully private, but not a huge deal.

@JoshRosen
Copy link
Contributor

Meh, this isn't that hard to read without interpolation, so I'd be okay with merging this if it's fine with @srowen.

@srowen
Copy link
Member

srowen commented Jan 15, 2016

I don't feel that strongly but if we're changing this, might as well do it right with interpolation and making the method private @navis

@srowen
Copy link
Member

srowen commented Jan 20, 2016

@navis what do you think about following up on this?

@srowen
Copy link
Member

srowen commented Jan 23, 2016

I'll take this over if there's no progress on this PR

asfgit pushed a commit that referenced this pull request Feb 2, 2016
Improve printing of StageInfo in onStageCompleted

See also #10585

Author: Sean Owen <sowen@cloudera.com>

Closes #10922 from srowen/SPARK-12637.
@srowen
Copy link
Member

srowen commented Feb 2, 2016

@navis you can close this PR

@asfgit asfgit closed this in 085f510 Feb 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants