在Spark SQL整合Hive时,老报错:
The specified datastore driver (
"com.mysql.jdbc.Driver") was
not found
in the CLASSPATH. Please check your CLASSPATH specification,
and the name of the driver.
尝试过:
1. 把
$HIVE_HOME/
LIB 加入到 /etc/profile 的
$CLASSPATH中 , 无法解决;
2. 在
$SPARK_HOME/conf/spark_env.sh 中,使用 export
SPARK_CLASSPATH=
$SPARK_CLASSPATH:/usr/software/hive-1.2.
1/mysql-connector-java-
5.1.
30-bin.jar , 无法解决;
3. 真是郁闷,直接把 mysql 的驱动程序 放到
$SPARK_HOME/jars ,解决了问题。