Skip to content

Instantly share code, notes, and snippets.

@ekbelova
Last active January 30, 2018 12:31
Show Gist options
  • Save ekbelova/03ed1b77358eeb3b9f93ef0ed0c73f1d to your computer and use it in GitHub Desktop.
Save ekbelova/03ed1b77358eeb3b9f93ef0ed0c73f1d to your computer and use it in GitHub Desktop.
export HADOOP_USER_NAME=hdfs
hdfs dfs -du -h /
hdfs dfs -du [-h] / | sort -n[/d] -r --key=1,15 #size of files on hdfs in sorted order
hdfs dfs -expunge #empty trash bin
#read several lines from compressed file on hdfs
hdfs dfs -cat /user/hive/warehouse/test_proz_tax/part-m-00000.gz | zcat | head -n 10
parquet-tools head hdfs://localhost/<hdfs-path> | less
#check where it is stored
hdfs fsck /data/kudu_backups -files -blocks -locations | less
#space without snapshots
hdfs dfs -du -h -x /
#with snapshots
hdfs dfs -du -h /
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment