How to exit name node from safe mode

0 votes
root# bin/hadoop fs -mkdir t
mkdir: org.apache.hadoop.hdfs.server.namenode.SafeModeException: Cannot create directory /user/root/t. Name node is in safe mode.

not able to create anything in hdfs

I did

root# bin/hadoop fs -safemode leave

But showing

safemode: Unknown command
Sep 26, 2018 in Big Data Hadoop by digger
• 26,700 points
724 views

1 answer to this question.

0 votes

In order to forcefully let the namenode leave safemode, following command should be executed:

 bin/hadoop dfsadmin -safemode leave

You are getting Unknown command error for your command as -safemode isn't a sub-command for hadoop fs, but it is of hadoop dfsadmin.

Use hdfs command instead of hadoop command for newer distributions. The hadoop command is being deprecated:

hdfs dfsadmin -safemode leave
answered Sep 26, 2018 by slayer
• 29,300 points

Related Questions In Big Data Hadoop

0 votes
2 answers

How to exit NameNode safe mode?

hadoop dfsadmin -safemode leave READ MORE

answered Apr 11, 2019 in Big Data Hadoop by anonymous
2,118 views
0 votes
1 answer

Name node is in safe mode. Not able to leave

In order to forcefully let the namenode ...READ MORE

answered Dec 7, 2020 in Big Data Hadoop by Gitika
• 65,870 points
93 views
0 votes
1 answer

How to delete a directory from Hadoop cluster which is having comma(,) in its name?

Just try the following command: hadoop fs -rm ...READ MORE

answered May 7, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
938 views
0 votes
1 answer

"Write successful" message from Data node to Name Node

What happens is namenode on the basis ...READ MORE

answered Jun 20, 2019 in Big Data Hadoop by Quill
122 views
+1 vote
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
6,861 views
+2 votes
11 answers

hadoop fs -put command?

Hi, You can create one directory in HDFS ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
48,479 views
–1 vote
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,390 points
2,602 views
0 votes
1 answer
0 votes
2 answers

How to convert .txt file to Hadoop's sequence file format

import java.io.IOException; import java.net.URI; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.IOUtils; import ...READ MORE

answered Oct 12, 2018 in Big Data Hadoop by Sanjay
1,854 views
0 votes
1 answer

Hadoop Java Error: java.lang.NoClassDefFoundError: WordCount (wrong name: org/myorg/WordCount)

Hey, try this code import java.io.IOException; import java.util.Iterator; import java.util.StringTokenizer; import ...READ MORE

answered Sep 19, 2018 in Big Data Hadoop by slayer
• 29,300 points
3,142 views