我正在尝试在我的计算机上安装Hadoop 2.2.0(OSX 10.9.3)。
我已经配置了相关文件,当我输入hadoop version
时,我得到了
Hadoop 2.2.0
Subversion https://svn.apache.org/repos/asf/hadoop/common -r 1529768
Compiled by hortonmu on 2013-10-07T06:28Z
Compiled with protoc 2.5.0
From source with checksum 79e53ce7994d1628b240f09af91e1af4
This command was run using /Users/hadoop/Downloads/hadoop/share/hadoop/common/hadoop-
common-2.2.0.jar
所以我相信这意味着Hadoop已成功安装。
但是,当我测试运行时
$HADOOP_PREFIX/bin/hadoop jar $HADOOP_PREFIX/share/hadoop/yarn/hadoop-yarn-applications-
distributedshell-2.2.0.jar org.apache.hadoop.yarn.applications.distributedshell.Client --
jar $HADOOP_PREFIX/share/hadoop/yarn/hadoop-yarn-applications-distributedshell-2.2.0.jar -
-shell_command date --num_containers 2 --master_memory 1024
(顺便说一句,如果你想知道上面的代码意味着:"有了这个命令,我们告诉hadoop在hadoop-yarn-applications-distributedshell-2.2.0.jar中运行Client类,传递它包含ApplicationMaster定义的jar(同一个jar),在每个主机中运行的shell命令(日期),要生成的容器数(2)以及ApplicationMaster使用的内存(1024MB)。通过尝试多次运行程序直到它停止失败,因为ApplicationMaster使用的内存比分配给它的内存多得多,因此根据经验设置了1024."根据我正在遵循的说明。)
我收到以下错误:
ERROR hdfs.DFSClient: Failed to close file /user/hadoop/DistributedShell/1/AppMaster.jar
org.apache.hadoop.ipc.RemoteException(java.io.IOException): File
/user/hadoop/DistributedShell/1/AppMaster.jar could only be replicated to 0 nodes instead
of minReplication (=1). There are 0 datanode(s) running and no node(s) are excluded in
this operation.
有谁知道如何修复此错误?