zoukankan      html  css  js  c++  java
  • Hadoop HDFS源码分析 关于数据块的类

    Hadoop HDFS源码分析 关于数据块的类

    1.BlocksMap

    官方代码中的注释为:

    /**
     * This class maintains the map from a block to its metadata.
     * block's metadata currently includes blockCollection it belongs to and
     * the datanodes that store the block.
     */

      BlocksMap数据块映射,管理名字节点上的数据块的元数据。数据块的元数据包括数据块所属的INode和那些数据节点保存数据块等信息。也就是定位哪个数据块在哪个数据节点上。

    2.DatanodeDescriptor

    DatanodeDescriptor数据节点描述符。官方解释为:

    /**
     * This class extends the DatanodeInfo class with ephemeral information (eg
     * health, capacity, what blocks are associated with the Datanode) that is
     * private to the Namenode, ie this class is not exposed to clients.
     */

    是名字节点中对数据节点的抽象,继承自DatanodeInfo。

    3.BlockInfo

    BlockInfo 数据块信息,是Block的子类,它增加了数据块所属的INode信息和保存该数据块的数据节点信息。

    /**
     * BlockInfo class maintains for a given block
     * the {@link INodeFile} it is part of and datanodes where the replicas of 
     * the block are stored.
     * BlockInfo class maintains for a given block
     * the {@link BlockCollection} it is part of and datanodes where the replicas of 
     * the block are stored.
     */

    数据块所在数据节点的信息保存在Object[] triplets。

  • 相关阅读:
    ASP.NET MVC 学习笔记 1
    安装xp遇到的问题与如何连接共享的打印机
    win8.1 安装
    AspxGridView控件的使用
    JS获取fileupload文件全路径
    正则表达式的学习
    回归起点
    Vmware ESX 5.0 安装与部署
    UITextField检测输入内容不能有空格的处理
    关于cell自动布局约束实现高度自适应问题
  • 原文地址:https://www.cnblogs.com/birdhack/p/4304510.html
Copyright © 2011-2022 走看看