Why does the hbase cluster return the client domain name instead of directly returning IP?

A hbase cluster with three nodes is now configured.
configuration in the hosts file:

10.3.0.173      node1
10.3.0.172      node2
10.3.0.174      node3

at the beginning, the java client queried the data and reported an error:
Caused by: java.net.UnknownHostException: can not resolve node1,60020,1543906659360 ,
because the client machine (local win10) does not have a hosts file configured .
add the above hosts mapping to the client machine, and then you can access the data normally and query the data.

question:
this is a bit troublesome, and the corresponding hosts mapping should be configured on the machine where the client is located.
from the error message, you can see the general process:

1. (java), ip: 10.3.0.173  node1 -->
2. java node1 -->
3. ,  node1 
   hosts, , .

my confusion is: why does the cluster return the domain name to the client instead of returning IP, directly so that the client does not need to configure hosts mapping, but can access it according to IP?


good question. Why don't you use ip instead of domain name to visit the web page?


this is because your local area network does not have a DNS infrastructure deployed. Hadoop is designed for large cluster environments.

you will find that large clusters are basically accessed by domain names, and domain names are encouraged and recommended. It is considered that the large cluster environment should have the infrastructure of DNS, and should not be directly connected to ip.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1c2c866-33b04.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1c2c866-33b04.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?