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。

  • 相关阅读:
    数据库mysql的基本操作
    多进程多线程与进程池线程池及协程
    面对对象的属性和方法
    Python中的编码及操作文件
    通过pymysql操作mysql数据库
    Spring注入
    Mybatis标签及使用1
    全局配置文件说明
    类方法和对象方法的区别
    Mybatis
  • 原文地址:https://www.cnblogs.com/birdhack/p/4304510.html
Copyright © 2011-2022 走看看