Windows环境下PySpark启动报错解决:HiveSessionStateBuilder实例化失败
Fix for
pyspark.sql.utils.IllegalArgumentException When Initializing HiveSessionStateBuilder I ran into this exact issue while setting up PySpark recently and couldn’t find a working solution through regular searches. Here’s my experience and the fix that resolved it:
The Error I Faced
After following the standard installation steps, I hit this frustrating error:
pyspark.sql.utils.IllegalArgumentException: "Error while instantiating 'org.apache.spark.sql.hive.HiveSessionStateBuilder':"
Root Cause & Solution
The problem boiled down to an incorrect file path for winutils.exe:
- I had placed
winutils.exedirectly in the root directory of myHADOOP_HOME - But it needs to be stored in the
binsubfolder underHADOOP_HOMEinstead
Once I moved winutils.exe to HADOOP_HOME\bin, the error disappeared right away. Hope this saves someone else the time and hassle!
内容的提问来源于stack exchange,提问作者J Welch
相关产品推荐
相关产品推荐

