日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

浅析NameNode/DataNode/SecondaryNameNode源码注释

發布時間:2024/2/28 编程问答 36 豆豆
生活随笔 收集整理的這篇文章主要介紹了 浅析NameNode/DataNode/SecondaryNameNode源码注释 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

NameNode源碼注釋?

/*********************************************************** NameNode serves as both directory namespace manager and* "inode table" for the Hadoop DFS. There is a single NameNode* running in any DFS deployment. (Well, except when there* is a second backup/failover NameNode, or when using federated NameNodes.)** The NameNode controls two critical tables:* 1) filename->blocksequence (namespace)* 2) block->machinelist ("inodes")** The first table is stored on disk and is very precious.* The second table is rebuilt every time the NameNode comes up.** 'NameNode' refers to both this class as well as the 'NameNode server'.* The 'FSNamesystem' class actually performs most of the filesystem* management. The majority of the 'NameNode' class itself is concerned* with exposing the IPC interface and the HTTP server to the outside world,* plus some configuration management.** NameNode implements the* {@link org.apache.hadoop.hdfs.protocol.ClientProtocol} interface, which* allows clients to ask for DFS services.* {@link org.apache.hadoop.hdfs.protocol.ClientProtocol} is not designed for* direct use by authors of DFS client code. End-users should instead use the* {@link org.apache.hadoop.fs.FileSystem} class.** NameNode also implements the* {@link org.apache.hadoop.hdfs.server.protocol.DatanodeProtocol} interface,* used by DataNodes that actually store DFS data blocks. These* methods are invoked repeatedly and automatically by all the* DataNodes in a DFS deployment.** NameNode also implements the* {@link org.apache.hadoop.hdfs.server.protocol.NamenodeProtocol} interface,* used by secondary namenodes or rebalancing processes to get partial* NameNode state, for example partial blocksMap etc.**********************************************************/

?


DataNode源碼注釋

/*********************************************************** DataNode is a class (and program) that stores a set of* blocks for a DFS deployment. A single deployment can* have one or many DataNodes. Each DataNode communicates* regularly with a single NameNode. It also communicates* with client code and other DataNodes from time to time.** DataNodes store a series of named blocks. The DataNode* allows client code to read these blocks, or to write new* block data. The DataNode may also, in response to instructions* from its NameNode, delete blocks or copy blocks to/from other* DataNodes.** The DataNode maintains just one critical table:* block-> stream of bytes (of BLOCK_SIZE or less)** This info is stored on a local disk. The DataNode* reports the table's contents to the NameNode upon startup* and every so often afterwards.** DataNodes spend their lives in an endless loop of asking* the NameNode for something to do. A NameNode cannot connect* to a DataNode directly; a NameNode simply returns values from* functions invoked by a DataNode.** DataNodes maintain an open server socket so that client code * or other DataNodes can read/write data. The host/port for* this server is reported to the NameNode, which then sends that* information to clients or other DataNodes that might be interested.***********************************************************/

?


SecondaryNameNode源碼注釋?

/*********************************************************** The Secondary NameNode is a helper to the primary NameNode.* The Secondary is responsible for supporting periodic checkpoints * of the HDFS metadata. The current design allows only one Secondary* NameNode per HDFs cluster.** The Secondary NameNode is a daemon that periodically wakes* up (determined by the schedule specified in the configuration),* triggers a periodic checkpoint and then goes back to sleep.* The Secondary NameNode uses the NamenodeProtocol to talk to the* primary NameNode.***********************************************************/

?

?

總結

以上是生活随笔為你收集整理的浅析NameNode/DataNode/SecondaryNameNode源码注释的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。