I am trying to configure Hadoop and have problems configuring it. One doubt I have about network config and it's related to host info.

In /etc/hosts second line is like slave1-machine and I know it is related to machine name. But the thing I do not know, is that what is the purpose for this line and if I remove it from the file, what will happen?


When you remove the line you can't resolve the Hostname slave1-machine to a IP Address anymore. Linux looks into the /etc/hosts before triyng to resolve a hostname via a DNS Query. So if you remove the Line. Linux try to resolve the Hostname slave1-machine via DNS and get a negative response.


The range 127/8 (which includes is bound to your loopback interface. Usually is the IP that resolves your computer hostname.

If you remove that line slave1-machine won't be able to resolve. (Its not a big problem. Some times it will throw an error saying hostname can't be resolved.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.