Skip to content

Conversation

@mccheah
Copy link
Contributor

@mccheah mccheah commented Apr 26, 2016

What changes were proposed in this pull request?

Replace com.sun.jersey with org.glassfish.jersey. Changes to the Spark Web UI code were required to compile. The changes were relatively standard Jersey migration things.

How was this patch tested?

I did a manual test for the standalone web APIs. Although I didn't test the functionality of the security filter itself, the code that changed non-trivially is how we actually register the filter. I attached a debugger to the Spark master and verified that the SecurityFilter code is indeed invoked upon hitting /api/v1/applications.

Changes to the Spark Web UI code were required to compile. The changes
were relatively standard Jersey migration things.
@SparkQA
Copy link

SparkQA commented Apr 26, 2016

Test build #57035 has finished for PR 12715 at commit b86ed6f.

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

javassist-3.18.1-GA.jar
javax.annotation-api-1.2.jar
javax.inject-1.jar
javax.inject-2.4.0-b34.jar
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is it problematic to have both javax.inject-1 and javax.inject-2.4.0?

Copy link
Contributor

Choose a reason for hiding this comment

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

I wouldn't say problematic, but both provide the exact same set of classes, so it's at least redundant. Being a javax API, I at least assume the newer one is backwards compatible.

@SparkQA
Copy link

SparkQA commented Apr 26, 2016

Test build #57039 has finished for PR 12715 at commit b4d72d8.

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

yarn/pom.xml Outdated
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-core</artifactId>
<groupId>org.glassfish.jersey.core</groupId>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually this doesn't work because the Mini YARN cluster needs Jersey 1 to start up. Since this is only in test scope we should be fine to keep the Jersey 1 dependency here - I'll add a comment to clarify that.

@SparkQA
Copy link

SparkQA commented Apr 27, 2016

Test build #57041 has finished for PR 12715 at commit e2dbf03.

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

@SparkQA
Copy link

SparkQA commented Apr 27, 2016

Test build #57069 has finished for PR 12715 at commit 5793600.

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

@SparkQA
Copy link

SparkQA commented Apr 27, 2016

Test build #57067 has finished for PR 12715 at commit 313401b.

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

@vanzin
Copy link
Contributor

vanzin commented Apr 27, 2016

retest this please

@SparkQA
Copy link

SparkQA commented Apr 27, 2016

Test build #57070 has finished for PR 12715 at commit c9b5c3b.

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

@SparkQA
Copy link

SparkQA commented Apr 27, 2016

Test build #57082 has finished for PR 12715 at commit c9b5c3b.

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

antlr-runtime-3.4.jar
antlr4-runtime-4.5.2-1.jar
aopalliance-1.0.jar
aopalliance-repackaged-2.4.0-b34.jar
Copy link
Member

Choose a reason for hiding this comment

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

We'll probably have to look at the impact on the LICENSE file for all these dependency changes. I can help do that bit if once we're pretty sure this will work.

@mccheah
Copy link
Contributor Author

mccheah commented Apr 27, 2016

@JoshRosen I did not change the Jersey dependency for the docker-integration-tests project. Should we change that here or leave it alone?

@mccheah
Copy link
Contributor Author

mccheah commented Apr 27, 2016

Jenkins, retest this please

@SparkQA
Copy link

SparkQA commented Apr 27, 2016

Test build #57155 has finished for PR 12715 at commit c9b5c3b.

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

@SparkQA
Copy link

SparkQA commented Apr 27, 2016

Test build #57174 has finished for PR 12715 at commit bed5618.

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

@SparkQA
Copy link

SparkQA commented Apr 27, 2016

Test build #57177 has finished for PR 12715 at commit bfb178a.

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

@SparkQA
Copy link

SparkQA commented Apr 28, 2016

Test build #57182 has finished for PR 12715 at commit a199cb6.

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

@mccheah
Copy link
Contributor Author

mccheah commented Apr 28, 2016

Hm... Are SparkLauncher tests just flaky or could this change have directly affected that?

@mccheah
Copy link
Contributor Author

mccheah commented Apr 28, 2016

Jenkins, retest this please

@vanzin
Copy link
Contributor

vanzin commented Apr 28, 2016

That particular one shouldn't be affected by these changes. I'll take a closer look at it separately.

@SparkQA
Copy link

SparkQA commented Apr 28, 2016

Test build #57184 has finished for PR 12715 at commit 5a95559.

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

@SparkQA
Copy link

SparkQA commented Apr 28, 2016

Test build #57196 has finished for PR 12715 at commit 5a95559.

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

@vanzin
Copy link
Contributor

vanzin commented Apr 28, 2016

LGTM, I'll leave this for @srowen since he had a comment about licenses.

@srowen
Copy link
Member

srowen commented Apr 29, 2016

Yeah you can update the following section of NOTICE to read as follows and that should be it:

========================================================================
Common Development and Distribution License 1.0
========================================================================

