Few useful Hadoop Commands
Uncompress gz file from HDFS to HDFS – Hadoop:
$hadoop fs -text /hdfs_path/compressed_file.gz | hadoop fs -put - /hdfs_path/uncompressed-file.txt
To uncompress while copying from local to HDFS directly:
$gunzip -c filename.txt.gz | hadoop fs -put - /user/dc-user/filename.txt
Hadoop commands for reporting purpose:
$hdfs fsck /hdfs_path
$hdfs fsck /hdfs_path -files -locations
$hadoop dfsadmin -safemode get
$hadoop dfsadmin -report
Get the job id using below command:
$hadoop job -list
Kill the job using below command:
$hadoop job -kill
Hadoop help command
$hadoop fs -help
Check hadoop version
$hadoop version
Comment below if you find this blog useful.