hadoop在遇到unknownhostexception时,按如下解决方案:

1. $hostname

sample_host


2. go to /etc/hosts

add sample_host behind 127.0.0.1


没问题了。