• Hadoop分布式部署实验2_格式化分布式文件系统


    [root@localhost program]# hadoop namenode -format
    09/04/24 09:38:13 INFO namenode.NameNode: STARTUP_MSG:
    /************************************************************
    STARTUP_MSG: Starting NameNode
    STARTUP_MSG:   host = localhost.localdomain/127.0.0.1
    STARTUP_MSG:   args = [-format]
    STARTUP_MSG:   version = 0.19.0
    STARTUP_MSG:   build = https://svn.apache.org/repos/asf/hadoop/core/branches/branch-0.19 -r 713890; compiled by 'ndaley' on Fri Nov 14 03:12:29 UTC 2008
    ************************************************************/
    Re-format filesystem in /tmp/hadoop-root/dfs/name ? (Y or N) y
    Format aborted in /tmp/hadoop-root/dfs/name
    09/04/24 09:38:59 INFO namenode.NameNode: SHUTDOWN_MSG:
    /************************************************************
    SHUTDOWN_MSG: Shutting down NameNode at localhost.localdomain/127.0.0.1
    ************************************************************/

    怎么格式化的时候会出错误?

    把/tmp/hadoop-root/dfs/下 name文件夹整个删除,再进行格式化,操作成功了。。。

    [root@localhost hadoop-root]# rm /tmp/hadoop-root/dfs/name/ -rf
    [root@localhost hadoop-root]# rm /tmp/hadoop-root/dfs/
    [root@localhost hadoop-root]# hadoop namenode -format
    09/04/24 09:42:55 INFO namenode.NameNode: STARTUP_MSG:
    /************************************************************
    STARTUP_MSG: Starting NameNode
    STARTUP_MSG:   host = localhost.localdomain/127.0.0.1
    STARTUP_MSG:   args = [-format]
    STARTUP_MSG:   version = 0.19.0
    STARTUP_MSG:   build = https://svn.apache.org/repos/asf/hadoop/core/branches/branch-0.19 -r 713890; compiled by 'ndaley' on Fri Nov 14 03:12:29 UTC 2008
    ************************************************************/
    09/04/24 09:42:56 INFO namenode.FSNamesystem: fsOwner=root,root,bin,daemon,sys,adm,disk,wheel
    09/04/24 09:42:56 INFO namenode.FSNamesystem: supergroup=supergroup
    09/04/24 09:42:56 INFO namenode.FSNamesystem: isPermissionEnabled=true
    09/04/24 09:42:56 INFO common.Storage: Image file of size 94 saved in 0 seconds.
    09/04/24 09:42:58 INFO common.Storage: Storage directory /tmp/hadoop-root/dfs/name has been successfully formatted.
    09/04/24 09:42:58 INFO namenode.NameNode: SHUTDOWN_MSG:
    /************************************************************
    SHUTDOWN_MSG: Shutting down NameNode at localhost.localdomain/127.0.0.1
    ************************************************************/
    之前的格式化为什么出错?只能格式化一次吗?

    可以参看笔记5,如果hadoop-site.xml为空,则使用默认值?对单点进行配置后,再运行 hadoop namenode -fromat,生成文件系统的位置变化了。。。

    hadoop namenode -format
    09/04/27 01:04:44 INFO namenode.NameNode: STARTUP_MSG:
    /************************************************************
    STARTUP_MSG: Starting NameNode
    STARTUP_MSG:   host = localhost.localdomain/127.0.0.1
    STARTUP_MSG:   args = [-format]
    STARTUP_MSG:   version = 0.19.0
    STARTUP_MSG:   build = https://svn.apache.org/repos/asf/hadoop/core/branches/branch-0.19 -r 713890; compiled by 'ndaley' on Fri Nov 14 03:12:29 UTC 2008
    ************************************************************/
    09/04/27 01:04:45 INFO namenode.FSNamesystem: fsOwner=root,root,bin,daemon,sys,adm,disk,wheel
    09/04/27 01:04:45 INFO namenode.FSNamesystem: supergroup=supergroup
    09/04/27 01:04:45 INFO namenode.FSNamesystem: isPermissionEnabled=true
    09/04/27 01:04:45 INFO common.Storage: Image file of size 94 saved in 0 seconds.
    09/04/27 01:04:45 INFO common.Storage: Storage directory /home/root/hdfs/name has been successfully formatted.
    09/04/27 01:04:45 INFO namenode.NameNode: SHUTDOWN_MSG:
    /************************************************************
    SHUTDOWN_MSG: Shutting down NameNode at localhost.localdomain/127.0.0.1
    ************************************************************/

  • 相关阅读:
    【leetcode】Pascal's Triangle
    [bxd学习java基本点]10.set元素不重复,取元素顺序会变的。TreeSet取值时,是安顺序来的。
    cocos2dx 学习点滴(4) cocos2dx 架构和引擎目录
    VC 2008编译libxml22.7.6
    程序猿的九重天
    使用批处理文件设置环境变量
    删除指定目录下除开指定文件外所有文件的批处理命令
    关于永动机的思考
    程序员的九阳真经
    上帝的归上帝,程序的归程序 (卓有成效的程序员)
  • 原文地址:https://www.cnblogs.com/riverphoenix/p/2502089.html
Copyright © 2020-2023  润新知