Github user mridulm commented on a diff in the pull request:
https://github.com/apache/spark/pull/15553#discussion_r84374076
--- Diff: sql/hive-thriftserver/pom.xml ---
@@ -41,11 +41,8 @@
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.apache.spark</groupId>
- <artifactId>spark-core_${scala.binary.version}</artifactId>
- <version>${project.version}</version>
- <type>test-jar</type>
- <scope>test</scope>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-servlet</artifactId>
--- End diff --
@srowen I tried digging a bit deeper into this.
Via 'dependency:list -DincludeParents=true', on master, I do see jetty
dependencies making into the dependencies for thrift server.
Via 'dependency:analyze', in master for thrift server, I see this :
```
[WARNING] Used undeclared dependencies found:
[WARNING] org.apache.hadoop:hadoop-common:jar:2.7.3:compile
[WARNING] org.scala-lang:scala-library:jar:2.11.8:compile
[WARNING] org.seleniumhq.selenium:selenium-api:jar:2.52.0:test
[WARNING] org.eclipse.jetty:jetty-servlet:jar:9.2.16.v20160414:provided
[WARNING] commons-lang:commons-lang:jar:2.6:compile
[WARNING] org.scala-lang.modules:scala-xml_2.11:jar:1.0.2:compile
[WARNING] org.spark-project.hive:hive-exec:jar:1.2.1.spark2:compile
[WARNING] org.slf4j:slf4j-api:jar:1.7.16:compile
[WARNING] jline:jline:jar:2.12.1:compile
[WARNING] commons-cli:commons-cli:jar:1.2:compile
[WARNING] commons-codec:commons-codec:jar:1.10:compile
[WARNING] org.apache.spark:spark-sql_2.11:jar:2.1.0-SNAPSHOT:compile
[WARNING] org.apache.spark:spark-catalyst_2.11:jar:2.1.0-SNAPSHOT:compile
[WARNING] org.eclipse.jetty:jetty-util:jar:9.2.16.v20160414:provided
[WARNING] commons-io:commons-io:jar:2.4:compile
[WARNING] javax.servlet:javax.servlet-api:jar:3.1.0:compile
[WARNING] org.apache.commons:commons-lang3:jar:3.5:compile
[WARNING] javax.ws.rs:javax.ws.rs-api:jar:2.0.1:compile
[WARNING] org.apache.thrift:libthrift:jar:0.9.2:compile
[WARNING] log4j:apache-log4j-extras:jar:1.2.17:compile
[WARNING] net.sourceforge.htmlunit:htmlunit:jar:2.18:test
[WARNING] org.spark-project.hive:hive-metastore:jar:1.2.1.spark2:compile
[WARNING] org.apache.spark:spark-core_2.11:jar:2.1.0-SNAPSHOT:compile
[WARNING] org.eclipse.jetty:jetty-server:jar:9.2.16.v20160414:provided
[WARNING] org.slf4j:jcl-over-slf4j:jar:1.7.16:compile
[WARNING] org.apache.httpcomponents:httpcore:jar:4.4.4:compile
[WARNING] Unused declared dependencies found:
[WARNING] org.seleniumhq.selenium:selenium-java:jar:2.52.0:test
[WARNING] org.spark-project.hive:hive-beeline:jar:1.2.1.spark2:compile
[WARNING] org.spark-project.spark:unused:jar:1.0.0:compile
[WARNING] com.novocode:junit-interface:jar:0.11:test
[WARNING] junit:junit:jar:4.12:test
```
Which matches what I see in the classpath declarations - that jetty
dependencies are making it into classpath.
I suspect it perhaps has to do with provided scope interacting with test
scope dependencies.
After this PR, 'dependency:list -DincludeParents=true' does not show jetty
as a dependency without the explicit inclusion above.
Given this, I assume adding the explicit dependency is the right thing to
do (it is a transitive depedency anyway currently). In order to preserve
earlier behavior of not including jetty with compile scope, I am explicitly
changing the above to 'provided' scope.
Any thoughts @srowen ?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]