diff --git a/assembly/pom.xml b/assembly/pom.xml index bd948344156ea65c0a8212e5558c094f30d65f07..079509bec6fb7a90dec018b79172409aaf4d8737 100644 --- a/assembly/pom.xml +++ b/assembly/pom.xml @@ -124,21 +124,21 @@ <profiles> <profile> - <id>hadoop2-yarn</id> + <id>yarn-alpha</id> <dependencies> <dependency> <groupId>org.apache.spark</groupId> - <artifactId>spark-yarn-2.0_${scala.binary.version}</artifactId> + <artifactId>spark-yarn-alpha_${scala.binary.version}</artifactId> <version>${project.version}</version> </dependency> </dependencies> </profile> <profile> - <id>hadoop2.2-yarn</id> + <id>yarn</id> <dependencies> <dependency> <groupId>org.apache.spark</groupId> - <artifactId>spark-yarn-2.2_${scala.binary.version}</artifactId> + <artifactId>spark-yarn_${scala.binary.version}</artifactId> <version>${project.version}</version> </dependency> </dependencies> diff --git a/docs/building-with-maven.md b/docs/building-with-maven.md index 699b10b188612261d6a5ff89ac8454fec9d1ce1f..b9ff0af76f6478f49fe37a0e6a360796eb1d967a 100644 --- a/docs/building-with-maven.md +++ b/docs/building-with-maven.md @@ -37,16 +37,16 @@ For Apache Hadoop versions 1.x, Cloudera CDH MRv1, and other Hadoop versions wit # Cloudera CDH 4.2.0 with MapReduce v1 $ mvn -Dhadoop.version=2.0.0-mr1-cdh4.2.0 -DskipTests clean package -For Apache Hadoop 2.x, 0.23.x, Cloudera CDH MRv2, and other Hadoop versions with YARN, you should enable the "hadoop2-yarn" or "hadoop2.2-yarn" profile and set the "hadoop.version", "yarn.version" property: +For Apache Hadoop 2.x, 0.23.x, Cloudera CDH MRv2, and other Hadoop versions with YARN, you should enable the "yarn-alpha" or "yarn" profile and set the "hadoop.version", "yarn.version" property: # Apache Hadoop 2.0.5-alpha - $ mvn -Phadoop2-yarn -Dhadoop.version=2.0.5-alpha -Dyarn.version=2.0.5-alpha -DskipTests clean package + $ mvn -Pyarn-alpha -Dhadoop.version=2.0.5-alpha -Dyarn.version=2.0.5-alpha -DskipTests clean package # Cloudera CDH 4.2.0 with MapReduce v2 - $ mvn -Phadoop2-yarn -Dhadoop.version=2.0.0-cdh4.2.0 -Dyarn.version=2.0.0-chd4.2.0 -DskipTests clean package + $ mvn -Pyarn-alpha -Dhadoop.version=2.0.0-cdh4.2.0 -Dyarn.version=2.0.0-chd4.2.0 -DskipTests clean package # Apache Hadoop 2.2.X ( e.g. 2.2.0 as below ) and newer - $ mvn -Phadoop2.2-yarn -Dhadoop.version=2.2.0 -Dyarn.version=2.2.0 -DskipTests clean package + $ mvn -Pyarn -Dhadoop.version=2.2.0 -Dyarn.version=2.2.0 -DskipTests clean package ## Spark Tests in Maven ## diff --git a/pom.xml b/pom.xml index a2c1f6d53d2fb20f61698f4b84d58018b92a4272..aa2f076aacc2423fba4e319378f1bf6e304eadfb 100644 --- a/pom.xml +++ b/pom.xml @@ -722,7 +722,7 @@ <profiles> <profile> - <id>hadoop2-yarn</id> + <id>yarn-alpha</id> <properties> <hadoop.major.version>2</hadoop.major.version> <!-- 0.23.* is same as 2.0.* - except hardened to run production jobs --> @@ -738,7 +738,7 @@ </profile> <profile> - <id>hadoop2.2-yarn</id> + <id>yarn</id> <properties> <hadoop.major.version>2</hadoop.major.version> <hadoop.version>2.2.0</hadoop.version> diff --git a/project/SparkBuild.scala b/project/SparkBuild.scala index bc9c02d96ff1837fd35767ab6bc747cfd0e73b80..b0749cc9c466fc4eb99fc06d324eda086c2310c7 100644 --- a/project/SparkBuild.scala +++ b/project/SparkBuild.scala @@ -85,11 +85,11 @@ object SparkBuild extends Build { } // Conditionally include the yarn sub-project - lazy val yarn20 = Project("yarn2-alpha", file("yarn/2.0"), settings = yarn20Settings) dependsOn(core) - lazy val yarn22 = Project("yarn2-stable", file("yarn/2.2"), settings = yarn22Settings) 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 maybeYarn = if (isYarnEnabled) Seq[ClasspathDependency](if (isNewHadoop) yarn22 else yarn20) else Seq[ClasspathDependency]() - lazy val maybeYarnRef = if (isYarnEnabled) Seq[ProjectReference](if (isNewHadoop) yarn22 else yarn20) 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 @@ -334,12 +334,12 @@ object SparkBuild extends Build { ) ++ extraYarnSettings - def yarn20Settings = yarnCommonSettings ++ Seq( - name := "spark-yarn-2.0" + def yarnAlphaSettings = yarnCommonSettings ++ Seq( + name := "spark-yarn-alpha" ) - def yarn22Settings = yarnCommonSettings ++ Seq( - name := "spark-yarn-2.2" + def yarnSettings = yarnCommonSettings ++ Seq( + name := "spark-yarn" ) // Conditionally include the YARN dependencies because some tools look at all sub-projects and will complain diff --git a/yarn/README.md b/yarn/README.md index 0d63bd9352d75511049eab03915a082f9a59d29f..9a7a1dd838dea01bb2b4b278bb81eda9bcf8e6d3 100644 --- a/yarn/README.md +++ b/yarn/README.md @@ -4,9 +4,9 @@ Hadoop Yarn related codes are organized in separate directories for easy managem * common : Common codes that do not depending on specific version of Hadoop. - * 2.0 / 2.2 : Codes that involve specific version of Hadoop YARN API. + * alpha / stable : Codes that involve specific version of Hadoop YARN API. - 2.0 actually represents 0.23 and 2.0 - 2.2 actually represents 2.2 and later, until the API is break again. + alpha represents 0.23 and 2.0.x + stable represents 2.2 and later, until the API is break again. -2.0 / 2.2 will build together with common dir into a single jar +alpha / stable will build together with common dir into a single jar diff --git a/yarn/2.2/pom.xml b/yarn/alpha/pom.xml similarity index 97% rename from yarn/2.2/pom.xml rename to yarn/alpha/pom.xml index 345462a2c09e0f94226d7c81e8c91a64787b45a8..94812f8c45c528fb38a03d1e640cb1d2240f6c40 100644 --- a/yarn/2.2/pom.xml +++ b/yarn/alpha/pom.xml @@ -25,9 +25,9 @@ </parent> <groupId>org.apache.spark</groupId> - <artifactId>spark-yarn-2.2_2.10</artifactId> + <artifactId>spark-yarn-alpha_2.10</artifactId> <packaging>jar</packaging> - <name>Spark Project YARN 2.2</name> + <name>Spark Project YARN Alpha API</name> <url>http://spark.incubator.apache.org/</url> <build> diff --git a/yarn/2.0/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala b/yarn/alpha/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala similarity index 100% rename from yarn/2.0/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala rename to yarn/alpha/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala diff --git a/yarn/2.0/src/main/scala/org/apache/spark/deploy/yarn/Client.scala b/yarn/alpha/src/main/scala/org/apache/spark/deploy/yarn/Client.scala similarity index 100% rename from yarn/2.0/src/main/scala/org/apache/spark/deploy/yarn/Client.scala rename to yarn/alpha/src/main/scala/org/apache/spark/deploy/yarn/Client.scala diff --git a/yarn/2.0/src/main/scala/org/apache/spark/deploy/yarn/WorkerLauncher.scala b/yarn/alpha/src/main/scala/org/apache/spark/deploy/yarn/WorkerLauncher.scala similarity index 100% rename from yarn/2.0/src/main/scala/org/apache/spark/deploy/yarn/WorkerLauncher.scala rename to yarn/alpha/src/main/scala/org/apache/spark/deploy/yarn/WorkerLauncher.scala diff --git a/yarn/2.0/src/main/scala/org/apache/spark/deploy/yarn/WorkerRunnable.scala b/yarn/alpha/src/main/scala/org/apache/spark/deploy/yarn/WorkerRunnable.scala similarity index 100% rename from yarn/2.0/src/main/scala/org/apache/spark/deploy/yarn/WorkerRunnable.scala rename to yarn/alpha/src/main/scala/org/apache/spark/deploy/yarn/WorkerRunnable.scala diff --git a/yarn/2.0/src/main/scala/org/apache/spark/deploy/yarn/YarnAllocationHandler.scala b/yarn/alpha/src/main/scala/org/apache/spark/deploy/yarn/YarnAllocationHandler.scala similarity index 100% rename from yarn/2.0/src/main/scala/org/apache/spark/deploy/yarn/YarnAllocationHandler.scala rename to yarn/alpha/src/main/scala/org/apache/spark/deploy/yarn/YarnAllocationHandler.scala diff --git a/yarn/pom.xml b/yarn/pom.xml index 3300a465ef7dc30e3a07b1adae6ae127923ab64d..7c145ef362600fc0be3a88da6121f51218202d81 100644 --- a/yarn/pom.xml +++ b/yarn/pom.xml @@ -89,16 +89,16 @@ <profiles> <profile> - <id>hadoop2-yarn</id> + <id>yarn-alpha</id> <modules> - <module>2.0</module> + <module>alpha</module> </modules> </profile> <profile> - <id>hadoop2.2-yarn</id> + <id>yarn</id> <modules> - <module>2.2</module> + <module>stable</module> </modules> </profile> </profiles> diff --git a/yarn/2.0/pom.xml b/yarn/stable/pom.xml similarity index 97% rename from yarn/2.0/pom.xml rename to yarn/stable/pom.xml index ec6738fa38279bb42489259aa4fcb1de6794dde3..45a14313f69b4b6da50754e2c5b5bf0f5731cbb7 100644 --- a/yarn/2.0/pom.xml +++ b/yarn/stable/pom.xml @@ -25,9 +25,9 @@ </parent> <groupId>org.apache.spark</groupId> - <artifactId>spark-yarn-2.0_2.10</artifactId> + <artifactId>spark-yarn_2.10</artifactId> <packaging>jar</packaging> - <name>Spark Project YARN 2.0</name> + <name>Spark Project YARN Stable API</name> <url>http://spark.incubator.apache.org/</url> <build> diff --git a/yarn/2.2/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala b/yarn/stable/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala similarity index 100% rename from yarn/2.2/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala rename to yarn/stable/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala diff --git a/yarn/2.2/src/main/scala/org/apache/spark/deploy/yarn/Client.scala b/yarn/stable/src/main/scala/org/apache/spark/deploy/yarn/Client.scala similarity index 100% rename from yarn/2.2/src/main/scala/org/apache/spark/deploy/yarn/Client.scala rename to yarn/stable/src/main/scala/org/apache/spark/deploy/yarn/Client.scala diff --git a/yarn/2.2/src/main/scala/org/apache/spark/deploy/yarn/WorkerLauncher.scala b/yarn/stable/src/main/scala/org/apache/spark/deploy/yarn/WorkerLauncher.scala similarity index 100% rename from yarn/2.2/src/main/scala/org/apache/spark/deploy/yarn/WorkerLauncher.scala rename to yarn/stable/src/main/scala/org/apache/spark/deploy/yarn/WorkerLauncher.scala diff --git a/yarn/2.2/src/main/scala/org/apache/spark/deploy/yarn/WorkerRunnable.scala b/yarn/stable/src/main/scala/org/apache/spark/deploy/yarn/WorkerRunnable.scala similarity index 100% rename from yarn/2.2/src/main/scala/org/apache/spark/deploy/yarn/WorkerRunnable.scala rename to yarn/stable/src/main/scala/org/apache/spark/deploy/yarn/WorkerRunnable.scala diff --git a/yarn/2.2/src/main/scala/org/apache/spark/deploy/yarn/YarnAllocationHandler.scala b/yarn/stable/src/main/scala/org/apache/spark/deploy/yarn/YarnAllocationHandler.scala similarity index 100% rename from yarn/2.2/src/main/scala/org/apache/spark/deploy/yarn/YarnAllocationHandler.scala rename to yarn/stable/src/main/scala/org/apache/spark/deploy/yarn/YarnAllocationHandler.scala