Skip to content

Commit 7dde1da

Browse files
yhuaiJoshRosen
authored andcommitted
[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.
1 parent d7d0cad commit 7dde1da

File tree

5 files changed

+68
-5
lines changed

5 files changed

+68
-5
lines changed

dev/run-tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ def determine_modules_to_test(changed_modules):
110110
['graphx', 'examples']
111111
>>> x = [x.name for x in determine_modules_to_test([modules.sql])]
112112
>>> x # doctest: +NORMALIZE_WHITESPACE
113-
['sql', 'hive', 'mllib', 'examples', 'hive-thriftserver', 'pyspark-sql', 'sparkr',
114-
'pyspark-mllib', 'pyspark-ml']
113+
['sql', 'hive', 'mllib', 'examples', 'hive-thriftserver', 'hivecontext-compatibility',
114+
'pyspark-sql', 'sparkr', 'pyspark-mllib', 'pyspark-ml']
115115
"""
116116
modules_to_test = set()
117117
for module in changed_modules:

dev/sparktestsupport/modules.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,18 @@ def __hash__(self):
151151
)
152152

153153

154+
hivecontext_compatibility = Module(
155+
name="hivecontext-compatibility",
156+
dependencies=[hive],
157+
source_file_regexes=[
158+
"sql/hivecontext-compatibility/",
159+
],
160+
sbt_test_goals=[
161+
"hivecontext-compatibility/test"
162+
]
163+
)
164+
165+
154166
sketch = Module(
155167
name="sketch",
156168
dependencies=[],

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@
100100
<module>sql/catalyst</module>
101101
<module>sql/core</module>
102102
<module>sql/hive</module>
103+
<module>sql/hivecontext-compatibility</module>
103104
<module>external/docker-integration-tests</module>
104105
<module>assembly</module>
105106
<module>external/flume</module>

project/SparkBuild.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ object BuildCommons {
3636

3737
private val buildLocation = file(".").getAbsoluteFile.getParentFile
3838

39-
val sqlProjects@Seq(catalyst, sql, hive, hiveThriftServer) = Seq(
40-
"catalyst", "sql", "hive", "hive-thriftserver"
39+
val sqlProjects@Seq(catalyst, sql, hive, hiveThriftServer, hiveCompatibility) = Seq(
40+
"catalyst", "sql", "hive", "hive-thriftserver", "hivecontext-compatibility"
4141
).map(ProjectRef(buildLocation, _))
4242

4343
val streamingProjects@Seq(
@@ -253,7 +253,7 @@ object SparkBuild extends PomBuild {
253253

254254
val mimaProjects = allProjects.filterNot { x =>
255255
Seq(
256-
spark, hive, hiveThriftServer, catalyst, repl, networkCommon, networkShuffle, networkYarn,
256+
spark, hive, hiveThriftServer, hiveCompatibility, catalyst, repl, networkCommon, networkShuffle, networkYarn,
257257
unsafe, testTags, sketch, mllibLocal
258258
).contains(x)
259259
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~ Licensed to the Apache Software Foundation (ASF) under one or more
4+
~ contributor license agreements. See the NOTICE file distributed with
5+
~ this work for additional information regarding copyright ownership.
6+
~ The ASF licenses this file to You under the Apache License, Version 2.0
7+
~ (the "License"); you may not use this file except in compliance with
8+
~ the License. You may obtain a copy of the License at
9+
~
10+
~ http://www.apache.org/licenses/LICENSE-2.0
11+
~
12+
~ Unless required by applicable law or agreed to in writing, software
13+
~ distributed under the License is distributed on an "AS IS" BASIS,
14+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
~ See the License for the specific language governing permissions and
16+
~ limitations under the License.
17+
-->
18+
19+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
21+
<modelVersion>4.0.0</modelVersion>
22+
<parent>
23+
<groupId>org.apache.spark</groupId>
24+
<artifactId>spark-parent_2.11</artifactId>
25+
<version>2.0.0-SNAPSHOT</version>
26+
<relativePath>../../pom.xml</relativePath>
27+
</parent>
28+
29+
<groupId>org.apache.spark</groupId>
30+
<artifactId>spark-hivecontext-compatibility_2.11</artifactId>
31+
<packaging>jar</packaging>
32+
<name>Spark Project HiveContext Compatibility</name>
33+
<url>http://spark.apache.org/</url>
34+
<properties>
35+
<sbt.project.name>hivecontext-compatibility</sbt.project.name>
36+
</properties>
37+
38+
<dependencies>
39+
<dependency>
40+
<groupId>org.apache.spark</groupId>
41+
<artifactId>spark-hive_${scala.binary.version}</artifactId>
42+
<version>${project.version}</version>
43+
</dependency>
44+
</dependencies>
45+
46+
<build>
47+
<outputDirectory>target/scala-${scala.binary.version}/classes</outputDirectory>
48+
<testOutputDirectory>target/scala-${scala.binary.version}/test-classes</testOutputDirectory>
49+
</build>
50+
</project>

0 commit comments

Comments
 (0)