From b0478c093c48fe608b8011fdaf76648f9f67ecda Mon Sep 17 00:00:00 2001 From: Patrick Wendell Date: Sun, 12 Oct 2014 23:27:07 -0700 Subject: [PATCH] Changes to simplify the build of SPARK-2706 This simply uses two profiles and defines the source location based on the profiles. It also removes a bunch of other excludes. Finally, this doesn't use dynamic profile activiation which could interfere with third-party libraries that try to link against the spark-hive artifact. --- assembly/pom.xml | 6 ++ docs/_config.yml | 2 - docs/building-spark.md | 14 ++- pom.xml | 33 ++++---- sql/hive/pom.xml | 187 +++++++++++------------------------------ 5 files changed, 82 insertions(+), 160 deletions(-) diff --git a/assembly/pom.xml b/assembly/pom.xml index 81219a37a0e6b..ccdc150e143da 100644 --- a/assembly/pom.xml +++ b/assembly/pom.xml @@ -197,6 +197,12 @@ spark-hive_${scala.binary.version} ${project.version} + + + + + hive-0.12.0 + org.apache.spark spark-hive-thriftserver_${scala.binary.version} diff --git a/docs/_config.yml b/docs/_config.yml index f4bf242ac191b..78c92281a49d5 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -1,7 +1,5 @@ highlighter: pygments markdown: kramdown -gems: - - jekyll-redirect-from # For some reason kramdown seems to behave differently on different # OS/packages wrt encoding. So we hard code this config. diff --git a/docs/building-spark.md b/docs/building-spark.md index b2940ee4029e8..2150f223f4915 100644 --- a/docs/building-spark.md +++ b/docs/building-spark.md @@ -97,12 +97,20 @@ mvn -Pyarn -Phadoop-2.4 -Dhadoop.version=2.4.0 -DskipTests clean package mvn -Pyarn-alpha -Phadoop-2.3 -Dhadoop.version=2.3.0 -Dyarn.version=0.23.7 -DskipTests clean package {% endhighlight %} + + # Building With Hive and JDBC Support To enable Hive integration for Spark SQL along with its JDBC server and CLI, -add the `-Phive` profile to your existing build options. +add the `-Phive` profile to your existing build options. By default Spark +will build with Hive 0.12.0 bindings. You can also build for Hive 0.13.1 using +the `-Phive-0.13.1` profile. NOTE: currently the JDBC server is only +supported for Hive 12. {% highlight bash %} -# Apache Hadoop 2.4.X with Hive support +# Apache Hadoop 2.4.X with Hive 12 support mvn -Pyarn -Phadoop-2.4 -Dhadoop.version=2.4.0 -Phive -DskipTests clean package + +# Apache Hadoop 2.4.X with Hive 13 support +mvn -Pyarn -Phive-0.13.1 -Phadoop-2.4 -Dhadoop.version=2.4.0 -Phive -DskipTests clean package {% endhighlight %} # Spark Tests in Maven @@ -192,4 +200,4 @@ To run test suites of a specific sub project as follows: compiler. When run locally as a background process, it speeds up builds of Scala-based projects like Spark. Developers who regularly recompile Spark with Maven will be the most interested in Zinc. The project site gives instructions for building and running `zinc`; OS X users can -install it using `brew install zinc`. \ No newline at end of file +install it using `brew install zinc`. diff --git a/pom.xml b/pom.xml index 8e5720aa8cc8c..31f456a03bb3b 100644 --- a/pom.xml +++ b/pom.xml @@ -127,6 +127,11 @@ 0.94.6 1.4.0 3.4.5 + + 0.12.0-protobuf-2.5 + + 0.12.0 + 10.4.2.0 1.4.3 1.2.3 8.1.14.v20131031 @@ -1260,34 +1265,28 @@ - hive-default - - - !hive.version - - - - 0.12.0 - 10.4.2.0 - - - - hive + hive-0.12.0 false + sql/hive-thriftserver + + 0.12.0-protobuf-2.5 + 0.12.0-protobuf-2.5 + 10.4.2.0 + - hive-versions + hive-0.13.1 - - hive.version - + false + 0.13.1 + 0.13.1 10.10.1.1 diff --git a/sql/hive/pom.xml b/sql/hive/pom.xml index d788f0f2ac72f..cdeba8accb70d 100644 --- a/sql/hive/pom.xml +++ b/sql/hive/pom.xml @@ -36,6 +36,11 @@ + + com.twitter + parquet-hive-bundle + 1.5.0 + org.apache.spark spark-core_${scala.binary.version} @@ -46,15 +51,46 @@ spark-sql_${scala.binary.version} ${project.version} + + org.spark-project.hive + hive-metastore + ${hive.version} + commons-httpclient commons-httpclient 3.1 + + org.spark-project.hive + hive-exec + ${hive.version} + + + commons-logging + commons-logging + + + org.codehaus.jackson jackson-mapper-asl + + org.spark-project.hive + hive-serde + ${hive.version} + + + commons-logging + commons-logging + + + commons-logging + commons-logging-api + + + org.apache.avro @@ -80,76 +116,7 @@ test - - - hive-default - - - !hive.version - - - - - com.twitter - parquet-hive-bundle - 1.5.0 - - - org.spark-project.hive - hive-metastore - ${hive.version} - - - org.spark-project.hive - hive-exec - ${hive.version} - - - commons-logging - commons-logging - - - - - org.spark-project.hive - hive-serde - ${hive.version} - - - commons-logging - commons-logging - - - commons-logging - commons-logging-api - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - add-default-sources - generate-sources - - add-source - - - - v${hive.version}/src/main/scala - - - - - - - - hive @@ -176,91 +143,35 @@ - - hive-versions - - - hive.version - - - - - org.apache.hive - hive-metastore - ${hive.version} - - - org.apache.hive - hive-exec - ${hive.version} - - - commons-logging - commons-logging - - - - - org.apache.hive - hive-serde - ${hive.version} - - - commons-logging - commons-logging - - - commons-logging - commons-logging-api - - - - - - + + + + target/scala-${scala.binary.version}/classes + target/scala-${scala.binary.version}/test-classes + + + org.scalatest + scalatest-maven-plugin + + org.codehaus.mojo build-helper-maven-plugin - add-v13-sources + add-default-sources generate-sources add-source - v${hive.version}/src/main/scala - - - - - add-scala-test-sources - generate-test-sources - - add-test-source - - - - src/test/scala + v${hive.version.short}/src/main/scala - - - - - - - target/scala-${scala.binary.version}/classes - target/scala-${scala.binary.version}/test-classes - - - org.scalatest - scalatest-maven-plugin -