All posts tagged: HDFS

How to view files in HDFS (hadoop fs -ls)

Leave a comment
Hadoop

Introduction The hadoop fs -ls command allows you to view the files and directories in your HDFS filesystem, much as the ls command works on Linux / OS X / *nix. Default Home Directory in HDFS A user’s home directory in HDFS is located at /user/userName. For example, my home directory is /user/akbar. List the Files in Your Home Directory hadoop fs -ls defaults to /user/userName, so you can leave the path blank to view […]

hdfs dfsadmin -metasave

Leave a comment
Hadoop

Introduction hdfs dfsadmin -metasave provides additional information compared to hdfs dfsadmin -report. With hdfs dfsadmin -metasave provides information about blocks, including> blocks waiting for replication blocks currently being replication total number of blocks hdfs dfsadmin -metasave filename.txt Run the command with sudo -u hdfs prefixed to ensure you don’t get a permission denied error. CDH4 runs the namenode as the hdfs user by default. However if you have changed the ssudo -u hdfs hdfs dfsadmin […]

hdfs dfsadmin -report

comment 1
Hadoop

Introduction hdfs dfsadmin -report outputs a brief report on the overall HDFS filesystem. It’s a userful command to quickly view how much disk is available, how many datanodes are running, and so on. Command Run the command with sudo -u hdfs prefixed to ensure you don’t get a permission denied error. CDH4 runs the namenode as the hdfs user by default. However if you have changed the sudo -u hdfs hdfs dfsadmin -report You will […]