以下示例在Hadoop中创建了多少个块? [英] how many blocks are made in Hadoop for the following example?
问题描述
我有4个文件:
文件A: 64MB * 3 + 2MB;
文件B:62 MB;
文件应该有4个块每个包含64 MB和一个包含2 MB的文件。
文件B应该有一个62 MB的块。
所以总共应该有6个块
仅仅因为在存储仅2 MB的文件A的一个块中存在空闲空间,
文件B不会附加到同一个块。是否正确?
我看过一些教程,他们说块中的空闲空间被利用。
正确的话,会有6个方块。所有这一切都意味着2MB的数据块仅在物理上占据了2MB的数据节点的硬盘空间,而不是一个完整的块大小,这将浪费空间。
Assume my HDFS block size is 64 MB.
I have 4 files:
File A: 64MB * 3 + 2 MB;
File B: 62 MB;
There should be 4 blocks for File A each with 64 MB and one with 2 MB.
There should be one block for File B with 62 MB.
So in total there should be 6 blocks
Just because there is "free" space in the one of the blocks of File A which stores only 2 MB, file B does NOT get appended to same block. Is it correct?
I have seen some tutorials where they say the "free" space in the block is utilized.
Correct, there will be 6 blocks. All this means is that a 2MB block only physically takes up 2MB on the datanode's hard disk and not a full block size which would be a waste of space.
这篇关于以下示例在Hadoop中创建了多少个块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!