Resolve Hadoop Name node is in safe mode

event 2018-05-13 visibility 1,804 comment 0 insights
more_vert
insights Stats
Raymond Raymond Hadoop, Hive & HBase

Articles about Apache Hadoop, Hive and HBase installation, performance tuning and general tutorials.

*The yellow elephant logo is a registered trademark of Apache Hadoop.

In Safe Mode, the HDFS cluster is read-only. After completion of block replication maintenance activity, the name node leaves safe mode automatically.

If you try to delete files in safe mode, the following exception may raise:

org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.hdfs.server.namenode.SafeModeException): Cannot delete /user/hadoop/sqoop_test/blogs. Name node is in safe mode.

The above exception occurred because I was using Sqoop to load files into HDFS while deleting existing files.

We can also manually leave safe mode by using the following command:

hadoop@hdp-master:/hadoop> hdfs dfsadmin -safemode leave
Safe mode is OFF

More from Kontext
comment Comments
No comments yet.

Please log in or register to comment.

account_circle Log in person_add Register

Log in with external accounts