Closed tungel closed 8 years ago
IMO, Name or service not known
is enough meaningful, ... but pull-requests are welcome to fix it, like Failed to connect host ($hostname): Name or service not known
or something.
Thanks for the response. In my case, since we have quite a number of datanodes, having the error message pointing out directly which datanode is the problem is very useful.
My hadoop setup consists of a few datanodes. And the hosts file
/etc/hosts
supposed to be something like:Let's say for some reason, some entries in the host file don't exist.
When I try to read a file from HDFS with the below code snippet:
I understand that Hadoop will perform a redirection to the actual datanode upon received the above request. As a result I receive a not so useful error message like:
where the actual problem maybe that the
name3
host is not defined in my hosts file. Is there a way to construct a more meaningful error message when this exception is raised?I see that there is no exception handling in the call
conn.request
andconn.send_request
inrequest
method inclient_v1.rb
. I can submit a pull request later if needed.Thanks.