【发布时间】:2016-06-03 06:27:48
【问题描述】:
我在 hadoop 集群上放了 100 个文件。我想确定 NameNode 维护的与这些文件相对应的元数据的大小。
【问题讨论】:
-
你可以直接去
dfs.namenode.name.dirlocation查看这个
我在 hadoop 集群上放了 100 个文件。我想确定 NameNode 维护的与这些文件相对应的元数据的大小。
【问题讨论】:
dfs.namenode.name.dirlocation查看这个
我相信您所说的元数据是有关存储在 datanode 中的数据块的信息。所有这些细节都将保存在 namenode 内存 RAM 中。
Namenode 消耗大约 150 字节用于块元数据存储和 150 字节用于文件元数据存储。因此,让我们假设您的集群块大小为 128Mb,并且您的 100 个文件中的每个文件大小约为 100Mb。然后每个文件在namenode中消耗300字节的内存。名称节点将消耗 300*100=30000 字节的数据。这是考虑到复制是 1x。
详细讨论已完成here。
【讨论】:
Each block replica on a DataNode is represented by two files in the local host’s native file system. The first file contains the data itself and the second file is block’s metadata including checksums for the block data and the block’s generation stamp.