关于hadoop:五Windows下Hadoop的启动HDFS上传文件等命令

5次阅读

共计 729 个字符,预计需要花费 2 分钟才能阅读完成。

PS: 肯定要在管理员窗口关上,不要关上 powershell!PS: 肯定要在管理员窗口关上,不要关上 powershell!PS: 肯定要在管理员窗口关上,不要关上 powershell!PS D:\open_source\hadoop-2.5.2\bin> hdfs namenode -format
PS D:\open_source\hadoop-2.5.2\bin> start-all.cmd

PS D:\open_source\hadoop-2.5.2\bin> hadoop fs -mkdir hdfs://localhost:9000/input
PS D:\open_source\hadoop-2.5.2\bin> hadoop fs -mkdir hdfs://localhost:9000/output
PS 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.sh
2、从新格式化 namenode(切换到 hadoop 目录下的 bin 目录下)
hdfs namenode -format
3、重新启动 hadoop 集群(切换到 hadoop 目录下的 sbin 目录下)start-all.sh
4、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

正文完
 0