Question-51: Why DNS aliases preferred instead of specific host name?

Answer: If you are having a very large cluster then using DNS for a specific host is a good idea. Because whenever you change the underlying physical or virtual hosts then you don’t need to change the various configuration files. Suppose there are many applications which writes data to HDFS file system then they need to know the Name Node host detail. Then in each application use the DNS name instead of the specific host name, so that if you change the HDFS NameNode in future, you don’t have to change your application in the future.

Question-52: Can you please explain when to use public host name or custom host name of the agents installed on each node in the cluster?

Answer: First of all, if you want to register the Ambari Agent with the Ambari server then you have to either use the custom host name or public host name so that agent can be referred with it. Suppose our hostname is host1.hadoopexam.local and we want it to refer as c1r1.hadoopexam.local (because it is part of cluster one and in the rack-1) then we have to use custom host name. And that would be also shown as c1r1.hadoopexam.local in the Ambari Web UI.

However, if you have host “host1.hadoopexam.local” and you want to use DNS canonical name CNAME as nn1.hadoopexam.local (its first name node) and even you change the underlying physical host then also this should not get changed. In this case we should use public host name.

Question-53: If I have already installed the Hadoop components on the one of the node in the cluster. Is it ok, if I change the custom host name now?

Answer: No, you should not do that. We should not customize the hostname once the Ambari agent, if Hadoop components already installed on that host. Because if we customize the host name then it will result in a new agent would be registered with the custom name, and does not update the existing agent hostname.

Question-54: Suppose you have both NameNode and Resource Manager of Hadoop installed on the same physical host. Then it is possible that we use different public host name for both the components?

Answer: No it is not possible as of now. As public host name is available on the host level and not on the component level. As given in the question, NameNode and Resource Manager both are installed on the same node both would use the same public host name.

Question-55: We are keep referring the word components, what does that mean?

Answer: As we have seen in the previous question NameNode, Resource manager all are known as components of the Hadoop cluster.