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

错误:

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


解决步骤:

  1. 修改spark-env.sh 添加SPARK_CLASSPATH=/opt/apache-hive-0.13.1-bin/conf

  2. 修改hive-site.xml的hive.metastore.warehouse.dir值,改成hdfs://master:9000/user/hive/warehouse