实战

来源:互联网 发布:网络推广经典案例 编辑:程序博客网 时间:2024/04/29 01:24

在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 ,解决了问题。
原创粉丝点击