Skip to content

Commit ca7322d

Browse files
committed
SPARK-3092 [SQL]: Always include the thriftserver when -Phive is enabled.
Currently we have a separate profile called hive-thriftserver. I originally suggested this in case users did not want to bundle the thriftserver, but it's ultimately lead to a lot of confusion. Since the thriftserver is only a few classes, I don't see a really good reason to isolate it from the rest of Hive. So let's go ahead and just include it in the same profile to simplify things. This has been suggested in the past by liancheng. Author: Patrick Wendell <[email protected]> Closes #2006 from pwendell/hiveserver and squashes the following commits: 742ea40 [Patrick Wendell] Merge remote-tracking branch 'apache/master' into hiveserver 034ad47 [Patrick Wendell] SPARK-3092: Always include the thriftserver when -Phive is enabled. (cherry picked from commit f2f26c2) Signed-off-by: Patrick Wendell <[email protected]>
1 parent 9b29099 commit ca7322d

File tree

8 files changed

+12
-27
lines changed

8 files changed

+12
-27
lines changed

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,7 @@ If your project is built with Maven, add this to your POM file's `<dependencies>
118118
## A Note About Thrift JDBC server and CLI for Spark SQL
119119

120120
Spark SQL supports Thrift JDBC server and CLI.
121-
See sql-programming-guide.md for more information about those features.
122-
You can use those features by setting `-Phive-thriftserver` when building Spark as follows.
123-
124-
$ sbt/sbt -Phive-thriftserver assembly
125-
121+
See sql-programming-guide.md for more information about using the JDBC server.
126122

127123
## Configuration
128124

assembly/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,6 @@
163163
<artifactId>spark-hive_${scala.binary.version}</artifactId>
164164
<version>${project.version}</version>
165165
</dependency>
166-
</dependencies>
167-
</profile>
168-
<profile>
169-
<id>hive-thriftserver</id>
170-
<dependencies>
171166
<dependency>
172167
<groupId>org.apache.spark</groupId>
173168
<artifactId>spark-hive-thriftserver_${scala.binary.version}</artifactId>

dev/create-release/create-release.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,14 @@ if [[ ! "$@" =~ --package-only ]]; then
6060
-Dmaven.javadoc.skip=true \
6161
-Dhadoop.version=2.2.0 -Dyarn.version=2.2.0 \
6262
-Dtag=$GIT_TAG -DautoVersionSubmodules=true \
63-
-Pyarn -Phive -Phive-thriftserver -Phadoop-2.2 -Pspark-ganglia-lgpl -Pkinesis-asl \
63+
-Pyarn -Phive -Phadoop-2.2 -Pspark-ganglia-lgpl -Pkinesis-asl \
6464
--batch-mode release:prepare
6565

6666
mvn -DskipTests \
6767
-Darguments="-DskipTests=true -Dmaven.javadoc.skip=true -Dhadoop.version=2.2.0 -Dyarn.version=2.2.0 -Dgpg.passphrase=${GPG_PASSPHRASE}" \
6868
-Dhadoop.version=2.2.0 -Dyarn.version=2.2.0 \
6969
-Dmaven.javadoc.skip=true \
70-
-Pyarn -Phive -Phive-thriftserver -Phadoop-2.2 -Pspark-ganglia-lgpl -Pkinesis-asl \
70+
-Pyarn -Phive -Phadoop-2.2 -Pspark-ganglia-lgpl -Pkinesis-asl \
7171
release:perform
7272

7373
cd ..
@@ -117,10 +117,10 @@ make_binary_release() {
117117
spark-$RELEASE_VERSION-bin-$NAME.tgz.sha
118118
}
119119

