Changing hostname in property puts Hadoop in safemode

0 votes

I have a CDH pseudo-distributed mode Hadoop cluster. It was working fine. Then as I was studying about the configuration files, I came across property present in core-site.xml file. Earlier my host was localhost, but I replaced it with hadoop.

After restarting the Hadoop daemons, Hadoop show that it is in safemode.

I got the following output:

$ hadoop dfsadmin -report
Safe mode is ON
Configured Capacity: 0 (0 B)
Present Capacity: 0 (0 B)
DFS Remaining: 0 (0 B)
DFS Used: 0 (0 B)
DFS Used%: NaN%
Under replicated blocks: 0
Blocks with corrupt replicas: 0
Missing blocks: 0

I am not able to execute -cat or -put command. It is showing that NameNode is in safe mode. Can anyone help in understanding how I can keep the hostname as Hadoop so that external systems can connect to it & my NameNode does not enter safe mode.

Apr 27, 2018 in Big Data Hadoop by coldcode
• 2,050 points

1 answer to this question.

0 votes

First of all, in Safe mode the HDFS filesystem is in read-only mode. So, all the read only applications can be executed but operations like write, create, delete cannot be performed.

Next, your hostname issue is because you machine cannot resolve your domain name. To do so, you need to append this in your file /etc/hosts: (your own ip address) localhost
answered Apr 27, 2018 by Shubham
• 13,450 points

Related Questions In Big Data Hadoop

0 votes
1 answer
0 votes
1 answer

“no such file or directory" in case of hadoop fs -ls

The behaviour that you are seeing is ...READ MORE

answered May 9, 2018 in Big Data Hadoop by nitinrawat895
• 10,950 points

edited May 9, 2018 by nitinrawat895 4,486 views
0 votes
1 answer

Can I have a list of property files used in Hadoop Framework?

Here is a complete list of configuration ...READ MORE

answered Aug 14, 2018 in Big Data Hadoop by Frankie
• 9,810 points
+1 vote
1 answer

What is the technique to know the Default scheduler in hadoop?

Default scheduler in hadoop is JobQueueTaskScheduler, which is ...READ MORE

answered Oct 30, 2018 in Big Data Hadoop by Frankie
• 9,810 points
+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
• 10,950 points
+1 vote
11 answers

hadoop fs -put command?

put syntax: put <localSrc> <dest> copy syntax: copyF ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Aditya
–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,320 points
0 votes
1 answer
0 votes
2 answers

Meaning of fs.defaultFS property in core-site.xml in hadoop

It allows to run dfs commands more ...READ MORE

answered Jan 22 in Big Data Hadoop by MD
• 56,480 points
+1 vote
2 answers

How to authenticate username & password while using Connector for Cloudera Hadoop in Tableau?

Hadoop server installed was kerberos enabled server. ...READ MORE

answered Aug 21, 2018 in Big Data Hadoop by Priyaj
• 57,640 points