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-26457] Show hadoop configurations in HistoryServer environment tab #23486

Closed
wants to merge 11 commits into from
Closed

[SPARK-26457] Show hadoop configurations in HistoryServer environment tab #23486

wants to merge 11 commits into from

Conversation

deshanxiao
Copy link
Contributor

@deshanxiao deshanxiao commented Jan 7, 2019

What changes were proposed in this pull request?

I know that yarn provided all hadoop configurations. But I guess it may be fine that the historyserver unify all configuration in it. It will be convenient for us to debug some problems.

How was this patch tested?

image

@planga82
Copy link
Contributor

planga82 commented Jan 7, 2019

Could you attach a screenshot? to see what the new properties look like. Thanks!!

@@ -442,9 +443,13 @@ object SparkEnv extends Logging {
val addedJarsAndFiles = (addedJars ++ addedFiles).map((_, "Added By User"))
val classPaths = (addedJarsAndFiles ++ classPathEntries).sorted

// Add Hadoop properties, it will ignore configs including in Spark
val hadoopProperties = hadoopConf.asScala.filter(entry => !conf.contains("spark.hadoop." + entry.getKey)).
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you exclude "spark.hadoop" conf? it could be posible that they are showing in spark properties?

Copy link
Contributor Author

@deshanxiao deshanxiao Jan 8, 2019

Choose a reason for hiding this comment

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

Yes, these properties have been shown above. So I remove it in hadoop properties.

@deshanxiao
Copy link
Contributor Author

@planga82 Thank you for your reply! Sure! Here it is!

image

@planga82
Copy link
Contributor

planga82 commented Jan 8, 2019

what happens if there are not hadoop options? I was thinking about a standalone scenario or Mesos scenario.

@deshanxiao
Copy link
Contributor Author

@planga82
For yarn application, it will be convenient because we don't need to see hadoop configurations in two sides. I used to meet with a case where users set "fs.impl.disable.cache"=true caused out of memory when they list so many hdfs files. It will not be shown in spark properties if they just set it in hadoop configuration files.

@planga82
Copy link
Contributor

planga82 commented Jan 9, 2019

@deshanxiao
It looks good for me. You need a commiter to authorize testing.

@@ -442,9 +445,13 @@ object SparkEnv extends Logging {
val addedJarsAndFiles = (addedJars ++ addedFiles).map((_, "Added By User"))
val classPaths = (addedJarsAndFiles ++ classPathEntries).sorted

// Add Hadoop properties, it will ignore configs including in Spark
val hadoopProperties = hadoopConf.asScala.filter(entry => !conf.contains("spark.hadoop." + entry.getKey)).
Copy link
Member

Choose a reason for hiding this comment

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

instead of conf.contains, use startsWith?

Copy link
Member

Choose a reason for hiding this comment

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

I actually don't think we should filter them - if I am trying to debug why the config is not getting picked up it's useful to see everyone listed here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@felixcheung Yes, I argee with you. I will remove it.

@@ -352,6 +352,7 @@ class VersionInfo private[spark](
class ApplicationEnvironmentInfo private[spark] (
val runtime: RuntimeInfo,
val sparkProperties: Seq[(String, String)],
val hadoopProperties: Seq[(String, String)],
Copy link
Member

Choose a reason for hiding this comment

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

I tried running the SHS with previous event logs, it seems that the API change will cause json parse exception.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, you are right. Thank you! I have repaired it.

@deshanxiao
Copy link
Contributor Author

@srowen @shahidki31 Could you give me some suggestions?

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 this is OK. My only concerns is that it makes the env page bigger and heavier. Are these sections collapsed by default or could they be?

@deshanxiao
Copy link
Contributor Author

@srowen Thank you! These sections can be collapsed. By default, it's not. Maybe the default style could keep in line with other properties.

@HyukjinKwon
Copy link
Member

ok to test

@HyukjinKwon
Copy link
Member

+1 for Sean's opinion. I think it's okie too but I'm a bit worried if the hadoop configurations looks overwhelming in that page.

@SparkQA
Copy link

SparkQA commented Jan 15, 2019

Test build #101221 has finished for PR 23486 at commit b275970.

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

@@ -352,6 +352,7 @@ class VersionInfo private[spark](
class ApplicationEnvironmentInfo private[spark] (
val runtime: RuntimeInfo,
val sparkProperties: Seq[(String, String)],
val hadoopProperties: Seq[(String, String)],
Copy link
Member

Choose a reason for hiding this comment

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

Looks it breaks mima but the constructor is private. Let's exclude it in mima. See the Jenkins test messages.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you! I will try it.

@deshanxiao
Copy link
Contributor Author

Retest please.

@SparkQA
Copy link

SparkQA commented Jan 15, 2019

Test build #101226 has finished for PR 23486 at commit 209ba5f.

  • This patch fails due to an unknown error code, -9.
  • This patch does not merge cleanly.
  • This patch adds no public classes.

@srowen
Copy link
Member

srowen commented Jan 15, 2019

@deshanxiao I wonder if it's easy enough to make this or even other sections besides Spark properties collapsed by default in the HTML here too

@@ -220,6 +220,9 @@ object MimaExcludes {
// [SPARK-26139] Implement shuffle write metrics in SQL
ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.spark.ShuffleDependency.this"),

// [SPARK-26457] Show hadoop configurations in HistoryServer environment tab
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if this changes any user-facing API then? if it's something people might use anywhere, I'd keep the constructor

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, maybe regarding hadoopConf as an optional parameters will be better.

@deshanxiao
Copy link
Contributor Author

@srowen Yes, it looks like not difficult. I will make other properties collapsed by default.

@SparkQA
Copy link

SparkQA commented Jan 16, 2019

Test build #101295 has finished for PR 23486 at commit b275970.

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

@SparkQA
Copy link

SparkQA commented Jan 16, 2019

Test build #101293 has finished for PR 23486 at commit ae78595.

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

@SparkQA
Copy link

SparkQA commented Jan 16, 2019

Test build #101294 has finished for PR 23486 at commit fd0b26a.

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

@SparkQA
Copy link

SparkQA commented Jan 16, 2019

Test build #101296 has finished for PR 23486 at commit 2fff471.

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

@deshanxiao
Copy link
Contributor Author

I try to make these properties collapsed by default.

Hadoop Properties
System Properties
Classpath Entries

It looks like:

image

@SparkQA
Copy link

SparkQA commented Jan 16, 2019

Test build #101298 has finished for PR 23486 at commit cbcd90c.

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

@SparkQA
Copy link

SparkQA commented Jan 16, 2019

Test build #101299 has finished for PR 23486 at commit 7bcd656.

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

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.

You'll have to resolve the MiMa warning:

[error]  * method this(org.apache.spark.status.api.v1.RuntimeInfo,scala.collection.Seq,scala.collection.Seq,scala.collection.Seq)Unit in class org.apache.spark.status.api.v1.ApplicationEnvironmentInfo does not have a correspondent in current version
[error]    filter with: ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.spark.status.api.v1.ApplicationEnvironmentInfo.this")

<a>System Properties</a>
</h4>
</span>
<div class="aggregated-systemProperties collapsible-table">
<div class="aggregated-systemProperties collapsible-table collapsed">
Copy link
Member

Choose a reason for hiding this comment

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

Nice, so only the Spark properties and system info are expanded by default? that sounds good.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, but collapseTablePageLoad in web.js may remember actions once expanded it.

@SparkQA
Copy link

SparkQA commented Jan 17, 2019

Test build #101339 has finished for PR 23486 at commit b9b434a.

  • This patch fails Scala style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@deshanxiao
Copy link
Contributor Author

Retest please.

@SparkQA
Copy link

SparkQA commented Jan 17, 2019

Test build #101340 has finished for PR 23486 at commit 1d921f7.

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

@SparkQA
Copy link

SparkQA commented Jan 17, 2019

Test build #101341 has finished for PR 23486 at commit 1b9d325.

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

@srowen
Copy link
Member

srowen commented Jan 17, 2019

Merged to master

@srowen srowen closed this in 650b879 Jan 17, 2019
@deshanxiao
Copy link
Contributor Author

jackylee-ch pushed a commit to jackylee-ch/spark that referenced this pull request Feb 18, 2019
… tab

## What changes were proposed in this pull request?

I know that yarn provided all hadoop configurations. But I guess it may be fine that the historyserver unify all configuration in it. It will be convenient for us to debug some problems.

## How was this patch tested?

![image](https://user-images.githubusercontent.com/42019462/50808610-4d742900-133a-11e9-868c-2976e856ed9a.png)

Closes apache#23486 from deshanxiao/spark-26457.

Lead-authored-by: xiaodeshan <xiaodeshan@xiaomi.com>
Co-authored-by: deshanxiao <42019462+deshanxiao@users.noreply.github.com>
Signed-off-by: Sean Owen <sean.owen@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants