Hadoop namenode无法摆脱安全模式

mei*_*ang 5 hadoop

所有.

我用hadoop2.6.0.

当我强制hadoop离开安全模式时,使用hdfs dfsadmin -safemode leave,它显示Safe mode is OFF,但我仍然无法删除目录中的文件,结果显示: rm: Cannot delete /mei/app-20151013055617-0001-614d554c-cc04-4800-9be8-7d9b3fd3fcef. Name node is in safe mode. 我尝试使用在Internet上列出的方式来解决这个问题,它没有'工作......

我使用命令'hdfs dfsadmin -report',它显示:

    Safe mode is ON
    Configured Capacity: 52710469632 (49.09 GB)
    Present Capacity: 213811200 (203.91 MB)
    DFS Remaining: 0 (0 B)
    DFS Used: 213811200 (203.91 MB)
    DFS Used%: 100.00%
    Under replicated blocks: 39
    Blocks with corrupt replicas: 0
    Missing blocks: 0

    -------------------------------------------------
    Live datanodes (1):

    Name: 127.0.0.1:50010 (bdrhel6)
    Hostname: bdrhel6
    Decommission Status : Normal
    Configured Capacity: 52710469632 (49.09 GB)
    DFS Used: 213811200 (203.91 MB)
    Non DFS Used: 52496658432 (48.89 GB)
    DFS Remaining: 0 (0 B)
    DFS Used%: 0.41%
    DFS Remaining%: 0.00%
    Configured Cache Capacity: 0 (0 B)
    Cache Used: 0 (0 B)
    Cache Remaining: 0 (0 B)
    Cache Used%: 100.00%
    Cache Remaining%: 0.00%
    Xceivers: 1
    Last contact: Wed Oct 14 03:30:33 EDT 2015
Run Code Online (Sandbox Code Playgroud)

有没有人有同样的问题?

请帮忙.

Vin*_*kal 5

Safemode是一个HDFS以只读方式挂载文件系统的状态; 不执行复制,也不能创建或删除文件.这将自动作为NameNode启动输入,以允许所有DataNodes时间使用NameNode签入并在NameNode确定哪些块未被复制之前宣布它们保留哪些块.NameNode等待直到特定百分比的块存在并计入-对于; 这是由配置控制的dfs.safemode.threshold.pct parameter.threshold满足此条件后,safemode将自动退出,HDFS允许正常操作.

1. Below command forces the NameNode to exit safemode

   hdfs dfsadmin -safemode leave

2. Run hdfs fsck -move or hdfs fsck -delete to move or delete corrupted files.
Run Code Online (Sandbox Code Playgroud)

根据报告,似乎资源在NN上很低.添加或释放更多资源,然后safe mode手动关闭.If you turn off safe mode before adding more resources or freeing up resource, the NameNode will immediately return to safe mode.

参考:

  1. Hadoop教程-YDN

  2. fsck的


Tho*_*aux 5

跑步:

hdfs dfsadmin -safemode forceExit

为我成功了。