Farid Arshad
Farid Arshad

Reputation: 334

Meaning of hdfs dfs -du -s -h

I was given a command by my colleague to check the datasize of a table

hdfs dfs -du -s -h <table path>

I would like to check what does this command as i tried researching online , i could only find command on hdfs dfs du

also , after i query the above command , for e.g path table : hdfs://test/table_1

hdfs dfs -du -s -h  hdfs://test/table_1

it returns

29.3 K  141.7 hdfs://test/table_1

How can we determine the size of the table ? should we determine that the size of the table is 29.3 ?

Upvotes: 1

Views: 1965

Answers (1)

Egor
Egor

Reputation: 1409

As the doc says:

The -s option will result in an aggregate summary of file lengths being displayed, rather than the individual files.

The -h option will format file sizes in a "human-readable" fashion (e.g 64.0m instead of 67108864)

Also the output of hdfs df -du has two columns: [size] [disk space consumed]. So the size of the table without replication is 29.3.

Upvotes: 3

Related Questions