I also encountered that at the first time I tested a hadoop cluster. After several rounds of re-installation, I finally found out the root cause.
- The HDFS prolonged startup (it took about one minute in my case). Therefore, if you try to get dfsadmin -report too early, you can't get the right capacity reported during the startup process.
- The safemode in HDFS. When you start up and shut down HDFS many times, you will find that sometimes the HDFS is in safemode while sometimes not. In fact, safemode will be off after the HDFS startup process is complete. So be patient and wait, or you may issue the command 'hadoop dfsadmin -safemode leave' to turn off it.
- The HDFS folder structure. Among all datanodes, the HDFS folder structure must be the same; otherwise HDFS will not start up properly. You may issue the command 'hadoop dfsadmin -refreshNodes' after waiting long enough for HDFS startup.
I hope my experience could help you fixing the problem and enjoy hadoop right away.
沒有留言:
張貼留言