ls: cannot access /home/spark-2.4.4-bin-hadoop2.6/lib/spark-assembly-*.jar: No such file or director

在安装了spark之后,一直正常的hive启动时出现报错:

ls: cannot access /home/spark-2.4.4-bin-hadoop2.6/lib/spark-assembly-*.jar: No such file or director_第1张图片

原因是spark升级到spark2以后,原有lib目录下的大JAR包被分散成多个小JAR包,原来的spark-assembly-*.jar已经不存在,所以hive没有办法找到这个JAR包。

解决办法:

将  sparkAssemblyPath=`ls ${SPARK_HOME}/lib/spark-assembly-*.jar`

修改为  sparkAssemblyPath=`ls ${SPARK_HOME}/jars/*.jar`

ls: cannot access /home/spark-2.4.4-bin-hadoop2.6/lib/spark-assembly-*.jar: No such file or director_第2张图片

ls: cannot access /home/spark-2.4.4-bin-hadoop2.6/lib/spark-assembly-*.jar: No such file or director_第3张图片 修改后再次进入hive无报错。

你可能感兴趣的:(hive)