我正在尝试运行我的第一个Hadoop计划&我遇到了我不知道如何解决的文件权限问题。以下是我得到的错误代码。非常感谢有关调试它的任何建议。谢谢
779 [main] DEBUG org.apache.hadoop.security.UserGroupInformation - PrivilegedAction as:Zim (auth:SIMPLE) from:org.apache.hadoop.mapreduce.Job.submit(Job.java:1287)
793 [main] DEBUG org.apache.hadoop.mapreduce.JobSubmitter - Configuring job job_local1916101729_0001 with file:/tmp/hadoop-Zim/mapred/staging/Zim1916101729/.staging/job_local1916101729_0001 as the submit dir
793 [main] DEBUG org.apache.hadoop.mapreduce.JobSubmitter - adding the following namenodes' delegation tokens:[file:///]
1325 [main] DEBUG org.apache.hadoop.mapreduce.JobResourceUploader - default FileSystem: file:///
1359 [main] DEBUG org.apache.hadoop.io.nativeio.NativeIO - Initialized cache for IDs to User/Group mapping with a cache timeout of 14400 seconds.
1363 [main] WARN org.apache.hadoop.mapreduce.JobResourceUploader - No job jar file set. User classes may not be found. See Job or Job#setJar(String).
1368 [main] DEBUG org.apache.hadoop.mapreduce.JobSubmitter - Creating splits at file:/tmp/hadoop-Zim/mapred/staging/Zim1916101729/.staging/job_local1916101729_0001
1392 [main] INFO org.apache.hadoop.mapreduce.JobSubmitter - Cleaning up the staging area file:/tmp/hadoop-Zim/mapred/staging/Zim1916101729/.staging/job_local1916101729_0001
Exception in thread "main" java.lang.RuntimeException: Error while running command to get file permissions : java.io.IOException: (null) entry in command string: null ls -F C:\UVic\AdvDB\Assignments\Assgn_3\assign3_hadoop_spark\hadoop_examples_post\input_weather\1901
at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:770)
at org.apache.hadoop.util.Shell.execCommand(Shell.java:866)
at org.apache.hadoop.util.Shell.execCommand(Shell.java:849)
at org.apache.hadoop.fs.FileUtil.execCommand(FileUtil.java:1097)
at org.apache.hadoop.fs.RawLocalFileSystem$DeprecatedRawLocalFileStatus.loadPermissionInfo(RawLocalFileSystem.java:659)
at org.apache.hadoop.fs.RawLocalFileSystem$DeprecatedRawLocalFileStatus.getPermission(RawLocalFileSystem.java:634)
at org.apache.hadoop.fs.LocatedFileStatus.<init>(LocatedFileStatus.java:49)
at org.apache.hadoop.fs.FileSystem$4.next(FileSystem.java:1733)
at org.apache.hadoop.fs.FileSystem$4.next(FileSystem.java:1713)
答案 0 :(得分:0)
我将HADOOP_HOME设置为bin目录(C:\ hadoop_spark \ hadoop-2.7.1 \ bin)。它希望我设置为C:\ hadoop_spark \ hadoop-2.7.1 \。希望这有助于其他人面临类似的问题