我正在尝试使用CYGWIN在Window 7,64位上运行hadoop并遵循http://raseshmori.wordpress.com/2012/09/23/install-hadoop-2-0-1-yarn-nextgen/的安装说明。
我能够成功检查hadoop版本:
vgv@IPLCEWKS02820 ~/yarn/hadoop
$ ./bin/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 /C:/cygwin64/home/vgv/yarn/hadoop/share/hadoop/common/hadoop-common-2.2.0.jar
和我的〜/ .bashrc如下:
export HADOOP_HOME=$HOME/yarn/hadoop
export HADOOP_MAPRED_HOME=$HOME/yarn/hadoop
export HADOOP_COMMON_HOME=$HOME/yarn/hadoop
export HADOOP_HDFS_HOME=$HOME/yarn/hadoop
export HADOOP_YARN_HOME=$HOME/yarn/hadoop
export HADOOP_CONF_DIR=$HOME/yarn/hadoop/etc/hadoop
export YARN_CONF_DIR=$HADOOP_CONF_DIR
但是,我无法格式化'namenode'
vgv@IPLCEWKS02820 ~/yarn/hadoop
$ ./bin/hadoop namenode -format
DEPRECATED: Use of this script to execute hdfs command is deprecated.
Instead use the hdfs command for it.
18 [main] bash 3948 fork: child -1 - forked process 1284 died unexpectedly, retry 0, exit code 0xC0000005, errno 11
/home/vgv/yarn/hadoop/bin/../libexec/hadoop-config.sh: fork: retry: Resource temporarily unavailable
Error: Could not find or load main class org.apache.hadoop.hdfs.server.namenode.NameNode
vgv@IPLCEWKS02820 ~/yarn/hadoop
$ ./bin/hadoop hdfs namenode -format
Error: Could not find or load main class hdfs
即便如此,我也无法启动HDFS流程:
vgv@IPLCEWKS02820 ~/yarn/hadoop
$ ./sbin/hadoop-daemon.sh start namenode
starting namenode, logging to /home/vgv/yarn/hadoop/logs/hadoop-vgv-namenode-IPLCEWKS02820.out
Error: Could not find or load main class org.apache.hadoop.hdfs.server.namenode.NameNode
请帮我解决此错误。
答案 0 :(得分:0)
通过在控制台中运行以下命令来检查$ HOME变量下的值:
# echo $HOME
如果输出如下:
/root
OR /家庭/ USERNAME
检查〜/ .bashrc文件下的相对路径。
HTH !!