sbin/start-dfs.sh

jps

bin/hdfs dfs -ls /

bin/hadoop dfsadmin -safemode leave 关闭安全模式
//在HDFS上创建输入文件夹
bin/hadoop fs -mkdir /data/wordcount
//上传本地/home/zjp/test/中的文件到集群的/data/wordcount目录下
bin/hdfs dfs -put /home/zjp/test/ztest2.txt /data/wordcount

bin/hdfs dfs -ls /data/wordcount

//运行hadoop自带实例wordcount
bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.7.jar wordcount /data/wordcount/ztest2.txt /home/zjp/test/out

bin/hdfs dfs -ls /home/zjp/test

bin/hdfs dfs -ls /home/zjp/test/out

bin/hadoop fs -cat /home/zjp/test/out/part-r-00000

相关文章:

  • 2021-04-09
  • 2021-08-04
  • 2022-12-23
  • 2021-06-30
  • 2022-12-23
  • 2021-09-01
  • 2022-01-21
  • 2021-10-19
猜你喜欢
  • 2021-10-04
  • 2021-09-25
  • 2021-04-30
  • 2022-02-11
  • 2022-12-23
  • 2021-11-20
  • 2021-08-21
相关资源
相似解决方案