Reputation: 10395
I have a HDFS cluster running on several linux machines with default block size of 64MB, if I store a file of size 1MB, will it occupy 64MB storage on my linux machine?
Similarly, if I store a file of size 65MB, will it occupy two blocks of 64MB on my machine or one 64MB and 1MB blocks?
Thanks
Upvotes: 2
Views: 1150
Reputation: 33545
According to the Hadoop : The Definitive Guide
Unlike a filesystem for a single disk, a file in HDFS that is smaller than a single block does not occupy a full block’s worth of underlying storage.
Upvotes: 2