Jps check Hadoop daemons like NameNode, DataNode, ResourceManager, NodeManager etc. which are running on the machine.
hadoop fs -ls /
hadoop fs -mkdir /user/training Create a new directory in HDFS
hadoop fs -put data/sample.txt /user/training Add a sample text file from the local dir “data” to the new dir created in HDFS
hadoop fs -ls /user/training List contents of this new directory in HDFS.
hadoop fs -put data/retail /user/training Add the entire local directory called “retail” to the
hadoop fs -copyFromLocal /home/training/purchases.txt /hadoop
hadoop fs -df hdfs:/ Available on currently mounted filesystem
hadoop fs -count hdfs:/ Count the number of directories,files and bytes under the paths that match the specified file pattern
hadoop fsck – / Run a DFS filesystem checking utility
hadoop balancer Run a cluster balancing utility
hadoop fs -text /filename To view the compress files
Copyright ©2022 coderraj.com. All Rights Reserved.