Uh oh!
There was an error while loading. Please reload this page.
[SPARK-27122][core] Jetty classes must not be return via getters in org.apache.spark.ui.WebUI - #24088
[SPARK-27122][core] Jetty classes must not be return via getters in org.apache.spark.ui.WebUI#24088ajithme wants to merge 4 commits into
Conversation
ajithme
commented
Mar 14, 2019
cloud-fan
commented
Mar 14, 2019
ok to test |
cloud-fan
commented
Mar 14, 2019
The title makes me think that this is a patch for build files(sbt or maven), but it is not. Can you explain how do you achieve it? |
ajithme
commented
Mar 14, 2019
@cloud-fan i have updated the PR description and PR title. Does it seem right now.? |
SparkQA
commented
Mar 14, 2019
Test build #103495 has finished for PR 24088 at commit
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
ajithme
commented
Mar 15, 2019
Updated as per review comments. Please check |
There was a problem hiding this comment.
This is not the right style. See the class's constructor for an example.
There was a problem hiding this comment.
@vanzin I have run scalafmt on modified class and updated the PR. Is it ok now.?
SparkQA
commented
Mar 15, 2019
Test build #103525 has finished for PR 24088 at commit
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
srowen
left a comment
There was a problem hiding this comment.
I'm OK with this approach, as opposed to adjusting the classpath. @ajithme although I only encountered this when running vs Java 11, it doesn't seem specific to Java 11. Maybe it was really just triggered by running the test in isolation. Anyway, seems OK to fix.
vanzin
commented
Mar 15, 2019
Looks ok pending tests which don't seem to have re-triggered... |
vanzin
commented
Mar 15, 2019
retest this please |
SparkQA
commented
Mar 15, 2019
Test build #103535 has finished for PR 24088 at commit
|
SparkQA
commented
Mar 16, 2019
Test build #4629 has started for PR 24088 at commit |
SparkQA
commented
Mar 17, 2019
Test build #4633 has finished for PR 24088 at commit
|
srowen
commented
Mar 17, 2019
Merged to master |
dongjoon-hyun
commented
Sep 12, 2019
Hi, All. |
dongjoon-hyun
commented
Sep 12, 2019
cc @dbtsai |
srowen
commented
Sep 12, 2019
This is a pretty internal change right? I think it could be fine for 2.4. |
dongjoon-hyun
commented
Sep 12, 2019
dongjoon-hyun
commented
Sep 15, 2019
I made a backport PR to |
… in org.apache.spark.ui.WebUI ### What changes were proposed in this pull request? This is a backport of #24088 to avoid CCE. ### Why are the changes needed? When we run YarnSchedulerBackendSuite, the class path seems to be made from the classes folder(`resource-managers/yarn/target/scala-2.12/classes`) instead of jar (`resource-managers/yarn/target/spark-yarn_2.12-*-SNAPSHOT.jar`) . `ui.getHandlers` is in spark-core and its loaded from spark-core.jar which is shaded and hence refers to `org.spark_project.jetty.servlet.ServletContextHandler` Here in org.apache.spark.scheduler.cluster.YarnSchedulerBackend, as its not shaded, it expects org.eclipse.jetty.servlet.ServletContextHandler Refer discussion https://issues.apache.org/jira/browse/SPARK-27122?focusedCommentId=16792318&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16792318 Hence as a fix, org.apache.spark.ui.WebUI must only return a wrapper class instance or references so that Jetty classes can be avoided in getters which are accessed outside spark-core ### Does this PR introduce any user-facing change? No. ### How was this patch tested? Pass the Jenkins with the existing tests. Closes#25793 from dongjoon-hyun/SPARK-27122. Authored-by: Ajith <ajith2489@gmail.com> Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
… avoid CCE ### What changes were proposed in this pull request? [SPARK-27122](#24088) fixes `ClassCastException` at `yarn` module by introducing `DelegatingServletContextHandler`. Initially, this was discovered with JDK9+, but the class path issues affected JDK8 environment, too. After [SPARK-28709](#25439), I also hit the similar issue at `streaming` module. This PR aims to fix `streaming` module by adding `getContextPath` to `DelegatingServletContextHandler` and using it. ### Why are the changes needed? Currently, when we test `streaming` module independently, it fails like the following. ``` $ build/mvn test -pl streaming ... UISeleniumSuite: - attaching and detaching a Streaming tab *** FAILED *** java.lang.ClassCastException: org.sparkproject.jetty.servlet.ServletContextHandler cannot be cast to org.eclipse.jetty.servlet.ServletContextHandler ... Tests: succeeded 337, failed 1, canceled 0, ignored 1, pending 0 *** 1 TEST FAILED *** [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ ``` ### Does this PR introduce any user-facing change? No. ### How was this patch tested? Pass the Jenkins with the modified tests. And do the following manually. Since you can observe this when you run `streaming` module test only (instead of running all), you need to install the changed `core` module and use it. ``` $ java -version openjdk version "1.8.0_222" OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_222-b10) OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.222-b10, mixed mode) $ build/mvn install -DskipTests $ build/mvn test -pl streaming ``` Closes#25791 from dongjoon-hyun/SPARK-29087. Authored-by: Dongjoon Hyun <dhyun@apple.com> Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
… avoid CCE ### What changes were proposed in this pull request? [SPARK-27122](#24088) fixes `ClassCastException` at `yarn` module by introducing `DelegatingServletContextHandler`. Initially, this was discovered with JDK9+, but the class path issues affected JDK8 environment, too. After [SPARK-28709](#25439), I also hit the similar issue at `streaming` module. This PR aims to fix `streaming` module by adding `getContextPath` to `DelegatingServletContextHandler` and using it. ### Why are the changes needed? Currently, when we test `streaming` module independently, it fails like the following. ``` $ build/mvn test -pl streaming ... UISeleniumSuite: - attaching and detaching a Streaming tab *** FAILED *** java.lang.ClassCastException: org.sparkproject.jetty.servlet.ServletContextHandler cannot be cast to org.eclipse.jetty.servlet.ServletContextHandler ... Tests: succeeded 337, failed 1, canceled 0, ignored 1, pending 0 *** 1 TEST FAILED *** [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ ``` ### Does this PR introduce any user-facing change? No. ### How was this patch tested? Pass the Jenkins with the modified tests. And do the following manually. Since you can observe this when you run `streaming` module test only (instead of running all), you need to install the changed `core` module and use it. ``` $ java -version openjdk version "1.8.0_222" OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_222-b10) OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.222-b10, mixed mode) $ build/mvn install -DskipTests $ build/mvn test -pl streaming ``` Closes#25791 from dongjoon-hyun/SPARK-29087. Authored-by: Dongjoon Hyun <dhyun@apple.com> Signed-off-by: Dongjoon Hyun <dhyun@apple.com> (cherry picked from commit 729b318) Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
What changes were proposed in this pull request?
When we run YarnSchedulerBackendSuite, the class path seems to be made from the classes folder(resource-managers/yarn/target/scala-2.12/classes) instead of jar (resource-managers/yarn/target/spark-yarn_2.12-3.0.0-SNAPSHOT.jar) . ui.getHandlers is in spark-core and its loaded from spark-core.jar which is shaded and hence refers to org.spark_project.jetty.servlet.ServletContextHandler
Here in org.apache.spark.scheduler.cluster.YarnSchedulerBackend, as its not shaded, it expects org.eclipse.jetty.servlet.ServletContextHandler
Refer discussion @ https://issues.apache.org/jira/browse/SPARK-27122?focusedCommentId=16792318&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16792318
Hence as a fix, org.apache.spark.ui.WebUI must only return a wrapper class instance or references so that Jetty classes can be avoided in getters which are accessed outside spark-core
How was this patch tested?
Existing UT can pass