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-3124] Fix the jar version conflict in uber-jar #2035

Closed

Conversation

chenghao-intel
Copy link
Contributor

Both netty-3.2.2.Final.jar and netty-3.6.6.Final.jar are flatten into the assembly package, however, the class(NioWorker) signature difference leads to the failure in launching sparksql CLI/ThriftServer.

And also a tiny bug found in CLISuite & HiveThriftServer2Suite after fixing the duplicated netty jar.

@SparkQA
Copy link

SparkQA commented Aug 19, 2014

QA tests have started for PR 2035 at commit fe62aa9.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Aug 19, 2014

QA tests have started for PR 2035 at commit 7d9e366.

  • This patch merges cleanly.

@@ -1172,8 +1172,13 @@
<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
<version>${zookeeper.version}</version>
Copy link
Contributor

Choose a reason for hiding this comment

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

There should not be modified.
We should modify the file sql/hive-thriftserver/pom.xml

    <dependency>
      <groupId>org.spark-project.hive</groupId>
      <artifactId>hive-cli</artifactId>
      <version>${hive.version}</version>
      <exclusions>
        <exclusion>
          <groupId>org.jboss.netty</groupId>
          <artifactId>netty</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

@SparkQA
Copy link

SparkQA commented Aug 19, 2014

QA tests have finished for PR 2035 at commit fe62aa9.

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

@SparkQA
Copy link

SparkQA commented Aug 19, 2014

QA tests have finished for PR 2035 at commit 7d9e366.

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

@SparkQA
Copy link

SparkQA commented Aug 20, 2014

QA tests have started for PR 2035 at commit 182b52b.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Aug 20, 2014

QA tests have finished for PR 2035 at commit 182b52b.

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

@chenghao-intel
Copy link
Contributor Author

test this please.

@SparkQA
Copy link

SparkQA commented Aug 20, 2014

QA tests have started for PR 2035 at commit 81fc0d7.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Aug 20, 2014

QA tests have finished for PR 2035 at commit 81fc0d7.

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

@marmbrus
Copy link
Contributor

test this please

@pwendell
Copy link
Contributor

I commented on the JIRA - but this is likely better solved by a dependency in the hive build, not changing around core dependencies.

@SparkQA
Copy link

SparkQA commented Aug 20, 2014

QA tests have started for PR 2035 at commit 81fc0d7.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Aug 20, 2014

QA tests have finished for PR 2035 at commit 81fc0d7.

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

