问题
Error while running command to get file permissions : java.io.IOException: (null) entry in command string: null ls -F
Configure the path before modification:
//本地运行输入路径配置
TextInputFormat.addInputPath(job, new Path("file:///D:\\IdeaWorkSpace\\bigDate\\data\\sort\\sort_input"));
Causes and solutions
- No specific path is specified. If there is only a single file, the path can be written to the specific file to the path
as follows:
//本地运行输入路径配置
TextInputFormat.addInputPath(job, new Path("file:///D:\\IdeaWorkSpace\\bigDate\\data\\sort\\sort_input\\1.txt"));
- If need to read multiple files in the file directory path and finally add
\\*
asTextInputFormat.addInputPath(job, new Path("file:///D:\\IdeaWorkSpace\\bigDate\\data\\sort\\sort_input\\*"));
//本地运行输入路径配置
TextInputFormat.addInputPath(job, new Path("file:///D:\\IdeaWorkSpace\\bigDate\\data\\sort\\sort_input\\*"));
So you can read the contents of all files under sort_input