java.lang.IllegalArgumentException: Pathname /E:/data/hello.txt from hdfs://ns1/E:/data/hello.txt is not a valid DFS filename
原因就在于,已经在classpath下面加载了hdfs-site.xml和core-site.xml的配置文件,则会自动理解输入的文件路径为hdfs的,自然会报错。所以,在此情况下还想加载本地文件,那么就告诉机器以本地文件的格式或者协议读取即可
把/E:/data/hello.txt加上file:格式
val linesRDD:RDD[String] = sc.textFile(“file:/E:/data/hello.txt”)
相关文章
- 03-22报错:is not a valid DFS filename
- 03-22laravel报错 : laravel Please provide a valid cache path
- 03-22vxbox导入虚拟机报错VERR_SUP_VP_UNEXPECTED_VALID_PATH_COUNT
- 03-22Prometheus报错:“INVALID“ is not a valid start token
- 03-22Maven下载时报错:Could not transfer artifact xxx from/to xxx和unable to find valid certification
- 03-22vue.config.js配置scss发生options has an unknown property ‘data‘. These properties are valid报错解决方法
- 03-22calico状态一直处于CrashLoopBackOff并且报错no valid IPv4 addresses found on the host interfaces
- 03-22DevOps 创建pipline报错:The value specified for SourceVersion is not a valid commit ID
- 03-22Pycharm 运行py脚本 报错 please select a valid interpreter
- 03-22报错:The valid characters are defined in RFC 7230 and RFC 3986