Skip to content

Conversation

@dongjoon-hyun
Copy link
Member

@dongjoon-hyun dongjoon-hyun commented Sep 15, 2019

What changes were proposed in this pull request?

SPARK-27122 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, 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

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-29087][SS] Use DelegatingServletContextHandler to avoid CCE [SPARK-29087][CORE][SS] Use DelegatingServletContextHandler to avoid CCE Sep 15, 2019
@dongjoon-hyun dongjoon-hyun changed the title [SPARK-29087][CORE][SS] Use DelegatingServletContextHandler to avoid CCE [SPARK-29087][CORE][STREAMING] Use DelegatingServletContextHandler to avoid CCE Sep 15, 2019
@dongjoon-hyun
Copy link
Member Author

cc @ajithme and @srowen

@SparkQA

This comment has been minimized.

@dongjoon-hyun

This comment has been minimized.

@SparkQA

This comment has been minimized.

@viirya
Copy link
Member

viirya commented Sep 15, 2019

retest this please

@SparkQA

This comment has been minimized.

@dongjoon-hyun

This comment has been minimized.

@SparkQA

This comment has been minimized.

@SparkQA
Copy link

SparkQA commented Sep 15, 2019

Test build #110615 has finished for PR 25791 at commit bed11a8.

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

@SparkQA
Copy link

SparkQA commented Sep 15, 2019

Test build #110620 has finished for PR 25791 at commit bed11a8.

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

@dongjoon-hyun
Copy link
Member Author

Thank you, @srowen and @viirya . Merged to master/2.4.

dongjoon-hyun added a commit that referenced this pull request Sep 15, 2019
… 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 <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
(cherry picked from commit 729b318)
Signed-off-by: Dongjoon Hyun <[email protected]>
@dongjoon-hyun dongjoon-hyun deleted the SPARK-29087 branch September 15, 2019 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants