diff options
author | Yin Huai <yhuai@databricks.com> | 2016-04-22 17:50:24 -0700 |
---|---|---|
committer | Josh Rosen <joshrosen@databricks.com> | 2016-04-22 17:50:24 -0700 |
commit | 7dde1da949d430c20a128bc3c6e5fe5c0271da11 (patch) | |
tree | e09b60dff207f1f2bd6bcf04338cc65fb4075fc4 | |
parent | d7d0cad0ad7667c0e09ae01601ee0e4d0b09963c (diff) | |
download | spark-7dde1da949d430c20a128bc3c6e5fe5c0271da11.tar.gz spark-7dde1da949d430c20a128bc3c6e5fe5c0271da11.tar.bz2 spark-7dde1da949d430c20a128bc3c6e5fe5c0271da11.zip |
[SPARK-14807] Create a compatibility module
## What changes were proposed in this pull request?
This PR creates a compatibility module in sql (called `hive-1-x-compatibility`), which will host HiveContext in Spark 2.0 (moving HiveContext to here will be done separately). This module is not included in assembly because only users who still want to access HiveContext need it.
## How was this patch tested?
I manually tested `sbt/sbt -Phive package` and `mvn -Phive package -DskipTests`.
Author: Yin Huai <yhuai@databricks.com>
Closes #12580 from yhuai/compatibility.
-rwxr-xr-x | dev/run-tests.py | 4 | ||||
-rw-r--r-- | dev/sparktestsupport/modules.py | 12 | ||||
-rw-r--r-- | pom.xml | 1 | ||||
-rw-r--r-- | project/SparkBuild.scala | 6 | ||||
-rw-r--r-- | sql/hivecontext-compatibility/pom.xml | 50 |
5 files changed, 68 insertions, 5 deletions
diff --git a/dev/run-tests.py b/dev/run-tests.py index cbe347274e..291f821c7f 100755 --- a/dev/run-tests.py +++ b/dev/run-tests.py @@ -110,8 +110,8 @@ def determine_modules_to_test(changed_modules): ['graphx', 'examples'] >>> x = [x.name for x in determine_modules_to_test([modules.sql])] >>> x # doctest: +NORMALIZE_WHITESPACE - ['sql', 'hive', 'mllib', 'examples', 'hive-thriftserver', 'pyspark-sql', 'sparkr', - 'pyspark-mllib', 'pyspark-ml'] + ['sql', 'hive', 'mllib', 'examples', 'hive-thriftserver', 'hivecontext-compatibility', + 'pyspark-sql', 'sparkr', 'pyspark-mllib', 'pyspark-ml'] """ modules_to_test = set() for module in changed_modules: diff --git a/dev/sparktestsupport/modules.py b/dev/sparktestsupport/modules.py index c844bcff7e..6d47733ec1 100644 --- a/dev/sparktestsupport/modules.py +++ b/dev/sparktestsupport/modules.py @@ -151,6 +151,18 @@ hive_thriftserver = Module( ) +hivecontext_compatibility = Module( + name="hivecontext-compatibility", + dependencies=[hive], + source_file_regexes=[ + "sql/hivecontext-compatibility/", + ], + sbt_test_goals=[ + "hivecontext-compatibility/test" + ] +) + + sketch = Module( name="sketch", dependencies=[], @@ -100,6 +100,7 @@ <module>sql/catalyst</module> <module>sql/core</module> <module>sql/hive</module> + <module>sql/hivecontext-compatibility</module> <module>external/docker-integration-tests</module> <module>assembly</module> <module>external/flume</module> diff --git a/project/SparkBuild.scala b/project/SparkBuild.scala index a0df9b6a33..9e6d341ca2 100644 --- a/project/SparkBuild.scala +++ b/project/SparkBuild.scala @@ -36,8 +36,8 @@ object BuildCommons { private val buildLocation = file(".").getAbsoluteFile.getParentFile - val sqlProjects@Seq(catalyst, sql, hive, hiveThriftServer) = Seq( - "catalyst", "sql", "hive", "hive-thriftserver" + val sqlProjects@Seq(catalyst, sql, hive, hiveThriftServer, hiveCompatibility) = Seq( + "catalyst", "sql", "hive", "hive-thriftserver", "hivecontext-compatibility" ).map(ProjectRef(buildLocation, _)) val streamingProjects@Seq( @@ -253,7 +253,7 @@ object SparkBuild extends PomBuild { val mimaProjects = allProjects.filterNot { x => Seq( - spark, hive, hiveThriftServer, catalyst, repl, networkCommon, networkShuffle, networkYarn, + spark, hive, hiveThriftServer, hiveCompatibility, catalyst, repl, networkCommon, networkShuffle, networkYarn, unsafe, testTags, sketch, mllibLocal ).contains(x) } diff --git a/sql/hivecontext-compatibility/pom.xml b/sql/hivecontext-compatibility/pom.xml new file mode 100644 index 0000000000..90c6bfdd8d --- /dev/null +++ b/sql/hivecontext-compatibility/pom.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one or more + ~ contributor license agreements. See the NOTICE file distributed with + ~ this work for additional information regarding copyright ownership. + ~ The ASF licenses this file to You under the Apache License, Version 2.0 + ~ (the "License"); you may not use this file except in compliance with + ~ the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + --> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.apache.spark</groupId> + <artifactId>spark-parent_2.11</artifactId> + <version>2.0.0-SNAPSHOT</version> + <relativePath>../../pom.xml</relativePath> + </parent> + + <groupId>org.apache.spark</groupId> + <artifactId>spark-hivecontext-compatibility_2.11</artifactId> + <packaging>jar</packaging> + <name>Spark Project HiveContext Compatibility</name> + <url>http://spark.apache.org/</url> + <properties> + <sbt.project.name>hivecontext-compatibility</sbt.project.name> + </properties> + + <dependencies> + <dependency> + <groupId>org.apache.spark</groupId> + <artifactId>spark-hive_${scala.binary.version}</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> + + <build> + <outputDirectory>target/scala-${scala.binary.version}/classes</outputDirectory> + <testOutputDirectory>target/scala-${scala.binary.version}/test-classes</testOutputDirectory> + </build> +</project> |