PS:肯定要在管理员窗口关上,不要关上powershell!PS:肯定要在管理员窗口关上,不要关上powershell!PS:肯定要在管理员窗口关上,不要关上powershell!PS D:\open_source\hadoop-2.5.2\bin> hdfs namenode -formatPS D:\open_source\hadoop-2.5.2\bin> start-all.cmdPS D:\open_source\hadoop-2.5.2\bin> hadoop fs -mkdir hdfs://localhost:9000/inputPS D:\open_source\hadoop-2.5.2\bin> hadoop fs -mkdir hdfs://localhost:9000/outputPS D:\open_source\hadoop-2.5.2\bin> hadoop fs -put D:\open_source\hadoop-2.5.2\AvgTemperature.txt hdfs://localhost:9000/input/ 
1、进行集群(切换到/sbin目录下)stop-all.sh2、从新格式化namenode(切换到hadoop目录下的bin目录下)hdfs namenode -format3、重新启动hadoop集群(切换到hadoop目录下的sbin目录下)start-all.sh4、hadoop dfsadmin -report
D:\open_source\hadoop-2.5.2\bin>hadoop fs -ls /input/D:\open_source\hadoop-2.5.2\bin>hadoop fs -cat /output/part-00000