How does HDFS manage block size?
问题 My file size is 65MB and default hdfs block size(64MB), then how many 64MB blocks will be allotted to my file? Is it like 1-64MB block, 1-1MB block or 2-64MB blocks? If it is 2-64MB blocks is it going to be wasted rest of the 63MB or will it be allocated to other file? 回答1: Block size 64MB means an upper bound size for a block. It doesn't mean that file blocks less than 64MB will consume 64MB. It will not consume 64MB to store a chunk of 1MB. If the file is 160 megabytes , Hope this helps.