{"action":"opened","issue":{"url":"https://api.github.com/repos/psStyle/repos/issues/10","labels_url":"https://api.github.com/repos/psStyle/repos/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/psStyle/repos/issues/10/comments","events_url":"https://api.github.com/repos/psStyle/repos/issues/10/events","html_url":"https://github.com/psStyle/repos/issues/10","id":90044356,"number":10,"title":"hadoop 学习第四天 HDFS的体系结构","user":{"login":"psStyle","id":12929526,"avatar_url":"https://avatars.githubusercontent.com/u/12929526?v=3","gravatar_id":"","url":"https://api.github.com/users/psStyle","html_url":"https://github.com/psStyle","followers_url":"https://api.github.com/users/psStyle/followers","following_url":"https://api.github.com/users/psStyle/following{/other_user}","gists_url":"https://api.github.com/users/psStyle/gists{/gist_id}","starred_url":"https://api.github.com/users/psStyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psStyle/subscriptions","organizations_url":"https://api.github.com/users/psStyle/orgs","repos_url":"https://api.github.com/users/psStyle/repos","events_url":"https://api.github.com/users/psStyle/events{/privacy}","received_events_url":"https://api.github.com/users/psStyle/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-22T08:43:02Z","updated_at":"2015-06-22T08:43:02Z","closed_at":null,"body":"HDFS的体系结构\r\n   HDFS下有Namenode    Datanode   SecondaryNameNode\r\n\tNamenode :是整个文件系统的管理节点.它维护着整个文件系统的文\r\n\r\n件目录树,文件.目录的元信息和每个文件对应的数据块列表.接收用户的操作\r\n\r\n请求.它下面包括   (1)fsimage:是元数据镜像文件,存储某一时段NameNode内\r\n\r\n存元数据信息.     (2)edits:操作日志文件\r\n\t          (3)fstime:保存最近一次checkpoint的时间. 以上这些文\r\n\r\n件都是保存在linux的文件系统中的.\r\n\tDataNode:提供真实文件数据的存储服务.以文件块(block)的方式存\r\n\r\n储,按照固定的大小,顺序对文件进行划分并编号,划分好的每个块称一个Block. HDFS默认Block大小是64MB,以一个256MB文件为例,它共有256/64=4个Block. 不同与普通文件系统的是,HDFS中,如果文件小于一个数据块的大小,并不占用整个数据块的存储空间,而是按实际大小算.\r\n\t      Replication : 多副本,默认是三个.\r\n\tSecondaryNameNodes是HA的一个解决方案.但不支持热备.\r\n\t\t执行过程:从NameNode上下载元数据信息(fsimage,edits),\r\n\r\n然后把二者合并,生成新的fsimage,在本地保存,并将其推送到NameNode,同时\r\n\r\n重置NameNode的edits,默认是安装在NameNode节点上,但这样不安全."}}