Skip to content

Commit

Permalink
Starts beeline with spark-submit
Browse files Browse the repository at this point in the history
  • Loading branch information
liancheng committed Jul 24, 2014
1 parent cfcf461 commit 9cc0f06
Showing 1 changed file with 1 addition and 22 deletions.
23 changes: 1 addition & 22 deletions bin/beeline
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,5 @@
# 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 "$@"
exec "$FWDIR"/bin/spark-submit --class $CLASS spark-internal "$@"

0 comments on commit 9cc0f06

Please sign in to comment.