Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Unable create table from sparksql

Shulou Source: shulou.com Published: 2022-06-03 06:45:16 11月23日 Update

SqlContext.sql ("CREATE TABLE IF NOT EXISTS src (key INT, value STRING)")

Error:

MetaException (message:file:/user/hive/warehouse/src is not a directory or unable to create one)

Resolution steps:

Modify spark-env.sh to add SPARK_CLASSPATH=/opt/apache-hive-0.13.1-bin/conf

Change the hive.metastore.warehouse.dirvalue of hive-site.xml to hdfs://master:9000/user/hive/warehouse

Tags: Step error Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker Linux Shulou Tech Info macOS MySQL