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?