您好,登錄后才能下訂單哦!
這篇文章主要講解了“Hadoop集群怎么管理Namenode的目錄數(shù)據(jù)結(jié)構(gòu)”,文中的講解內(nèi)容簡單清晰,易于學(xué)習(xí)與理解,下面請大家跟著小編的思路慢慢深入,一起來研究和學(xué)習(xí)“Hadoop集群怎么管理Namenode的目錄數(shù)據(jù)結(jié)構(gòu)”吧!
一、dfs目錄結(jié)構(gòu)
[root@master hadoop]# pwd /opt/hadoop-2.7.1/etc/hadoop [root@master hadoop]# cat core-site.xml <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> <!-- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. See accompanying LICENSE file. --> <!-- Put site-specific property overrides in this file. --> <configuration> <property> <name>hadoop.tmp.dir</name> <value>/opt/hadoop-2.7.1/tmp</value> </property> <property> <name>fs.defaultFS</name> <value>hdfs://master.harry.com:9000</value> </property> <!-- HA--> <!-- <property> <name>ha.zookeeper.quorum</name> <value>master.harry.com:2181</value> </property> <property> <name>ha.zookeeper.session-timeout.ms</name> <value>5000</value> </property> <property> <name>ha.zookeeper.parent-znode</name> <value>/hadoop-harry-ha</value> </property> --> </configuration> [root@master tmp]# pwd /opt/hadoop-2.7.1/tmp [root@master tmp]# tree dfs/ -L 2 dfs/ |-- data | `-- current `-- name `-- current 4 directories, 0 files [root@master current]# pwd /opt/hadoop-2.7.1/tmp/dfs/name/current [root@master current]# ll total 1076 -rw-r--r--. 1 root root 207 Oct 14 22:39 VERSION -rw-r--r--. 1 root root 14381 Oct 14 23:33 edits_0000000000000000001-0000000000000000127 -rw-r--r--. 1 root root 42 Oct 15 00:33 edits_0000000000000000128-0000000000000000129 -rw-r--r--. 1 root root 42 Oct 15 01:33 edits_0000000000000000130-0000000000000000131 -rw-r--r--. 1 root root 42 Oct 15 02:33 edits_0000000000000000132-0000000000000000133 -rw-r--r--. 1 root root 1048576 Oct 15 02:33 edits_inprogress_0000000000000000134 -rw-r--r--. 1 root root 1809 Oct 15 01:33 fsimage_0000000000000000131 -rw-r--r--. 1 root root 62 Oct 15 01:33 fsimage_0000000000000000131.md5 -rw-r--r--. 1 root root 1809 Oct 15 02:33 fsimage_0000000000000000133 -rw-r--r--. 1 root root 62 Oct 15 02:33 fsimage_0000000000000000133.md5 -rw-r--r--. 1 root root 4 Oct 15 02:33 seen_txid
二、解析
edits_* 文件:當(dāng)我們對元數(shù)據(jù)進行修改時,如新增了block,新增了節(jié)點,等等,這樣對namespace等進行了修改,數(shù)據(jù)都會被臨時存放到edits文件中。
fsimage 文件:存放實際的namenode所管理的數(shù)據(jù)。定期的由secondary namenode和并edits文件和舊的fsimage文件而成的。
seen_txid:記錄最后一個edits文件的數(shù)字如 本例子中式134.因為edits文件最后到133.當(dāng)系統(tǒng)重啟時,會檢查seen_txid和edits文件的最后數(shù)字,來表示是否存在元數(shù)據(jù)的缺失。
[root@master current]# cat seen_txid 134
VERSION文件:
[root@master current]# cat VERSION #Wed Oct 14 22:39:48 PDT 2015 namespaceID=1916027777 clusterID=CID-f0ee4204-f7a1-4e8d-9799-bdd5e23259f1 cTime=0 storageType=NAME_NODE blockpoolID=BP-1637593683-172.16.114.202-1444887588098 layoutVersion=-63
感謝各位的閱讀,以上就是“Hadoop集群怎么管理Namenode的目錄數(shù)據(jù)結(jié)構(gòu)”的內(nèi)容了,經(jīng)過本文的學(xué)習(xí)后,相信大家對Hadoop集群怎么管理Namenode的目錄數(shù)據(jù)結(jié)構(gòu)這一問題有了更深刻的體會,具體使用情況還需要大家實踐驗證。這里是億速云,小編將為大家推送更多相關(guān)知識點的文章,歡迎關(guān)注!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。