【異常】Unable to instantiate SparkSession with Hive support because Hive classes a


如果在本地windows測試的時候,不能加.enableHiveSupport():
 val spark = SparkSession.builder()
            .master("")
            .appName("")
            .getOrCreate()
訪問的是本地的表,不能訪問Hive表。

如果想訪問Hive表要加上.enableHiveSupport():
 val spark = SparkSession.builder()
            .master("")
            .appName("")
            .enableHiveSupport()
            .getOrCreate()
在Windows使用 .enableHiveSupport()會出現一個異常:
Unable to instantiate SparkSession with Hive support because Hive classes are not found.
只能把代碼打包到linux上去執行,在windows上訪問hive就是不可以。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM