Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Chapter 2 of Hadoop Learning: Hadoop Command

Shulou Source: shulou.com Published: 2022-06-03 05:38:24 11月24日 Update

Common Hadoop commands:

hadoop dfs -mkdir /tmp/input New folder on HDFS

hadoop dfs -put input1.txt /tmp/input Transfer the local file input1.txt to the HDFS/tmp/input directory

Hadoop dfs -get input1.txt/tmp/input/input1.txt Pull HDFS files locally

hadoop dfs -ls /tmp/output Lists a directory in HDFS

hadoop dfs -cat/tmp/ouput/output1.txt View files on HDFS

hadoop dfs -rmr /home/less/hadoop/tmp/output Delete directories on HDFS

hadoop dfsadmin -report View HDFS status, such as which datanodes exist, and the status of each datanode

hadoop dfsadmin -safemode leave Leave safe mode

hadoop dfsadmin -safemode enter Enter safe mode

hadoop jar /usr/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.6.4.jar wordcount /usr/input /usr/output

Reference website:

http://hadoop.apache.org/docs/r1.0.4/cn/hdfs_shell.html

Tags: File directory security mode command common use situation folder status URL reference chapter 2 study Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Apple NVidia Linux macOS