获取IllegalArgumentException

时间:2017-12-21 10:28:02

标签: pyspark

我在提交火花作业时收到IllegalArgumentException

C:\spark\spark-2.2.1-bin-hadoop2.7\hadoop\bin>pyspark
        Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:25:58) [MSC v.1500 64 bit (AMD64)] on win32
        Type "help", "copyright", "credits" or "license" for more information.
        Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties
        Setting default log level to "WARN".
        To adjust logging level use sc.setLogLevel(newLevel). For SparkR, use setLogLevel(newLevel).
        WARNING: An illegal reflective access operation has occurred
        WARNING: Illegal reflective access by org.apache.hadoop.security.authentication.util.KerberosUtil (file:/C:/spark/spark-2.2.1-bin-hadoop2.7/jars/hadoop-auth-2.7.3.jar) to method sun.security.krb5.Config.getInstance()
        WARNING: Please consider reporting this to the maintainers of org.apache.hadoop.security.authentication.util.KerberosUtil
        WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
        WARNING: All illegal access operations will be denied in a future release
        17/12/21 15:48:46 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
        Traceback (most recent call last):
          File "C:\spark\spark-2.2.1-bin-hadoop2.7\python\pyspark\shell.py", line 45, in <module>
            spark = SparkSession.builder\
          File "C:\spark\spark-2.2.1-bin-hadoop2.7\python\pyspark\sql\session.py", line 183, in getOrCreate
            session._jsparkSession.sessionState().conf().setConfString(key, value)
          File "C:\spark\spark-2.2.1-bin-hadoop2.7\python\lib\py4j-0.10.4-src.zip\py4j\java_gateway.py", line 1133, in __call__
          File "C:\spark\spark-2.2.1-bin-hadoop2.7\python\pyspark\sql\utils.py", line 79, in deco
            raise IllegalArgumentException(s.split(': ', 1)[1], stackTrace)
        pyspark.sql.utils.IllegalArgumentException: u"Error while instantiating 'org.apache.spark.sql.hive.HiveSessionStateBuilder':"

请告知如何解决这些错误

1 个答案:

答案 0 :(得分:0)

检查/tmp/hive/的权限。使用sudo chmod -R 777 /tmp/hive/。另外,请检查您是否使用sqlContext来传递查询,否则您可以将其更改为sparkSession