windows开发hadoop【file permissions : java.io.IOException: (null) entry in command string: null ls -F*】
分类:
文章
•
2025-04-25 16:40:46
Error while running command to get file permissions : java.io.IOException: (null) entry in command string: null ls -F
关于这个报错提示,在windows开发hadoop程序其输入路径
是需要写具体路径(意思就是写到你准备用的数据文件的名称,不是写到input就截止了)的。

如上图所示的样子,需要写到1901才可以。如果写到input,就会报这个错误提示。当然,问了好多人和百度,有的是在设置hadoop的输入路径的时候借助addInputpaths
,这个来输入更多的文件,但这个也是需要写具体路径的,其addInputpaths
用法如下:
FileInputFormat.addInputPaths(job, “input/1901,input/1902”);
多路径字符串之间用逗号分隔开就可以啦!。
其 addInputPath 输入多路径的时候,是这样的:
FileInputFormat.addInputPath(job,”input/1901”);
FileInputFormat.addInputPath(job,”input/1902”);
当然,这个可以指定Mapper的。
接下来说一下,还有一种关于这个报错怎么在windows上解决的办法。

正如上图所示,借助通配符来解决的。重点是还需要加一个中括号。(~~~)
感谢一位大佬学长的提示。