码迷,mamicode.com
首页 > 其他好文 > 详细

Cannot lock storage /tmp/hadoop-root/dfs/name. The directory is already locked.

时间:2014-07-11 00:23:43      阅读:362      评论:0      收藏:0      [点我收藏+]

标签:hadoop   namenode   

[root@nn01 bin]# ./hadoop namenode -format
12/05/21 06:13:51 INFO namenode.NameNode: STARTUP_MSG:
/************************************************************
STARTUP_MSG: Starting NameNode
STARTUP_MSG:   host = nn01/127.0.0.1
STARTUP_MSG:   args = [-format]
STARTUP_MSG:   version = 0.20.2
STARTUP_MSG:   build = https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20 -r 911707; compiled by ‘chrisdo‘ on Fri Feb 19 08:07:34 UTC 2010
************************************************************/
Re-format filesystem in /tmp/hadoop-root/dfs/name ? (Y or N) Y
12/05/21 06:14:01 INFO namenode.FSNamesystem: fsOwner=root,root,bin,daemon,sys,adm,disk,wheel
12/05/21 06:14:01 INFO namenode.FSNamesystem: supergroup=supergroup
12/05/21 06:14:01 INFO namenode.FSNamesystem: isPermissionEnabled=true
12/05/21 06:14:01 INFO common.Storage: Cannot lock storage /tmp/hadoop-root/dfs/name. The directory is already locked.
12/05/21 06:14:01 ERROR namenode.NameNode: java.io.IOException: Cannot lock storage /tmp/hadoop-root/dfs/name. The directory is already locked.
        at org.apache.hadoop.hdfs.server.common.Storage$StorageDirectory.lock(Storage.java:510)
        at org.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:1087)
        at org.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:1110)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:856)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:948)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:965)

12/05/21 06:14:01 INFO namenode.NameNode: SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at nn01/127.0.0.1

 

./hadoop namenode -format 命令是格式化命名空间,一定是在未启动  hadoop 服务的时候才能执行。出现这个错误提示是因为 hadoop 的服务是子运行状态。

Cannot lock storage /tmp/hadoop-root/dfs/name. The directory is already locked.,布布扣,bubuko.com

Cannot lock storage /tmp/hadoop-root/dfs/name. The directory is already locked.

标签:hadoop   namenode   

原文地址:http://blog.csdn.net/u014078192/article/details/37598229

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!