@@ -65,6 +65,7 @@ class HiveThriftServer2Suite extends FunSuite with BeforeAndAfterAll with TestUt
val command =
s"""../../sbin/start-thriftserver.sh
| --master local
| --hiveconf hive.root.logger=INFO,console
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Make sure the hive test will be triggered.

@chenghao-intel
Copy link
Contributor Author

@pwendell I've updated the jira. You are right, it works well with hadoop 2.3, but failed under hadoop-2.0.0-mr1-cdh4.3.0, which I am working with.

@SparkQA
Copy link

SparkQA commented Aug 21, 2014

QA tests have started for PR 2035 at commit ade1ae0.

  • This patch merges cleanly.

@chenghao-intel
Copy link
Contributor Author

I was trying to update the pom.xml under sql/, but still failed in evicting the netty.3.2.2.Final.jar, and at last, I printed the it's dependency tree, and found the spark-core indirectly depends on netty.3.2.2.Final.jar via hadoop-client, curator, zookeeper etc., hence I have to updated the pom.xml under root and core. Not sure if you have better idea to solve this.

@SparkQA
Copy link

SparkQA commented Aug 21, 2014

QA tests have finished for PR 2035 at commit ade1ae0.

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

@chenghao-intel
Copy link
Contributor Author

It passed the unit test in my local.
Jenkins, test this please

@chenghao-intel
Copy link
Contributor Author

test this please

@SparkQA
Copy link

SparkQA commented Aug 21, 2014

QA tests have started for PR 2035 at commit ade1ae0.

  • This patch merges cleanly.

@witgo
Copy link
Contributor

witgo commented Aug 21, 2014

I think we need to modify this file: sql/hive-thriftserver/pom.xml

    <dependency>
      <groupId>org.spark-project.hive</groupId>
      <artifactId>hive-cli</artifactId>
      <version>${hive.version}</version>
      <exclusions>
        <exclusion>
          <groupId>org.jboss.netty</groupId>
          <artifactId>netty</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

@SparkQA
Copy link

SparkQA commented Aug 21, 2014

QA tests have finished for PR 2035 at commit ade1ae0.

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

@chenghao-intel
Copy link
Contributor Author

I pulled the latest master and only update the sql/hive-thriftserver/pom.xml as you suggested, however, both netty-3.2.2.Final.jar & netty-3.6.6.Final.jar exist under the folder lib_managed/bundled by running sbt/sbt -Phive -Phive-thriftserver -Dhadoop.version=2.0.0-mr1-cdh4.3.0 clean compile.

That's why I changed the pom.xml files under root and core. Not sure if you got time to reproduce that in your local?

@chenghao-intel chenghao-intel changed the title [SPARK-3124] [SQL] Fix the assembly jar conflict [SPARK-3124] Fix the jar version conflict in uber-jar Aug 21, 2014
@chenghao-intel
Copy link
Contributor Author

Sorry for the confusing, I've removed the SQL from the PR title.

@witgo
Copy link
Contributor

witgo commented Aug 21, 2014

./make-distribution.sh -Pyarn -Phadoop-2.3 -Phive-thriftserver -Phive -Dhadoop.version=2.3.0.

./bin/spark-sql --hiveconf hive.root.logger=INFO,console seems to be no problem,under the folder dist

@chenghao-intel
Copy link
Contributor Author

Exactly, I did the same test under hadoop-2.3, it plays well, but not for hadoop.version=2.0.0-mr1-cdh4.3.0. Probably the maven exclusion rule are not well configured for the earlier released hadoop.

@marmbrus
Copy link
Contributor

marmbrus commented Sep 3, 2014

@chenghao-intel, what is the status of this? Can you update this PR?

@SparkQA
Copy link

SparkQA commented Sep 3, 2014

QA tests have started for PR 2035 at commit f96ec21.

  • This patch merges cleanly.

@@ -108,6 +108,7 @@ class HiveThriftServer2Suite extends FunSuite with Logging {
logError(s"Failed to start Hive Thrift server within $timeout", cause)
case _ =>
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Minor change for triggering the HQL testing.

@chenghao-intel
Copy link
Contributor Author

@marmbrus this PR will fix method signature exception for the earlier released hadoop version in the uber-jar (like 2.0.0-mr1-cdh4.3.0), and it's harmless for current trunk(which is based on hadoop 2.3.0 for unit test). I created this PR just in case someone making uber-jar with different hadoop version other than default, which may causes runtime exception, like what I did.

@pwendell @witgo , any ideas?

@SparkQA
Copy link

SparkQA commented Sep 3, 2014

QA tests have finished for PR 2035 at commit f96ec21.

  • This patch fails unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • protected trait YarnAllocateResponse

@chenghao-intel
Copy link
Contributor Author

retest this please.

@SparkQA
Copy link

SparkQA commented Sep 4, 2014

QA tests have started for PR 2035 at commit f96ec21.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Sep 4, 2014

QA tests have finished for PR 2035 at commit f96ec21.

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

@chenghao-intel
Copy link
Contributor Author

test this please

@SparkQA
Copy link

SparkQA commented Sep 4, 2014

QA tests have started for PR 2035 at commit f96ec21.

  • This patch merges cleanly.

@witgo
Copy link
Contributor

witgo commented Sep 4, 2014

LGTM

@SparkQA
Copy link

SparkQA commented Sep 4, 2014

QA tests have finished for PR 2035 at commit f96ec21.

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

@chenghao-intel
Copy link
Contributor Author

thank you @witgo. @pwendell I think this is ready to be merged.

@SparkQA
Copy link

SparkQA commented Sep 6, 2014

QA tests have started for PR 2035 at commit f96ec21.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Sep 6, 2014

Tests timed out after a configured wait of 120m.

@SparkQA
Copy link

SparkQA commented Sep 15, 2014

QA tests have started for PR 2035 at commit f96ec21.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Sep 15, 2014

QA tests have finished for PR 2035 at commit f96ec21.

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

<exclusion>
<groupId>org.jboss.netty</groupId>
<artifactId>netty</artifactId>
</exclusion>
Copy link
Contributor

Choose a reason for hiding this comment

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

When building against Hadoop-2.0.2, I found that only this dependency exclusion (not the additional one you included below) was necessary to get past the error you mentioned.

@chenghao-intel
Copy link
Contributor Author

thanks, closing this PR.

@chenghao-intel chenghao-intel deleted the assembly_jar_conflict branch December 10, 2014 02:42
szehon-ho pushed a commit to szehon-ho/spark that referenced this pull request Sep 24, 2024
szehon-ho pushed a commit to szehon-ho/spark that referenced this pull request Sep 24, 2024
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.

6 participants