Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions dev/deps/spark-deps-hadoop-3.1
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ jackson-core-2.6.7.jar
jackson-core-asl-1.9.13.jar
jackson-databind-2.6.7.1.jar
jackson-dataformat-yaml-2.6.7.jar
jackson-jaxrs-base-2.7.8.jar
jackson-jaxrs-json-provider-2.7.8.jar
jackson-mapper-asl-1.9.13.jar
jackson-module-jaxb-annotations-2.6.7.jar
jackson-module-paranamer-2.7.9.jar
Expand Down
4 changes: 2 additions & 2 deletions dev/run-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,8 @@ def get_hadoop_profiles(hadoop_version):
"""

sbt_maven_hadoop_profiles = {
"hadoop2.6": ["-Phadoop-2.6"],
"hadoop2.7": ["-Phadoop-2.7"],
"hadoop2.6": ["-Phadoop-3.1"],
"hadoop2.7": ["-Phadoop-3.1"],
}

if hadoop_version in sbt_maven_hadoop_profiles:
Expand Down
6 changes: 5 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
<flume.version>1.6.0</flume.version>
<zookeeper.version>3.4.6</zookeeper.version>
<curator.version>2.6.0</curator.version>
<hive.group>org.spark-project.hive</hive.group>
<hive.group>com.github.hyukjinkwon</hive.group>
Copy link
Member Author

@HyukjinKwon HyukjinKwon Jun 16, 2018

Choose a reason for hiding this comment

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

I redistributed Spark's Hive fork that contains single line fix for Hadoop 3 support for dev and testing purpose.

<!-- Version used in Maven Hive dependency -->
<hive.version>1.2.1.spark2</hive.version>
<!-- Version used for internal directory structure -->
Expand Down Expand Up @@ -1080,6 +1080,10 @@
<groupId>com.sun.jersey.contribs</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down
17 changes: 15 additions & 2 deletions project/SparkBuild.scala
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ object SparkBuild extends PomBuild {
// Note ordering of these settings matter.
/* Enable shared settings on all projects */
(allProjects ++ optionallyEnabledProjects ++ assemblyProjects ++ copyJarsProjects ++ Seq(spark, tools))
.foreach(enable(sharedSettings ++ DependencyOverrides.settings ++
.foreach(enable(sharedSettings ++ DependencyOverrides.settings ++ ExcludeDependencies.settings ++
ExcludedDependencies.settings ++ Checkstyle.settings))

/* Enable tests settings for all projects except examples, assembly and tools */
Expand Down Expand Up @@ -464,7 +464,20 @@ object DockerIntegrationTests {
*/
object DependencyOverrides {
lazy val settings = Seq(
dependencyOverrides += "com.google.guava" % "guava" % "14.0.1")
dependencyOverrides += "com.google.guava" % "guava" % "14.0.1",
dependencyOverrides += "com.fasterxml.jackson.core" % "jackson-annotations" % "2.6.7",
dependencyOverrides += "com.fasterxml.jackson.core" % "jackson-core" % "2.6.7",
dependencyOverrides += "com.fasterxml.jackson.core" % "jackson-module-jaxb-annotations" % "2.6.7",
dependencyOverrides += "com.fasterxml.jackson.core" % "jackson-databind" % "2.6.7")
}

/**
* Exclusions to work around sbt's dependency resolution being different from Maven's.
*/
object ExcludeDependencies {
lazy val settings = Seq(
excludeDependencies += "com.fasterxml.jackson.jaxrs" % "jackson-jaxrs-json-provider",
excludeDependencies += "javax.ws.rs" % "jsr311-api")
Copy link
Member Author

Choose a reason for hiding this comment

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

Note to myself: this seems coming from Jersey which we exclude the dependencies in Maven. Seems because different dependency resolution between Maven and SBT IIUC.

}

/**
Expand Down
2 changes: 1 addition & 1 deletion sql/hive/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
<artifactId>avro</artifactId>
</dependency>
<!-- use the build matching the hadoop api of avro-mapred (i.e. no classifier for hadoop 1 API,
hadoop2 classifier for hadoop 2 API. avro-mapred is a dependency of org.spark-project.hive:hive-serde -->
hadoop2 classifier for hadoop 2 API. avro-mapred is a dependency of com.github.hyukjinkwon:hive-serde -->
<dependency>
<groupId>org.apache.avro</groupId>
<artifactId>avro-mapred</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,10 @@ private[hive] class IsolatedClientLoader(

protected def isSharedClass(name: String): Boolean = {
val isHadoopClass =
name.startsWith("org.apache.hadoop.") && !name.startsWith("org.apache.hadoop.hive.")
name.startsWith("org.apache.hadoop.") && !name.startsWith("org.apache.hadoop.hive.") ||
// Also, includes configuration2 as a min fix for Hadoop 3+ for now. This is failed
// during class resolution. It is fine when 'sharesHadoopClasses' is disabled.
name.startsWith("org.apache.commons.configuration2.")

name.startsWith("org.slf4j") ||
name.startsWith("org.apache.log4j") || // log4j1.x
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import java.io.{BufferedWriter, File, FileWriter}
import scala.tools.nsc.Properties

import org.apache.hadoop.fs.Path
import org.apache.hadoop.util.VersionInfo
import org.scalatest.{BeforeAndAfterEach, Matchers}

import org.apache.spark._
Expand Down Expand Up @@ -123,6 +124,7 @@ class HiveSparkSubmitSuite
}

test("SPARK-8020: set sql conf in spark conf") {
assume(VersionInfo.getVersion < "3.0.0", "Only Hive 2.3+ supports Hadoop 3+. See HIVE-16081.")
val unusedJar = TestUtils.createJarWithClasses(Seq.empty)
val args = Seq(
"--class", SparkSQLConfTest.getClass.getName.stripSuffix("$"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package org.apache.spark.sql.hive.client

import org.apache.hadoop.conf.Configuration
import org.apache.hadoop.util.VersionInfo
import org.scalactic.source.Position
import org.scalatest.Tag

Expand Down Expand Up @@ -49,6 +50,9 @@ private[client] abstract class HiveVersionSuite(version: String) extends SparkFu

override protected def test(testName: String, testTags: Tag*)(testFun: => Any)
(implicit pos: Position): Unit = {
assume(
VersionInfo.getVersion < "3.0.0" || version >= "2.3",
"Hive 2.3+ supports Hadoop 3+. See HIVE-16081.")
super.test(s"$version: $testName", testTags: _*)(testFun)
}
}
Loading