hadoop 2.2:未找到类路径

9rbhqvlz  于 2021-06-03  发布在  Hadoop
关注(0)|答案(1)|浏览(339)

我尝试在windows7上运行hadoop,64位,使用cygwin,并遵循了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

请帮我解决这个错误。

mkh04yzy

mkh04yzy1#

通过在控制台中运行以下命令,检查$home变量下的值:


# echo $HOME

如果得到如下输出:

/root

或/home/username
检查~/.bashrc文件下的相对路径。
嗯!!

相关问题