- Hadoop Real-World Solutions Cookbook(Second Edition)
- Tanmay Deshpande
- 234字
- 2021-07-09 20:02:48
Entering and exiting from the safe mode in a Hadoop cluster
Sometimes, due to an unclear filesystem image state, the Hadoop cluster goes into safemode
. In this recipe, we will see how to enter and exit from safemode
.
How to do it...
Safemode
is an HDFS state that does not allow any new writes to the filesystem. It also does not replicate or delete any blocks from the filesystem. In case you want to make any configuration changes to your cluster, you can put the system into safemode
. Here is a command to enter the system into safemode
:
hdfs dfsadmin -safemode enter
Now, if you try to make any writes to HDFS, it will not allow you do so. You can perform cluster maintenance and once this is done, you can switch off safemode
:
hdfs dfsadmin -safemode leave
In case you are not aware of whether safemode
is ON
or OFF
, you can get its status by executing the following command:
hdfs dfsadmin -safemode get
How it works...
Generally, safemode
is enabled automatically for NameNode
on startup. It then tries to get the state of the filesystem from FSImage
and EditLogs
. Namenode
waits until datanodes
start reporting the block status of inpidual nodes. safemode
is automatically disabled when datanodes
report the availability of most of the blocks.
If we enter into safemode
manually, we need to disable it manually. It won't be disabled automatically.
- 工業(yè)機(jī)器人產(chǎn)品應(yīng)用實(shí)戰(zhàn)
- AWS:Security Best Practices on AWS
- 快學(xué)Flash動(dòng)畫百例
- 最后一個(gè)人類
- 高維聚類知識(shí)發(fā)現(xiàn)關(guān)鍵技術(shù)研究及應(yīng)用
- MCGS嵌入版組態(tài)軟件應(yīng)用教程
- Cloud Security Automation
- Unity Multiplayer Games
- 大數(shù)據(jù)導(dǎo)論
- 實(shí)戰(zhàn)突擊
- 單片機(jī)硬件接口電路及實(shí)例解析
- 傳感器原理及應(yīng)用(第二版)
- 巧學(xué)活用電腦維護(hù)108問(wèn)
- Keras 2.x Projects
- Getting Started with Flurry Analytics