The following components are provided under the Common Development and Distribution License 1.0. See project link for details.

     (CDDL 1.0) Glassfish Jasper (org.mortbay.jetty:jsp-2.1:6.1.14 - http://jetty.mortbay.org/project/modules/jsp-2.1)
     (CDDL 1.0) JAX-RS (https://jax-rs-spec.java.net/)
     (CDDL 1.0) Servlet Specification 2.5 API (org.mortbay.jetty:servlet-api-2.5:6.1.14 - http://jetty.mortbay.org/project/modules/servlet-api-2.5)
     (CDDL 1.0) (GPL2 w/ CPE) javax.annotation API (https://glassfish.java.net/nonav/public/CDDL+GPL.html)
     (COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0) (GNU General Public Library) Streaming API for XML (javax.xml.stream:stax-api:1.0-2 - no url defined)
     (Common Development and Distribution License (CDDL) v1.0) JavaBeans Activation Framework (JAF) (javax.activation:activation:1.1 - http://java.sun.com/products/javabeans/jaf/index.jsp)

========================================================================
Common Development and Distribution License 1.1
========================================================================

The following components are provided under the Common Development and Distribution License 1.1. See project link for details.

     (CDDL 1.1) (GPL2 w/ CPE) org.glassfish.hk2 (https://hk2.java.net)
     (CDDL 1.1) (GPL2 w/ CPE) JAXB API bundle for GlassFish V3 (javax.xml.bind:jaxb-api:2.2.2 - https://jaxb.dev.java.net/)
     (CDDL 1.1) (GPL2 w/ CPE) JAXB RI (com.sun.xml.bind:jaxb-impl:2.2.3-1 - http://jaxb.java.net/)
     (CDDL 1.1) (GPL2 w/ CPE) Jersey 2 (https://jersey.java.net)

yarn/pom.xml Outdated
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-core</artifactId>
<scope>test</scope>
<version>1.9</version>
Copy link
Member

Choose a reason for hiding this comment

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

One last finishing touch .. you could define (in just this pom) a property for Jersey 1.x versions to make sure they're modified together.

@mccheah
Copy link
Contributor Author

mccheah commented May 3, 2016

@srowen Should the NOTICE still contain Jersey 1 since I think we still pull it in explicitly for YARN unit tests?

@srowen
Copy link
Member

srowen commented May 3, 2016

This is looking good. Regarding the license, it depends on whether the artifacts we distribute contain Jersey 1.x or not. I have the impression it isn't at the moment. If you have the build handy and can look at the assembly and grep its contents, that would help verify whether 1.x classes are still there or not. If not, this is fine. Otherwise just restore the Jersey 1.x license statements.

@SparkQA
Copy link

SparkQA commented May 3, 2016

Test build #57622 has finished for PR 12715 at commit 70d4844.

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

@mccheah
Copy link
Contributor Author

mccheah commented May 3, 2016

I didn't see any old-Jersey jars in the lib directory.

@mccheah
Copy link
Contributor Author

mccheah commented May 4, 2016

@srowen given that Jersey 1 isn't being distributed, this PR should be good to go?

@srowen
Copy link
Member

srowen commented May 4, 2016

LGTM; let me leave this open a short while longer for comments.

@fabriziocucci
Copy link

Question: will this be ported to the 1.6 branch?

@srowen
Copy link
Member

srowen commented May 4, 2016

No, it's too significant a change for a maintenance release.

@fabriziocucci
Copy link

Thanks Sean. So, just to recap regarding this, whoever is stuck trying to use spark in a web application based on Jersey 2 has currently the following options:

  • wait for spark 2.0;
  • rollback the web application to use Jersey 1.9 (to be consistent with spark);
  • rollback the spark version to be 1.3.1 (the only one that can be easily integrated by simply excluding the jersey-server dependecy);
  • replace Jersey 2 in the web application with something else (e.g. spring mvc).

Is my understanding correct?

@srowen
Copy link
Member

srowen commented May 4, 2016

I think the best option is to shade Jersey if you need a different version.

@srowen
Copy link
Member

srowen commented May 5, 2016

Merged to master/2.0

@asfgit asfgit closed this in b7fdc23 May 5, 2016
asfgit pushed a commit that referenced this pull request May 5, 2016
## What changes were proposed in this pull request?

Replace com.sun.jersey with org.glassfish.jersey. Changes to the Spark Web UI code were required to compile. The changes were relatively standard Jersey migration things.

## How was this patch tested?

I did a manual test for the standalone web APIs. Although I didn't test the functionality of the security filter itself, the code that changed non-trivially is how we actually register the filter. I attached a debugger to the Spark master and verified that the SecurityFilter code is indeed invoked upon hitting /api/v1/applications.

Author: mcheah <[email protected]>

Closes #12715 from mccheah/feature/upgrade-jersey.

(cherry picked from commit b7fdc23)
Signed-off-by: Sean Owen <[email protected]>
@robert3005 robert3005 deleted the feature/upgrade-jersey branch September 24, 2016 04:09
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.

5 participants