Skip to content
Snippets Groups Projects
Commit d1a6f7aa authored by Raymond Liu's avatar Raymond Liu
Browse files

Use unmanaged source dir to include common yarn code

parent c5422e02
No related branches found
No related tags found
No related merge requests found
...@@ -85,11 +85,11 @@ object SparkBuild extends Build { ...@@ -85,11 +85,11 @@ object SparkBuild extends Build {
} }
// Conditionally include the yarn sub-project // Conditionally include the yarn sub-project
lazy val yarnCommon = Project("yarn-common", file("yarn/common"), settings = yarnCommonSettings) dependsOn(core) lazy val yarn20 = Project("yarn2-alpha", file("yarn/2.0"), settings = yarn20Settings) dependsOn(core)
lazy val yarnAPI = Project("yarn-api", file(if (isNewHadoop) "yarn/2.2" else "yarn/2.0"), settings = yarnAPISettings) dependsOn(yarnCommon) lazy val yarn22 = Project("yarn2-stable", file("yarn/2.2"), settings = yarn22Settings) dependsOn(core)
lazy val yarnScheduler = Project("yarn", file("yarn/scheduler"), settings = yarnSchedulerSettings) dependsOn(yarnAPI)
lazy val maybeYarn = if (isYarnEnabled) Seq[ClasspathDependency](yarnCommon, yarnAPI, yarnScheduler) else Seq[ClasspathDependency]() lazy val maybeYarn = if (isYarnEnabled) Seq[ClasspathDependency](if (isNewHadoop) yarn22 else yarn20) else Seq[ClasspathDependency]()
lazy val maybeYarnRef = if (isYarnEnabled) Seq[ProjectReference](yarnCommon, yarnAPI, yarnScheduler) else Seq[ProjectReference]() lazy val maybeYarnRef = if (isYarnEnabled) Seq[ProjectReference](if (isNewHadoop) yarn22 else yarn20) else Seq[ProjectReference]()
// Everything except assembly, tools and examples belong to packageProjects // Everything except assembly, tools and examples belong to packageProjects
lazy val packageProjects = Seq[ProjectReference](core, repl, bagel, streaming, mllib) ++ maybeYarnRef lazy val packageProjects = Seq[ProjectReference](core, repl, bagel, streaming, mllib) ++ maybeYarnRef
...@@ -319,16 +319,20 @@ object SparkBuild extends Build { ...@@ -319,16 +319,20 @@ object SparkBuild extends Build {
) )
) )
def yarnAPISettings = sharedSettings ++ Seq( def yarnCommonSettings = sharedSettings ++ Seq(
name := "spark-yarn-api" unmanagedSourceDirectories in Compile <++= baseDirectory { base =>
Seq(
base / "../common/src/main/scala"
)
}
) ++ extraYarnSettings ) ++ extraYarnSettings
def yarnCommonSettings = sharedSettings ++ Seq( def yarn20Settings = yarnCommonSettings ++ Seq(
name := "spark-yarn-common" name := "spark-yarn-2.0"
) )
def yarnSchedulerSettings = sharedSettings ++ Seq( def yarn22Settings = yarnCommonSettings ++ Seq(
name := "spark-yarn" name := "spark-yarn-2.2"
) )
// Conditionally include the YARN dependencies because some tools look at all sub-projects and will complain // Conditionally include the YARN dependencies because some tools look at all sub-projects and will complain
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment