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 127.0.1.1 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 127.0.1.1) is bound to your loopback interface. Usually 127.0.1.1 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.)