Repository: spark Updated Branches: refs/heads/master d7d0cad0a -> 7dde1da94
[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 <[email protected]> Closes #12580 from yhuai/compatibility. Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/7dde1da9 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/7dde1da9 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/7dde1da9 Branch: refs/heads/master Commit: 7dde1da949d430c20a128bc3c6e5fe5c0271da11 Parents: d7d0cad Author: Yin Huai <[email protected]> Authored: Fri Apr 22 17:50:24 2016 -0700 Committer: Josh Rosen <[email protected]> Committed: Fri Apr 22 17:50:24 2016 -0700 ---------------------------------------------------------------------- dev/run-tests.py | 4 +-- dev/sparktestsupport/modules.py | 12 +++++++ pom.xml | 1 + project/SparkBuild.scala | 6 ++-- sql/hivecontext-compatibility/pom.xml | 50 ++++++++++++++++++++++++++++++ 5 files changed, 68 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/7dde1da9/dev/run-tests.py ---------------------------------------------------------------------- diff --git a/dev/run-tests.py b/dev/run-tests.py index cbe3472..291f821 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: http://git-wip-us.apache.org/repos/asf/spark/blob/7dde1da9/dev/sparktestsupport/modules.py ---------------------------------------------------------------------- diff --git a/dev/sparktestsupport/modules.py b/dev/sparktestsupport/modules.py index c844bcf..6d47733 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=[], http://git-wip-us.apache.org/repos/asf/spark/blob/7dde1da9/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index dfee5d7..73334a8 100644 --- a/pom.xml +++ b/pom.xml @@ -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> http://git-wip-us.apache.org/repos/asf/spark/blob/7dde1da9/project/SparkBuild.scala ---------------------------------------------------------------------- diff --git a/project/SparkBuild.scala b/project/SparkBuild.scala index a0df9b6..9e6d341 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) } http://git-wip-us.apache.org/repos/asf/spark/blob/7dde1da9/sql/hivecontext-compatibility/pom.xml ---------------------------------------------------------------------- diff --git a/sql/hivecontext-compatibility/pom.xml b/sql/hivecontext-compatibility/pom.xml new file mode 100644 index 0000000..90c6bfd --- /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> --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
