器量大者,福泽必厚
全部博文(587)
分类: HADOOP
2013-02-14 16:49:21
1:[root@ungeo8 bin]# hadoop dfs -rmr helloabc
DEPRECATED: Use of this script to execute hdfs command is deprecated.
Instead use the hdfs command for it.
12/10/03 18:19:47 INFO security.Groups: Group mapping impl=org.apache.hadoop.security.ShellBasedUnixGroupsMapping; cacheTimeout=300000
12/10/03 18:19:52 WARN conf.Configuration: mapred.task.id is deprecated. Instead, use mapreduce.task.attempt.id
rmr: Cannot delete /user/root/helloabc. Name node is in safe mode.
解决方法:
[root@ungeo8 hadoop]# bin/hadoop dfsadmin -safemode leave
DEPRECATED: Use of this script to execute hdfs command is deprecated.
Instead use the hdfs command for it.
12/10/03 18:25:39 INFO security.Groups: Group mapping impl=org.apache.hadoop.security.ShellBasedUnixGroupsMapping; cacheTimeout=300000
12/10/03 18:25:39 WARN conf.Configuration: mapred.task.id is deprecated. Instead, use mapreduce.task.attempt.id
Safe mode is OFF
[root@ungeo8 hadoop]# bin/hadoop dfs -rmr helloabc
DEPRECATED: Use of this script to execute hdfs command is deprecated.
Instead use the hdfs command for it.
12/10/03 18:26:49 INFO security.Groups: Group mapping impl=org.apache.hadoop.security.ShellBasedUnixGroupsMapping; cacheTimeout=300000
12/10/03 18:26:50 WARN conf.Configuration: mapred.task.id is deprecated. Instead, use mapreduce.task.attempt.id
Deleted hdfs://0.0.0.0:9000/user/root/helloabc
[root@ungeo8 hadoop]#
bin/hadoop dfsadmin -safemode leave ##绝对可以使用,已经测试过了!
或
bin/hadoop fsck / ##这个命令有人说可以,但我运行该命令后,还是不能删除目录,暂时记录下了!
附件是hadoop安全模式的解释,摘于hadoop权威指南