解决方法could only be replicated to 0 nodes, instead of 1

阅读更多
开启hadoop的start-all.sh脚本后,执行例子,出现properties could only be replicated to 0 nodes, instead of 1 这样的异常,解决方案是:
1、停止hadoop脚本:bin/stop-all.sh
(在进行2、3步前,注意数据的备份)
2、删除主节点和从节点上的hadoop根目录下的临时文件夹,比如$HADOOP_HOME/hadooptmp
3、格式化namenode: hadoop namenode -format
4、重新开启hadoop的start-all.sh脚本:bin/start-all.sh
5、查看从节点下的datanode是否起来,没有的话重复2、3
6、执行想要的jar包
正常会出现:
INFO input.FileInputFormat: Total input paths to process : 2
INFO util.NativeCodeLoader: Loaded the native-hadoop library
INFO mapred.JobClient: Running job: job_201303111150_0001
INFO mapred.JobClient:  map 0% reduce 0%
INFO mapred.JobClient:  map 100% reduce 0%
INFO mapred.JobClient:  map 100% reduce 100%
INFO mapred.JobClient: Job complete: job_201303111150_0001


你可能感兴趣的:(hadoop,replicated,to,0,nodes)