spark-class Could not find or load main class org.apache.hive.beeline.BeeLine
Hello to all,
I'm trying to execute a command
/opt/cloudera/parcels/CDH/lib/spark/bin/spark-beeline -u 'jdbc:hive2:<myserver>:10000' -f /root/testquery.sql
and get an error
Error: Could not find or load main class org.apache.hive.beeline.BeeLine
spark-beeline is a script (taken from spark repository with some path modifications):
set -o posix
export JAVA_HOME=/usr/java/jdk1.8.0_181-cloudera
# Figure out if SPARK_HOME is set
if [ -z "${SPARK_HOME}" ]; then
source "$(dirname "$0")"/find-spark-home
fi
CLASS="org.apache.hive.beeline.BeeLine"
exec "/opt/cloudera/parcels/CDH/lib/spark/bin/spark-class" $CLASS "$@"
I think that I need to add a classpath to Hive Beeline (maybe
/opt/cloudera/parcels/CDH/lib/hive/lib/hive-beeline.jar). I tryed to add
--driver-class-path /opt/cloudera/parcels/CDH/lib/hive/lib/hive-beeline.jar and
--conf "spark.executor.extraClassPath=/opt/cloudera/parcels/CDH/lib/hive/lib/hive-beeline.jar" options to command without results.
What am I doing wrong?
Thanks!

