Skip to content

Commit 9b29e34

Browse files
committed
Review feedback on PR
1 parent 46ed2ad commit 9b29e34

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/building-with-maven.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,4 @@ The debian package can then be found under assembly/target. We added the short c
7979

8080
## A note about Hadoop version 0.23.x
8181

82-
For building spark with hadoop 0.23.x and also yarn, you will have to provide a dependency on avro manually.
82+
For building spark with hadoop 0.23.x and also yarn, you will have to manually add a dependency on avro (org.apache.avro, avro, 1.7.4).

project/SparkBuild.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ object SparkBuild extends Build {
8787
case Some(v) => v.toBoolean
8888
}
8989
lazy val hadoopClient = if (hadoopVersion.startsWith("0.20.") || hadoopVersion == "1.0.0") "hadoop-core" else "hadoop-client"
90-
val isAvroNeeded = hadoopVersion.startsWith("0.23.") && isYarnEnabled
90+
val maybeAvro = if (hadoopVersion.startsWith("0.23.") && isYarnEnabled) Seq("org.apache.avro" % "avro" % "1.7.4") else Seq()
9191
// Conditionally include the yarn sub-project
9292
lazy val yarnAlpha = Project("yarn-alpha", file("yarn/alpha"), settings = yarnAlphaSettings) dependsOn(core)
9393
lazy val yarn = Project("yarn", file("yarn/stable"), settings = yarnSettings) dependsOn(core)
@@ -286,8 +286,8 @@ object SparkBuild extends Build {
286286
"com.twitter" %% "chill" % "0.3.1",
287287
"com.twitter" % "chill-java" % "0.3.1",
288288
"com.clearspring.analytics" % "stream" % "2.5.1"
289-
) ++ (if (isAvroNeeded) Seq(
290-
"org.apache.avro" % "avro" % "1.7.4") else Seq())
289+
),
290+
libraryDependencies ++= maybeAvro
291291
)
292292

293293
def rootSettings = sharedSettings ++ Seq(

0 commit comments

Comments
 (0)