hadoop学习——第二天

本文解决了Hadoop集群搭建过程中的NameNode初始化失败问题。通过格式化NameNode、检查并关闭未结束的Hadoop进程,最终成功启动了Hadoop集群,并验证了NameNode和JobTracker的状态。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

继续昨天问题:今天已经解决,调通了(hadoop 1.0.0)

 

  • 问题

2012-03-13 20:12:57,764 ERROR org.apache.hadoop.hdfs.server.namenode.FSNamesystem: FSNamesystem initialization failed.

 

原因是没有fomat namenode 执行如下命令

 

  •  bin/hadoop namenode -format

 

在这之前需要检查:是否有hadoop进程没有关闭

  • ps -aux|grep "hadoop"

 检查是否有hadoop运行

  • bin/start-all.sh

运行结果

输入

NameNode 'localhost:9000'

Started: Wed Mar 14 18:48:41 CST 2012
Version: 1.0.1-SNAPSHOT, r
Compiled: Wed Dec 28 11:13:26 CST 2011 by somo
Upgrades: There are no upgrades in progress.


Browse the filesystem
Namenode Logs


Cluster Summary

Safe mode is ON. The ratio of reported blocks 0.0000 has not reached the threshold 0.9990. Safe mode will be turned off automatically.
6 files and directories, 1 blocks = 7 total. Heap Size is 240.69 MB / 888.94 MB (27%)

Configured Capacity : 0 KB
DFS Used : 0 KB
Non DFS Used : 0 KB
DFS Remaining : 0 KB
DFS Used% : 100 %
DFS Remaining% : 0 %
Live Nodes : 0
Dead Nodes : 0
Decommissioning Nodes : 0
Number of Under-Replicated Blocks : 0


There are no datanodes in the cluster


NameNode Storage:

Storage DirectoryTypeState
/tmp/hadoop-somo/dfs/nameIMAGE_AND_EDITSActive

 


This is Apache Hadoop release 1.0.1-SNAPSHOT

 

 

查看JobTracker

 http://localhost:50030/

 

上面页面显示,成功,不过集群没有Data Node

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值