I upgrade to the latest version of cloudera.Now I am trying to create directory in HDFS
hadoop fs -mkdir data
Am getting the following error
Cannot Create /user/cloudera/data Name Node is in SafeMode.
How can I do this?
I upgrade to the latest version of cloudera.Now I am trying to create directory in HDFS
hadoop fs -mkdir data
Am getting the following error
Cannot Create /user/cloudera/data Name Node is in SafeMode.
How can I do this?
When you start hadoop
, for some time limit hadoop
stays in safemode
. You can either wait (you can see the time limit being decreased on Namenode
web UI) until the time limit or You can turn it off with
hadoop dfsadmin -safemode leave
The above command turns off the safemode of hadoop
In addition to Ramesh Maharjan answer, By default, cloudera machine(Cloudera Quick Start#5.12) doesn't allow to SET OFF safe mode, it's required to specify the -u options as shown below:
sudo -u hdfs hdfs dfsadmin -safemode leave
For me, I was immediately using hive
command to go into hive shell after starting hadoop using start-all.sh
. I re-tried using hive
command after waiting for 10-20 seconds.
Might need the full path to hdfs command
/usr/local/hadoop/bin/hdfs dfsadmin -safemode leave
© 2022 - 2024 — McMap. All rights reserved.