120-
make_binary_release "hadoop1" "-Phive -Phive-thriftserver -Dhadoop.version=1.0.4" &
121-
make_binary_release "cdh4" "-Phive -Phive-thriftserver -Dhadoop.version=2.0.0-mr1-cdh4.2.0" &
120+
make_binary_release "hadoop1" "-Phive -Dhadoop.version=1.0.4" &
121+
make_binary_release "cdh4" "-Phive -Dhadoop.version=2.0.0-mr1-cdh4.2.0" &
122122
make_binary_release "hadoop2" \
123-
"-Phive -Phive-thriftserver -Pyarn -Phadoop-2.2 -Dhadoop.version=2.2.0 -Pyarn.version=2.2.0" &
123+
"-Phive -Pyarn -Phadoop-2.2 -Dhadoop.version=2.2.0 -Pyarn.version=2.2.0" &
124124
make_binary_release "hadoop2-without-hive" \
125125
"-Pyarn -Phadoop-2.2 -Dhadoop.version=2.2.0 -Pyarn.version=2.2.0" &
126126
wait

dev/run-tests

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ echo -e "q\n" | sbt/sbt $BUILD_MVN_PROFILE_ARGS clean package assembly/assembly
9999

100100
# If the Spark SQL tests are enabled, run the tests with the Hive profiles enabled:
101101
if [ -n "$_RUN_SQL_TESTS" ]; then
102-
SBT_MAVEN_PROFILES_ARGS="$SBT_MAVEN_PROFILES_ARGS -Phive -Phive-thriftserver"
102+
SBT_MAVEN_PROFILES_ARGS="$SBT_MAVEN_PROFILES_ARGS -Phive"
103103
fi
104104
# echo "q" is needed because sbt on encountering a build file with failure
105105
# (either resolution or compilation) prompts the user for input either q, r,

dev/scalastyle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# limitations under the License.
1818
#
1919

20-
echo -e "q\n" | sbt/sbt -Phive -Phive-thriftserver scalastyle > scalastyle.txt
20+
echo -e "q\n" | sbt/sbt -Phive scalastyle > scalastyle.txt
2121
# Check style with YARN alpha built too
2222
echo -e "q\n" | sbt/sbt -Pyarn -Phadoop-0.23 -Dhadoop.version=0.23.9 yarn-alpha/scalastyle \
2323
>> scalastyle.txt

docs/building-with-maven.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,8 @@ mvn -Pyarn-alpha -Phadoop-2.3 -Dhadoop.version=2.3.0 -Dyarn.version=0.23.7 -Dski
9898

9999
# Building Thrift JDBC server and CLI for Spark SQL
100100

101-
Spark SQL supports Thrift JDBC server and CLI.
102-
See sql-programming-guide.md for more information about those features.
103-
You can use those features by setting `-Phive-thriftserver` when building Spark as follows.
104-
{% highlight bash %}
105-
mvn -Phive-thriftserver assembly
106-
{% endhighlight %}
101+
Spark SQL supports Thrift JDBC server and CLI. See sql-programming-guide.md for
102+
more information about the JDBC server.
107103

108104
# Spark Tests in Maven
109105

docs/sql-programming-guide.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -578,9 +578,7 @@ evaluated by the SQL execution engine. A full list of the functions supported c
578578

579579
The Thrift JDBC server implemented here corresponds to the [`HiveServer2`]
580580
(https://cwiki.apache.org/confluence/display/Hive/Setting+Up+HiveServer2) in Hive 0.12. You can test
581-
the JDBC server with the beeline script comes with either Spark or Hive 0.12. In order to use Hive
582-
you must first run '`sbt/sbt -Phive-thriftserver assembly/assembly`' (or use `-Phive-thriftserver`
583-
for maven).
581+
the JDBC server with the beeline script comes with either Spark or Hive 0.12.
584582

585583
To start the JDBC server, run the following in the Spark directory:
586584

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1178,7 +1178,7 @@
11781178
</profile>
11791179

11801180
<profile>
1181-
<id>hive-thriftserver</id>
1181+
<id>hive</id>
11821182
<activation>
11831183
<activeByDefault>false</activeByDefault>
11841184
</activation>

0 commit comments

Comments
 (0)