diff options
author | liguoqiang <liguoqiang@rd.tuan800.com> | 2014-01-03 16:06:34 +0800 |
---|---|---|
committer | liguoqiang <liguoqiang@rd.tuan800.com> | 2014-01-03 16:06:34 +0800 |
commit | 8ddbd531a4112239a2fd63591b8184b438768a0c (patch) | |
tree | 45a18f715f0b7ef572e89021fa61275566f97ff0 /project | |
parent | b27b75f1c595139bdcebbadb43e89b0a7eadf2b5 (diff) | |
parent | 30b9db0abedbef7afa06a927a011147cfeca2a70 (diff) | |
download | spark-8ddbd531a4112239a2fd63591b8184b438768a0c.tar.gz spark-8ddbd531a4112239a2fd63591b8184b438768a0c.tar.bz2 spark-8ddbd531a4112239a2fd63591b8184b438768a0c.zip |
merge upstream/master
Diffstat (limited to 'project')
-rw-r--r-- | project/SparkBuild.scala | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/project/SparkBuild.scala b/project/SparkBuild.scala index 2eef2dfa5e..b0749cc9c4 100644 --- a/project/SparkBuild.scala +++ b/project/SparkBuild.scala @@ -85,12 +85,11 @@ object SparkBuild extends Build { } // Conditionally include the yarn sub-project - lazy val yarn = Project("yarn", file(if (isNewHadoop) "new-yarn" else "yarn"), settings = yarnSettings) dependsOn(core) + lazy val yarnAlpha = Project("yarn-alpha", file("yarn/alpha"), settings = yarnAlphaSettings) dependsOn(core) + lazy val yarn = Project("yarn", file("yarn/stable"), settings = yarnSettings) dependsOn(core) - //lazy val yarn = Project("yarn", file("yarn"), settings = yarnSettings) dependsOn(core) - - lazy val maybeYarn = if (isYarnEnabled) Seq[ClasspathDependency](yarn) else Seq[ClasspathDependency]() - lazy val maybeYarnRef = if (isYarnEnabled) Seq[ProjectReference](yarn) else Seq[ProjectReference]() + lazy val maybeYarn = if (isYarnEnabled) Seq[ClasspathDependency](if (isNewHadoop) yarn else yarnAlpha) else Seq[ClasspathDependency]() + lazy val maybeYarnRef = if (isYarnEnabled) Seq[ProjectReference](if (isNewHadoop) yarn else yarnAlpha) else Seq[ProjectReference]() // Everything except assembly, tools and examples belong to packageProjects lazy val packageProjects = Seq[ProjectReference](core, repl, bagel, streaming, mllib) ++ maybeYarnRef @@ -320,10 +319,29 @@ object SparkBuild extends Build { ) ) - def yarnSettings = sharedSettings ++ Seq( - name := "spark-yarn" + def yarnCommonSettings = sharedSettings ++ Seq( + unmanagedSourceDirectories in Compile <++= baseDirectory { base => + Seq( + base / "../common/src/main/scala" + ) + }, + + unmanagedSourceDirectories in Test <++= baseDirectory { base => + Seq( + base / "../common/src/test/scala" + ) + } + ) ++ extraYarnSettings + def yarnAlphaSettings = yarnCommonSettings ++ Seq( + name := "spark-yarn-alpha" + ) + + def yarnSettings = yarnCommonSettings ++ Seq( + name := "spark-yarn" + ) + // Conditionally include the YARN dependencies because some tools look at all sub-projects and will complain // if we refer to nonexistent dependencies (e.g. hadoop-yarn-api from a Hadoop version without YARN). def extraYarnSettings = if(isYarnEnabled) yarnEnabledSettings else Seq() |