linux上运行jar包,默认从hdfs上找,怎样改从电脑文件中找
来源:5-2 -A SQLContext的使用
逍遥胖胖
2018-06-22
命令
spark-submit \
--name SqlContextApp \
--class com.imooc.spark.SqlContextApp \
--master local[2] \
/root/lib/sql-1.0.jar \
/root/app/spark-2.1.0-bin-2.6.0-cdh5.7.0/examples/src/main/resources/people.json
错误
Exception in thread "main" org.apache.spark.sql.AnalysisException: Path does not exist: hdfs://hadoop00-1:8020/root/app/spark-2.1.0-bin-2.6.0-cdh5.7.0/examples/src/main/resources/people.json;
at org.apache.spark.sql.execution.datasources.DataSource$.org$apache$spark$sql$execution$datasources$DataSource$$checkAndGlobPathIfNecessary(DataSource.scala:715)
1回答
-
先分析这个信息: Path does not exist: hdfs://hadoop00-1:8020/root/app/spark-2.1.0-bin-2.6.0-cdh5.7.0/examples/src/main/resources/people.json;,这里是说HDFS上找不到,而你的文件如果是本地的,是否记得该以什么开头?
052018-06-22
相似问题