HDFS如何管理块大小? [英] How does HDFS manage block size?

查看:62
本文介绍了HDFS如何管理块大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的文件大小为65MB,默认的hdfs块大小为64MB,那么将为我的文件分配多少个64MB块?

My file size is 65MB and default hdfs block size(64MB), then how many 64MB blocks will be allotted to my file?

是1-64MB块,1-1MB块还是2-64MB块?如果它是2-64MB的块,它将浪费掉63MB的其余部分,还是会分配给其他文件?

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?

推荐答案

块大小64MB表示块的上限大小.这并不意味着小于64MB的文件块将消耗64MB.存储1MB的块不会消耗64MB.

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.

如果文件为 160兆字节

希望这会有所帮助.

这篇关于HDFS如何管理块大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