我在hdfs中有textfile val.txt我想使用SparkSQL。所以我打开了火花壳并宣称:
sqlContext.sql("CREATE TABLE val(code string,description string) ROW FORMAT DELIMITED FIELDS TERMINATED BY ';' STORED AS TextFile")
sqlContext.sql("LOAD DATA INPATH 'hdfs://localhost:9000/val.txt' OVERWRITE INTO TABLE val")
该表已创建,但我得到了:
Failure:SemanticException[Error 10028]: Line 1:17 is not legal 'hdfs://localhost:9000/val.txt:Move from ;hdfs//localhost:9000/val.txt to file:/user/hive/hive/warehouse/val is not valid .Please check that values for params "default.fs.name" and"hive.metastore.warehouse.dir" do not.