- 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.
- Canvas LMS Course Design
- 樂高創意機器人教程(中級 下冊 10~16歲) (青少年iCAN+創新創意實踐指導叢書)
- 大數據驅動的設備健康預測及維護決策優化
- The Python Workshop
- AI的25種可能
- 三菱FX/Q系列PLC工程實例詳解
- ZigBee無線通信技術應用開發
- 與人共融機器人的關節力矩測量技術
- 大型機系統應用基礎
- Getting Started with Tableau 2018.x
- Getting Started with Tableau 2019.2
- 基于Quartus Ⅱ的數字系統Verilog HDL設計實例詳解
- 巧學活用Photoshop
- Flash CS3動畫制作融會貫通
- 數據庫技術:Access 2003計算機網絡技術