forked from apache/spark
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry picked the Hive Thrift server
Starts Hive Thrift server via spark-submit Make HiveThriftServer2 play well with spark-submit Starts spark-sql shell with spark-submit Updated docs for Hive compatibility and Shark migration guide draft Fixed minor issues in spark-sql and start-thriftserver.sh Added missing license headers Fixed more license header issues Adapts test suites to spark-submit settings Addressed all comments by @pwendell Updated documents and build scripts for the newly added hive-thriftserver profile Starts beeline with spark-submit Fixed spark-submit application options handling logic Any options in the application option list with the same option name that SparkSubmitArguments recognizes (e.g., --help) are stolen by SparkSubmit instead of passed to the application. Fixed failed test suites Disabled MIMA for hive-thriftserver Reordered spark-submit options in spark-shell[.cmd] All options behind primary resource are (and should be) recognized as application options now. Updated Spark SQL programming guide docs Revert changes related to SPARK-2678, decided to move them to another PR Uses random port for HiveThriftServer2 to avoid collision with parallel builds
- Loading branch information
Showing
54 changed files
with
1,781 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,3 +57,4 @@ metastore_db/ | |
metastore/ | ||
warehouse/ | ||
TempStatsStore/ | ||
sql/hive-thriftserver/test_warehouses |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/usr/bin/env bash | ||
|
||
# | ||
# 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. | ||
# | ||
|
||
# Figure out where Spark is installed | ||
FWDIR="$(cd `dirname $0`/..; pwd)" | ||
|
||
# Find the java binary | ||
if [ -n "${JAVA_HOME}" ]; then | ||
RUNNER="${JAVA_HOME}/bin/java" | ||
else | ||
if [ `command -v java` ]; then | ||
RUNNER="java" | ||
else | ||
echo "JAVA_HOME is not set" >&2 | ||
exit 1 | ||
fi | ||
fi | ||
|
||
# Compute classpath using external script | ||
classpath_output=$($FWDIR/bin/compute-classpath.sh) | ||
if [[ "$?" != "0" ]]; then | ||
echo "$classpath_output" | ||
exit 1 | ||
else | ||
CLASSPATH=$classpath_output | ||
fi | ||
|
||
CLASS="org.apache.hive.beeline.BeeLine" | ||
exec "$RUNNER" -cp "$CLASSPATH" $CLASS "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env bash | ||
|
||
# | ||
# 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. | ||
# | ||
|
||
# | ||
# Shell script for starting the Spark SQL CLI | ||
|
||
# Enter posix mode for bash | ||
set -o posix | ||
|
||
# Figure out where Spark is installed | ||
FWDIR="$(cd `dirname $0`/..; pwd)" | ||
|
||
if [[ "$@" = *--help ]] || [[ "$@" = *-h ]]; then | ||
echo "Usage: ./sbin/spark-sql [options]" | ||
$FWDIR/bin/spark-submit --help 2>&1 | grep -v Usage 1>&2 | ||
exit 0 | ||
fi | ||
|
||
CLASS="org.apache.spark.sql.hive.thriftserver.SparkSQLCLIDriver" | ||
exec "$FWDIR"/bin/spark-submit --class $CLASS spark-internal $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.