Skip to content

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.

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

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 <[email protected]>

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

Development

Successfully merging this pull request may close these issues.

4 participants