gpt4 book ai didi

hadoop - 无法删除目录/app/hadoop/tmp/dfs/name/current

转载 作者:行者123 更新时间:2023-12-02 21:47:04 25 4
gpt4 key购买 nike

我尝试在Ubuntu中设置单节点hadoop设置,当我运行hadoop namenode -format时出现错误“无法删除目录/ app / hadoop / tmp / dfs / name / current”。我以root用户身份删除了当前目录,然后尝试执行命令,然后出现以下不同错误:

hduser@ubuntu:/usr/local/hadoop/bin$ hadoop namenode -format
14/06/17 22:58:46 INFO namenode.NameNode: STARTUP_MSG:
/************************************************************
STARTUP_MSG: Starting NameNode
STARTUP_MSG: host = ubuntu/127.0.1.1
STARTUP_MSG: args = [-format]
STARTUP_MSG: version = 1.2.1
STARTUP_MSG: build = https://svn.apache.org/repos/asf/hadoop/common/branches/branch-1.2 -r 1503152; compiled by 'mattf' on Mon Jul 22 15:23:09 PDT 2013
STARTUP_MSG: java = 1.7.0_55
**************************************************
Re-format filesystem in /app/hadoop/tmp/dfs/name ? (Y or N) Y
14/06/17 22:58:49 INFO util.GSet: Computing capacity for map BlocksMap
14/06/17 22:58:49 INFO util.GSet: VM type = 64-bit
14/06/17 22:58:49 INFO util.GSet: 2.0% max memory = 1013645312
14/06/17 22:58:49 INFO util.GSet: capacity = 2^21 = 2097152 entries
14/06/17 22:58:49 INFO util.GSet: recommended=2097152, actual=2097152
14/06/17 22:58:51 INFO namenode.FSNamesystem: fsOwner=hduser
14/06/17 22:58:51 INFO namenode.FSNamesystem: supergroup=supergroup
14/06/17 22:58:51 INFO namenode.FSNamesystem: isPermissionEnabled=true
14/06/17 22:58:51 INFO namenode.FSNamesystem: dfs.block.invalidate.limit=100
14/06/17 22:58:51 INFO namenode.FSNamesystem: isAccessTokenEnabled=false accessKeyUpdateInterval=0 min(s), accessTokenLifetime=0 min(s)
14/06/17 22:58:51 INFO namenode.FSEditLog: dfs.namenode.edits.toleration.length = 0
14/06/17 22:58:51 INFO namenode.NameNode: Caching file names occuring more than 10 times
14/06/17 22:58:52 ERROR namenode.NameNode: java.io.IOException: Cannot create directory /app/hadoop/tmp/dfs/name/current
at org.apache.hadoop.hdfs.server.common.Storage$StorageDirectory.clearDirectory(Storage.java:294)
at org.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:1337)
at org.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:1356)
at org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:1261)
at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1467)
at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1488)

14/06/17 22:58:52 INFO namenode.NameNode: SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at ubuntu/127.0.1.1

然后,我尝试使用sudo命令,并尝试授予对hduser的访问权限,但这没有用。
hduser@ubuntu:/usr/local/hadoop/bin$ sudo hadoop namenode -format
[sudo] password for hduser:
sudo: hadoop: command not found

我尝试搜索解决方案,并在conf / hdfs-site.xml中进行了更改,但是没有用。
如何解决这个问题?

最佳答案

尝试以hduser用户身份从shell手动创建目录:
hduser @ ubuntu:mkdir / app / hadoop / tmp / dfs / name / current
并发布错误。如果显示“权限被拒绝”,请发布目录名称,dfs和tmp的权限。

关于hadoop - 无法删除目录/app/hadoop/tmp/dfs/name/current,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24278312/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com