sqlContext.sql("CREATE TABLE IF NOT EXISTS src (key INT, value STRING)")sql
錯誤:apache
MetaException(message:file:/user/hive/warehouse/src is not a directory or unable to create one)ide
解決步驟:spa
修改spark-env.sh 添加SPARK_CLASSPATH=/opt/apache-hive-0.13.1-bin/confxml
修改hive-site.xml的hive.metastore.warehouse.dir值,改爲hdfs://master:9000/user/hive/warehouseci