Spark Error while running command to get file permissions

Spark Error while running command to get file permissions

 Error while running command to get file permissions : 
2 java.io.IOException: (null) entry in command string: null ls -F C:\Users\ue\IdeaProjects\spark-learn\data

解决方法:

  1. C:\Program Files下新建文件夹hadoop,在hadoop下新建bin目录

  2. hadoop相关的文件,拷贝到bin目录下

    Spark Error while running command to get file permissions_第1张图片

  3. hadoop.dllwinutils.exe拷贝到C:\Windows\System32

  4. 在cmd中进入C:\Program Files\hadoop\bin,并执行以下命令

    winutils.exe chmod -R 777 C:\Users\ue\IdeaProjects\spark-learn\data
    
  5. 在idea中添加环境变量:HADOOP_HOME=C:\Program Files\hadoop

    Spark Error while running command to get file permissions_第2张图片

    Spark Error while running command to get file permissions_第3张图片

    Spark Error while running command to get file permissions_第4张图片

你可能感兴趣的:(Spark Error while running command to get file permissions)